local health = 50
if health < 100 then
print("Игрок ранен!")
endlocal health = 100
if health < 100 then
print("Игрок ранен!")
else
print("Игрок здоров!")
endlocal health = 70
if health <= 0 then
print("Игрок проиграл!")
elseif health < 100 then
print("Игрок ранен!")
else
print("Игрок здоров!")
endscript.Parent.Touched:Connect(function(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid then
humanoid:TakeDamage(20)
print("Игрок получил урон!")
else
print("Касание не игроком")
end
end)local points = 50
if points >= 100 then
print("Переход на следующий уровень!")
else
print("Нужно больше очков!")
endlocal button = script.Parent
local door = workspace.Door
button.ClickDetector.MouseClick:Connect(function()
if door.CanCollide == false then
door.CanCollide = true
door.Transparency = 0
else
door.CanCollide = false
door.Transparency = 0.5
end
end)