You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
I know that exploiters have access to see any scripts that is client-side and it is impossible to completely hide it, but what methods I can implement to make sure to make it difficult for them to see scripts within my game? I am mostly talking about how would I try my best to hide my localscripts? Or is there a way I can use a script from server side to work all of my GUI and how would I go my way to make this possible? Please, any insight and help would be greatly appreciated and thank you in advance!
PS: In theory, would I be able to make it possible by having a modulescript in ServerScriptService that has all my gui functions there and using a script in StarterGui that requires it? Will this work and what are the risks of doing so?
Hey there!
I’d like to start off by saying “you can’t”, it is impossible to hide local scripts from exploiters, as most exploits have built-in functionality that shows them all local scripts in the game, regardless of where you put them. As for your question with module scripts. If the module script is located inside of ServerStorage or ServerScriptService, you cannot require those on the client, as the client doesn’t have access to those services. If you put the module script anywhere the client can access, the client will be able to require them, but exploiters will also be able to view the contents of them.
There is no way to hide code from exploiters, so instead of wasting your time trying, write solid code that isn’t exploitable instead.
If you’re talking about trying to have a localscript require a modulescript in ServerscriptService then no, if you want to hide a localscript then what you can do is create an Actor under ReplicatedFirst and put your LocalScript in it after that you need to put
script.Parent:Destroy()
script:Destroy()
at line 1 of your script, there are further steps you can take but this is good enough, this will make it pretty annoying for an exploiter to find
Yes I understand that hiding it completely impossible, but what I want to know if there is a method to make it annoying and more difficult for them to find it? Thank you for giving your thoughts on this too
As I mentioned in my response, this does not affect exploiters much, as most exploits have features that allow them to view all running scripts, this includes destroyed objects. Destroying a script does not hide it from exploiters. Even if the script isn’t running, exploiters can also view all destroyed objects.