WolfGamesProgrammer

Purchase Server

Oct 10th, 2024
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.29 KB | Source Code | 0 0
  1. function Buy(plr, productName, price)
  2.     if plr.leaderstats.Cash.Value >= price then
  3.         local product = game.ReplicatedStorage.Backpack[productName]:Clone()
  4.         product.Parent = plr.Backpack
  5.         plr.leaderstats.Cash.Value -= price
  6.     end
  7. end
  8. game.ReplicatedStorage.Purchase.OnServerEvent:Connect(Buy)
Advertisement
Add Comment
Please, Sign In to add comment