The main thing is, the module script runs. I call the require from another script when I’m getting properties.
But the playeradded and gamepass ownership is not being called
The main thing is, the module script runs. I call the require from another script when I’m getting properties.
But the playeradded and gamepass ownership is not being called
you should not put that playeradded in a module script instead have it in a server script and have a function in module script which you connects whenever a player added and pass the player as argument.
False. ModuleScripts required from the Server will run in the context of the Server, the environment will not be available nor shared to other clients.
However, can it be decompiled and allow exploiters to see the source code? Yes.
This shouldn’t be your way of doing a system like this. If you do this, the changes from a specific player owning that gamepass will also affect other players as well.
Instead, you can look online on YouTube or the forum to look for other solutions, such as creating a data folder for each player on the server and creating NumberValues for each chance, so that when the server checks if the player owns the gamepass, instead of changing a variable, the server will change the NumberValue of that chance for that specific player, so this will be a lot more secure.
And you don’t need to do this with a module script.
Yeah, that’s what I was afraid of, I’ve had instances where a change other player does reflects to other players.
What I’ll try to do now is make 2 seperate folders and then from a server script, use the folder depending on gamepass ownership because each folder would have its own config. gamepasscrates and just crates
I highly doubt that way will work too.
Here’s a neat way of doing a system like this:
Using a system like this, you can easily manage the data of your players. Make sure to delete the folder when the player leaves though so it won’t cause a memory leak or any other issues.
Just played around and discovered I could not get BindableEvent to fire if it or the script using it is located on ReplicatedStorage. I didn’t know that!
This does not make any valuable sense. People could just access some useless functions that do not serve any real purpose.
They could also access the price, the chances, the image id, and the item list. And?
It could become faulty if the client bases itself on those values, and if ONLY the client handles the part with those values. But the module wouldn’t be faulty, it would be the remote event that handles server-sided replication that would be faulty. Everything needs to be checked back on the server for that kind of scenario.
Of course exploiters can access replicated modules. That being said, as long as the programming architecture is fine, and secured enough, nothing to worry about.