A decompiler for vLuaU in luau, Roblox scripting language, as its in beta dont expect much from it
WARNING: THIS CANNOT EXECUTE IN ANY OTHER LANGUAGES ONLY IN LUAU
This was made for educational purposes only and does not intend to harm anyone
Added support for BREAK and NOP opcodes
Possibly the forgloop opcode support wont come, sorry for this
While and repeat loops decompilation with partial or full support
Upvalue decompiling
Function decompiling
Global decompiling
Numerical For loop decompiling (FULL SUPPORT: Gives light errors or variable naming error)
etc.
Cannot decompile while and repeat loops, May cause some errors since its in beta
local decompile = require("Decompile")
local bytecode = "bytecodestring" -- this is an example this will not work
local code = decompile(bytecode)
Please install luau and vLuaU Compiler. You can get it from here (No need to install luau if you have studio)
local str = [[
-- script here
print("Hello, World!")
]]
local compile = require(script.compiler).luau_compile
local decompile = require(script.decompiler)
local bytecode = compile(str)
print("Original bytecode: "..bytecode)
print("Decompiled bytecode: "..decompile(bytecode))
local decompile = require(script.Decompile)
local bytecode = getscriptbytecode(scriptPath --[[Replace with script path smth like game.ReplicatedFirst or smth like that]]) -- this will generate real bytecode
local code = decompile(bytecode) -- returns the code from that bytecode