Lua Decompiler (2024)

Specifically tuned to reverse-engineer Luau, the highly optimized derivative of Lua used by Roblox. Lua 5.1 to 5.4

A Java-based decompiler that is widely considered the most accurate for standard Lua 5.1 through 5.4. It handles complex structures like upvalues and nested functions better than most.

: When you run a Lua script, the standard Lua compiler ( luac ) translates the human-readable text into binary bytecode. This bytecode consists of raw instructions optimized for the Lua Virtual Machine (VM). During this process, variable names, formatting, and comments are stripped away to optimize performance and save space. lua decompiler

unluac can recover the original local variable names if the bytecode includes debug information (line numbers, local names). Without debug info, you get local a_0_1 , local b_2_1 — functional but ugly.

Imagine feeding raw bytecode into an LLM trained on Lua patterns. Early experiments (GPT-4 fine-tuned on Luac) can reconstruct variable names and even comments from context. This could dramatically improve the output quality within 2-3 years. : When you run a Lua script, the

Open your terminal or command prompt and navigate to that directory. Run the following command:

: Reverse engineering is generally protected under "Fair Use" laws in many jurisdictions if done for interoperability (making two programs work together), security auditing, malware analysis, or personal educational research. unluac can recover the original local variable names

A decompiler will recover exactly this code—which is technically correct but human-unfriendly. Mission accomplished.

Ready to prep for med exams from your PDFs?