Advertisement
Sungmingamerpro13

Extra Lives System(STORY GAME)

Aug 24th, 2022
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. local DataStoreService = game:GetService("DataStoreService"):GetDataStore("Lives")
  2.  
  3. local Debounce = false
  4.  
  5. script.Parent.Touched:Connect(function(Hit)
  6. if Debounce == false then
  7. Debounce = true
  8. local Character = Hit.Parent
  9. local player = game.Players:GetPlayerFromCharacter(Character)
  10. DataStoreService:IncrementAsync(player.UserId, 5)
  11. wait(5)
  12. Debounce = false
  13. end
  14. end)
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement