Z_Dev

Donation gui code

Aug 7th, 2020
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. player = game.Players.LocalPlayer
  2. currency = "Cash"
  3. recipient = ""
  4. amount = 0
  5. script.Parent.MouseButton1Click:Connect(function()
  6. recipient = script.Parent.Parent.Player.Text
  7. amount = tonumber(script.Parent.Parent.Amount.Text)
  8. if player.leaderstats[currency].Value >= tonumber(script.Parent.Parent.Amount.Text) then
  9. game.Players[recipient].leaderstats[currency].Value = game.Players[recipient].leaderstats[currency].Value + amount
  10. player.leaderstats[currency].Value = player.leaderstats[currency].Value - amount
  11.  
  12. end
  13. end)
Advertisement
Add Comment
Please, Sign In to add comment