The Scratch Platformer! 2.0

Instructions: <> Arrow Keys or WASD to move/jump\n<> You can walljump!\n<> Stay motivated :)

@Stage\n\nwhen I receive [next level v]\nnext backdrop\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\n@Ball\n\nwhen flag clicked\nshow\nset [x v] to [0]\nset [y v] to [0]\nforever\n    change [y v] by (-1)\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [x v] by (-1)\n    end\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [x v] by (1)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (-4)\n        change x by ((x) * (-1))\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n            set [y v] to [17]\n            if <(x) > [0]> then\n                set [x v] to [-10]\n            else\n                set [x v] to [10]\n            end\n        else\n            set [x v] to [0]\n        end\n    end\n    change y by (y)\n    if <touching (ground v)?> then\n        change y by ((y) - ((y) * (2)))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<key (up arrow v) pressed?> and <touching (ground v)?>> then\n        set [y v] to [15]\n    end\n    change y by (1)\n    if <(x position) > [222]> then\n        go to x: (-217) y: (-20)\n        broadcast (NEXT LEVEL v)\n    end\n    if <touching color (#000000)?> then\n        set [y v] to [22]\n    end\nend\n\nwhen I receive [next level v]\nchange [level v] by (1)\n\nwhen flag clicked\nforever\n    if <touching (spikes v)?> then\n        go to x: (-217) y: (-20)\n        change [deaths: v] by (1)\n    end\nend\n\nwhen flag clicked\nset [level v] to [0]\nchange [☁ views! v] by (1)\ngo to x: (-217) y: (-20)\n\nwhen I receive [reset v]\ngo to x: (-217) y: (-20)\n\n@ground\n\nwhen flag clicked\nswitch costume to (costume1 v)\nforever\n    play sound [bensound-scifi v] until done\nend\n\nwhen I receive [next level v]\nnext costume\n\n@Trampoline\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\ngo to [back v] layer\nswitch costume to (costume1 v)\n\n@Spikes\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\nif <<(costume [number v]) = [12]> or <(costume [number v]) = [13]>> then\n    go to [front v] layer\nelse\n    go to [back v] layer\nend\n\n@Thumbnail\n\nwhen flag clicked\ngo to [front v] layer\nshow\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\n@Sprite4\n\nwhen flag clicked\ngo to [back v] layer\nset size to (100) %\nhide\nwait (2) seconds\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (130) %\n    else\n        set size to (100) %\n    end\nend\n\nwhen this sprite clicked\nbroadcast (Reset v)\n\nwhen flag clicked\nforever\n    if <(backdrop [number v]) = [10]> then\n        go to [front v] layer\n    else\n        go to [back v] layer\n    end\nend\n\n@Sprite2\n\nwhen this sprite clicked\nbroadcast (NEXT LEVEL v)\n\nwhen flag clicked\ngo to [back v] layer\nset size to (100) %\nhide\nwait (2) seconds\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (130) %\n    else\n        set size to (100) %\n    end\nend\n\nwhen flag clicked\nforever\n    if <(backdrop [number v]) = [10]> then\n        go to [front v] layer\n    else\n        go to [back v] layer\n    end\nend\n\n