Simply Platformer

Instructions: Up, Down, Left, and Right to move\n\n\nR to restart a level if it glitches\n\nThanks for 1000 views!

@Stage\n\nwhen flag clicked\nset [level v] to [0]\n\nwhen flag clicked\nforever\n    if <(Level) = [1 ]> then\n        switch backdrop to (backdrop3 v)\n    end\n    if <(Level) = [2]> then\n        switch backdrop to (backdrop4 v)\n    end\n    if <(Level) = [3 ]> then\n        switch backdrop to (backdrop5 v)\n    end\n    if <(Level) = [4]> then\n        switch backdrop to (backdrop6 v)\n    end\n    if <(Level) = [5]> then\n        switch backdrop to (backdrop7 v)\n    end\n    if <(Level) = [6]> then\n        switch backdrop to (backdrop8 v)\n    end\n    if <(Level) = [7]> then\n        switch backdrop to (backdrop9 v)\n    end\n    if <(Level) = [8]> then\n        switch backdrop to (backdrop10 v)\n    end\n    if <(Level) = [8]> then\n        switch backdrop to (backdrop10 v)\n    end\n    if <(Level) = [9]> then\n        switch backdrop to (backdrop11 v)\n    end\n    if <(Level) = [10]> then\n        switch backdrop to (backdrop13 v)\n    end\n    if <(Level) = [11]> then\n        switch backdrop to (backdrop14 v)\n    end\n    if <(Level) = [12]> then\n        switch backdrop to (backdrop15 v)\n    end\n    if <(Level) = [13]> then\n        switch backdrop to (backdrop16 v)\n    end\n    if <(Level) = [14]> then\n        switch backdrop to (backdrop17 v)\n    end\n    if <(Level) = [15]> then\n        switch backdrop to (backdrop18 v)\n    end\n    if <(Level) = [16]> then\n        switch backdrop to (backdrop12 v)\n    end\nend\n\nbroadcast (Boss v)\n\n@Sprite2\n\nwhen flag clicked\nforever\n    if <touching color (#ff0000)?> then\n        go to x: (-213) y: (-90)\n    end\nend\n\nwhen backdrop switches to [backdrop2 v]\nset [gravity v] to [5]\nforever\n    change [y vel v] by (-0.5)\n    if <key (right arrow v) pressed?> then\n        change [x vel v] by (0.7)\n    end\n    if <key (left arrow v) pressed?> then\n        change [x vel v] by (-0.7)\n    end\n    set [x vel v] to ((X vel) * (0.9))\n    change x by (X vel)\n    if <touching color (#000000)?> then\n        change y by (-1)\n        if <touching color (#000000)?> then\n            change y by (-1)\n            if <touching color (#000000)?> then\n                change y by (-1)\n                if <touching color (#000000)?> then\n                    change y by (-1)\n                    if <touching color (#000000)?> then\n                        change y by (-1)\n                        if <touching color (#000000)?> then\n                            change x by ((X vel) * (-1))\n                            change x by (-1)\n                            change y by (-5)\n                            change x by (-1)\n                            if <key (up arrow v) pressed?> then\n                                if <(X vel) > [0  ]> then\n                                    set [x vel v] to [-8]\n                                else\n                                    set [x vel v] to [8]\n                                end\n                                set [y vel v] to [8]\n                            else\n                                set [y vel v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (Y vel)\n    if <touching color (#000000)?> then\n        change y by ((Y vel) * (-1))\n        set [y vel v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#000000)?> then\n        if <key (up arrow v) pressed?> then\n            set [y vel v] to [10]\n        end\n    end\nend\n\nwhen backdrop switches to [backdrop2 v]\ngo to x: (-213) y: (-90)\nshow\nforever\n    if <not <touching (<touching color (#000000)?> v)?>> then\n        change y by (1.5)\n    end\nend\n\nwhen I receive [new level v]\ngo to x: (-213) y: (-90)\n\nwhen flag clicked\nforever\n    if <key (r v) pressed?> then\n        go to x: (-213) y: (-90)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <(y position) < [-97  ]> then\n        change y by (18)\n    end\nend\n\nsay [Hello!]\n\n@Sprite3\n\nwhen flag clicked\nshow\nswitch backdrop to (backdrop1 v)\n\nwhen this sprite clicked\nswitch backdrop to (backdrop2 v)\nhide\n\n@Sprite4\n\nwhen flag clicked\nhide\nforever\n    if <touching (sprite2 v)?> then\n        broadcast (New level v)\n        change [level v] by (1)\n    end\nend\n\nwhen backdrop switches to [backdrop2 v]\nshow\n\nwhen backdrop switches to [backdrop12 v]\nhide\n\n@Sprite5\n\nwhen flag clicked\nhide\n\n@Sprite6\n\nwhen flag clicked\nshow\nwait (3) seconds\nchange [ghost v] effect by (25)\nwait (0.1) seconds\nchange [ghost v] effect by (25)\nwait (0.1) seconds\nchange [ghost v] effect by (25)\nwait (0.1) seconds\nchange [ghost v] effect by (25)\nhide\n\n@Sprite7\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <(Level) = [13]> then\n        go to x: (-144) y: (-89)\n        show\n        forever\n            glide (3) secs to x: (190) y: (-89)\n            if <(Level) = [14]> then\n                stop [this script v]\n            end\n            glide (3) secs to x: (-144) y: (-89)\n            if <(Level) = [14]> then\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [14]> then\n        go to x: (-1) y: (-90)\n        show\n        forever\n            glide (2) secs to x: (-1) y: (30)\n            if <(Level) = [15]> then\n                hide\n                stop [this script v]\n            end\n            glide (2) secs to x: (-1) y: (-90)\n            if <(Level) = [15]> then\n                hide\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [12]> then\n        go to x: (83) y: (-17)\n        show\n        forever\n            glide (3) secs to x: (210) y: (-17)\n            if <(Level) = [13]> then\n                stop [this script v]\n            end\n            glide (3) secs to x: (83) y: (-17)\n            if <(Level) = [13]> then\n                stop [this script v]\n            end\n        end\n    end\nend\n\n@Sprite8\n\nwhen I receive [boss v]\nwait (2) seconds\nforever\n    wait (1) seconds\n    broadcast (Pew v)\n    wait (0.3) seconds\n    broadcast (Pew v)\n    wait (0.3) seconds\n    broadcast (Pew v)\n    wait (1) seconds\nend\n\nwhen flag clicked\nhide\n\n@Sprite9\n\nwhen I start as a clone\ngo to (sprite8 v)\npoint towards (sprite2 v)\nshow\nrepeat until <touching (_edge_ v)?>\n    change x by (-3)\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nif <touching (sprite2 v)?> then\n    delete this clone\nend\n\nwhen I receive [pew v]\ncreate clone of (_myself_ v)\n\n