Arctic-Lock
Enter jumps to the next match, shift-enter the previous.
Last changed November 19, 2026.
What Arctic-Lock is
Arctic-Lock is a virtual-machine obfuscator for Luau, built into ArcticAuth. It compiles your script into bytecode for a VM that is generated fresh for that build, then encrypts the program image. The original source never leaves the vault, and what an executor receives is a program for a machine that only exists in that one build.
The difference from an upload-time obfuscator is when it runs. Arctic-Lock builds on delivery and rebuilds once the current build is older than the rotation window (10 seconds by default). Each build draws new opcode numbers, instruction layout, handler shapes, control-flow states and keys, so two builds of the same script share nothing that can be diffed.
- Costs no tokens, on every plan.
- Builds are kept in server memory only. They are never written to disk, cache or logs.
- The vault loader is protected with Arctic-Lock too, so the loader rotates as well.
How it differs from commercial obfuscators
Most commercial Lua obfuscators produce one protected file that you upload and ship. Once somebody has deobfuscated or dumped that file, the work applies to every copy, everywhere, until you upload a new one by hand. Arctic-Lock works differently:
- Rotating builds
- Each build is a new VM. A dumped or partly reversed build goes stale within seconds, and a tool written against one build does not fit the next one.
- Per-build structure (Arctic-Morph)
- The generated VM is structurally rewritten for each build, not just re-keyed, so its shape is different every time. This has no runtime cost.
- Wrong key, not a verdict
- The optional environment-logger shield folds its probe results into the image key. A Lua-hosted emulator gets a wrong key and garbage, not a "tamper detected" message that tells it which check to patch.
- Part of the key system
- Delivery, sessions, the trust list and obfuscation are one pipeline. There is no separate obfuscator account, no per-file fee and no re-upload after every change.
- Existing macros work
- Luraph (LPH_*), MoonVeil (MV_*), LuaQ (LUAQ_*) and legacy PANDA_*/PK_* macro names are accepted with the same meaning, so a script can move over without being rewritten.
- Clear diagnostics
- A macro Arctic-Lock cannot honour is reported with a stable code and the reason. It is never silently ignored, so your script does not lose a protection without you being told.
Turning it on
- Open your service, then Vault → Upload.
- For the obfuscator, choose Arctic-Lock. The script is test-built when you upload it, so a syntax error or an invalid macro is reported at upload time, not by your users.
- Deliver it the usual way, loader-based or lite. Nothing changes on the client side.
You do not need any macros. Without them, every function is virtualized with the platform preset. The macros and directives below are only for tuning specific functions.
Macros
Macros are global names that Arctic-Lock resolves at build time. They are only recognized as unshadowed globals: a local variable or a table field with the same spelling is an ordinary value, and a macro cannot be stored in a variable and called later.
Values
- ARCTIC_OBFUSCATED
- true in a protected build. Use it to branch between development and protected behaviour.
- ARCTIC_LINE
- The original source line number where it is used. Useful in error messages, since the protected build has no meaningful line numbers.
- ARCTIC_VERSION
- The Arctic-Lock version string.
- ARCTIC_MACRO_API
- The macro API version the build applied (currently 2).
- ARCTIC_BUILD_ID
- A 16-hex-digit identifier for this build. Each rotation gets a new one.
Calls
- ARCTIC_ENCRYPT_STRING("text")
- A hardened string literal that is decoded each time it is used, instead of sitting in the constant table. The argument must be a string literal.
- ARCTIC_ENCRYPT_STRING("text", key, runtimeKey)
- Keyed form. key is a string or integer literal, and runtimeKey is any expression evaluated at run time. The string only decodes correctly when the runtime value matches.
- ARCTIC_ENCRYPT_NUMBER(42)
- A hardened numeric literal, decoded on each use. The argument must be a finite number literal.
- ARCTIC_CLEAR_STACK()
- Clears dead VM scratch registers and the current frame's string caches. Returns nil. VM only.
- ARCTIC_CLEAR_CONSTANT_CACHE()
- Drops Arctic-Lock's ordinary decrypted-string caches. Returns nil.
Function wrappers
A wrapper takes an anonymous function literal and returns it with a policy attached. The argument must be written in place as function(...) ... end. A variable holding a function does not work.
- ARCTIC_NO_VIRTUALIZE(fn)
- Emit this function as plain Luau instead of VM bytecode. Use for hot loops (render steps, heavy math) where VM overhead matters.
- ARCTIC_INLINE(fn)
- Request inlining. Best effort; the build reports it when the request is not applied.
- ARCTIC_OPTIMIZE(level, fn)
- Per-function optimization level: the literal 0, 1 or 2.
- ARCTIC_PROTECT(level, fn)
- Per-function protection: "minimal", "balanced" or "strong".
- ARCTIC_CACHE_STRINGS(n, fn)
- Capacity of this function's decrypted-string cache, an integer literal from 0 to 256. 0 decodes every string on every use.
- ARCTIC_CFF(fn)
- Force control-flow flattening for this function, even when it is below the preset's size threshold.
Statements
- ARCTIC_REQUIRE_MACRO_API(2)
- A top-level assertion. The build fails if it would apply a different macro API version, so a script never runs with macros it was not written for.
ARCTIC_REQUIRE_MACRO_API(2)
local WEBHOOK = ARCTIC_ENCRYPT_STRING("https://example.com/hook")
local MAX_SPEED = ARCTIC_ENCRYPT_NUMBER(32)
-- Hot path: plain Luau, no VM overhead.
local step = ARCTIC_NO_VIRTUALIZE(function(dt)
for _, part in ipairs(workspace.Moving:GetChildren()) do
part.CFrame = part.CFrame * CFrame.new(0, 0, -MAX_SPEED * dt)
end
end)
-- Sensitive logic: strongest protection, flattened.
local checkLicense = ARCTIC_PROTECT("strong", ARCTIC_CFF(function(key)
return key ~= nil and #key == 32
end))
game:GetService("RunService").Heartbeat:Connect(step)
print("build", ARCTIC_BUILD_ID, "line", ARCTIC_LINE)Attributes (comment directives)
If you would rather not wrap a function in a call, put an attribute comment on the line directly above its declaration. A directive does the same thing as the matching wrapper. It must directly precede a function declaration, such as local function f, function M.f or local f = function. Anywhere else it is reported and ignored.
- --!arctic:native
- Same as ARCTIC_NO_VIRTUALIZE.
- --!arctic:optimize 2
- Same as ARCTIC_OPTIMIZE(2, fn).
- --!arctic:protect strong
- Same as ARCTIC_PROTECT("strong", fn).
- --!arctic:cache 64
- Same as ARCTIC_CACHE_STRINGS(64, fn).
- --!arctic:inline
- Same as ARCTIC_INLINE(fn).
- --!arctic:cff
- Same as ARCTIC_CFF(fn).
- --!arctic:nocff
- Exclude this function from control-flow flattening. There is no wrapper for this one.
--!arctic:native
local function lerp(a, b, t)
return a + (b - a) * t
end
--!arctic:protect strong
--!arctic:cache 0
local function decodeConfig(blob)
-- ...
end--!panda: and --!pk: are accepted as spellings of --!arctic:. Setting the same policy twice on one function, for example a directive and a wrapper that both set protect, is a build error (PM005).
Running the same script unprotected
In Studio or a plain executor the macros are just undefined globals. Define fallbacks inside an if not ARCTIC_OBFUSCATED then block. Arctic-Lock recognizes that exact form, removes it from protected builds, and allows assignments to macro names only there.
if not ARCTIC_OBFUSCATED then
ARCTIC_ENCRYPT_STRING = function(s) return s end
ARCTIC_ENCRYPT_NUMBER = function(n) return n end
ARCTIC_NO_VIRTUALIZE = function(f) return f end
ARCTIC_PROTECT = function(_, f) return f end
ARCTIC_CFF = function(f) return f end
ARCTIC_BUILD_ID = "dev"
ARCTIC_LINE = 0
endMigrating from another obfuscator
These names are accepted and behave exactly like the Arctic-Lock macro they map to:
- Luraph
- LPH_OBFUSCATED, LPH_LINE, LPH_NO_VIRTUALIZE, LPH_ENCSTR / LPH_STRENC, LPH_ENCNUM / LPH_NUMENC
- MoonVeil
- MV_OBFUSCATED, MV_LINE, MV_OMIT (= NO_VIRTUALIZE), MV_INLINE, MV_ENC_STR, MV_CFF
- LuaQ
- LUAQ_OBFUSCATED, LUAQ_LINE, LUAQ_NO_VIRTUALIZE
- Panda / PK
- Every PANDA_* name, plus PK_OBFUSCATED, PK_LINE, PK_VERSION, PK_BUILD_ID, PK_NO_VIRTUALIZE, PK_ENC_STR, PK_ENC_NUM, PK_CLEAR_STACK, PK_INLINE, PK_CFF
Some macros from other products are deliberately not implemented, and using one is reported (PM007) with the reason:
- LPH_CRASH, MV_CRASH …
- Luau has no uncatchable crash. Call error() if that is what you intend.
- LPH_JIT, LPH_JIT_MAX
- Use ARCTIC_NO_VIRTUALIZE, or ARCTIC_OPTIMIZE(2, fn).
- LPH_ATTRIBUTES …
- Use the ARCTIC_* wrappers or --!arctic: directives above.
- Luraph key tables
- The two-argument LPH_ENCSTR and table forms of LPH_ENCNUM have no equivalent. Use the keyed three-argument ARCTIC_ENCRYPT_STRING.
Build diagnostics
Every macro use is checked before code generation. An error stops the build and is shown at upload, for example [Arctic-Lock PM002] ARCTIC_ENCRYPT_STRING: expects exactly one string literal (line 4). A warning is recorded and the build continues.
- PM001
- Wrong number of arguments.
- PM002
- An argument is not the literal, type or range required.
- PM003
- Macro API version mismatch (ARCTIC_REQUIRE_MACRO_API).
- PM004
- Not supported in this place, for example a VM-only macro inside an ARCTIC_NO_VIRTUALIZE function.
- PM005
- Conflicting or duplicate policy on the same function.
- PM006
- Inline request not applied.
- PM007
- Unknown or deliberately unsupported reserved macro name.
- PM008
- Legacy (API 1) behaviour used.
- PM009
- Invalid placement: a directive not directly above a function, or a statement macro that is not at the top level.
- PM010
- Assignment to a reserved macro name outside an "if not ARCTIC_OBFUSCATED then" block.
- PM011
- A call macro used as a value, without calling it.
ARCTIC_, PANDA_, PK_, LPH_, MV_ and LUAQ_ followed by capitals. Do not use them for your own globals.
