Advertisement
Animescapetower

Ban script

Jul 7th, 2017
545
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. local BossHealth = script.Parent
  2.  
  3.  
  4. BossHealth.Changed:connect(function()
  5. local Players = game.Players:GetPlayers()
  6. if BossHealth.Value <= 0 then
  7. for i = 1, #Players do
  8. local Badge = game:GetService("BadgeService")
  9. Badge:AwardBadge(Players[i].userId, 0)
  10. end
  11. end
  12. end)
  13.  
  14. game.Players.PlayerAdded:connect (function(Player)
  15.  
  16. local leaderstats = Instance.new ("IntValue", Player)
  17. leaderstats.Name = "leaderstats"
  18.  
  19. local Lives = Instance.new ("IntValue", leaderstats)
  20. Lives.Name = "BanPoints"
  21.  
  22. Lives.Value = 20
  23.  
  24. Player.CharacterAdded:connect(function()
  25. Player.Character.Humanoid.WalkSpeed = 12
  26. Player.Character.Humanoid.Died:connect(function()
  27. Lives.Value = Lives.Value - 4
  28. if Lives.Value <= 0 then
  29. Player:Kick("You have been banned for abusing in this game for 7 seconds")
  30. wait(1)
  31. Player:Kick("And also animescapetower banned you.")
  32. wait(1)
  33. Player:Kick("Admins will get you next time.")
  34. wait(5)
  35. Player:Kick("Ok you can rejoin now.")
  36. end
  37. end)
  38. end)
  39. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement