MoonVeil-Docs/content/docs/macros/MV_OBFUSCATED.md
2025-08-07 16:38:35 -05:00

983 B

weight title description icon date lastmod
100 MV_OBFUSCATED Detect if script is obfuscated code_blocks 2025-05-01T18:47:58-05:00 2025-05-01T18:47:58-05:00

declare MV_OBFUSCATED: boolean

This macro is a constant value that is set as true during obfuscation, which can allow certain code paths to only run in an obfuscated or unobfuscated context. MoonVeil will optimize out the blocks which should not run.

{{% alert context="info" text="Note: LPH_OBFUSCATED is an available alias." /%}}

Valid Usage

if MV_OBFUSCATED then
	validateWhitelist() -- This code will only if the script has been obfuscated.
else
	skipWhitelist()
	-- This code will only run when the script is not obfuscated.
	-- Additionally, there will be no traces of this code in the obfuscated code.
end

return if MV_OBFUSCATED then runWithoutDebugging() else runWithDebugging()

Obfuscates to:

do

	validateWhitelist()

end

return runWithoutDebugging()