as a person who has no idea how to use scratch: how the fuck did you do screen wrapping
checking its position to see if it's above/below specific edges of the screen, then warping it to the other edge when necessary.
(And fyi, I did not touch the other 10 bossfight, because I wanted to make 18's 2nd phase feel more special and not like... 18 and 10 at once, even if that's literally what it is)