Advertisement
Guest User

Currency Giver Script

a guest
Feb 8th, 2022
803
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. --Leaderboard Script
  2.  
  3. game.Players.PlayerAdded:Connect(function(Player)
  4. local Leaderboard = Instance.new("Folder")
  5. Leaderboard.Name = "leaderstats"
  6. Leaderboard.Parent = Player
  7.  
  8. local Cash = Instance.new("IntValue")
  9. Cash.Name = "Cash"
  10. Cash.Value = 0
  11. Cash.Parent = Leaderboard
  12. end)
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19. --Currency Giver Script
  20.  
  21. local Part = script.Parent
  22.  
  23. Debounce = false
  24.  
  25. Part.Touched:Connect(function(hit)
  26. if hit.Parent:FindFirstChild("Humanoid") then
  27. local Player = game.Players:GetPlayerFromCharacter(hit.Parent)
  28. if Debounce == false then
  29. Debounce = true
  30. Player.leaderstats.Cash.Value = Player.leaderstats.Cash.Value + 10
  31. wait(5)
  32. Debounce = false
  33. end
  34. end
  35. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement