Scoped Api
A scoped api is available to all scripts with the api variable.
Properties
Section titled “Properties”commands
Section titled “commands”commands:
Readonly<ScopedCommandsApi>
Functions for adding commands to the command palette
Components
Section titled “Components”Components:
SvelteComponents
Useful svelte components which can be used by scripts
headers
Section titled “headers”headers:
Readonly<ScriptHeaders>
The headers containing this script’s metadata
hotkeys
Section titled “hotkeys”hotkeys:
Readonly<ScopedHotkeysApi>
Functions to listen for key combinations
lib: <
T>(name) =>Libraries[T] =Api.libs.get
Gets the exported values of a library
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends string | number |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
name |
T |
Returns
Section titled “Returns”Libraries[T]
libs:
Readonly<ScopedLibsApi>
Methods for getting info on libraries
logger
Section titled “logger”logger:
Readonly<LoggerApi>
Utilities for pretty logs with a tag showing they are from this script
net:
Readonly<ScopedNetApi>
Ways to interact with the current connection to the server, and functions to send general requests
onStop()
Section titled “onStop()”onStop: (
callback) =>void
Run a callback when this script is disabled
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
callback |
() => void |
Returns
Section titled “Returns”void
openSettingsMenu()
Section titled “openSettingsMenu()”openSettingsMenu: (
callback) =>void
Run a callback when this plugin’s settings menu button is clicked
This function is not available for libraries
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
callback |
() => void |
Returns
Section titled “Returns”void
patcher
Section titled “patcher”patcher:
Readonly<ScopedPatcherApi>
Functions for intercepting the arguments and return values of functions
plugin()
Section titled “plugin()”plugin: <
T>(name) =>Plugins[T] =Api.plugins.get
Gets the exported values of a plugin, if it has been enabled
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends string | number |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
name |
T |
Returns
Section titled “Returns”Plugins[T]
plugins
Section titled “plugins”plugins:
Readonly<ScopedPluginsApi>
Methods for getting info on plugins
rewriter
Section titled “rewriter”rewriter:
Readonly<ScopedRewriterApi>
Functions to edit Gimkit’s code
settings
Section titled “settings”settings:
[Pluginsettings](/api/settings)
A utility for creating persistent settings menus, only available to plugins
storage
Section titled “storage”storage:
Readonly<ScopedStorageApi>
Functions for persisting data between reloads
svelte_5_43_0
Section titled “svelte_5_43_0”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.
UI:
Readonly<ScopedUIApi>
Functions for interacting with the DOM
Accessors
Section titled “Accessors”classicStores
Section titled “classicStores”Get Signature
Section titled “Get Signature”get classicStores():
ClassicStores
A variety of gimkit internal objects available in 1d gamemodes
Returns
Section titled “Returns”ClassicStores
platformerPhysics
Section titled “platformerPhysics”Get Signature
Section titled “Get Signature”get platformerPhysics():
any
Physics variables available in platformer gamemodes
Returns
Section titled “Returns”any
Get Signature
Section titled “Get Signature”get React(): typeof
React
Gimkit’s internal react instance
Returns
Section titled “Returns”typeof React
ReactDOM
Section titled “ReactDOM”Get Signature
Section titled “Get Signature”get ReactDOM():
__module
Gimkit’s internal reactDom instance
Returns
Section titled “Returns”__module
stores
Section titled “stores”Get Signature
Section titled “Get Signature”get stores():
Stores
A variety of gimkit internal objects available in 2d gamemodes
Returns
Section titled “Returns”Stores
Methods
Section titled “Methods”requestReload()
Section titled “requestReload()”requestReload():
any
Display a modal to the user indicating that this script requires a reload
Returns
Section titled “Returns”any