player

Local player related functions

player.jump

player.jump()

Makes the local player jump

player.click_mouse

player.click_mouse()

Left clicks

player.right_click_mouse

player.right_click_mouse()

Right clicks

player.message

player.message(message)

Sends a message in chat, can also run client commands such as ".killaura" to toggle modules or set any option.

player.strafe

player.strafe(): number, number

Returns the forward and strafing speed the player is moving at

player.position

player.position(): number, number, number

Returns the player's x, y and z positions.

player.camera_position

player.camera_position(): number, number, number

Returns the camera's x, y and z positions.

player.prev_position

player.prev_position(): number, number, number

Returns the player's previous x, y and z positions.

player.motion

player.motion(): number, number, number

Returns the player's x, y and z motion amount.

player.set_motion

player.set_motion(motion_x, motion_y, motion_z)

Sets the local player motion

player.set_position

player.set_position(pos_x, pos_y, pos_z)

Sets the local player position

player.set_sprinting

player.set_sprinting(sprinting)

Sets local player's sprinting state

player.distance_to_entity

player.distance_to_entity(entity_id): number

Returns the distance in blocks between you and the entity.

player.distance_to

player.distance_to(pos_x, pos_y, pos_z): number

Returns the distance in blocks between you and the coordinates.

player.send_packet

player.send_packet(packet_id, [...])

Sends a packet to the server.

Packet IDs can be found here: https://wiki.vg/index.php?title=Protocol&oldid=7368#Serverbound_2

Packets supported: 0x0A, 0x07, 0x08, 0x0B, 0x03, 0x04, 0x05, 0x06, 0x07, 0x0F

player.angles

player.angles(): number, number

Returns yaw and pitch.

player.prev_angles

player.prev_angles(): number, number

Returns prev yaw and prev pitch.

player.set_angles

player.set_angles(yaw, pitch)

Sets the player in-game look angles

player.using_item

player.using_item(): boolean

Returns if the player is using an item or not.

player.swing_item

player.swing_item()

Swings the item

player.use_item

player.use_item()

Uses the item you're holding

player.id

player.id(): number

Returns your current player entity ID

player.health

player.health(): number

Returns your current player health, divide by two for getting heart amount

player.fall_distance

player.fall_distance(): number

Returns the amount of blocks you're falling

player.max_health

player.max_health(): number

Returns the max amount of health your player can have, divide by two for getting hearts

player.held_item

player.held_item(): string

Returns the name of the item you're holding

player.name

player.name(): string

Returns the player name

player.base_speed

player.base_speed(): number

Returns the base speed amount, used for speed calculations.

player.held_item_slot

player.held_item_slot(): number

Returns the slot number of the item you're holding. Counting from 1 to 9

player.set_held_item_slot

player.set_held_item_slot(slot)

Sets your hotbar slot to the desired one

player.hurt_time

player.hurt_time(): number

Returns how much ticks of hurt time left

player.food_stats

player.food_stats(): number

Returns the hunger you have, divide by two to get muslito amount

player.absorption

player.absorption(): number

Returns amount of yellow health that you have, divide by two to get heart amount

player.eye_height

player.eye_height(): number

Returns

player.facing

player.facing(): number

This function will return a direction on a number.

1: Down 2: Up 3: North 4: South 5: West 6: East

player.over_mouse

player.over_mouse(): number, [...]

This function will return different values depending on the first returned number.

If the first number is 1, this means your player is not aiming at anything. If the number is 3, this means its aiming at an entity, second number will return the index of that entity If the number is 2, this means its aiming at a block, will return side_hit, block_x, block_x, block_x, hit_x, hit_y, hit_z

player.convert_speed

player.convert_speed(on_player_move_table, speed): [fixed_table]

This function will return a table that sets the on_player_move table values to ones that will make the player strafe according to the speed assigned

player.kill_aura_target

player.kill_aura_target(): number

Returns the player id of KillAura's target

player.on_ground

player.on_ground(): boolean

Returns if the player is on the ground

player.is_in_water

player.is_in_water(): boolean

Returns if the player is in water

player.is_in_lava

player.is_in_lava(): boolean

Returns if the player is in lava

player.burning

player.burning(): boolean

Returns if the player is currently burning

player.is_sneaking

player.is_sneaking(): boolean

Returns if the player is currently sneaking

player.set_sneaking

player.set_sneaking(sneak)

player.is_in_cobweb

player.is_in_cobweb(): boolean

Returns if the player is currently in a cobweb

player.angles_for_cords

player.angles_for_cords(x, y, z): number, number

This function returns a yaw and pitch to look at the desired coordinates.

player.dead

player.dead(): boolean

Returns if the player is currently dead

player.sprinting

player.sprinting(): boolean

Returns if the player is currently sprinting

player.riding

player.riding(): boolean

Returns if the player is currently riding an entity

player.on_ladder

player.on_ladder(): boolean

Returns if the player is currently on a ladder

player.collided_vertically

player.collided_vertically(): boolean

Returns if the player is currently colliding with any block vertically

player.collided_horizontally

player.collided_horizontally(): boolean

Returns if the player is currently colliding with any block horizontally

player.is_potion_active

player.is_potion_active(potion_id): boolean

Returns if the desired potion is currently active

player.ticks_existed

player.ticks_existed(): number

Returns the amount of ticks the player has existed in the world

player.ray_cast

player.ray_cast(yaw, pitch, range): number, [...]

This function will return different values depending on the first returned number.

If the first number is 1, this means your player is not aiming at anything. If the number is 3, this means its aiming at an entity, second number will return the index of that entity If the number is 2, this means its aiming at a block, will return side_hit, block_x, block_x, block_x, hit_x, hit_y, hit_z

player.place_block

player.place_block(item_slot, block_x, block_y, block_z, side, hit_x, hit_y, hit_z): boolean

hit_x , hit_yand hit_zare values used to check where the actual placement took place, this are the values sent to the server in the 0x08 packet

local facing_x = hit_x - block_x
local facing_y = hit_y - block_y
local facing_y = hit_z - block_z

This means that the hit_* values you'll put in the function will be applied to the example shown before

Places a block

player.is_on_edge

player.is_on_edge(): boolean

Returns if the player is at the edge of a block

player.get_speed

player.get_speed(): number

Returns the players speed

player.set_speed

player.set_speed(speed): number

Sets the player's speed

Last updated