Category
Scripts
Script, bytecode, and environment queries.Category guide
Overview
Use this overview to understand the category before opening a specific function.- See what this group of functions is meant to solve.
- Compare function names and descriptions in one table.
- Open a function for syntax, arguments, returns, and examples.
Scripts
Available functions
| Function | Description |
|---|---|
decompile | Attempts to decompile a script instance into readable Luau source. |
dumpstring | Returns bytecode or dumped script data for inspection. |
getcallingscript | Returns the script associated with the current calling context. |
getinstancesbyclass | Returns reachable instances whose class name matches the provided class. |
getloadedmodules | Returns loaded ModuleScript instances, optionally excluding core modules. |
getmenv | Returns the module environment for a ModuleScript. |
getreferencedby | Returns objects or scripts that reference the provided instance. |
getrunningscripts | Returns script instances that are currently running. |
getscriptbytecode | Returns the bytecode for a script instance. |
getscriptclosure | Returns the callable closure associated with a script instance. |
getscripthash | Returns a stable hash for a script when bytecode is available. |
getscripts | Returns all script instances reachable by the runtime. |
getscriptthread | Returns the thread associated with a script when one is available. |
getsenv | Returns the script environment table for a script. |
loadstring | Compiles a Luau source string and returns the resulting function or an error message. |