Turns a script’s bytecode back into readable Luau source and returns it as a string. Decompilation runs off-thread, so the call yields while the work happens and resumes with the finished source. The output aims to be behaviorally faithful rather than a byte-for-byte match of the original.

Parameters

Instance
required
A script with bytecode to decompile.

Returns

string
The recovered Luau source.

Example

Errors