Or just make the room a minefield. NOTE!!! Keep the damage value low or the script will crash your browser
gx = getBuddyX();
gy = getBuddyY();
test = gx>510||gx350||gy<40;
if(test,explode(gx+random()-.5,getBuddyY(),1),0)
if your feeling lazy, unlock the scripting engine, and put this in.
gx = getBuddyX();
test = gx>510||gx<3;
if(test,explode(gx+random()-.5,getBuddyY(),.15),0)
Then just sit back and enjoy :)