Skip to content

Scoped Api

A scoped api is available to all scripts with the api variable.

commands: Readonly<ScopedCommandsApi>

Functions for adding commands to the command palette


Components: SvelteComponents

Useful svelte components which can be used by scripts


headers: Readonly<ScriptHeaders>

The headers containing this script’s metadata


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 Parameter
T extends string | number
Parameter Type
name T

Libraries[T]


libs: Readonly<ScopedLibsApi>

Methods for getting info on libraries


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: (callback) => void

Run a callback when this script is disabled

Parameter Type
callback () => void

void


openSettingsMenu: (callback) => void

Run a callback when this plugin’s settings menu button is clicked

This function is not available for libraries

Parameter Type
callback () => void

void


patcher: Readonly<ScopedPatcherApi>

Functions for intercepting the arguments and return values of functions


plugin: <T>(name) => Plugins[T] = Api.plugins.get

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

Type Parameter
T extends string | number
Parameter Type
name T

Plugins[T]


plugins: Readonly<ScopedPluginsApi>

Methods for getting info on plugins


rewriter: Readonly<ScopedRewriterApi>

Functions to edit Gimkit’s code


settings: [Pluginsettings](/api/settings)

A utility for creating persistent settings menus, only available to plugins


storage: Readonly<ScopedStorageApi>

Functions for persisting data between reloads


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

get classicStores(): ClassicStores

A variety of gimkit internal objects available in 1d gamemodes

ClassicStores


get platformerPhysics(): any

Physics variables available in platformer gamemodes

any


get React(): typeof React

Gimkit’s internal react instance

typeof React


get ReactDOM(): __module

Gimkit’s internal reactDom instance

__module


get stores(): Stores

A variety of gimkit internal objects available in 2d gamemodes

Stores

requestReload(): any

Display a modal to the user indicating that this script requires a reload

any