Custom bytecode virtual machine
Your script is moved into Luaq's own bytecode format, with the instruction layout built around the protected runtime instead of ordinary readable Luau.
LUAQ
Paste your script, choose what you want enabled, and Luaq handles the ugly part: the VM, encryption, macros and the rest. You keep your normal source; the protected output is what gets complicated.
Your source
if not LUAQ_OBFUSCATED then
LUAQ_ENCSTR = function(s) return s end
LUAQ_NO_VIRTUALIZE = function(...) return ... end
LUAQ_CRASH = function() while true do end end
LUAQ_INLINE = function(fn) return fn end
end
local state = { time = 0 }
local tampered = false
local secret = LUAQ_ENCSTR("protected")
local increment = LUAQ_INLINE(function(current: number, dt: number)
return current + dt
end)
local update = LUAQ_NO_VIRTUALIZE(function(dt: number)
state.time = increment(state.time, dt)
end)
if tampered then
LUAQ_CRASH()
end
PROTECTION STACK
Nothing here is here just to fill a feature list. Each step does one job, and the layers make more sense when they work together.
Your script is moved into Luaq's own bytecode format, with the instruction layout built around the protected runtime instead of ordinary readable Luau.
Strings, numbers and selected functions can be packed at build time, then recovered only when the protected script actually needs them.
Clean up waste before protection is added: fold constants, remove dead paths, simplify expressions and reuse registers where it makes sense.
Cuts down the emitted VM payload when a protected script is getting large and you would rather not ship unnecessary weight.
Reworks selected branches into a flatter dispatcher-style flow, so following the original execution order from the output is far less straightforward.
Put protection exactly where you want it. Luaq macros cover encryption, inlining, performance sections, and a lot more.
LUAQ_INLINE(fn)
LUAQ_ENCSTR(string)
LUAQ_NO_VIRTUALIZE(fn)
Runtime checks watch the environment and the protected build itself. If something important is changed, the script can stop instead of carrying on normally.
WORKFLOW
Write the script normally. Add macros where they are actually useful, then run the finished source through Luaq when you are ready to ship it.
See all supported macros →READY WHEN YOU ARE