Speed Run Platformer

Instructions: Arrow keys/WASD to move\nRed kills you\nBlue makes you jump\nYellow takes you to the next level\nLight blue is water\nGreen is boost\nPurple is bumper\nPink is goop\nPost Deaths and Time!\nPressing R will reset the run without replaying the intro.

@Stage\n\n@Sprite1\n\nwhen backdrop switches to [backdrop11 v]\nhide variable [level v]\n\nshow variable [☁ world best deaths v]\nshow variable [☁ world best time v]\nif <(☁ World Best Deaths) > (Deaths)> then\n    set [temp v] to (☁ World Best Deaths)\n    set [☁ world best deaths v] to (Deaths)\n    if <(temp) < (Deaths)> then\n        set [☁ world best deaths v] to (Deaths)\n    end\nend\nif <(☁ World Best Time) > (Time)> then\n    set [temp v] to (☁ World Best Time)\n    set [☁ world best time v] to (Deaths)\n    if <(temp) < (Deaths)> then\n        set [☁ world best time v] to (Deaths)\n    end\nend\n\ndefine Platform\nforever\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [xv v] by (1)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [xv v] by (-1)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <touching color (#666666)?> then\n        change y by (1)\n        if <touching color (#666666)?> then\n            change y by (1)\n            if <touching color (#666666)?> then\n                change y by (1)\n                if <touching color (#666666)?> then\n                    change y by (1)\n                    if <touching color (#666666)?> then\n                        change y by (1)\n                        if <touching color (#666666)?> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\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                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-1)\n    change y by (Yv)\n    if <touching color (#666666)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#666666)?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [yv v] to [15]\n        end\n    end\n    change y by (1)\n    if <touching color (#ffff00)?> then\n        switch backdrop to (next backdrop v)\n        go to x: (-220) y: (-70)\n        set [yv v] to [0]\n        set [xv v] to [0]\n        change [level v] by (1)\n    end\n    if <touching color (#ff0000)?> then\n        go to x: (-220) y: (-70)\n        set [yv v] to [0]\n        set [xv v] to [0]\n        change [deaths v] by (1)\n    end\n    if <touching color (#003fff)?> then\n        set [yv v] to [20]\n    end\n    if <touching color (#00ffff)?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [yv v] to [5]\n        else\n            set [yv v] to [-1]\n        end\n    end\n    if <touching color (#e2ffbd)?> then\n        go to x: (-220) y: (-70)\n        switch backdrop to (backdrop27 v)\n        set [yv v] to [0]\n        set [xv v] to [0]\n    end\n    if <touching color (#cccc00)?> then\n        go to x: (-220) y: (-70)\n        switch backdrop to (backdrop17 v)\n        hide variable [level v]\n        set [yv v] to [0]\n        set [xv v] to [0]\n    end\n    if <touching color (#00ff55)?> then\n        if <(Xv) > [0]> then\n            set [xv v] to [20]\n        end\n        if <(Xv) < [0]> then\n            set [xv v] to [-20]\n        end\n    end\n    if <touching color (#7f00ff)?> then\n        set [xv v] to ((Xv) * (-2))\n        set [yv v] to ((Yv) * (-1.08))\n    end\n    if <touching color (#ff00bf)?> then\n        set [xv v] to ((Xv) * (0.5))\n        set [yv v] to ((Yv) * (0.9))\n    end\n    if <touching color (#ffff99)?> then\n        go to x: (-220) y: (-70)\n        switch backdrop to (previous backdrop v)\n        set [yv v] to [0]\n        set [xv v] to [0]\n    end\nend\n\nwhen flag clicked\nset [level v] to [1]\nset [qwerty v] to [0]\nhide variable [deaths v]\nhide variable [time v]\nhide variable [level v]\nhide variable [☁ world best deaths v]\nhide variable [☁ world best time v]\nhide\nwait (6) seconds\nshow\nset [deaths v] to [0]\ngo to x: (-220) y: (-70)\nswitch backdrop to (backdrop26 v)\nshow variable [level v]\nshow variable [deaths v]\nshow variable [time v]\nbroadcast (Timer v)\nPlatform\n\nwhen flag clicked\nwait (6) seconds\nforever\n    if <key (r v) pressed?> then\n        set [xv v] to [0]\n        set [yv v] to [0]\n        set [qwerty v] to [0]\n        hide variable [deaths v]\n        hide variable [time v]\n        hide variable [level v]\n        hide variable [☁ world best deaths v]\n        hide variable [☁ world best time v]\n        set [deaths v] to [0]\n        go to x: (-220) y: (-70)\n        switch backdrop to (backdrop26 v)\n        show variable [level v]\n        show variable [deaths v]\n        show variable [time v]\n        broadcast (Timer v)\n    end\nend\n\nwhen I receive [timer v]\nset [time v] to [0]\nreset timer\nrepeat until <touching color (#ff9400)?>\n    set [time v] to (timer)\nend\n\nset [☁ world best deaths v] to [9999]\nset [☁ world best time v] to [9999]\n\n@Sprite2\n\nwhen flag clicked\nwait (3) seconds\nshow\ngo to x: (0) y: (0)\nwait (3) seconds\nhide\n\n@Sprite4\n\nwhen flag clicked\npoint in direction (90)\ngo to [front v] layer\nshow\ngo to x: (0) y: (0)\nset size to (0) %\nrepeat (50)\n    change size by (2)\n    turn right (7.2) degrees\nend\n\nwhen I receive [logo v]\nhide\n\n@Sprite3\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nwait (3) seconds\nhide\nbroadcast (logo v)\n\n