debug.decompile
Dumps a function's bytecode as hexadecimal text.
Syntax
Signature
debug.decompile(FunctionOrLevel: function | number) -> stringAliases
This function has no aliases.
Parameters
| Parameter | Type | Description |
|---|---|---|
FunctionOrLevel | function | number | Luau closure or positive stack level. |
Returns
| Type | Description |
|---|---|
string | Hexadecimal bytecode dump. |
Notes
It does not return source code. Use the global decompile function when source recovery is needed.
Example
Luau
local Function = function() local Message = "Hello" return Message end
local Result = debug.decompile(Function)
print(Result)