Hello I was wondering how I should go about doing my client side module script security. To my understanding exploiters and hackers are still able to access all things client side including module scripts. Therefore they would still be able to manipulate any flaws in your systems that you may have. I do know that you are supposed to do all things validation on the server side to prevent hackers from changing game data and what not but I was wondering how I could go about preventing exploiters from requiring the client side modules and using any stray or vulnerable functions to their power.
If you look below, this setup here is split up into 3 parts. Variables at the top, private functions in the center, and public functions on the bottom.
At first requirement in the module that it is supposed to be used in these functions are suitable. However if this were a client sided module and an exploiter were to require the same module, to my understanding it would still be possible for them to also use the same public functions.
So I was wondering if it was possible to make this not possible. Maybe even only make the module requirable once or public functions only available once at one place that truly uses them so that any exploiter may not require the same module and use the public functions to their will.
I did come up with a possible solution to allowing only public functions to be available one time at first requirement but I was not sure if this was an efficient way of going about things. The problem is I need some of these functions to be public because they are actually being used by my other scripts but I don’t want unauthorized access to use them. I make sure that server validates things properly but if it’s possible to tighten up security a little more I would like to know. But then again, is it even worth going this deep into trying to prevent this? I am not sure.

