macros
in your script. This documentation will show you everything about the LPH_NO_VIRTUALIZE
macro
How obfuscation works
How Lua code is compiled to bytecode
How Luraph obfuscates Lua code
RenderStepped example
Example of a RenderStepped connection
CalculateParameters
) used in this loop, which automatically means that function will be executed as well, which will lead to even more and more instructions to run.__index
:
__index example
Example of a metamethod hook
__index
runs quite often. Example:game.Workspace
,game.Players...
__index
function and run the code above. This will be extremely resource intensive and heavy, considering that it is probably called thousands of times per second.And on top of that, if you obfuscate this part, you will end up with more than a million instructions to run every second, which will crash your game.loadstring()
, or LPH_NO_VIRTUALIZE
.
It is recommended to use LPH_NO_VIRTUALIZE
instead of loadstring while excluding chunks from obfuscation, because it is generally harder to view the code when you’re using LPH_NO_VIRTUALIZE
.
LPH_NO_VIRTUALIZE
?LPH_NO_VIRTUALIZE
takes one constant argument which must be a function, and returns a function that can be called.
LPH_NO_VIRTUALIZE
:
Good usage
Bad usage
LPH_NO_VIRTUALIZE
?RenderStepped
connectionsHeartbeat
connections__index
metamethod hooks__namecall
metamethod hooks (optional)while true
loops with no delayfunction
s, if they are called by one of those above