I’m soon going to develop a single-player based experience where scripts are all locally ran to counter lag, but I’m well aware that programs exist out there that can snatch code. Normally, you would run server scripts that cannot be read by clients, but because of my system, I can’t do this. What is a possible solution to stop hackers from entering my game and completely copying it?
If you’re planning to use localscripts, note that you cannot do anything to stop them from stealing it.
You shouldn’t rely on localscripts either, since the server needs to verify important information (ex, updating whatever you have in your game for others and datastore stuff, if you use it).
Right. I planned to send data to and from the server already, but I’ve seen other games successfully pull this off, and I’ve yet to see a clone arise of them. I’ve always thought there was a way to prevent it, but if there isn’t, I guess I’ll just either move to serverside or accept the consequences.
Using localscripts doesn’t necessarily mean it will prevent lag, what matters is what you do inside the script, not what script you’re using (server/client).
Localscripts are not to be trusted, so you should be really careful with what you’re doing, as any localscript and checks within it can be destroyed by exploiters.
You can always obfuscate your code. It doesn’t prevent the script from working, but it makes it unreadable and unrecognizable. This isn’t really a “solution,” but more of a way to waste the time of the people trying to steal scripts to understand what it actually does.