Square - A Platformer

Instructions:  Welcome to Square - A Platformer\nUse the arrow keys or WASD to get the grey square to the other side.\nDo not touch red.\nGreen is bouncy.\nALL LEVELS ARE POSSIBLE!!!

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [next level v]\nnext backdrop\n\nwhen flag clicked\nforever\n    play sound [Vexento - Sons of Norway v] until done\nend\n\nwhen flag clicked\nshow variable [level v]\nforever\n    set [level v] to (backdrop [number v])\nend\n\nwhen I receive [end v]\nhide variable [level v]\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nswitch backdrop to (end v)\nwait (1) seconds\nclear graphic effects\n\n@Sprite1\n\nwhen flag clicked\nshow\nforever\n    change [y v] by (-0.5)\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [x v] by (-1)\n    end\n    if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n        change [x v] by (1)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <<touching color (#000008)?> or <touching color (#00ff55)?>> then\n        change y by (1)\n        if <<touching color (#000008)?> or <touching color (#00ff55)?>> then\n            change y by (1)\n            if <<touching color (#000008)?> or <touching color (#00ff55)?>> then\n                change y by (1)\n                if <<touching color (#000008)?> or <touching color (#00ff55)?>> then\n                    change y by (1)\n                    if <<touching color (#000008)?> or <touching color (#00ff55)?>> then\n                        change y by (1)\n                        if <<touching color (#000008)?> or <touching color (#00ff55)?>> then\n                            change y by (1)\n                            if <<touching color (#000008)?> or <touching color (#00ff55)?>> then\n                                change y by (-6)\n                                if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                    set [y v] to [10]\n                                    if <(x) > [0]> then\n                                        set [x v] to [-10]\n                                    else\n                                        set [x v] to [10]\n                                    end\n                                else\n                                    change x by ((x) * (-1))\n                                    set [x v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (y)\n    if <touching color (#000008)?> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-0.5)\n    if <<touching color (#000008)?> and <key (up arrow v) pressed?>> then\n        set [y v] to [10]\n    end\n    change y by (0.5)\n    show\n    if <touching color (#00ff55)?> then\n        set [y v] to [15]\n    end\nend\n\nwhen flag clicked\ngo to x: (-201) y: (-85)\nshow\n\nwhen flag clicked\nset [level v] to [1]\nswitch backdrop to (backdrop1 v)\n\nwhen flag clicked\nforever\n    if <<(x position) > [230]> or <(x position) = [230]>> then\n        go to x: (-204) y: (-83)\n        broadcast (next level v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#ff0000)?> then\n        go to x: (-209) y: (-91)\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (r v) pressed?> then\n        go to x: (-213) y: (-100)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#00ffff)?> then\n        broadcast (end v)\n        stop [other scripts in sprite v]\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        broadcast (finish v)\n        hide\n    end\nend\n\n@Sprite2\n\nwhen flag clicked\nhide\n\ngo to [front v] layer\ngo to x: (0) y: (0)\nshow\n\n