Static Class present on Client side.
🗿Static Class
This is a Static Class. Access it's methods directly with .. It's not possible to spawn new instances.
💂Authority
This static class can be accessed only on 🟧
Client side.
🧑💻API Source
This page is auto-generated! The Functions, Properties and Events described here are defined in our
GitHub's API Repository! Feel free to commit suggestions and changes to the source .json API files!
🗿 Static Functions

CopyToClipboard
Copies a text to Clipboard
Client.CopyToClipboard(text)
| Type | Parameter | Default | Description |
|---|
| string | text | Required parameter | No description provided |

Disconnect
Disconnects from the server

GetAllValuesKeys
Gets a list of all values keys
— Returns table of string (a list with all values keys).
local ret = Client.GetAllValuesKeys()
See also GetValue, SetValue.

GetConnectedServerIP
Gets the current connected server IP:Port
— Returns string.
local ret = Client.GetConnectedServerIP()

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

GetFrameTime
Gets the current Frame Time
— Returns float (the Frame Time).
local ret = Client.GetFrameTime()

GetLanguage
Gets the current language of the Client
— Returns string (the language code).
local ret = Client.GetLanguage()

GetLocalPlayer
Gets the local Player
— Returns Player (the local Player).
local ret = Client.GetLocalPlayer()

GetLogLevel
Returns the current log level
— Returns integer (the log level).
local ret = Client.GetLogLevel()

GetMap
Returns the current Map
— Returns string (the current Map).
local ret = Client.GetMap()

GetNearClipPlane
Gets the Near Clip Plane value
— Returns float.
local ret = Client.GetNearClipPlane()
See also SetNearClipPlane.

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

GetTime
Gets the Unix Epoch Time in milliseconds
— Returns integer (the unix timestamp).
local ret = Client.GetTime()

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

IsPackageLoaded
Returns if a Package is currently loaded
— Returns boolean (if the package is loaded).
local ret = Client.IsPackageLoaded(package_name)
| Type | Parameter | Default | Description |
|---|
| string | package_name | Required parameter | No description provided |
Opens the escape menu
Client.OpenEscapeMenu(open_settings?)
| Type | Parameter | Default | Description |
|---|
| boolean | open_settings? | false | If true, opens the Settings tab directly |

SetDebugEnabled
Enables/Disables Debug settings and Client Console to be used
Client.SetDebugEnabled(enable_debug)
| Type | Parameter | Default | Description |
|---|
| boolean | enable_debug | Required parameter | No description provided |
Sets the Escape Menu text
Client.SetEscapeMenuText(text)
| 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
]])

SetHighlightColor
Changes the Highlight Color for highlighted actors at a specific Index. Multiply it by 5 (or more) for having a glowing effect.
HighlightMode.Always will always be visible, even behind walls
HighlightMode.OnlyHidden will only be visible if behind a wall
HighlightMode.OnlyVisible will 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?)
| Type | Parameter | Default | Description |
|---|
| Color | highlight_color | Required parameter | No description provided |
| integer | index | Required parameter | No description provided |
| HighlightMode | mode? | HighlightMode.Always | No description provided |

SetNearClipPlane
Sets the Near Clip Plane
Client.SetNearClipPlane(near_clip_plane)
| Type | Parameter | Default | Description |
|---|
| float | near_clip_plane | Required parameter | No description provided |
See also GetNearClipPlane.

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 is 0 (when interacting with stuff).
Client.SetOutlineColor(outline_color, index?, thickness?)
| Type | Parameter | Default | Description |
|---|
| Color | outline_color | Required parameter | No description provided |
| integer | index? | 0 | No description provided |
| float | thickness? | 2 | No description provided |

SetSettingGammaOverride
Overrides the gamma setting and prevents the client from changing it
Client.SetSettingGammaOverride(override, new_gamma?)
| 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 |

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)
| Type | Parameter | Default | Description |
|---|
| string | key | Required parameter | Key |
| any | value | Required parameter | Value |
See also GetAllValuesKeys, GetValue, ValueChange.

ShowNotification
Shows a notification using the built-in notification system.
Client.ShowNotification(text, notification_type?, add_to_notification_list?, duration?)
| Type | Parameter | Default | Description |
|---|
| string | text | Required parameter | No description provided |
| NotificationType | notification_type? | NotificationType.Info | No description provided |
| 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 |

Subscribe
Subscribes for an Event
— Returns function (the function callback itself).
local ret = Client.Subscribe(event_name, callback)
| Type | Parameter | Default | Description |
|---|
| string | event_name | Required parameter | No description provided |
| function | callback | Required parameter | No description provided |

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?)
| Type | Parameter | Default | Description |
|---|
| string | event_name | Required parameter | No description provided |
| function | callback? | nil | No description provided |
🚀 Events
| Name | Description |
|---|
 | LanguageChange | Called when the Client language changes |
 | 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) |
 | WindowFocusChange | Called when the game is focused/unfocused |

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

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

Tick
Called Every Frame. Do not abuse
Client.Subscribe("Tick", function(delta_time)
end)
| Type | Argument | Description |
|---|
| float | delta_time | No description provided |

ValueChange
Triggered when a Value is changed with Client.SetValue() or Server.SetValue() (for synced values)
Client.Subscribe("ValueChange", function(key, value)
end)
| Type | Argument | Description |
|---|
| string | key | The key that changed |
| any | value | The new value |
See also SetValue, Server.SetValue().

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