Climb Out of The Hole

Instructions: Gray box has been fixed after the horrors of scratch 2.0! \n\nThe story is in the game\n\nUse the arrow keys or WAD to move\n\nPress R to restart a level\n\nPress 0 to skip a level\n\nGreen moss makes you bounce\n\nYou can only wall jump after a certain level

@Stage\n\nwhen flag clicked\nset [can-wall-jump v] to [0]\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [start-game v]\nswitch backdrop to (backdrop6 v)\nwait until <key (space v) pressed?>\nswitch backdrop to (backdrop5 v)\n\n@Sprite1\n\nwhen backdrop switches to [backdrop5 v]\nshow\ngo to x: (0) y: (100)\nwait (2) seconds\nthink [Where Am I?] for (3) seconds\nwait (2) seconds\nthink [I guess I have to head up...] for (4) seconds\n\nwhen I receive [change-back v]\ngo to x: (-136) y: (-144)\nswitch backdrop to (next backdrop v)\n\nwhen backdrop switches to [backdrop3 v]\nthink [That green moss looks bouncy...] for (5) seconds\n\nwhen I receive [reset v]\ngo to x: (-136) y: (-144)\n\nwhen backdrop switches to [backdrop17 v]\nforever\n    if <<key (space v) pressed?> and <<(direction) = [90]> and <touching color (#666666)?>>> then\n        point in direction (-90)\n        set [y-vel v] to [10]\n        change [x-vel v] by (-3)\n    end\n    if <<key (space v) pressed?> and <<(direction) = [-90]> and <touching color (#666666)?>>> then\n        point in direction (90)\n        set [y-vel v] to [10]\n        change [x-vel v] by (3)\n    end\nend\n\nwhen backdrop switches to [backdrop17 v]\nset [can-wall-jump v] to [1]\n\nwhen backdrop switches to [backdrop5 v]\nset rotation style [left-right v]\nset [y-vel v] to [0]\nset [x-vel v] to [0]\nhide variable [y-vel v]\nhide variable [x-vel v]\nforever\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        point in direction (90)\n        change [x-vel v] by (1)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [x-vel v] by (-1)\n    end\n    set [x-vel v] to ((X-vel) * (0.9))\n    change x by (X-vel)\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 ((X-vel) * (-1))\n                            change y by (-5)\n                            if <(can-wall-jump) = [1]> then\n                                if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n                                    if <(X-vel) > [0]> then\n                                        set [x-vel v] to [-15]\n                                    else\n                                        set [x-vel v] to [15]\n                                    end\n                                    set [y-vel v] to [10]\n                                else\n                                    set [x-vel v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\ngo to x: (0) y: (100)\nhide\nforever\n    if <<touching (_edge_ v)?> and <<(y position) < [0 ]> and <not <(y position) > [0]>>>> then\n        broadcast (reset v)\n    end\n    if <<touching (_edge_ v)?> and <<(y position) > [0]> and <not <(y position) < [0 ]>>>> then\n        broadcast (change-back v)\n        wait until <not <touching (_edge_ v)?>>\n    end\n    if <key (r v) pressed?> then\n        broadcast (reset v)\n    end\n    if <key (0 v) pressed?> then\n        broadcast (change-back v)\n        wait until <not <key (0 v) pressed?>>\n    end\n    if <touching color (#ae06f4)?> then\n        broadcast (reset v)\n    end\nend\n\nwhen backdrop switches to [backdrop5 v]\nforever\n    change [y-vel v] by (-1)\n    change y by (Y-vel)\n    if <touching color (#666666)?> then\n        change y by ((Y-vel) * (-1))\n        set [y-vel v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#00ff55)?> then\n        set [y-vel v] to [16]\n    else\n        if <touching color (#666666)?> then\n            if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n                set [y-vel v] to [16]\n            end\n        end\n    end\n    change y by (1)\nend\n\nwhen flag clicked\nforever\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        switch costume to (costume1 v)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        switch costume to (costume2 v)\n    end\nend\n\nwhen backdrop switches to [backdrop21 v]\nsay [I'm free!!!!!] for (3) seconds\nswitch backdrop to (next backdrop v)\n\nwhen backdrop switches to [backdrop22 v]\nhide\n\nwhen backdrop switches to [backdrop5 v]\nforever\n    if <touching color (#ff00bf)?> then\n        broadcast (open-wall v)\n    end\nend\n\n@Sprite2\n\nwhen flag clicked\nshow\ngo to x: (0) y: (30)\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (15)\n        wait until <not <touching (mouse-pointer v)?>>\n        change size by (-15)\n    end\nend\n\nwhen this sprite clicked\nhide\nbroadcast (start-game v)\n\n@Sprite3\n\nwhen flag clicked\ngo to x: (0) y: (140)\nshow\n\nwhen I receive [start-game v]\nhide\n\n@Sprite4\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\n\nwhen backdrop switches to [backdrop12 v]\nshow\nset size to (100) %\ngo to x: (139) y: (-90)\nforever\n    repeat until <<touching color (#666666)?> and <not <touching (sprite1 v)?>>>\n        change x by (3)\n    end\n    move (-3) steps\n    repeat until <<touching color (#666666)?> and <not <touching (sprite1 v)?>>>\n        change x by (-3)\n    end\n    move (3) steps\nend\n\nwhen backdrop switches to [backdrop18 v]\n\nwhen backdrop switches to [backdrop13 v]\nhide\nstop [other scripts in sprite v]\n\n@Sprite5\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop12 v]\nshow\ngo to x: (-140) y: (0)\nforever\n    repeat until <<touching color (#666666)?> and <not <touching (sprite1 v)?>>>\n        change x by (3)\n    end\n    move (-3) steps\n    repeat until <<touching color (#666666)?> and <not <touching (sprite1 v)?>>>\n        change x by (-3)\n    end\n    move (3) steps\nend\n\nwhen backdrop switches to [backdrop13 v]\nstop [other scripts in sprite v]\ngo to x: (0) y: (-120)\nforever\n    repeat until <touching (_edge_ v)?>\n        change y by (3)\n    end\n    change y by (-3)\n    repeat until <touching (_edge_ v)?>\n        change y by (-3)\n    end\n    change y by (3)\nend\n\nwhen backdrop switches to [backdrop14 v]\nhide\nstop [other scripts in sprite v]\n\n@Sprite6\n\nwhen flag clicked\nhide\nhide\ngo to x: (-11) y: (-88)\ngo [backward v] (6) layers\nhide\nswitch costume to (costume1 v)\n\nwhen backdrop switches to [backdrop15 v]\nhide\nswitch costume to (costume2 v)\ngo to x: (46) y: (54)\n\nwhen I receive [open-wall v]\nshow\n\nwhen backdrop switches to [backdrop16 v]\nhide\n\n@Thumbnail\n\nwhen flag clicked\nshow\ngo to [front v] layer\ngo to x: (0) y: (0)\nwait (0.1) seconds\nhide\n\nshow\n\n