decompile
Recovers Luau source from available bytecode.
Syntax
Signature
decompile(Source: Instance | function | string) -> stringAliases
This function has no aliases.
Parameters
| Parameter | Type | Description |
|---|---|---|
Source | Instance | function | string | Script wrapper, Luau closure, or binary Luau bytecode. |
Returns
| Type | Description |
|---|---|
string | Recovered Luau source. |
Notes
Runs the local decompiler helper and checks that its output compiles. Missing bytecode and helper failures raise errors. Recovered names and control flow may differ from the original source.
Example
Luau
local Result = decompile(function() return "hello" end)
print(Result)