i got this code:
variable = not variable
coroutine.resume(coro, variable)
what i need put in this code, or in coro code to make it repeat if variable == true?
It sounds like you need a loop of some kind or an If statement, I would search online for control structures in lua (https://www.lua.org/pil/4.3.html).