Advertisement
vendaskOfficial

ItemIDSystem

Dec 15th, 2018
1,108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.42 KB | None | 0 0
  1. local repStorage = game:GetService("ReplicatedStorage")
  2. local remote = repStorage:FindFirstChild("BuyItem")
  3.  
  4. remote.OnServerEvent:Connect(function(plr, x)
  5.     if x == 0 then
  6.         if plr.leaderstats.Cash.Value >= 500 then
  7.             local l = game.Lighting:FindFirstChild("Item"):Clone()
  8.             l.Parent = plr.Backpack
  9.             plr.leaderstats.Cash.Value = plr.leaderstats.Cash.Value - 500
  10.         end
  11.     end
  12.     --copy and paste for more items
  13. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement