Skip to content

client

Game client utilities

Properties

NameDescription
game_speedtype: number Controls the game timer speed

Functions

player_name(): string

Returns the player name

  • returns (string)

fps(): number

Returns the client FPS

  • returns (number)

time_millis(): number

Returns the current time in milliseconds

  • returns (number)

window_width(): number

Returns the window width

  • returns (number)

window_height(): number

Returns the window height

  • returns (number)

scaled_window_width(): number

Returns the scaled window width

  • returns (number)

scaled_window_height(): number

Returns the scaled window height

  • returns (number)

gui_scale(): number

Returns the gui scale

  • returns (number)

connected_server(): string

Returns the currently connected server's ip address

  • returns (string)

play_sound(id : string, pitch : number, volume : number)

Plays a sound using Minecraft's sound identifiers

  • id (string) The sound id
  • pitch (number) The sound pitch
  • volume (number) The sound volume

is_key_down(key : enums.key_code): bool

Returns whether a keyboard key is down or not

is_mouse_button_down(button : number): bool

Returns whether a mouse button is down or not

  • button (number) The mouse button to check
  • returns (bool)