Having trouble breaking a for loop

task.wait(5)
local num = 0

repeat
	num += 1
	task.wait(0.5)
	print(num)
	for i = 1, 10 do
		if i >= 5 then
			break
		else
			task.wait(0.5)
			print(i+10)
		end
	end
until num == 10

This is just a sample, if you can copy and paste the script you’re trying to achieve this in that’d be helpful.

No that’s not what I’m trying to do, its fine I might use the coroutine

Nvm I Found a way by doing a Humanoid.Died event and putting it before the repeat loop