sUNC Reference
Scripts
Inspect script bytecode, closures, environments and thread associations.
Related to sUNC documentation
This reference is based exclusively on the official sUNC documentation.
Overview
- Script APIs work with BaseScript and ModuleScript values.
- Bytecode-dependent calls can return `nil` when source data is unavailable.
Available functions
getcallingscriptRetrieves the script that triggered the current execution.getloadedmodulesRetrieves modules that have already completed loading.getrunningscriptsRetrieves running scripts in the caller global state.getscriptbytecodeRetrieves compiled script bytecode.getscriptclosureCompiles a new closure from script bytecode.getscriptfromthreadReads the script reference associated with a thread.getscripthashHashes raw script bytecode with SHA-384.getscriptsRetrieves Script, LocalScript and ModuleScript instances.getsenvRetrieves an active script global environment.