Skip to main content
Luarmor uses Luraph as its obfuscation provider, so you can use Luraph’s macros in your script as well as Luarmor’s own macros.
For more information on what a constant function is and is not, see how to use LPH_NO_VIRTUALIZE.

LRM_INIT_SCRIPT

This macro lets you run a piece of code before your script runs. It accepts a constant function. It can be useful for displaying an “Enter a key” GUI, running anti-cheat bypasses, or anything else that must be executed before authentication. It works best when combined with the key check library.
The function passed into this macro will not be obfuscated, so anyone can read it as plain source code. Don’t put sensitive code in it.You must yield somewhere, even if it’s just a task.wait() at the end. Otherwise, script_key will read as nil.
For a full key system GUI, you can start from this template.To display an async key UI, block execution with a loop at the end of the init script. Otherwise, the script will continue without a key and kick the user with a “no key found” error.
To run a bypass or any other code that doesn’t need to wait for user input, you don’t need the blocking loop. Just add your code directly, but keep the yield from the warning above.

Limitations

  • You can’t reference upvalues inside an init script, because it is extracted from the obfuscated code and runs without them. Treat it as a completely separate context, and define every helper function or variable it uses inside it.
  • There can be only one init script per script, so you can use this macro only once.
  • The function you pass must be a constant. Do not pass a variable, e.g. LRM_INIT_SCRIPT(handlerFn).

LPH_NO_UPVALUES

Wrap a hookfunction hook in LPH_NO_UPVALUES to fix the “hook has more upvalues than original” error, which happens due to obfuscation. Before:
After:
If you are still having issues, make sure the argument you give to LPH_NO_UPVALUES is a constant function, not a variable. If you want to give the function a name, wrap it first and then pass the result:

Other macros