Build scripts
Script types and files
Know which files run, stay loaded, or can be imported.
Scripts/
instant/<id>.lua Run once
modules/<id>/main.lua Persistent module entry
modules/<id>/other.lua Private imports for that module
lib/<id>.lua Shared importable library
logs/ Rotating per-script logs
sounds/ Optional WAV files<id> uses 1–64 letters, digits, _, or -. The Scripts tab lists up to 256 entries. Lua files are limited to 256 KiB. You can load up to 32 modules at once.
| Kind | What runs | How to start | Import behavior |
|---|---|---|---|
| Instant | Top-level code, then optional on_start | Run | require can load a library or a permitted local file during that run. |
| Module | Top-level code, on_start, then repeated callbacks | Load; Reload after saving | require("helpers") resolves within the module; require("sdk") resolves lib/sdk.lua. |
| Library | Imported code only | No direct Run/Load | Available to the script that imports it. |
Globals and imports in one module are unavailable to another module. A module can use saved values when strings must survive a reload.
The Scripts tab saves editor changes to disk. Run and Reload read the saved file. Switching away with unsaved edits requires saving or discarding them. Downloading an SDK update preserves edited libraries; reload a module to use an updated library.
The Script Store guide covers package manifests and installed paths.