The One Script Platformer
@Stage\n\n@Sprite1\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nwait (3) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\n    wait (0.001) seconds\nend\nswitch costume to (costume2 v)\nset [ghost v] effect to (0)\nswitch backdrop to (backdrop1 v)\ngo to x: (-200) y: (0)\nset [xv v] to [0]\nset [yv v] to [0]\nset [speed v] to [1]\nset [wall jump mode v] to [1]\nset [jump height v] to [15]\nset [gravity v] to [1]\nstart sound [OMFG_-_Hello.mp3 v]\nforever\n    if <key (r v) pressed?> then\n        go to x: (-200) y: (0)\n    end\n    if <<(backdrop [name v]) = [backdrop10]> and <([x position v] of [sprite1 v]) > [235]>> then\n        set [ghost v] effect to (100)\n        switch costume to (costume1 v)\n        go to x: (0) y: (0)\n        repeat (10)\n            change [ghost v] effect by (-10)\n            wait (0.01) seconds\n        end\n        forever\n            go to x: (0) y: (0)\n        end\n    end\n    if <touching color (#ff0000)?> then\n        go to x: (-200) y: (0)\n    end\n    if <([x position v] of [sprite1 v]) > [235]> then\n        switch backdrop to (next backdrop v)\n        go to x: (-200) y: (0)\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [xv v] by (Speed)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [xv v] by ((Speed) * (-1))\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\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 ((Xv) * (-1))\n                            change y by (-5)\n                            if <(Wall Jump Mode) = [1]> then\n                                if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                    if <(Xv) > [0]> then\n                                        set [xv v] to [-5]\n                                    else\n                                        set [xv v] to [5]\n                                    end\n                                    set [yv v] to [10]\n                                else\n                                    set [xv v] to [0]\n                                end\n                            end\n                            if <(Wall Jump Mode) = [2]> then\n                                if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                    if <(Xv) > [0]> then\n                                        set [xv v] to [-20]\n                                    else\n                                        set [xv v] to [20]\n                                    end\n                                    set [yv v] to [15]\n                                else\n                                    set [xv v] to [0]\n                                end\n                            end\n                            if <(Wall Jump Mode) = [2]> then\n                                if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                else\n                                    set [xv v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-1)\n    change y by ((Yv) / (Gravity))\n    if <touching color (#000000)?> then\n        change y by (((Yv) / (Gravity)) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#000000)?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [yv v] to (Jump Height)\n        end\n    end\n    change y by (1)\nend\n\n
Presenting: The One Script Platformer!\nInstructions: Arrow keys to move, reach the right side of the screen.\nPress r to restart a level.\nEnjoy the game!\nBe sure to love and favorite, I worked on this for a whole afternoon.\nAll levels are possible!