Scripts & bytecode
Script discovery, execution environments, compilation and decompilation.
Use this group to discover scripts, inspect bytecode, and compile or decompile Luau.
- Discovery returns a snapshot; an object can become unavailable later.
decompilereconstructs source from bytecode: control flow is rebuilt from an SSA lift and emitted as a typed AST by our own Decompiler.- Comments, whitespace, and stripped local names are not recoverable from bytecode and are not synthesized (you should know this ^^).
Functions
| Function | Purpose |
|---|---|
| loadstring | Compiles Luau source into a callable function. |
| getscripts | Lists client-accessible script containers. |
| getloadedmodules | Lists ModuleScripts recorded as loaded. |
| getmodules | Lists every ModuleScript in the DataModel. |
| getrunningscripts | Lists scripts associated with running non-executor threads. |
| getactors | Lists Actor instances available through the collector. |
| getscriptbytecode | Reads decoded bytecode from a script container. |
| getscripthash | Hashes the stored bytecode blob of a script container with SHA-384. |
| getscriptclosure | Loads a script container's bytecode as a callable closure. |
| getsenv | Returns the environment associated with a script's thread. |
| getmenv | Returns the environment of a loaded ModuleScript. |
| getcallingscript | Returns the script associated with the calling context. |
| isparallel | Checks whether the current script phase is parallel. |
| require | Loads a module through Acedia's module handling or the engine require path. |
| getfunctionbytecode | Serializes a Lua function's prototype into bytecode. |
| getscriptfromthread | Finds the script associated with a thread or its formatted thread string. |
| gettenv | Returns a thread's global environment. |
| trampoline_call | Calls a function on a new carrier thread with selected context options. |
| decompile | Recovers Luau source from a script, Lua function or bytecode string. |
