How can I make anti exploitable shops?

Shops are always implemented into basically every popular game. I was wondering how I can make them so hackers can’t exploit them. I was having the idea of when a person clicks the buy button, they will get the item(obviously). My first though was a remote event, but if I send lets say a value, can’t the player just put any number they want? I have values stored in each button with their values and when firing the server I want to pass that value, so I’m stumped on what to do.

Item prices should be stored ON the server.

local prices = { 
  ["Bloxy Cola"] = 5, ["Blox Aid"] = true,
};

Player money should be on the server, and validated apon purchase request!

Remote.OnClientEvent:Connect(function(player)
if playerMoney >= itemPrice then
-- Add function here!
end
end)
1 Like

With the remote event, just make sure the player has enough currency to buy the item, if he does, give it to them