Ha, nice.
Some of my friends at Uni once told me about Scratch. Looking at your snippet, it looks like a kind of... bizarre way to teach programming.
"Broadcasting" and "Receiving"? Is that Scratch's terminology for Functions/Methods?
Weird.
Like people said... probably the... 'next stage' would be:
Game Maker or MMF or even DarkBasic.
There's also the Torque 2D engine which looks pretty nice but it's kind of expensive, as I recall.
I've never actually used any of these, I'm not in to using pre-built engines when it comes to 2D game development, so I can't explain any direct details to you...
HOWEVER, I'm interested in what YOUR definition of a "code loop" is and what problem it's causing. I've never used scratch but in programming, the logic is pretty consistent and I have... a sort of OCD for fixing bugs, even if they aren't my own. I know you want to move on from Scratch but hey, if you encountered it in one Game Dev program, you might encounter it in another so it's good to learn how and why these problems come about, so you can deal with them in the future.
In short:
HEY, MrPoetatoebadger! Tell me about your "code loop" problem you were having, please!
EDIT: Feel free to PM/Message me it instead, otherwise we'll get complained at for cluttering up the screenshot thread or something.