StartIntroduction
sUNC Reference
Closures
Debug
Drawing
Encoding
Environment
Filesystem
Instances
Metatable
Miscellaneous
Reflection
Scripts
getcallingscriptgetloadedmodulesgetrunningscriptsgetscriptbytecodegetscriptclosuregetscriptfromthreadgetscripthashgetscriptsgetsenv
Signals
WebSocket
Related to sUNC docsOfficial reference
Scripts
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.
PrevioussetthreadidentityNextgetcallingscript
On this pagesUNC sourceOverviewAvailable functions