world
World and entity related functions
world.timer
world.timer(): number
Returns the multiplier of speed the game is running at.
world.set_timer
world.set_timer(timer_speed)
Argument
Type
Description
timer_speed
Number
Timer speed
Sets the multiplier to make the speed faster or slower, 0.5 makes the game run at half-speed
world.refresh_chunks
world.refresh_chunks()
Refreshes the loaded chunks, just like F3+A does
world.entities
world.entities(): table
Returns a table with all the loaded entities IDs
world.block
world.block(x, y, z): string
Argument
Type
Description
x
Number
x position
y
Number
y position
z
Number
z position
Returns the name of the block in the specified cords
world.name
world.name(entity_id): string
Argument
Type
Description
entity_id
Number
ID of the entity
Returns the name of the specified entity
world.display_name
world.display_name(entity_id): string
Argument
Type
Description
entity_id
Number
ID of the entity
Returns the display name of the specified entity, example: [MVP++] Player
world.held_item
world.held_item(entity_id): string
Argument
Type
Description
entity_id
Number
ID of the entity
Returns the name of the item the player is holding
world.hurt_time
world.hurt_time(entity_id): number
Argument
Type
Description
entity_id
Number
ID of the entity
Returns how much ticks of hurt time the player has left
world.health
world.health(entity_id): number
Argument
Type
Description
entity_id
Number
ID of the entity
Returns the player health, divide by two for getting heart amount
world.max_health
world.max_health(entity_id): number
Argument
Type
Description
entity_id
Number
ID of the entity
Returns the player max health, divide by two for getting heart amount
world.sprinting
world.sprinting(entity_id): boolean
Argument
Type
Description
entity_id
Number
ID of the entity
Returns if the player is sprinting
world.facing
world.facing(entity_id): number
Argument
Type
Description
entity_id
Number
ID of the entity
This function will return a direction on a number
1: Down 2: Up 3: North 4: South 5: West 6: East
world.angles
world.angles(entity_id): number, number
Argument
Type
Description
entity_id
Number
ID of the entity
Returns the player's yaw and pitch
world.bounding_box
world.bounding_box(entity_id): number, number, number, number, number, number
Argument
Type
Description
entity_id
Number
ID of the entity
Returns minX, minY, minZ, maxX, maxY, maxZ of the players BBOX
world.ticks_existed
world.ticks_existed(entity_id): number
Argument
Type
Description
entity_id
Number
ID of the entity
Returns the ticks the player has existed in the world
world.is_player
world.is_player(entity_id): boolean
Argument
Type
Description
entity_id
Number
ID of the entity
Returns if the entity is a player
world.width_height
world.width_height(entity_id): number, number
Argument
Type
Description
entity_id
Number
ID of the entity
Returns the entity width and height
world.is_sneaking
world.is_sneaking(entity_id): boolean
Argument
Type
Description
entity_id
Number
ID of the entity
Returns if the entity is sneaking
world.is_invisible
world.is_invisible(entity_id): boolean
Argument
Type
Description
entity_id
Number
ID of the entity
Returns if the entity is invisible
world.burning
world.burning(entity_id): boolean
Argument
Type
Description
entity_id
Number
ID of the entity
Returns if the entity is burning
world.is_bot
world.is_bot(entity_id): boolean
Argument
Type
Description
entity_id
Number
ID of the entity
Returns if the entity is detected as a bot by the client
world.is_friend
world.is_friend(entity_id): boolean
Argument
Type
Description
entity_id
Number
ID of the entity
Returns if the entity is a friend in the client
world.is_enemy
world.is_enemy(entity_id): boolean
Argument
Type
Description
entity_id
Number
ID of the entity
Returns if the entity is an enemy in the client
world.riding
world.riding(entity_id): boolean
Argument
Type
Description
entity_id
Number
ID of the entity
Returns if the entity is riding anything
world.position
world.position(entity_id): number, number, number
Argument
Type
Description
entity_id
Number
ID of the entity
Returns the player's x, y and z positions
world.prev_position
world.prev_position(entity_id): number, number, number
Argument
Type
Description
entity_id
Number
ID of the entity
Returns the previous player's x, y and z positions
world.is_potion_active
world.is_potion_active(entity_id, potion_id): boolean
Argument
Type
Description
entity_id
Number
ID of the entity
potion_id
Number
ID of the potion to check if active
Returns if the player has the specified potion id active
world.remove
world.remove(entity_id): boolean
Argument
Type
Description
entity_id
Number
ID of the entity
Removes the entity from the world, will return true if successfully removed
world.biome
world.biome(): string
Returns the current biome name
world.inventory
world.inventory(): table
Returns the player's inventory in a table, table.helmet, table.chestplate, table.leggings, table.boots, table.hand
Last updated
Was this helpful?