The Outside World || A platformer

Instructions:                   Welcome to the Outside World!\n\n↳ This is the part one of the game. Part two's link is here\nhttps://scratch.mit.edu/projects/496528245/\nAnyways here are the controls\n↬ AWD or arrow keys to move\n↬ You have to go get the coal/ice/crystal/bread and the key\n\n                                    ↳Story↲\nThis is player. He is a very depressed person. Sadly, his family was killed by a group of people. He had nothing to do with them. Once, while going outside, a snow storm began. And for the worst, those people returned. They didn't hurt him but dumped (Yeeted!) him somewhere far from his home.

@Stage\n\nwhen I receive [magma v]\nswitch backdrop to (hell v)\n\nwhen flag clicked\nswitch backdrop to (winter v)\n\nwhen I receive [crystal cave v]\nswitch backdrop to (crystal cave v)\n\nwhen I receive [spring v]\nswitch backdrop to (home v)\n\nwhen I receive [restart v]\nswitch backdrop to (winter v)\n\n@Player\n\nwhen flag clicked\nhide\nwait (1) seconds\nshow\ngo to x: (-195) y: (-79)\nset [wall jump v] to [0]\nset [speed v] to [0]\nwait (1) seconds\ngo to x: (-195) y: (-79)\nforever\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        point in direction (-90)\n        move (5) steps\n        if <<touching color (#a32929)?> or <touching color (#5c656a)?>> then\n            if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> and <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n                if <<touching color (#a32929)?> or <touching color (#5c656a)?>> then\n                    move (-10) steps\n                end\n                move (-1) steps\n                wait (0.1) seconds\n                change y by (5)\n            end\n        end\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        point in direction (90)\n        move (5) steps\n        if <<touching color (#a32929)?> or <touching color (#5c656a)?>> then\n            if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> and <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n                if <<touching color (#a32929)?> or <touching color (#5c656a)?>> then\n                    move (-10) steps\n                end\n                move (-1) steps\n                wait (0.1) seconds\n                change y by (5)\n            end\n        end\n    end\n    if <<touching color (#a32929)?> or <touching color (#5c656a)?>> then\n        move (-10) steps\n    end\n    if <touching color (#4eaffb)?> then\n        set [speed v] to [-1]\n        repeat until <not <touching color (#4eaffa)?>>\n            change [speed v] by (1)\n            move (Speed) steps\n            set [speed v] to [0]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    wait (0.8) seconds\n    next costume\nend\n\nwhen I receive [next level! v]\ngo to x: (-205) y: (-6)\n\nwhen flag clicked\ngo [backward v] (1) layers\ngo to x: (-197) y: (-59)\nset [gravity v] to [0]\nforever\n    if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n        set [gravity v] to [3]\n        change y by (Gravity)\n        repeat until <touching (ground v)?>\n            change [gravity v] by (-0.1)\n            change y by (Gravity)\n        end\n    end\n    repeat until <touching (ground v)?>\n        change y by (-5)\n    end\nend\n\nwhen flag clicked\nforever\n    if on edge, bounce\nend\n\nwhen [timer v] > (0.1)\nhide\n\nwhen flag clicked\nforever\n    if <touching color (#ff0000)?> then\n        go to x: (-195) y: (-79)\n    end\n    if <touching color (#a2ffff)?> then\n        go to x: (-195) y: (-79)\n    end\n    if <touching color (#a91a1a)?> then\n        change x by (5)\n    end\n    if <touching color (#a84343)?> then\n        change x by (-5)\n    end\n    if <touching color (#475d8b)?> then\n        change x by (-5)\n    end\n    if <touching color (#6b748a)?> then\n        change x by (5)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (danger v)?> then\n        go to x: (-195) y: (-79)\n    end\nend\n\nwhen I receive [crystal cave v]\nthink [ Im not selfish but... A few crystals wont matter tho...] for (0.1) seconds\n\nwhen I receive [spring v]\nsay [I'm so hungr-] for (0.5) seconds\nsay [wait what's that?] for (1) seconds\nsay [MY home!?!] for (1) seconds\n\nwhen I receive [restart v]\ngo to x: (-195) y: (-79)\n\n@ground\n\nwhen flag clicked\ngo [backward v] (1) layers\nhide\nswitch costume to (level 1 v)\nbroadcast (Start v)\nwait (1) seconds\nshow\nforever\n    if <(costume [number v]) = [12]> then\n        broadcast (Spikes! v)\n        broadcast (Key!! v)\n    end\n    if <(costume [number v]) = [7]> then\n        broadcast (Magma v)\n    end\n    if <(costume [number v]) = [10]> then\n        broadcast (Crystal cave v)\n    end\n    if <(costume [number v]) = [9]> then\n        broadcast (Way to the cave v)\n    end\n    if <(costume [number v]) = [13]> then\n        broadcast (No spikes v)\n        broadcast (Spring v)\n    end\n    if <(costume [number v]) = [14]> then\n        broadcast (End v)\n    end\nend\n\nwhen I receive [next level! v]\nnext costume\n\nwhen I receive [restart v]\nswitch costume to (level 1 v)\n\n@Object\n\nwhen flag clicked\nshow\ngo to x: (204) y: (-92)\nforever\n    if <touching (player v)?> then\n        broadcast (Next level! v)\n    end\n    if <touching color (#672f17)?> then\n        switch costume to (lce v)\n    end\n    if <<touching color (#a5b49d)?> and <touching color (#8f4a2d)?>> then\n        hide\n    end\nend\n\nwhen I receive [start v]\nhide\nwait (1) seconds\nshow\n\nwhen flag clicked\nswitch costume to (coal v)\n\nwhen I receive [crystal cave v]\nswitch costume to (crystal v)\n\nwhen I receive [spring v]\nswitch costume to (bread v)\n\n@The outside world\n\nwhen flag clicked\nshow\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nbroadcast (Start v)\nforever\n    reset timer\nend\n\nwhen [timer v] > (0.1)\nshow\ngo to [front v] layer\n\n@decor\n\nwhen I start as a clone\nforever\n    change y by (pick random (-5) to (-1))\n    if <touching (ground v)?> then\n        delete this clone\n    end\nend\n\nwhen flag clicked\nshow\nswitch costume to (snow flakes v)\ngo to x: (-205) y: (180)\nforever\n    wait (0.5) seconds\n    set x to (pick random (-256) to (256))\n    create clone of (_myself_ v)\nend\n\nwhen I receive [magma v]\nswitch costume to (lava rain v)\n\nwhen I receive [spring v]\nhide\n\nwhen I receive [crystal cave v]\nswitch costume to (water droplets v)\n\n@skip/credits\n\nwhen this sprite clicked\nbroadcast (Next level! v)\n\nwhen I receive [end v]\nswitch costume to (end v)\nif <<touching (mouse-pointer v)?> and <mouse down?>> then\n    broadcast (credits v)\nend\n\nwhen flag clicked\nshow\nswitch costume to (skip v)\n\nwhen I receive [credits v]\nhide\n\nwhen flag clicked\nforever\n    wait until <touching (mouse-pointer v)?>\n    repeat (10)\n        change size by (1)\n    end\n    wait until <not <touching (mouse-pointer v)?>>\n    repeat (10)\n        change size by (-1)\n    end\nend\n\n@sign\n\nwhen I receive [way to the cave v]\nshow\n\nwhen flag clicked\nhide\n\nwhen I receive [crystal cave v]\nhide\n\n@danger\n\nwhen I receive [spikes! v]\nshow\n\nwhen flag clicked\nhide\n\nwhen I receive [no spikes v]\nhide\n\n@Music\n\nwhen flag clicked\nshow\nset volume to (100) %\nswitch costume to (music v)\n\nwhen flag clicked\nforever\n    play sound [♪  You don't need to cry ♪ v] until done\n    wait (10) seconds\nend\n\nwhen this sprite clicked\nbroadcast (Music on or off v)\nnext costume\n\nwhen I receive [music on or off v]\nif <(costume [number v]) = [1]> then\n    set volume to (100) %\nelse\n    set volume to (0) %\nend\n\nwhen flag clicked\nforever\n    wait until <touching (mouse-pointer v)?>\n    repeat (10)\n        change size by (1)\n    end\n    wait until <not <touching (mouse-pointer v)?>>\n    repeat (10)\n        change size by (-1)\n    end\nend\n\nwhen I receive [credits v]\nhide\n\n@key!\n\nwhen I receive [key!! v]\nshow\nif <touching (player v)?> then\n    change [ghost v] effect by (25)\nend\n\nwhen flag clicked\nclear graphic effects\nhide\n\nwhen I receive [no spikes v]\nhide\n\n@Credits\n\nwhen flag clicked\nhide\n\nwhen I receive [credits v]\nshow\nswitch backdrop to (end v)\nswitch costume to (credits v)\nwait (4) seconds\nswitch costume to (credits2 v)\nwait (4) seconds\nswitch costume to (bye.... v)\nwait (3) seconds\nswitch costume to (player's room v)\nwait (2) seconds\nswitch costume to (player crying v)\nwait (5) seconds\nswitch costume to (player angry v)\nwait (6) seconds\nswitch costume to (costume1 v)\nwait (5) seconds\nstop [all v]\n\n@Settings\n\nwhen flag clicked\nshow\nforever\n    wait until <<mouse down?> and <touching (mouse-pointer v)?>>\n    wait until <not <<mouse down?> and <touching (mouse-pointer v)?>>>\n    show\n    wait until <<mouse down?> and <touching (mouse-pointer v)?>>\n    wait until <not <<mouse down?> and <touching (mouse-pointer v)?>>>\n    hide\n    broadcast (Pause v)\nend\n\nwhen I receive [resume v]\nshow\n\nwhen I receive [credits v]\nhide\n\nwhen flag clicked\nshow\nforever\n    wait until <touching (mouse-pointer v)?>\n    repeat (10)\n        change size by (1)\n    end\n    wait until <not <touching (mouse-pointer v)?>>\n    repeat (10)\n        change size by (-1)\n    end\nend\n\n@Resume\n\nwhen I receive [pause v]\nshow\nforever\n    set size to (100) %\n    wait until <touching (mouse-pointer v)?>\n    repeat (10)\n        change size by (1)\n    end\n    wait until <not <touching (mouse-pointer v)?>>\n    repeat (10)\n        change size by (-1)\n    end\nend\n\nwait until <touching (mouse-pointer v)?>\nrepeat (10)\n    change size by (1)\nend\nwait until <not <touching (mouse-pointer v)?>>\nrepeat (10)\n    change size by (-1)\nend\n\nwhen flag clicked\ngo [forward v] (2) layers\nhide\n\nwhen this sprite clicked\nhide\nbroadcast (Resume v)\n\nwhen I receive [resume v]\nhide\n\nwait until <touching (mouse-pointer v)?>\n\n@Restart\n\nwhen I receive [pause v]\nshow\ngo [forward v] (2) layers\nforever\n    set size to (100) %\n    wait until <touching (mouse-pointer v)?>\n    repeat (10)\n        change size by (1)\n    end\n    wait until <not <touching (mouse-pointer v)?>>\n    repeat (10)\n        change size by (-1)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [resume v]\nhide\n\nwhen this sprite clicked\nbroadcast (restart v)\nwait (0.1) seconds\nbroadcast (Resume v)\n\n@Quit\n\nwhen I receive [pause v]\nshow\ngo to [front v] layer\nforever\n    set size to (100) %\n    wait until <touching (mouse-pointer v)?>\n    repeat (10)\n        change size by (1)\n    end\n    wait until <not <touching (mouse-pointer v)?>>\n    repeat (10)\n        change size by (-1)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [resume v]\nhide\n\nwhen this sprite clicked\nbroadcast (quit? y/n v)\n\n@pause menu\n\nwhen flag clicked\ngo [forward v] (1) layers\nclear graphic effects\nchange [ghost v] effect by (25)\nhide\n\nwhen I receive [pause v]\nshow\n\nwhen I receive [resume v]\nhide\n\n@Quit?\n\nwhen I receive [quit? y/n v]\ngo to [front v] layer\ngo [backward v] (2) layers\nshow\n\nwhen flag clicked\nhide\n\nwhen I receive [no quit v]\nhide\n\n@yes\n\nwhen flag clicked\ngo to [front v] layer\nhide\n\nwhen I receive [quit? y/n v]\nset size to (100) %\ngo to [front v] layer\nshow\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        stop [all v]\n    end\nend\n\nwhen I receive [no quit v]\nhide\n\nwhen I receive [quit? y/n v]\nforever\n    wait until <touching (mouse-pointer v)?>\n    repeat (10)\n        change size by (1)\n    end\n    wait until <not <touching (mouse-pointer v)?>>\n    repeat (10)\n        change size by (-1)\n    end\nend\n\n@no\n\nwhen flag clicked\ngo to [front v] layer\nhide\n\nwhen I receive [quit? y/n v]\ngo to [front v] layer\nshow\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        broadcast (no quit v)\n        hide\n    end\nend\n\nwhen I receive [quit? y/n v]\nforever\n    wait until <touching (mouse-pointer v)?>\n    repeat (10)\n        change size by (1)\n    end\n    wait until <not <touching (mouse-pointer v)?>>\n    repeat (10)\n        change size by (-1)\n    end\nend\n\n