The Scuba Diver

This Scratch code has a scuba diver swimming back and forth. He changes costumes when it gets to the end and then heads the other way. It uses a variable to keep track of which way it is going so it will know whether to add on to or subtract from the x position.