Skip to content

Unscoped Api

The api is accessible via the global variable GL. Scripts are also encouraged to use the scoped API which automatically handles cleanup. The scoped api is available with the script-specific api variable.

static commands: Readonly<CommandsApi>

Functions for adding commands to the command palette


static hotkeys: Readonly<HotkeysApi>

Functions to listen for key combinations


static lib: <T>(name) => Libraries[T]

Gets the exported values of a library

Type Parameter
T extends string | number
ParameterType
nameT

Libraries[T]


static libs: Readonly<LibsApi>

Methods for getting info on libraries


static net: Readonly<NetApi>

Ways to interact with the current connection to the server, and functions to send general requests


static patcher: Readonly<PatcherApi>

Functions for intercepting the arguments and return values of functions


static plugin: <T>(name) => Plugins[T]

Gets the exported values of a plugin, if it has been enabled

Type Parameter
T extends string | number
ParameterType
nameT

Plugins[T]


static plugins: Readonly<PluginsApi>

Methods for getting info on plugins


static rewriter: Readonly<RewriterApi>

Functions to edit Gimkit’s code


static storage: Readonly<StorageApi>

Functions for persisting data between reloads


static svelte_5_43_0: Svelte

The exports of svelte v5.43.0, used internally by Gimloader and exposed to make scripts smaller. Should never be used by hand.


static UI: Readonly<UIApi>

Functions for interacting with the DOM

get static React(): typeof React

Gimkit’s internal react instance

typeof React


get static ReactDOM(): __module

Gimkit’s internal reactDom instance

__module


get static stores(): Stores

A variety of Gimkit internal objects available in 2d gamemodes

Stores