Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local repStorage = game:GetService("ReplicatedStorage")
- local remote = repStorage:FindFirstChild("BuyItem")
- remote.OnServerEvent:Connect(function(plr, x)
- if x == 0 then
- if plr.leaderstats.Cash.Value >= 500 then
- local l = game.Lighting:FindFirstChild("Item"):Clone()
- l.Parent = plr.Backpack
- plr.leaderstats.Cash.Value = plr.leaderstats.Cash.Value - 500
- end
- end
- --copy and paste for more items
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement