Kawaii Platformer

Instructions: Happy Halloween, guys! It's the best time to make a platformer ...\n\n▶ use the arrow keys, WASD or tap (mobile) to move \n▶ don't touch spikes\n▶ you can do walljump\n\nthe story behind this game: halloween is the day of spook ... and the day of pumpkins! But suddenly a wind gust came ... and blow all the pumpkins away! Oh no! can they find the way back home through the daaark night? Well, let's see. Are you ready?\n\nDid you enjoyed it? Then leave a love and fave or follow my (or both, of course). \n\nJust some people that I have to credit:\n▶ some of the art is from @-SparklyBlue101- and from @Kilonap\n▶ the music is "Mysterioso March" Kevin MacLeod (incompetech.com) (Licensed under Creative Commons: By Attribution 3.0) License\nhttp://creativecommons.org/licenses/by/3.0/\n▶ the rest of the code of art was made by me\n\nMobile friendly. I hope you enjoy!\n\noh, and I just want to note: If you got stuck somewhere, press b to respawn.

@Stage\n\nwhen I receive [levelup v]\nnext backdrop\n\nwhen flag clicked\nswitch backdrop to (backdrop2 v)\n\n@seal\n\nwhen flag clicked\nshow\nerase all\npen up\nset [x v] to [0]\ngo to x: (-142) y: (-4)\nset [xv v] to [0]\nset [yv v] to [0]\nreset timer\nforever\n    if <touching (end v)?> then\n        set [levup v] to [1]\n        broadcast (levelup v) and wait\n    end\n    if <touching color (#99b3ff)?> then\n        if <key (left arrow v) pressed?> then\n            change [xv v] by (-1)\n        end\n        if <key (right arrow v) pressed?> then\n            change [xv v] by (1)\n        end\n        if <key (down arrow v) pressed?> then\n            change [yv v] by (-1)\n        end\n        if <key (up arrow v) pressed?> then\n            change [yv v] by (1)\n        end\n        set [xv v] to ((xv) * (0.8))\n        set [yv v] to ((yv) * (0.8))\n        change [yv v] by (((yv) / (15)) + (0.1))\n        if <touching color (#ff0000)?> then\n            broadcast (dead v) and wait\n            set [x v] to [0]\n            go to x: (startX) y: (-40)\n            set [xv v] to [0]\n            set [yv v] to [0]\n        end\n        change x by (xv)\n        change y by (yv)\n        if <not <touching color (#99b3ff)?>> then\n            change y by (-2)\n            if <touching color (#99b3ff)?> then\n                change y by (2)\n                change y by ((-1) * (yv))\n                if <key (up arrow v) pressed?> then\n                    change y by (yv)\n                    set [yv v] to [9]\n                end\n            end\n        end\n        if <touching color (#000008)?> then\n            change y by (-2)\n            if <touching color (#000008)?> then\n                change x by ((-1) * (xv))\n                set [xv v] to ((-1) * (xv))\n            end\n            change y by (2)\n        end\n        if <touching color (#000008)?> then\n            change y by (-6)\n            if <not <touching color (#000008)?>> then\n                change y by ((-1) * (yv))\n                set [yv v] to ((-1) * (yv))\n            end\n            change y by (6)\n        end\n    else\n        if <<(y position) < [-170]> or <touching color (#ff0000)?>> then\n            broadcast (dead v) and wait\n            set [x v] to [0]\n            go to x: (startX) y: (-40)\n            set [xv v] to [0]\n            set [yv v] to [0]\n        end\n        if <key (left arrow v) pressed?> then\n            change [xv v] by (-1)\n        end\n        if <key (right arrow v) pressed?> then\n            change [xv v] by (1)\n        end\n        set [xv v] to ((xv) * (0.85))\n        change x by (xv)\n        if <touching color (#000008)?> then\n            change y by (-2)\n            if <touching color (#000008)?> then\n                change x by ((-1) * ((xv) + ((xv) / (([abs v] of (xv) ) + (0.0001)))))\n                if <<key (up arrow v) pressed?> and <not <(xv) = [0]>>> then\n                    set [yv v] to [8]\n                    set [xv v] to (((xv) / ([abs v] of (xv) )) * (-10))\n                else\n                    set [xv v] to [0]\n                end\n            end\n            change y by (2)\n        end\n        change y by (-3)\n        if <<key (up arrow v) pressed?> and <touching color (#000008)?>> then\n            set [yv v] to [9]\n        end\n        change y by (3)\n        if <(yv) > [-15]> then\n            change [yv v] by (-0.5)\n        end\n        if <(yv) < [3]> then\n            change y by (-2)\n            if <not <touching color (#000008)?>> then\n                change y by (-1)\n            end\n            change y by (2)\n        end\n        change y by (yv)\n        if <touching color (#000008)?> then\n            change y by (-2)\n            if <touching color (#000008)?> then\n                change y by ((-1) * (yv))\n                set [yv v] to [-3]\n            end\n            change y by (2)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#ff0000)?> then\n        go to x: (-198) y: (-125)\n    end\n    if <touching color (#00ffff)?> then\n        broadcast (levelup v)\n        go to x: (-198) y: (-125)\n    end\n    if <key (r v) pressed?> then\n        go to x: (-198) y: (-125)\n    end\nend\n\nwhen I receive [exit menu v]\nshow\nerase all\npen up\nset [x v] to [0]\nset [xv v] to [0]\nset [yv v] to [0]\nreset timer\nforever\n    if <touching (end v)?> then\n        set [levup v] to [1]\n        broadcast (levelup v) and wait\n    end\n    if <touching color (#99b3ff)?> then\n        if <key (left arrow v) pressed?> then\n            change [xv v] by (-1)\n        end\n        if <key (right arrow v) pressed?> then\n            change [xv v] by (1)\n        end\n        if <key (down arrow v) pressed?> then\n            change [yv v] by (-1)\n        end\n        if <key (up arrow v) pressed?> then\n            change [yv v] by (1)\n        end\n        set [xv v] to ((xv) * (0.8))\n        set [yv v] to ((yv) * (0.8))\n        change [yv v] by (((yv) / (15)) + (0.1))\n        if <touching color (#ff0000)?> then\n            broadcast (dead v) and wait\n            set [x v] to [0]\n            go to x: (startX) y: (-40)\n            set [xv v] to [0]\n            set [yv v] to [0]\n        end\n        change x by (xv)\n        change y by (yv)\n        if <not <touching color (#99b3ff)?>> then\n            change y by (-2)\n            if <touching color (#99b3ff)?> then\n                change y by (2)\n                change y by ((-1) * (yv))\n                if <key (up arrow v) pressed?> then\n                    change y by (yv)\n                    set [yv v] to [9]\n                end\n            end\n        end\n        if <touching color (#000008)?> then\n            change y by (-2)\n            if <touching color (#000008)?> then\n                change x by ((-1) * (xv))\n                set [xv v] to ((-1) * (xv))\n            end\n            change y by (2)\n        end\n        if <touching color (#000008)?> then\n            change y by (-6)\n            if <not <touching color (#000008)?>> then\n                change y by ((-1) * (yv))\n                set [yv v] to ((-1) * (yv))\n            end\n            change y by (6)\n        end\n    else\n        if <<(y position) < [-170]> or <touching color (#ff0000)?>> then\n            broadcast (dead v) and wait\n            set [x v] to [0]\n            go to x: (startX) y: (-40)\n            set [xv v] to [0]\n            set [yv v] to [0]\n        end\n        if <key (left arrow v) pressed?> then\n            change [xv v] by (-1)\n        end\n        if <key (right arrow v) pressed?> then\n            change [xv v] by (1)\n        end\n        set [xv v] to ((xv) * (0.85))\n        change x by (xv)\n        if <touching color (#000008)?> then\n            change y by (-2)\n            if <touching color (#000008)?> then\n                change x by ((-1) * ((xv) + ((xv) / (([abs v] of (xv) ) + (0.0001)))))\n                if <<key (up arrow v) pressed?> and <not <(xv) = [0]>>> then\n                    set [yv v] to [8]\n                    set [xv v] to (((xv) / ([abs v] of (xv) )) * (-10))\n                else\n                    set [xv v] to [0]\n                end\n            end\n            change y by (2)\n        end\n        change y by (-3)\n        if <<key (up arrow v) pressed?> and <touching color (#000008)?>> then\n            set [yv v] to [9]\n        end\n        change y by (3)\n        if <(yv) > [-15]> then\n            change [yv v] by (-0.5)\n        end\n        if <(yv) < [3]> then\n            change y by (-2)\n            if <not <touching color (#000008)?>> then\n                change y by (-1)\n            end\n            change y by (2)\n        end\n        change y by (yv)\n        if <touching color (#000008)?> then\n            change y by (-2)\n            if <touching color (#000008)?> then\n                change y by ((-1) * (yv))\n                set [yv v] to [-3]\n            end\n            change y by (2)\n        end\n    end\nend\n\nwhen I receive [pause menu v]\nstop [other scripts in sprite v]\n\nwhen I receive [exit menu v]\nforever\n    if <touching color (#ff0000)?> then\n        go to x: (-198) y: (-125)\n    end\n    if <touching color (#00ffff)?> then\n        broadcast (levelup v)\n        go to x: (-198) y: (-125)\n    end\n    if <key (r v) pressed?> then\n        go to x: (-198) y: (-125)\n    end\nend\n\n@resolution\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nswitch costume to (costume1 v)\n\nwhen [space v] key pressed\nswitch costume to (costume2 v)\n\nwhen this sprite clicked\nhide\n\nwhen backdrop switches to [backdrop22 v]\nshow\n\n@bonus levels\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop22 v]\nshow\n\nwhen this sprite clicked\nhide\nswitch backdrop to (backdrop23 v)\n\n