Advertisement
epic31200

Coin Script

Jun 13th, 2019
5,431
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. local db = true
  2. script.Parent.Touched:Connect(function(hit)
  3. if hit.Parent:FindFirstChild("Humanoid") ~= nil then
  4. if db == true then
  5. db = false
  6. script.Parent.Transparency = 1
  7. local player = game.Players:GetPlayerFromCharacter(hit.Parent)
  8. player.leaderstats.Coins.Value = player.leaderstats.Coins.Value + 100
  9. script.Sound:play()
  10. wait (1)
  11. script.Parent:Remove()
  12. end
  13. end
  14. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement