How do I add cash safely?

So right now I’m making a tool so when you press it sends a remote event to the server where its going to change the leaderboard

The problem is that I want to make more tools, some tools better than others so they are going to give more money.

So I’m not sure if I put these parameters in they will be safe

for example

remoteEvent:FireServer("ToolName", "AmountAdded")

What can I do other then send the server the tool name and amount added, Also how would I create sanity checks for adding player cash

I have done sanity checks for debounces but thats about it.

You should keep the prices on the server, the cash could even be in the tool as an IntValue. As long as you use the value from the server and not from client you should be fine

1 Like

So for example if I put a int value in starterpack can exploiters change the value. Also how can I identify which tool it is. I don’t know which tool it is unless I send the server the name of the code, but can’t exploiters change the name of the argument?

Only for themselves, which is why you only use the value the server sees which won’t be the exploited value :slight_smile:

You already send ToolName over, which would be the name of the tool, and yes they could send over their own name but does it matter as long as it’s valid? And you check that they have enough cash or level or whatever requirements are needed for certain weapon.

1 Like