Obfuscator macros
Selective VM bypass for hot functions. The selected macros reduce interpretation overhead; they are not a way to make protected code unobfuscated.
Luraph-style macros
Luraph uses LPH_* macros. The Luraph-hardened mode in this deployment accepts these shims through the Secro v14.9-compatible pipeline.
local draw = LPH_NO_VIRTUALIZE(function(dt)
-- hot code: runs outside the VM
end)
RunService.RenderStepped:Connect(draw)
Supported names
| Macro | Behavior |
|---|---|
LPH_OBFUSCATED | true inside protected output. |
LPH_NO_VIRTUALIZE(fn) | Compile the function literal as native code instead of a VM prototype. |
LPH_ENCSTR / LPH_STRENC | Identity for compatibility; graph string constants are encrypted separately. |
LPH_ENCNUM / LPH_NUMENC | Identity for compatibility. |
LPH_ENCBUF / LPH_BUFENC | Buffer conversion when buffer exists; otherwise identity. |
LPH_PRECHECK(fn) | Calls the check immediately. |
LPH_REWRITE, LPH_ASSUME, LPH_OPAQUE | Identity. |
LPH_STACKALLOC | Compatibility stack allocator shim. |
LPH_CRASH | Compatibility no-op. |
LPH_VM, LPH_PRESET, attributes | Accepted as compatibility attributes; granular attribute semantics are not implemented. |
The Luraph tab documents the same macro family used by the Luraph-hardened compatibility path. For full native Luraph behavior, use the actual Luraph service.
SecroLuaVM macros
Secro uses its own SECRO_* macro names. Use them directly in scripts uploaded to SecroAuth or the obfuscator.
local draw = SECRO_NO_VIRTUALIZE(function(dt)
-- hot code: runs as native Luau, not through the Secro VM
end)
RunService.RenderStepped:Connect(draw)
SECRO_NO_VIRTUALIZE
Use a direct function literal:
-- good
local f = SECRO_NO_VIRTUALIZE(function(a, b)
return a + b
end)
-- not supported: passing a function reference
local f = SECRO_NO_VIRTUALIZE(existingFunction)
Free names are captured through getter/setter closures, so updates to surrounding variables continue to work. The native function still needs the executor to provide loadstring and setfenv.
Other Secro macros
| Macro | Behavior |
|---|---|
SECRO_OBFUSCATED | true inside protected output. |
SECRO_NO_VIRTUALIZE(fn) | Native function body, encrypted at rest. |
SECRO_VIRTUALIZE(fn) | Compatibility shim; use a normal function for VM execution. |
SECRO_ENCSTR, SECRO_STRENC | Identity; strings are encrypted by the graph serializer. |
SECRO_ENCNUM, SECRO_NUMENC | Identity. |
SECRO_ENCBUF, SECRO_BUFENC | Buffer conversion when available. |
SECRO_PRECHECK(fn) | Calls the check immediately. |
SECRO_REWRITE, SECRO_ASSUME, SECRO_OPAQUE | Identity. |
SECRO_STACKALLOC | Compatibility stack allocator shim. |
SECRO_CRASH | Compatibility no-op. |
SECRO_VM, SECRO_PRESET, SECRO_OPTIMIZE, other attributes | Accepted as compatibility attributes; granular attribute semantics are not implemented. |
Limits
- The argument must be a direct
function ... endliteral. - Nested performance macros are expanded recursively.
- This does not make the function invulnerable to hooks or memory inspection.
- Use only where the VM overhead is measurable; wrapping large portions of the script reduces protection and increases native exposure.