Mountain - A Platformer

Instructions: I AM CURRENTLY REMAKING THE ENTIRE GAME. I am remaking the game so it doesn't glitch and the gameplay is more smooth, as you said in the comments. Until then, don't play it as it will be atrocious. \n\n▶WASD or Arrow Keys to move\n▶Double-Jumping is possible\n▶If you get stuck, press r to restart\n▶Lead is poisonous (dark grey)\n▶Pink + yellow makes you tiny\n▶Try to win for glory (Don't Cheat!)\n                      ✔✔✔Have Fun! :D ✔✔✔\n\n\n

@Stage\n\nwhen flag clicked\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [beginning v]\nswitch backdrop to (backdrop3 v)\n\nwhen I receive [start v]\nset volume to (50) %\nforever\n    play sound [music v] until done\nend\n\nwhen I receive [start v]\nrepeat (10)\n    switch backdrop to (backdrop2 v)\nend\n\n@theGuy\n\nwhen flag clicked\nhide\n\nwhen I receive [restart level v]\nReset\n\nwhen I receive [straighten up v]\nforever\n    point in direction (90)\nend\n\nwhen I receive [beginning v]\nshow\ngo to x: (-56) y: (28)\n\nwhen I receive [start v]\nReset\n\nforever\n    if <touching color (#4d4d4d)?> then\n        Die\n        broadcast (Restart Level v)\n    end\nend\n\nif <touching color (#00aaff)?> then\n    if <key (any v) pressed?> then\n        if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> and <not <touching color (#c34213)?>>> then\n            change x by (1)\n            change y by (0.25)\n            if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> and <touching color (#c34213)?>> then\n                change x by (-1)\n            end\n        end\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> and <not <touching color (#c34213)?>>> then\n            change x by (-1)\n            change y by (-0.25)\n            if <<<<key (left arrow v) pressed?> or <key (a v) pressed?>> and <touching color (#c34213)?>> and <[] = [0]>> then\n                change x by (1)\n            end\n        end\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <not <touching color (#4d4d4d)?>>> then\n            change y by (1)\n        end\n    else\n        if <not <<touching color (#26b7ff)?> and <touching color (#c34213)?>>> then\n            change y by (-1)\n        end\n    end\nend\nif <<touching color (#ee00ff)?> or <touching color (#ffc000)?>> then\n    set [size v] to [small]\nend\nif <(size) = [small]> then\n    set size to (40) %\nelse\n    set size to (70) %\nend\n\nif <not <touching color (#00aaff)?>> then\nend\n\nif <<<<(trick move) > [3]> and <not <<<touching color (#b5a27e)?> or <touching color (#00b50a)?>> or <<touching color (#7e7e7e)?> or <<touching color (#c34213)?> or <touching color (#ffffff)?>>>>>> and <(double jump) = [1]>> and <(jump) = [1]>> then\n    set [yv v] to [15]\n    set [double jump v] to [0]\nend\nif <<<touching color (#00b50a)?> or <touching color (#b5a27e)?>> or <<touching color (#7e7e7e)?> or <<touching color (#c34213)?> or <touching color (#ffffff)?>>>> then\n    set [yv v] to [1]\n    set [double jump v] to [1]\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        if <[0] = (up)> then\n            set [yv v] to [15]\n        end\n    end\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    if <[0] = (left)> then\n        change [xv v] by (-3.5)\n        change y by (2)\n    end\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    if <[0] = (right)> then\n        change [xv v] by (3.5)\n        change y by (2)\n    end\nend\nif <[1] = (down)> then\n    set [yv v] to [1]\nend\nif <[1] = (right)> then\n    set [xv v] to [-4]\nend\nif <[1] = (left)> then\n    set [xv v] to [4]\nend\nif <[1] = (up)> then\n    set [yv v] to [-5]\nend\nif <touching color (#8ac3ff)?> then\n    set [yv v] to [-0.75]\nend\nchange [yv v] by (-1)\nset [xv v] to ((Xv) * (0.7))\nchange y by (Yv)\nchange x by (Xv)\n\nwhen I receive [start v]\nforever\n    if <key (r v) pressed?> then\n        broadcast (Restart Level v)\n        wait until <not <key (r v) pressed?>>\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <touching (next level v)?> then\n        broadcast (Next Level v)\n        Reset\n        wait until <not <touching (next level v)?>>\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <key (any v) pressed?> then\n        if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n            switch costume to (jump v)\n        end\n        if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n            switch costume to (right v)\n        end\n        if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n            switch costume to (left v)\n        end\n        if <<<key (d v) pressed?> or <key (right arrow v) pressed?>> and <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n            switch costume to (right jump v)\n        end\n        if <<<key (a v) pressed?> or <key (left arrow v) pressed?>> and <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n            switch costume to (left jump v)\n        end\n    else\n        switch costume to (normal v)\n    end\nend\n\nwhen I receive [start v]\n\nforever\n    if <not > then\n        change [trick move v] by (1)\n    else\n        set [trick move v] to [0]\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        set [jump v] to [1]\n        wait (0.05) seconds\n        set [jump v] to [0]\n        wait until <not <<key (up arrow v) pressed?> or <key (w v) pressed?>>>\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <not <touching color (#00aaff)?>>> then\n        play sound [Jump v] until done\n        wait until <not <<key (up arrow v) pressed?> or <key (w v) pressed?>>>\n        wait until <<<touching color (#00b50a)?> or <touching color (#b5a27e)?>> or <<touching color (#7e7e7e)?> or <<touching color (#c34213)?> or <touching color (#ffffff)?>>>>\n    end\nend\n\ndefine Reset\nset [ghost v] effect to (0)\ngo to [front v] layer\nset size to (70) %\npoint in direction (90)\ngo to x: (-187) y: (-100)\nset [yv v] to [0]\nset [xv v] to [0]\n\ndefine Die\nstart sound [Disconnect v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nwait (0.1) seconds\n\nwhen flag clicked\n\ndefine Touch Wall <touch ground>\nrepeat (10)\n    if <touch ground> then\n        change y by (1)\n    end\nend\nif <touch ground> then\n    change x by ((round (Xv)) * (-1))\n    change y by (-10)\n    set [xv v] to [0]\nend\n\nif <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]\nelse\nend\n\ndefine Double Jump <up> <touch ground>\nif <<<(falling) > [0]> and <(falling) < [10]>> and <(Yv) < [0]>> then\n    set [jump v] to [1]\nend\nchange y by (-1)\nif <<up> and <<<touch ground> or <(falling) < [5]>> and <<(jump) = [0]> and <(jump key) = [0]>>>> then\n    set [yv v] to [13]\n    set [jump v] to [1]\n    set [jump key v] to [1]\nend\nchange y by (1)\nif <<up> and <<(jump) = [1]> and <(jump key) = [0]>>> then\n    set [yv v] to [13]\n    set [jump v] to [2]\n    set [jump key v] to [1]\nend\n\ndefine Touch Ground <up> <touch ground>\nif <(Yv) > [0]> then\n    repeat until <not <touch ground>>\n        change y by (-1)\n        set [yv v] to [0]\n    end\nelse\n    repeat until <not <touch ground>>\n        change y by (1)\n        set [yv v] to [0]\n        set [falling v] to [0]\n        set [jump v] to [0]\n    end\nend\nDouble Jump <up> <touch ground>\n\ndefine Play <right> <left> <up> <down> <touch ground>\nif <right> then\n    change [xv v] by (1)\nend\nif <left> then\n    change [xv v] by (-1)\nend\nset [xv v] to ((Xv) * (0.9))\nchange x by (round (Xv))\nTouch Wall <touch ground>\nchange [yv v] by (-1)\nchange [falling v] by (1)\nchange y by (Yv)\nTouch Ground <up> <touch ground>\nif <not <up>> then\n    set [jump key v] to [0]\nend\n\nwhen I receive [start v]\nReset\nforever\n    Play <<key (d v) pressed?> or <key (right arrow v) pressed?>> <<key (a v) pressed?> or <key (left arrow v) pressed?>> <<key (w v) pressed?> or <key (up arrow v) pressed?>> <<key (s v) pressed?> or <key (down arrow v) pressed?>> <touching (ground v)?>\nend\n\n@Ground\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [13]> then\n        broadcast (Water v)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [next level v]\nstart sound [Connect v]\nnext costume\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [15]> then\n        broadcast (Straighten Up v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [16]> then\n        broadcast (Straighten Up v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [19]> then\n        broadcast (Ending v)\n        set [ending level? v] to [1]\n        broadcast (Straighten Up v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [17]> then\n        broadcast (No Water v)\n    end\nend\n\nwhen I receive [beginning v]\nshow\ngo to x: (0) y: (0)\nswitch costume to (costume6 v)\n\nwhen I receive [start v]\nshow\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\n\n@Next Level\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nset [ghost v] effect to (100)\n\nwhen I receive [ending v]\nhide\n\n@water\n\nwhen flag clicked\nrepeat (10)\n    hide\n    go to x: (0) y: (0)\nend\n\nwhen I receive [water v]\nshow\ngo to [back v] layer\n\nwhen I receive [no water v]\nhide\n\n@GameSurf\n\nwhen flag clicked\nset size to (160) %\nhide\nwait (1) seconds\ngo to x: (415) y: (20)\nstart sound [Ocean Wave v]\nshow\nglide (0.8) secs to x: (8) y: (20)\nwait (2) seconds\nhide\nbroadcast (Beginning v)\n\n@Play\n\nwhen I receive [beginning v]\ngo to x: (144) y: (7)\nset size to (70) %\nshow\ngo to [front v] layer\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n        set size to (100) %\n    else\n        switch costume to (costume1 v)\n        set size to (70) %\n    end\nend\n\nwhen this sprite clicked\nstart sound [Hand Clap v]\nhide\nbroadcast (Start v)\n\nwhen flag clicked\nhide\n\n@Platforming Script\n\nwhen flag clicked\nhide\n\nReset\nforever\n    if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n        change [xv v] by (1)\n    end\n    if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n        change [xv v] by (-1)\n    end\n    set [xv v] to ((Xv) * (0.8))\n    change x by (round (Xv))\n    Touch Wall\n    change [yv v] by (-1)\n    change [falling v] by (1)\n    change y by (Yv)\n    Touch Ground\n    if <not <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n        set [jump key v] to [0]\n    end\nend\n\ndefine Touch Ground\nif <(Yv) > [0]> then\n    repeat until <not <touching color (#000000)?>>\n        change y by (-1)\n        set [yv v] to [0]\n    end\nelse\n    repeat until <not <touching color (#000000)?>>\n        change y by (1)\n        set [yv v] to [0]\n        set [falling v] to [0]\n        set [jump v] to [0]\n    end\nend\nDouble Jump\n\ndefine Touch Wall\nrepeat (10)\n    if <touching color (#000000)?> then\n        change y by (1)\n    end\nend\nif <touching color (#000000)?> then\n    change x by ((round (Xv)) * (-1))\n    change y by (-10)\n    if <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\nend\n\ndefine Reset\ngo to x: (-147) y: (-21)\nset [xv v] to [0]\nset [yv v] to [0]\nset [falling v] to [0]\nset [jump v] to [0]\nset [jump key v] to [0]\n\nif <<<key (w v) pressed?> or <key (up arrow v) pressed?>> and <<touching color (#000000)?> or <(falling) < [5]>>> then\n    start sound [Meow v]\n    set [yv v] to [12]\nend\n\ndefine Double Jump\nif <<<(falling) > [0]> and <(falling) < [10]>> and <(Yv) < [0]>> then\n    set [jump v] to [1]\nend\nchange y by (-1)\nif <<<key (w v) pressed?> or <key (up arrow v) pressed?>> and <<<touching color (#000000)?> or <(falling) < [5]>> and <<(jump) = [0]> and <(jump key) = [0]>>>> then\n    set [yv v] to [12]\n    set [jump v] to [1]\n    set [jump key v] to [1]\nend\nchange y by (1)\nif <<<key (w v) pressed?> or <key (up arrow v) pressed?>> and <<(jump) = [1]> and <(jump key) = [0]>>> then\n    set [yv v] to [12]\n    set [jump v] to [2]\n    set [jump key v] to [1]\nend\n\n