Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --// MADE BY TACIDUSYT \\--
- --//Variables
- local player = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait()
- local char = player.Character or player.CharacterAdded:Wait()
- local humanoid = char:WaitForChild("Humanoid")
- local healthGui = script.Parent
- local textlabel = script.Parent.Main.TextLabel
- --//Health
- humanoid:GetPropertyChangedSignal("Health"):Connect(function()
- local healthColor = Color3.fromRGB(255, 88, 88):Lerp(Color3.fromRGB(146, 255, 116),humanoid.Health/humanoid.MaxHealth)
- local healthChange = humanoid.Health/humanoid.MaxHealth
- healthGui.Main.Bar:TweenSize(UDim2.new(healthChange,0,1,0),"In","Linear",1)
- healthGui.Main.Bar.BackgroundColor3 = healthColor
- textlabel.Text = "Health: "..humanoid.Health
- end)
Add Comment
Please, Sign In to add comment