client

add_callback

client.add_callback(event: string, callback: function)

reload_script

client.reload_script()

Reloads current script

unload_script

client.unload_script()

Unloads current script

Events

render

Fired every frame. Most of render functions can be called only here.

createmove

Fired once per tick. You can modify movement here. UserCmd is passed as argument in callback. This callback is called before cheat functions. It is guranteed that globals.is_in_game is true, globals.is_connected is true and entity.get_local_player() is not nil and valid.

struct UserCmd

Field
Type
Description

command_number

number

Serial number of move command. Read-only.

tickcount

number

Simulation tick.

move

vector

Move direction, each value is clamped [-450, 450]

viewangles

qangle

View angle.

buttons

number

Current buttons, use bit library to access buttons state.

random_seed

number

Random seed.

hasbeenpredicted

bool

If this command has been predicted.

allow_defensive

bool

Allow defensive exploit. Default is true.

override_defensive

bool

Trigger defensive exploit. Double tap need to be fully charged for this. Leave nil if you don't want to override.

set_move

function

Arguments: move yaw (absolute), velocity (optional, by default uses current cmd velocity)

antiaim

Fired after createmove callback. You can modify antiaim here. It is guranteed that entity.get_local_player() is not nil and it is known if defensive exploit is active. Context is passed into callback.

AntiAimContext

Function
Description

pitch(pitch: number)

Overrides pitch angle.

yaw(yaw: number)

Overrides base yaw angle.

yaw_offset(yaw_offset: number)

Overrides yaw offset around base yaw.

fakelag(ticks: number)

Overrides fakelag ticks. This value may be clamped if tickbase exploit is active.

desync(enabled: bool)

Enables or disables desync for this tick.

desync_angle(limit: number)

Overrides desync angle.

desync_side(side: number)

Overrides desync side, -1 or 1.

level_init

Fired after client has fully connected to the server (SIGNONSTATE_FULL).

aim_shot

Fired when aimbot shoots. AimShot is passed in the callback. Note: some fields will be filled after shot is acked.

aim_ack

Fired when aimbot shot is acked (recieved all data from the server). AimShot is passed in the callback.

struct AimShot

Field
Type
Description

client_shoot_pos

vector

Predicted shoot position.

target_pos

vector

Aim position.

client_angle

qangle

Aim angle.

command_number

number

Command number when fired.

wanted_damage

number

Calculated damage.

wanted_damagegroup

number

Damagegroup aimbot was targeting.

hitchance

number

Chance of hit based on weapon inaccuracy

backtrack

number

Amount of ticks the player was backtracked.

record

Lag record aimbot has fired at.

Fields below are avaliable only in aim_ack callback.

shoot_pos

vector

Actual shoot position.

end_pos

vector

Position where bullet stopped.

angle

qangle

Angle between shoot_pos and end_pos.

impacts

vector[]

Array of server bullet impacts.

damage

number

Actual damage. 0 if missed.

damagegroup

number

Actual damage group. -1 if missed.

hit_point

vector

Nearest point to target point. Usually point where bullet hit player.

acked

boolean

If shot was acked. Always true in aim_ack callback.

miss_reason

string

Reason why shot was missed or hit wrong damage group. Avaliable miss reasons: death, player death, correction, spread, occlusion, prediction error, lagcomp failure, unknown, unregistered shot, damage rejection.

frame_stage

Fired on every frame stage.

Frame stages

game_events

Fired on game events. List of all game events you can find here. table with event data is passed in callback.

field
type
desc

get_name

function: string

Get event name

__index

any

Access any game event filed. Example: event.userid

voice_message

Fired when voice message is recieved. VoiceMessage is passed in callback.

struct VoiceMessage

Field
Type
Description

client

Entity that sent this packet.

audible_mask

number

Aduible mask.

xuid

number

64 bit xuid.

xuid_low

number

First 32 bits of xuid.

xuid_high

number

Last 32 bits of xuid.

format

number

Format

sequence_bytes

number

Sequence bytes

section_number

number

Section number

uncompressed_sample_offset

number

Uncompressed sample offset

get_voice_data

function: string

Voice data buffer, can be zero length.

is_arctictech

function: boolean

Is packet has been sent by arctictech.

pre_anim_update

Fired before local player animation update, you can modify animstate here. Local player is passed in argument. It is guranteed that local player entity and local player animstate are not nil here.

Example

post_anim_update

Fired after local player animation update and before bone setup, you can modifiy poseparameters and animlayers here. Local player is passed in argument. It is guranteed that local player entity is not nil here.

Example

You can find animlayer and pose param enumerations here.

draw_chams

Fired when drawing chams, you can render custom chams (even layered) here. Return nil to allow cheat render chams, return 1 to block game from rendering original model, return 0 to render original model.

console_input

Fired when user inputs command in console. Command as string is passed in callback.

unload

Fired before script unload. Save data, unhook functions here.

Last updated