getscriptbytecode
Returns the compiled Luau bytecode behind a script.
Signature
getscriptbytecode(script: BaseScript): stringParameters
scriptLocalScript | ModuleScriptThe script to dump.
Returns
string
Example
local script = game.Players.LocalPlayer.PlayerScripts:FindFirstChildOfClass("LocalScript")
local bytecode = getscriptbytecode(script)
print(#bytecode, "bytes")