Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while wait() do
- -- Variables
- local base = script.Parent
- local scale = base.Scale
- local text = base.TextLabel
- local player = game.Players.LocalPlayer
- local character = player.Character
- local humanoid = character.Humanoid
- local health = humanoid.Health
- local maxHealth = humanoid.MaxHealth
- -- Code
- local ratio = health / maxHealth
- scale.Size = UDim2.new(ratio,0,1,0)
- text.Text = math.floor(health)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement