No If Blocks: Platformer
@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nset [l v] to [1]\na\n\ndefine a\nswitch backdrop to (l)\na\n\n@Sprite1\n\ndefine physics\nchange [xv v] by (<key (right arrow v) pressed?> * (2))\nchange [xv v] by (<key (left arrow v) pressed?> * (-2))\nset [xv v] to ((xv) * (0.7))\nchange x by (xv)\nrepeat until <not <touching color (#000000)?>>\n    change x by ((<(xv) < [0]> * (2)) - (1))\n    set [xv v] to ((xv) * <touching color (#000000)?>)\nend\nchange [yv v] by (-0.5)\nchange y by (yv)\nrepeat until <not <touching color (#000000)?>>\n    change y by ((<(yv) < [0]> * (2)) - (1))\n    set [yv v] to ((yv) * <touching color (#000000)?>)\nend\nchange y by (-1)\nchange [yv v] by (<<key (up arrow v) pressed?> and <touching color (#000000)?>> * ((10) - (yv)))\nchange y by (1)\nchange [l v] by <(x position) > [240]>\nset [a v] to <<(y position) < [-180]> or <<(x position) > [240]> or <touching color (#ff0000)?>>>\nchange [xv v] by (() - ((a) * (xv)))\nchange [yv v] by (() - ((a) * (yv)))\ngo to x: ((x position) - (((x position) + (130)) * (a))) y: ((y position) - ((y position) * (a)))\n\nwhen flag clicked\nwait (0) seconds\nset [xv v] to [0]\nset [yv v] to [0]\ngo to x: (-130) y: (0)\nforever\n    physics\nend\n\n@Sprite2\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [front v] layer\nset [ghost v] effect to (100)\n\n