Scripts
The Scripts library provides functions for interacting with running scripts, loading modules, and compiling code.
Overview
These functions allow you to:
- Get references to running scripts
- Access script environments
- Load and compile Luau code
- Extract script information
Available Functions
| Function | Description |
|---|---|
decompile | Decompile a script into Luau source |
getcallingscript | Get the script that called the current function |
getfunctionbytecode | Get bytecode for a Luau closure |
getloadedmodules | Get all loaded ModuleScripts |
getmodules | Get cached ModuleScripts |
getrunningscripts | Get all running scripts |
getscriptbytecode | Get processed script bytecode |
getscriptclosure | Get a script's main function |
getscriptfromthread | Get the script associated with a thread |
getscriptthread | Get a thread associated with a script |
getscripthash | Hash processed script bytecode |
getscripts | Get cached client-visible scripts |
getsenv | Get a script's environment |
isexecutorthread | Check whether a thread belongs to Volt |
loadstring | Compile and load Luau code |