⌨️ Client
Static Class present on Client side.
🗿 Static Functions
| Returns | Name | Description | |
|---|---|---|---|
CopyToClipboard | Copies a text to Clipboard | ||
Disconnect | Disconnects from the server | ||
| table of Base Actor | GetActorsInRadius | Returns the actors within the specified radius | |
| table of string | GetAllValuesKeys | Gets a list of all values keys | |
| string | GetConnectedServerIP | Gets the current connected server IP:Port | |
| Base Entity or nil | GetEntityByID | Returns the entity with the specified ID | |
| float | GetFrameTime | Gets the current Frame Time | |
| string | GetLanguage | Gets the current language of the Client | |
| Player | GetLocalPlayer | Gets the local Player | |
| integer | GetLogLevel | Returns the current log level | |
| string | GetMap | Returns the current map package name | |
| float | GetNearClipPlane | Gets the Near Clip Plane value | |
| table of table | GetPackages | Returns a list of Packages running | |
| table | GetSettings | Gets the local player's game Settings | |
| integer | GetTime | Gets the Unix Epoch Time in milliseconds | |
| any | GetValue | Gets a value given a key | |
| boolean | IsPackageLoaded | Returns if a Package is currently loaded | |
| boolean | IsVOIPSelfMuted | Gets whether the local player has muted their own microphone | |
OpenEscapeMenu | Opens the escape menu | ||
SetDebugEnabled | Enables/Disables Debug settings and Client Console to be used | ||
SetEscapeMenuText | Sets the Escape Menu text | ||
SetHighlightColor | Changes the Highlight Color for highlighted actors at a specific Index | ||
SetNearClipPlane | Sets the Near Clip Plane | ||
SetOutlineColor | Changes the Outline Color for outlined actors at a specific Index | ||
SetSettingGammaOverride | Overrides the gamma setting and prevents the client from changing it | ||
SetValue | Sets a global value in the Client, which can be accessed from anywhere (client side) | ||
ShowNotification | Shows a notification using the built-in notification system. | ||
| function | Subscribe | Subscribes for an Event | |
Unsubscribe | Unsubscribes from all subscribed Events in this Class and in this Package, optionally passing the function to unsubscribe only that callback |
Optimal

CopyToClipboard
Copies a text to Clipboard
Client.CopyToClipboard(text)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | text | Required parameter | The text to copy |
Slow

Disconnect
Disconnects from the server
Client.Disconnect()
Moderate

GetActorsInRadius
Returns the actors within the specified radius
local ret = Client.GetActorsInRadius(location, radius, only_classes?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Vector | location | Required parameter | The center location of the search |
| number | radius | Required parameter | The search radius |
| table of string | only_classes? | [] | Only actors of these classes will be returned (pass empty for all classes) |
Returns
| Type | Description |
|---|---|
| table of Base Actor | The actors found in radius |
Moderate

GetAllValuesKeys
Gets a list of all values keys
local ret = Client.GetAllValuesKeys()
Optimal

GetConnectedServerIP
Gets the current connected server IP:Port
local ret = Client.GetConnectedServerIP()
Returns
| Type | Description |
|---|---|
| string | Current connected server IP:Port |
Moderate

GetEntityByID
Returns the entity with the specified ID
local ret = Client.GetEntityByID(entity_id)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| integer | entity_id | Required parameter | The entity ID |
Returns
| Type | Description |
|---|---|
| Base Entity or nil | the entity |
Optimal

GetFrameTime
Gets the current Frame Time
local ret = Client.GetFrameTime()
Returns
| Type | Description |
|---|---|
| float | the Frame Time |
Optimal

GetLanguage
Gets the current language of the Client
local ret = Client.GetLanguage()
Returns
| Type | Description |
|---|---|
| string | the language code |
Optimal

GetLocalPlayer
Gets the local Player
local ret = Client.GetLocalPlayer()
Returns
| Type | Description |
|---|---|
| Player | the local Player |
Optimal

GetLogLevel
Returns the current log level
local ret = Client.GetLogLevel()
Returns
| Type | Description |
|---|---|
| integer | the log level |
Optimal

GetMap
Returns the current map package name
local ret = Client.GetMap()
Returns
| Type | Description |
|---|---|
| string | the current Map |
Optimal

GetNearClipPlane
Gets the Near Clip Plane value
local ret = Client.GetNearClipPlane()
Returns
| Type | Description |
|---|---|
| float | Near Clip Plane value |
See also SetNearClipPlane.
Slow

GetPackages
Returns a list of Packages running
local ret = Client.GetPackages(package_type_filter?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| PackageType | package_type_filter? | PackageType.All | Which Package type to return. Leave it default to return all types. |
Slow

GetSettings
Gets the local player's game Settings
local ret = Client.GetSettings()
Returns
| Type | Description |
|---|---|
| table | the current Settings with this format |
Optimal

GetTime
Gets the Unix Epoch Time in milliseconds
local ret = Client.GetTime()
Returns
| Type | Description |
|---|---|
| integer | the unix timestamp |
Moderate

GetValue
Gets a value given a key
local ret = Client.GetValue(key, fallback)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | key | Required parameter | The key |
| any | fallback | Required parameter | Value returned if the key doesn't exist |
Returns
| Type | Description |
|---|---|
| any | Value at key or fallback if key doesn't exist |
See also GetAllValuesKeys, SetValue.
Moderate

IsPackageLoaded
Returns if a Package is currently loaded
local ret = Client.IsPackageLoaded(package_name)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | package_name | Required parameter | The package folder name |
Returns
| Type | Description |
|---|---|
| boolean | if the package is loaded |
Optimal

IsVOIPSelfMuted
Gets whether the local player has muted their own microphone. Only the player can change it, with the VOIP key when the Open Mic setting is on, or from the escape menu.
local ret = Client.IsVOIPSelfMuted()
Returns
| Type | Description |
|---|---|
| boolean | Whether the microphone is muted by the player |
Optimal

OpenEscapeMenu
Opens the escape menu
Client.OpenEscapeMenu(open_settings?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| boolean | open_settings? | false | If true, opens the Settings tab directly |
Moderate

SetDebugEnabled
Enables/Disables Debug settings and Client Console to be used
Client.SetDebugEnabled(enable_debug)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| boolean | enable_debug | Required parameter | Whether to enable Debug settings and Client Console to be used |
Moderate

SetEscapeMenuText
Sets the Escape Menu text
Client.SetEscapeMenuText(text)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | text | Required parameter | Supports using <h1>, <h2>, <h3> and <strong> tags in the text. |
Client.SetEscapeMenuText Examples
Adding customized texts
Client.SetEscapeMenuText([[
<h1>Header 1</>
<h2>Header 2</>
<h3>Header 3</>
<strong>Strong</>
Normal Text
]])
Optimal

SetHighlightColor
Changes the Highlight Color for highlighted actors at a specific Index. Multiply it by 5 (or more) for having a glowing effect.HighlightMode.Alwayswill always be visible, even behind wallsHighlightMode.OnlyHiddenwill only be visible if behind a wallHighlightMode.OnlyVisiblewill only be visible if not behind a wall
Note: You can only have 3 different indexes (0, 1 or 2).
Client.SetHighlightColor(highlight_color, index, mode?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Color | highlight_color | Required parameter | The color to use |
| integer | index | Required parameter | Highlight slot index (0 to 2) |
| HighlightMode | mode? | HighlightMode.Always | When the highlight is visible |
Optimal

SetNearClipPlane
Sets the Near Clip Plane
Client.SetNearClipPlane(near_clip_plane)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| float | near_clip_plane | Required parameter | The new Near Clip Plane |
See also GetNearClipPlane.
Optimal

SetOutlineColor
Changes the Outline Color for outlined actors at a specific Index. Multiply it by 5 (or more) for having a glowing effect.
Note: You can only have 3 different indexes (0, 1 or 2), and the default Outline color index used by the game is0(when interacting with stuff).
Client.SetOutlineColor(outline_color, index?, thickness?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Color | outline_color | Required parameter | The color to use |
| integer | index? | 0 | Outline slot index (0 to 2) |
| float | thickness? | 2 | Line thickness |
Optimal

SetSettingGammaOverride
Overrides the gamma setting and prevents the client from changing it
Client.SetSettingGammaOverride(override, new_gamma?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| boolean | override | Required parameter | Whether to override the gamma setting |
| float or nil | new_gamma? | 1.0 | The new gamma value if overriding |
Moderate

SetValue
Sets a global value in the Client, which can be accessed from anywhere (client side)
Please refer to Entity Values for more information
Client.SetValue(key, value)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | key | Required parameter | Key |
| any | value | Required parameter | Value |
See also GetAllValuesKeys, GetValue, ValueChange.
Moderate

ShowNotification
Shows a notification using the built-in notification system.
Client.ShowNotification(text, notification_type?, add_to_notification_list?, duration?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | text | Required parameter | The text of the notification |
| NotificationType | notification_type? | NotificationType.Info | The notification style |
| boolean | add_to_notification_list? | true | Whether to add this notification to the notification list (accessible from the bell icon on the top-right corner) |
| float | duration? | 10 | Duration in seconds to display the notification |
Optimal

Subscribe
Subscribes for an Event
local ret = Client.Subscribe(event_name, callback)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | event_name | Required parameter | The name of the event |
| function | callback | Required parameter | The function to be called |
Returns
| Type | Description |
|---|---|
| function | the function callback itself |
Optimal

Unsubscribe
Unsubscribes from all subscribed Events in this Class and in this Package, optionally passing the function to unsubscribe only that callback
Client.Unsubscribe(event_name, callback?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | event_name | Required parameter | The name of the event |
| function | callback? | nil | The function to be called |
🚀 Events
| Name | Description | |
|---|---|---|
LanguageChange | Called when the Client language changes | |
PackageLoad | Triggered when any package is loaded | |
PackageUnload | Triggered when any package is unloaded | |
SpawnLocalPlayer | Called when the local player spawns (just after the game has loaded) | |
Tick | Called Every Frame. Do not abuse | |
ValueChange | Triggered when a Value is changed with Client.SetValue() or Server.SetValue() (for synced values) | |
VOIPSelfMuteChange | Called when the local player mutes or unmutes their own microphone, either with the VOIP key (on Open Mic) or from the escape menu | |
WindowFocusChange | Called when the game is focused/unfocused |

LanguageChange
Called when the Client language changes
Client.Subscribe("LanguageChange", function(language)
-- LanguageChange was called
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| string | language | The new language code |

PackageLoad
Triggered when any package is loaded
Client.Subscribe("PackageLoad", function(package_name)
-- PackageLoad was called
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| string | package_name | The package name (its folder name) |
See also GetPackages, IsPackageLoaded.

PackageUnload
Triggered when any package is unloaded
Client.Subscribe("PackageUnload", function(package_name)
-- PackageUnload was called
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| string | package_name | The package name (its folder name) |
See also GetPackages, IsPackageLoaded.

SpawnLocalPlayer
Called when the local player spawns (just after the game has loaded)
Client.Subscribe("SpawnLocalPlayer", function(local_player)
-- SpawnLocalPlayer was called
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| Player | local_player | The local Player |

Tick
Called Every Frame. Do not abuse
Client.Subscribe("Tick", function(delta_time)
-- Tick was called
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| float | delta_time | Seconds since the last frame |

ValueChange
Triggered when a Value is changed withClient.SetValue()orServer.SetValue()(for synced values)
Client.Subscribe("ValueChange", function(key, value)
-- ValueChange was called
end)
See also SetValue, Server.SetValue().

VOIPSelfMuteChange
Called when the local player mutes or unmutes their own microphone, either with the VOIP key (on Open Mic) or from the escape menu
Client.Subscribe("VOIPSelfMuteChange", function(is_muted)
-- VOIPSelfMuteChange was called
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| boolean | is_muted | Whether the microphone is now muted |

WindowFocusChange
Called when the game is focused/unfocused
Client.Subscribe("WindowFocusChange", function(is_focused)
-- WindowFocusChange was called
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| boolean | is_focused | If it's focused |


