Securing your LUA code

Hi guys !

I am creating this topic for a subject that I have seen very little on this forum, which is none other than the security of our codes on fivem. Facing dumps, if we can’t do anything, we can always make the dump incomprehensible for the attacker. That’s why I’m here to ask if any of you have an encryption algorithm for LUA, not a very advanced code but at least able to modify variable names, functions, etc etc…
If anyone knows of another technique, I’ll take it too!

Thanks in advance
Walteer.

1 Like

It’s not really worth the effort trying to encrypt/whatever client code - the better idea is to not trust the client side in the beginning, offload all risky events (adding/removing money, jailing, you name it) to be server-side only and pass them to the client via events with the server being the “gatekeeper”. That way it’s as safe as possible without any obscure methods.

Hello,
Yes, of course, I understand this reasoning completely and it is in fact what I apply as much as possible, but, after having spent months and months of work, the idea that my source code ends up in the hands of the first person who comes along scares me, and rightly so…
My goal is to make my client code as unreadable as possible (nonsense variable names, randomly named functions, and no tabs…)

Sounds like JavaScript with uglifier & minifier is what you want. On the topic of Lua you can look into Lua obfuscators.

1 Like

Thank you for your reply.
It is very interesting, thank you! Would you personally have a particular tool to recommend to me that has satisfied you?