Advertisement
xmaanzach

RespawnCoin

Feb 15th, 2019
337
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 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 + 5
  9. script.Sound:Play()
  10. wait(3) -- Tiempo en que volverá a aparecer
  11. db = true
  12. script.Parent.Transparency = 0
  13. end
  14. end
  15. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement