OpenLua AI
Macro documentation
Dashboard SecroAuth

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)
The native function is still delivered inside the protected artifact. It is decrypted at runtime and loaded natively.

Supported names

MacroBehavior
LPH_OBFUSCATEDtrue inside protected output.
LPH_NO_VIRTUALIZE(fn)Compile the function literal as native code instead of a VM prototype.
LPH_ENCSTR / LPH_STRENCIdentity for compatibility; graph string constants are encrypted separately.
LPH_ENCNUM / LPH_NUMENCIdentity for compatibility.
LPH_ENCBUF / LPH_BUFENCBuffer conversion when buffer exists; otherwise identity.
LPH_PRECHECK(fn)Calls the check immediately.
LPH_REWRITE, LPH_ASSUME, LPH_OPAQUEIdentity.
LPH_STACKALLOCCompatibility stack allocator shim.
LPH_CRASHCompatibility no-op.
LPH_VM, LPH_PRESET, attributesAccepted 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)
The native function is still delivered inside the protected artifact. It is decrypted at runtime and loaded natively.
Recommended targets: RenderStepped, Heartbeat, __index/__namecall hooks, tight loops, and helper functions called by those. Do not wrap the entire script.

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

MacroBehavior
SECRO_OBFUSCATEDtrue 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_STRENCIdentity; strings are encrypted by the graph serializer.
SECRO_ENCNUM, SECRO_NUMENCIdentity.
SECRO_ENCBUF, SECRO_BUFENCBuffer conversion when available.
SECRO_PRECHECK(fn)Calls the check immediately.
SECRO_REWRITE, SECRO_ASSUME, SECRO_OPAQUEIdentity.
SECRO_STACKALLOCCompatibility stack allocator shim.
SECRO_CRASHCompatibility no-op.
SECRO_VM, SECRO_PRESET, SECRO_OPTIMIZE, other attributesAccepted as compatibility attributes; granular attribute semantics are not implemented.

Limits

  • The argument must be a direct function ... end literal.
  • 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.