Script
Inspecting running scripts, their environments, threads, and bytecode.
Available Functions
| Function | Description |
|---|---|
| getscripts | Returns a table of every script in the game. |
| getrunningscripts | Returns a table of every script that's currently running. |
| getloadedmodules | Returns a table of every ModuleScript that's loaded in the game. |
| getscriptclosure | Returns the main function of a given script. |
| getscripthash | Returns a hash of a given script. |
| getscriptbytecode | Returns the bytecode of a given script. |
| decompile | Return pseudocode from the bytecode of 'LuaSourceContainer' with RunContext of 'Client', Legacy with a LocalScript or a ModuleScript. |
| getscriptthread | Returns a thread (or nil) that's derived from an associated script. |
| getscriptfromthread | Returns a script (or nil) that's derived from an associated thread. |
| getthreadidentity | Returns the current thread's identity. |
| setthreadidentity | Sets the current Luau thread identity and the capabilities associated with that identity level. |
| getcallingscript | Returns the Script, LocalScript, or ModuleScript that triggered the current code execution, or nil if none. |