So I made a script to take damage away but if the Until is met it stops but the Break Value is set to true when the player presses a key but it doesn’t break:
local BreakValue = player2.PlayerGui.Struggle.Break
repeat
wait(0.1)
humanoid:TakeDamage(2)
print("damage")
until BreakValue.Value == true or humanoid.Health <= 2 or script.Parent.Parent.Transformed.Hit.Value == true or humanoid.Parent.Transformed.Value ~= Color3.new(0,0,0) or script.parent.parent.Humanoid.Health <= 0