unreadable.gg

luau

unreadable.gg turns Luau bytecode back into source. Where it gets a module right, the source compiles to the same bytes you started with. Where it can't be sure, it marks the spot or refuses that function, and never guesses.

what it reads

Luau bytecodeCompiled modules from the stock Luau compiler, bytecode versions 3 to 14, at any optimisation and debug level.
place files.rbxm and .rbxl aren't read yet. Take the scripts' bytecode out first.

Other Lua versions aren't supported yet: see lua versions.

what you get back

The instructions for one function, as the bytecode has them:

copy
; function onLeave(player)
GETUPVAL   R1 0
LOADNIL    R2
SETTABLE   R2 R1 R0
RETURN     R0 1

And the source the decompiler gives back for it, which compiles to those same instructions:

copy
local function onLeave(player)
    sessions[player] = nil
end

Names come from the module's debug information where it kept them. Where it didn't, locals are called v0, v1 and parameters arg0, arg1, rather than given names that sound right and might mislead you.

how sure it is

Every change to the decompiler is tested on hundreds of Luau modules, each compiled at every optimisation level. Their decompiled source has to compile back to identical bytecode and run the same as the original.

Your own file isn't recompiled when you decompile it, so every result comes with a verdict on how far to trust it, and points at any spot that was marked or function that was refused. What changed recently is on the changelog.

try it

Drop a compiled module on the home page. You get 5 free decompiles a day. Scripts and agents can use the same decompiler through the API.