--kills player if he/she has no blood.
function Check()
if script.Parent.Value == 0 then
game.Players.LocalPlayer.Character.Humanoid.Health = 0
end
end
script.Parent.Changed:connect(Check)
--if bleeding is true, slowly take away
script.Parent.Parent.Parent.BleedingGui.IsBleeding.Changed:connect(function()
print("u gon bleed to deth")
if script.Parent.Parent.Parent.BleedingGui.IsBleeding == true then
script.Parent.Parent.Parent.BleedingGui.TextLabel.Visible = true
for i = 1, script.Parent.Parent.Parent.BloodGui.Blood.Value do
wait(1.5)
game.Players.LocalPlayer.Character.Humanoid.Health = game.Players.LocalPlayer.Character.Humanoid.Health - 5
end
else game.Players.LocalPlayer.Character.Humanoid.Health = game.Players.LocalPlayer.Character.Humanoid.Health
script.Parent.Parent.Parent.BleedingGui.TextLabel.Visible = false
end
end)
--keep the value the same with the GUI
script.Parent.Changed:connect(function()
script.Parent.Parent.TextLabel.Text = "Blood [" .. script.Parent.Value .. "]"
end)
Above won't do anything if IsBleeding is set to true, and the GUI isn't keeping track of its Value. It seems as if "if" statements hate me :l
Below won't set IsBleeding to true, and the GUI isn't keeping track of the value (Like the BloodGui).
--Player hunger/energy/thirst script made by Cyotokatrov
x = game.Workspace
y = script.Parent
for i = 1, y.Thirst.Value do
wait(15)
y.Thirst.Value = y.Thirst.Value - 1
script.Parent.TextLabel.Text = "Thirst [" .. script.Parent.Thirst.Value .. "]"
end
function a()
if script.Parent.Thirst.Value == 0 then
print("u ded nao boi")
for i = 1, script.Parent.Parent.BloodGui.Blood.Value do
wait(0.1)
script.Parent.Parent.BloodGui.Blood.Value = script.Parent.Parent.BloodGui.Blood.Value - 1
end
end
end
script.Parent.Thirst.Changed:connect(a)
script.Parent.Changed:connect(function()
script.Parent.Parent.TextLabel.Text = "Blood [" .. script.Parent.Value .. "]"
end)
Will screenshots of the error help?
