How to make a platformer

Instructions: After one year I've finally made a sequel to the original Apps! I don't think that anything I make can ever top the original, but this is still pretty fun to play.\n\nLike in the original, type skip out on your keyboard while you are in a game to skip it!\n\nUse the arrow keys to move and control your app as you travel through various games to make it to your place on the home screen!\n\nAlso for color switch you have to keep tapping the up key to jump up, and you can only touch things that are the same color as you are.\n\n(Scratchopoly is still in the making, it's just taking a very long time so I decided to make something that people could play while they wait.)

@Stage\n\n@Player\n\nwhen I receive [next level v]\nreset\nReset player variables\n\ndefine reset\nclear graphic effects\nset size to (100) %\nshow\ngo to x: (-160) y: (0)\npoint in direction (90)\nReset player variables\n\nwhen flag clicked\ngo to [front v] layer\nset [level v] to [1]\nset size to (100) %\nReset player variables\nreset\nforever\n    if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > ((x position) + (10))>>>> then\n        change [x v v] by (.9)\n    end\n    if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(mouse x) < ((x position) + (-10))>>>> then\n        change [x v v] by (-.9)\n    end\n    set [x v v] to ((X v) * (0.9))\n    change x by (X v)\n    if <touching (sprite2 v)?> then\n        change y by (1)\n        if <touching (sprite2 v)?> then\n            change y by (1)\n            if <touching (sprite2 v)?> then\n                change y by (1)\n                if <touching (sprite2 v)?> then\n                    change y by (1)\n                    if <touching (sprite2 v)?> then\n                        change y by (1)\n                        if <touching (sprite2 v)?> then\n                            change x by ((X v) * (-1))\n                            change y by (-5)\n                            if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > ((y position) + (10))>>>> then\n                                if <(X v) > [0]> then\n                                    set [x v v] to [-5]\n                                else\n                                    set [x v v] to [5]\n                                end\n                                set [y v v] to [10]\n                            else\n                                set [x v v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y v v] by (-1)\n    change y by (Y v)\n    if <touching (sprite2 v)?> then\n        change y by ((Y v) * (-1))\n        set [y v v] to [0]\n    end\n    change y by (-1)\n    if <touching (sprite2 v)?> then\n        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > ((y position) + (10))>>>> then\n            set [y v v] to [10]\n        end\n    end\n    change y by (1)\n    if <touching (sprite5 v)?> then\n        reset\n    end\n    change y by (-1)\n    change y by (1)\nend\n\ndefine Reset player variables\nset [x v v] to [0]\nset [y v v] to [0]\n\nwhen flag clicked\nforever\n    if <(y position) < [-150]> then\n        reset\n    end\n    if <(x position) > [230]> then\n        reset\n        change [level v] by (1)\n        broadcast (NEXT LEVEL v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Hide) = [1]> then\n        reset\n    end\nend\n\ngo to [front v] layer\n\nwhen I receive [outro v]\nhide\n\nwhen flag clicked\nshow\n\n@Sprite2\n\nwhen flag clicked\nLayer Level\n\nwhen flag clicked\nset [level v] to [1]\nswitch costume to (Level)\nwait until <(Level) = [2]>\nwait (1) seconds\nswitch costume to (Level)\nLayer Level\nwait until <(Level) = [3]>\nwait (1) seconds\nswitch costume to (Level)\nLayer Level\nwait until <(Level) = [4]>\nwait (1) seconds\nswitch costume to (Level)\nLayer Level\nwait until <(Level) = [5]>\nwait (1) seconds\nswitch costume to (Level)\nLayer Level\nwait until <(Level) = [6]>\nwait (1) seconds\nswitch costume to (Level)\nLayer Level\nwait until <(Level) = [7]>\nwait (1) seconds\nswitch costume to (Level)\nLayer Level\n\ndefine Layer Level\nbroadcast (Delete Level v)\ngo to x: (10) y: (-80)\nchange x by (10)\nchange y by (10)\nrepeat (20)\n    broadcast (New Clones v)\n    change x by (-1)\n    change y by (-1)\nend\n\nwhen I receive [outro v]\nhide\n\nwhen flag clicked\nshow\n\n@Sprite3\n\nwhen flag clicked\nhide\n\nwhen I receive [delete level v]\ndelete this clone\n\nwhen I receive [new clones v]\nif <(x position) = [200]> then\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\ngo to x: ([x position v] of [sprite2 v]) y: ([y position v] of [sprite2 v])\nswitch costume to ([costume # v] of [sprite2 v])\nshow\n\nwhen I receive [outro v]\nhide\n\n@Cover\n\nwhen I receive [next level v]\nset [hide v] to [1]\nif <(Level) < [8]> then\n    go to [front v] layer\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    set [ghost v] effect to (0)\n    wait (2) seconds\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    set [hide v] to [0]\nelse\n    switch costume to (costume2 v)\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset [hide v] to [1]\ngo to [front v] layer\nset [ghost v] effect to (0)\nwait (2) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [hide v] to [0]\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\nwhen I receive [outro v]\nhide\n\nwhen flag clicked\nshow\n\n@Sprite5\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\nwait until <(Level) = [4]>\nwait (2) seconds\nshow\nwait until <(Level) = [5]>\nwait (2) seconds\nswitch costume to (costume2 v)\nshow\nwait until <(Level) = [6]>\nwait (2) seconds\nswitch costume to (costume3 v)\nshow\nwait until <(Level) = [7]>\nwait (2) seconds\nswitch costume to (costume4 v)\nshow\n\nwhen I receive [outro v]\nhide\n\n@Front Effects\n\nwhen flag clicked\nhide\n\nwhen I receive [delete level v]\ndelete this clone\n\nwhen I receive [new clones v]\ngo to x: (0) y: (-90)\n\nwhen flag clicked\nset [brightness v] effect to (10)\nwait (2) seconds\nswitch costume to (level1 v)\nshow\ngo to [front v] layer\ngo [backward v] (1) layers\nwait until <(Level) = [2]>\nswitch costume to (level2 v)\nwait (2) seconds\nshow\nwait until <(Level) = [3]>\nswitch costume to (level3 v)\nwait (2) seconds\nshow\nwait until <(Level) = [4]>\nswitch costume to (level4 v)\nwait (2) seconds\nshow\nwait until <(Level) = [5]>\nswitch costume to (level5 v)\nwait (2) seconds\nshow\nwait until <(Level) = [6]>\nswitch costume to (level6 v)\nwait (2) seconds\nshow\nwait until <(Level) = [7]>\nswitch costume to (level7 v)\nwait (2) seconds\nshow\n\nwhen I receive [outro v]\nhide\n\nwhen flag clicked\nshow\n\n@Back Effects\n\nwhen flag clicked\nhide\n\nwhen I receive [delete level v]\ndelete this clone\n\nwhen I receive [new clones v]\ngo to x: (20) y: (-70)\n\nwhen flag clicked\nset [brightness v] effect to (0)\nwait (2) seconds\nswitch costume to (level1 v)\nshow\ngo to [back v] layer\ngo [forward v] (1) layers\nwait until <(Level) = [2]>\nswitch costume to (level2 v)\nwait (2) seconds\nshow\nwait until <(Level) = [3]>\nswitch costume to (level3 v)\nwait (2) seconds\nshow\nwait until <(Level) = [4]>\nswitch costume to (level4 v)\nwait (2) seconds\nshow\nwait until <(Level) = [5]>\nswitch costume to (level5 v)\nwait (2) seconds\nshow\nwait until <(Level) = [6]>\nswitch costume to (level6 v)\nwait (2) seconds\nshow\nwait until <(Level) = [7]>\nswitch costume to (level7 v)\nwait (2) seconds\nshow\n\nwhen I receive [outro v]\nhide\n\nwhen flag clicked\nshow\n\n