getscriptbytecode
Reads a script's available bytecode.
Syntax
Signature
getscriptbytecode(Script: Instance) -> stringAliases
dumpstring
Parameters
| Parameter | Type | Description |
|---|---|---|
Script | Instance | Script table with a nonempty raw _id. |
Returns
| Type | Description |
|---|---|
string | Binary Luau bytecode. |
Notes
If no cached load is available, searches the selected VM for a matching live root prototype and serializes it. Raises an error when neither source is available.
Example
Luau
local Script = getscripts()[1]
assert(Script, "No captured script available")
local Result = getscriptbytecode(Script)
print(Result)