Documentation
Everything you need to obfuscate Lua 5.1 and Roblox executor scripts: how the obfuscator works, the compile modes, the guard suite and the output options.
Introduction
GoonVeil is an obfuscator for Lua 5.1 (Roblox executor Lua). You hand it a script and get back a hardened bundle that still behaves the same on the runtime you ship to, with the internals of your code dissolved. The whole pipeline runs client-side in your browser: the engine and the guard suite are downloaded once and run locally, and the source never leaves your machine.
Every build runs through three stages:
- Optimize. Your source is parsed and optimized before any protection runs: constants are folded and dead code is dropped.
- Protect. The compile mode you pick rewrites the code, and the guard suite is embedded so it is obfuscated together with your script.
- Bundle. Everything is emitted as one self-contained Lua file, optionally compressed behind a loadstring decompressor.
Quick start
- Sign in and open the Studio.
- Paste your script into the source pane, or load a .lua or .luau file.
- Pick a compile mode. We recommend Safe Env for shipped scripts.
- Press Obfuscate. The output pane fills with the bundle, ready to copy or download.
Compile modes
The compile mode decides how the whole script is protected. It is the biggest knob you have, and it trades runtime cost against protection.
| Mode | What it does | Runtime cost | Output size |
|---|---|---|---|
| CFF | Breaks branches and loops apart with junk states and mangles names, strings and globals | Low | Small |
| Heavy | Maximum junk injection on top of control-flow mangling | High | Larger |
| Safe Env | Same engine with the full guard suite (anti-tamper, anti-env, anti-sandbox, anti env-logger, anti write-file, anti hook-networks) embedded and obfuscated with your code | Highest | Largest |
CFF settings
- Mangle control flow (junk level) 0 to 5. Higher means more junk states, a bigger bundle and slower functions.
- Optimization before protection none, single pass, fixpoint, or fixpoint with deeper folding.
The engine and the packer
Obfuscation runs in a Rust engine compiled to WebAssembly, entirely in your browser: the source is parsed, identifiers are mangled, numbers and strings are re-encoded, junk states are injected and control flow is flattened. A separate C++ packer stage compresses the output (RLE) and encrypts it with a rolling XOR cipher keyed per build; the bundle ships with a Lua loader that decodes and runs itself at startup.
Per-build randomization: the identifier alphabet, cipher keys, junk shapes, decoy states and packer key are all derived from a random seed generated for each build, so two builds of the same script share no structure.