Lost ~ A Platformer

Instructions:     This is the first platformer I made! Use up, left, and right arrows to jump and move around. Avoid water, polar bears, and fake platforms. Press R to restart the level if you get stuck. See how far you can get! 

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop v)\nbroadcast (engine_start v)\nforever\n    play sound [Restart - Subtact v] until done\n    play sound [Tunnel Vision - Subtact v] until done\nend\n\n@Player\n\nwhen I receive [engine_tick v]\nswitch costume to (PlayerLastC)\nif <(PlayerY) > [0]> then\n    switch costume to (jump v)\nelse\n    if <(PlayerY) < [0]> then\n        switch costume to (fall v)\n    else\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n            if <<[1] < (costume [number v])> and <[3] > (costume [number v])>> then\n                next costume\n            else\n                switch costume to (walk1 v)\n            end\n        else\n            switch costume to (stand v)\n        end\n    end\nend\nset [playerlastc v] to (costume [number v])\n\nwhen I receive [engine_start v]\nshow\npoint in direction (90)\ngo to x: (0) y: (180)\nset rotation style [left-right v]\ngo to [front v] layer\nset size to (40) %\nset [playerx v] to [0]\nset [playery v] to [-3]\nset [deaths v] to [0]\nset [jumps v] to [0]\nforever\n    change [playery v] by (-1)\n    switch costume to (hitbox v)\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        point in direction (-90)\n        change [playerx v] by (-1)\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        point in direction (90)\n        change [playerx v] by (1)\n    end\n    set [playerx v] to ((PlayerX) * (0.9))\n    if <touching (ground v)?> then\n        set [playery v] to [0]\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        set [playery v] to [0]\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        set [playery v] to [0]\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        set [playery v] to [0]\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (-4)\n        change x by ((PlayerX) * (-1))\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [playery v] to [15]\n            if <([abs v] of (PlayerX) ) = (PlayerX)> then\n                set [playerx v] to [-10]\n            else\n                set [playerx v] to [10]\n            end\n        else\n            set [playerx v] to [0]\n        end\n    end\n    change y by (PlayerY)\n    if <touching (ground v)?> then\n        change y by ((PlayerY) - ((PlayerY) * (2)))\n        set [playery v] to [0]\n    end\n    change y by (-1)\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <touching (ground v)?>> then\n        set [playery v] to [15]\n        change [jumps v] by (1)\n    end\n    change y by (1)\n    set x to (0)\n    set [all_sprite v] to (PlayerX)\n    if <<<touching (_edge_ v)?> and <[-10] > (y position)>> or <<key (r v) pressed?> or <<touching (polar bears v)?> or <<touching (wolf v)?> or <<touching (spikes v)?> or <touching (scorpions v)?>>>>>> then\n        switch costume to (stand v)\n        wait until <not <key (r v) pressed?>>\n        set [playerx v] to [0]\n        set [playery v] to [-3]\n        set [all_sprite v] to [-300]\n        change [deaths v] by (1)\n        point in direction (90)\n        set y to (180)\n    end\n    broadcast (engine_tick v) and wait\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen [space v] key pressed\nshow variable [deaths v]\nshow variable [jumps v]\n\nwhen [x v] key pressed\nhide variable [deaths v]\nhide variable [jumps v]\n\n@Ground\n\nwhen I receive [engine_tick v]\nset [scrollx v] to ((ScrollX) + (ALL_SPRITE))\nif <(ScrollX) < [0]> then\n    set [scrollx v] to [0]\nend\ngo to x: ((PositionX) - (ScrollX)) y: (0)\n\nwhen I receive [engine_start v]\nswitch costume to (part1 v)\nset [positionx v] to [0]\nset [scrollx v] to [0]\nset [numberofparts v] to [35]\nrepeat ((NumberOfParts) - (1))\n    create clone of (_myself_ v)\n    next costume\n    change [positionx v] by (479)\nend\n\n@Text + Decor\n\nwhen I receive [engine_tick v]\ngo [backward v] (1) layers\nset [scrollx v] to ((ScrollX) + (ALL_SPRITE))\nif <(ScrollX) < [0]> then\n    set [scrollx v] to [0]\nend\ngo to x: ((PositionX) - (ScrollX)) y: (0)\n\nwhen I receive [engine_start v]\nswitch costume to (part1 v)\nset [positionx v] to [0]\nset [scrollx v] to [0]\nset [numberofparts v] to [35]\nrepeat ((NumberOfParts) - (1))\n    go [backward v] (999) layers\n    create clone of (_myself_ v)\n    next costume\n    change [positionx v] by (479)\nend\n\n@Border\n\nwhen I receive [engine_start v]\nwait (0.01) seconds\ngo to x: (0) y: (0)\ngo to [front v] layer\nswitch costume to (costume1 v)\nshow\n\n@Polar Bears\n\nwhen I receive [engine_tick v]\nset [scrollx v] to ((ScrollX) + (ALL_SPRITE))\nif <(ScrollX) < [0]> then\n    set [scrollx v] to [0]\nend\ngo to x: ((PositionX) - (ScrollX)) y: (0)\n\nwhen I receive [engine_start v]\nset [positionx v] to [0]\nset [scrollx v] to [0]\nswitch costume to (costume3 v)\nset [numberofparts v] to [7]\nrepeat ((NumberOfParts) - (1))\n    create clone of (_myself_ v)\n    next costume\n    change [positionx v] by (479)\nend\n\n@Wolf\n\nwhen I receive [engine_tick v]\nset [scrollx v] to ((ScrollX) + (ALL_SPRITE))\nif <(ScrollX) < [0]> then\n    set [scrollx v] to [0]\nend\ngo to x: ((PositionX) - (ScrollX)) y: (0)\n\nwhen I receive [engine_start v]\nset [positionx v] to [0]\nset [scrollx v] to [0]\nswitch costume to (costume3 v)\nset [numberofparts v] to [17]\nrepeat ((NumberOfParts) - (1))\n    create clone of (_myself_ v)\n    next costume\n    change [positionx v] by (479)\nend\n\n@Spikes\n\nwhen I receive [engine_tick v]\nset [scrollx v] to ((ScrollX) + (ALL_SPRITE))\nif <(ScrollX) < [0]> then\n    set [scrollx v] to [0]\nend\ngo to x: ((PositionX) - (ScrollX)) y: (0)\n\nwhen I receive [engine_start v]\nset [positionx v] to [0]\nset [scrollx v] to [0]\nswitch costume to (costume3 v)\nset [numberofparts v] to [17]\nrepeat ((NumberOfParts) - (1))\n    create clone of (_myself_ v)\n    next costume\n    change [positionx v] by (479)\nend\n\n@Map\n\nwhen I receive [engine_tick v]\nset [scrollx v] to ((ScrollX) + (ALL_SPRITE))\nif <(ScrollX) < [0]> then\n    set [scrollx v] to [0]\nend\ngo to x: ((PositionX) - (ScrollX)) y: (0)\n\nwhen I receive [engine_start v]\nset [positionx v] to [0]\nset [scrollx v] to [0]\nswitch costume to (costume1 v)\nset [numberofparts v] to [25]\nrepeat ((NumberOfParts) - (1))\n    create clone of (_myself_ v)\n    next costume\n    change [positionx v] by (479)\nend\n\nwhen flag clicked\nclear graphic effects\nwait until <touching (player v)?>\nrepeat (50)\n    change [ghost v] effect by (2)\nend\n\n@Scorpions\n\nwhen I receive [engine_tick v]\nset [scrollx v] to ((ScrollX) + (ALL_SPRITE))\nif <(ScrollX) < [0]> then\n    set [scrollx v] to [0]\nend\ngo to x: ((PositionX) - (ScrollX)) y: (0)\n\nwhen I receive [engine_start v]\nset [positionx v] to [0]\nset [scrollx v] to [0]\nswitch costume to (costume1 v)\nset [numberofparts v] to [30]\nrepeat ((NumberOfParts) - (1))\n    create clone of (_myself_ v)\n    next costume\n    change [positionx v] by (479)\nend\n\n@Cover\n\nwhen flag clicked\ngo to [front v] layer\nhide\nset [timer v] to (timer)\nforever\n    set [timer v] to ((timer) + (.1))\n    set [timer v] to (timer)\nend\n\nwhen [timer v] > (timer)\nshow\ngo to [front v] layer\n\nwhen [space v] key pressed\nshow variable [timer v]\n\nwhen [x v] key pressed\nhide variable [timer v]\n\n