Advertisement
Blueisim

AutoHealthTagger(battle)

Jun 10th, 2019
428
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. --print("healthtagger by leaquing loaded")
  2. wait()
  3. local config=require(script.Config)
  4. local x=nil
  5. local clones=game.ServerStorage.Clones
  6. local config2=require(script.Parent.ZScript.Config)
  7. local remotes=workspace.Remotes
  8. if config.Respawn==true then
  9. x=script.Parent:clone()
  10. x.Parent=clones
  11. x.AutoHealthTag.Disabled=true
  12. else
  13. x=nil
  14. end
  15. if config.Level==true then
  16. script.Parent.Humanoid.MaxHealth=(config2.health+(workspace.GameStats.Level.Value-1)*(config2.health/10))
  17. script.Parent.Humanoid.Health=script.Parent.Humanoid.MaxHealth
  18. else
  19. script.Parent.Humanoid.MaxHealth=(config2.health)
  20. script.Parent.Humanoid.Health=script.Parent.Humanoid.MaxHealth
  21. end
  22. while wait() do
  23. if script.Parent~=nil then
  24. if config.Level==true then
  25. script.Parent.Name=config.Name.."(Level "..workspace.GameStats.Level.Value..")"..": "..config.Humanoid.Health.."/"..config.Humanoid.MaxHealth.." ("..math.floor((config.Humanoid.Health/config.Humanoid.MaxHealth)*100).."%)"
  26. else
  27. script.Parent.Name=config.Name..": "..config.Humanoid.Health.."/"..config.Humanoid.MaxHealth.." ("..math.floor((config.Humanoid.Health/config.Humanoid.MaxHealth)*100).."%)"
  28. end
  29. if config.Humanoid.Health<=0 and config.Respawn==true and x~=nil then
  30. wait(config.RespawnTime)
  31. x.Parent=script.Parent.Parent
  32. x.AutoHealthTag.Disabled=false
  33. script.Disabled=true
  34. script.Parent:Destroy()
  35. end
  36. end
  37. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement