Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Paste in LocalScript
- local Display = script.Parent.Display
- local HealthText = script.Parent.HealthText
- --[[Setting]]------
- local speed = 0.4
- ------------
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local Humanoid = character:WaitForChild("Humanoid")
- Humanoid.HealthChanged:Connect(function(Damage)
- Display:TweenSize(UDim2.new(Damage/Humanoid.MaxHealth, 0, 1, 0), Enum.EasingDirection.In, Enum.EasingStyle.Quad, speed, false)
- HealthText.Text = math.floor(Humanoid.Health).."/"..Humanoid.MaxHealth
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement