Yuari
Documentation
Docs/Scripts & decompiling/getscriptbytecode

getscriptbytecode

Raw Luau bytecode of a script. Returns an empty string for non-scripts.

Syntax

getscriptbytecode(script: Instance) -> string

Parameters

ParameterTypeDescription
scriptInstanceThe script value used by the call.

Returns

TypeDescription
stringString

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.