getscriptbytecode
Raw Luau bytecode of a script. Returns an empty string for non-scripts.
Syntax
getscriptbytecode(script: Instance) -> string
Parameters
| Parameter | Type | Description |
|---|---|---|
script | Instance | The script value used by the call. |
Returns
| Type | Description |
|---|---|
string | String |
Description
getscriptbytecode is part of the Scripts & decompiling library. Script helpers inspect scripts in the live DataModel and can read bytecode or decompile source.
The call is read-only: it resolves the current value when invoked and does not change the underlying state.
Example
local script = getscripts()[1]
print(#getscriptbytecode(script))
Notes
- Script bytecode and source are read from the live game.