Help with making a repeat untill?



I'm making a game and I want to add a breath meter, but I cant seem to make the right code for it. My code so far is:


Have a Emoji and draw a redline from left to right with another emoji.
When y position of fish is less than (surface)
Draw a trail from right to left the background color
When fish y position is higher than surface draw trail from left to right in red


The breath block looks like this

And it has to stop when my value breath is 1


When you reach the surface draw a colored line in the forward direction.


Can you please explain it a little bit more? I don't get it right now. (Maybe you can add some pictures?)


Sorry, going to sleep now.
Simply draw a red line from left to right.
Then from right to left draw a white line so the red line is deleting
When the emoji drawing the white line touches the emoji at the start of the red line. The fish drowns.