Buy items with in-game cash via RemoteEvent. Server validates every purchase.
-- Shop System local ReplicatedStorage = game:GetService("ReplicatedStorage") local ServerStorage = game:GetService("ServerStorage") local ITEMS = { Sword = { price = 50 }, Shield = { price = 100 }, } local buyEvent = Instance.new("RemoteEvent") buyEvent.Name = "BuyItem" buyEvent.Parent = ReplicatedStorage buyEvent.OnServerEvent:Connect(function(player, itemId) local item = ITEMS[itemId] if not item then return end local cash = player.leaderstats and player.leaderstats:FindFirstChild("Cash") if not cash or cash.Value < item.price then return end local tool = ServerStorage:FindFirstChild(itemId) if not tool then return end cash.Value -= item.price tool:Clone().Parent = player.Backpack end) -- CLIENT: buyEvent:FireServer("Sword")