Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Is there anyway to protect localscript codes?

Asked by
Dfzoz 489 Moderation Voter
4 years ago

I wanted to create a solo, lag free game, even if it meant exploiters could cheat to win on it by changing variables on the game. The only problem that I think of is that localscripts code can be read by exploiters, while serverscripts on serverscriptservice cant. Is there a way to protect the source of localscripts so people cant clone my game?

0
I saw somewhere that i can require modules i made from outside of the game. I would also like to know if the code becomes readable in the game after i require one with my local script. Dfzoz 489 — 4y
0
The client can do anything they could normally do in a localscript - fire events, move their character, delete stuff in their character, delete their local scripts, etc. They can write their own code and run it in your game. Good rule of thumb is never trust the client with anything and assume they can change anything locally.  royaltoe 5144 — 4y
0
and yeah you can require your modules from outside the game, but i think only on server. You _could_ have a remote event for it, but then you would want to make sure hackers can't get that code.  royaltoe 5144 — 4y
0
That part of players deleting and building what they want with exploit isnt what concerns me, as i mentioned. What i fear would be the cloning of source, directly from the localscript or a require function it made from a module. Dfzoz 489 — 4y

2 answers

Log in to vote
2
Answered by 4 years ago
Edited 4 years ago

I suggest reading all of this.

Unfortunately, exploiters have programs available that can capture the local code even if you require them from outside of the game. The programs run at a higher level than you as a developer even have access to. Think of it like this: You are literally giving clients the code. No matter what you do, the client can access the code.

Hiding your local code should only ever be thought of as a deterrent since exploiters will always be able to access them. This is why you must use sanity checks on the server to make sure the information sent from the client is correct.

So in short, keep important data in your server scripts and only send information to the client. Remember that the main source and true engine of the game stems from the server scripts. Without the server scripts your game is basically a frame of a car, so it will not help an exploiter much.

Ad
Log in to vote
0
Answered by 4 years ago

A hacker/exploiter can read all localscripts.

0
What about the outside modules i mentioned on the comment? Dfzoz 489 — 4y
0
He knows that. He said "localscripts code can be read by exploiters" He is asking how to protect his scripts from exploiters. royaltoe 5144 — 4y

Answer this question