Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.Health, false)
- local character = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- local function update()
- script.Parent.TextLabel.Text = humanoid.Health.." / "..humanoid.MaxHealth
- script.Parent.Health:TweenSize(UDim2.new(humanoid.Health/humanoid.MaxHealth,0,1,0), "Out", "Linear", 0.25)
- end
- humanoid:GetPropertyChangedSignal("Health"):Connect(update)
- humanoid:GetPropertyChangedSignal("MaxHealth"):Connect(update)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement