Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --print("healthtagger by leaquing loaded")
- wait()
- local config=require(script.Config)
- local x=nil
- local clones=game.ServerStorage.Clones
- local config2=require(script.Parent.ZScript.Config)
- local remotes=workspace.Remotes
- if config.Respawn==true then
- x=script.Parent:clone()
- x.Parent=clones
- x.AutoHealthTag.Disabled=true
- else
- x=nil
- end
- if config.Level==true then
- script.Parent.Humanoid.MaxHealth=(config2.health+(workspace.GameStats.Level.Value-1)*(config2.health/10))
- script.Parent.Humanoid.Health=script.Parent.Humanoid.MaxHealth
- else
- script.Parent.Humanoid.MaxHealth=(config2.health)
- script.Parent.Humanoid.Health=script.Parent.Humanoid.MaxHealth
- end
- while wait() do
- if script.Parent~=nil then
- if config.Level==true then
- 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).."%)"
- else
- script.Parent.Name=config.Name..": "..config.Humanoid.Health.."/"..config.Humanoid.MaxHealth.." ("..math.floor((config.Humanoid.Health/config.Humanoid.MaxHealth)*100).."%)"
- end
- if config.Humanoid.Health<=0 and config.Respawn==true and x~=nil then
- wait(config.RespawnTime)
- x.Parent=script.Parent.Parent
- x.AutoHealthTag.Disabled=false
- script.Disabled=true
- script.Parent:Destroy()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement