I survived 2020|| A scrolling platformer

Instructions: Instructions \n1) WASD or arrow keys to move\n2) You have to collect all the coins to get through the hole\n3) Have fun\n4) Leave a ❤️ and ⭐or maybe a follow\n     Do you like this project? Propose to be featured here: https://scratch.mit.edu/studios/4228481/\n

@Stage\n\nwhen [space v] key pressed\nset [mouse v] to (join ((mouse x) + (SCROLL X)) (join [,] ((mouse y) + (SCROLL Y))))\n\nwhen flag clicked\n\nwhen I receive [name v]\nswitch backdrop to (backdrop2 v)\n\nwhen I receive [name done v]\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [intro done v]\nswitch backdrop to (mountain v)\n\nwhen I receive [last intro v]\n\nwhen I receive [intro v]\nswitch backdrop to (backdrop1 v)\n\n@blank\n\n@exit\n\nwhen I receive [tick v]\ngo to ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <<(costume [number v]) = [2]> and <touching (player v)?>> then\n    set [exit v] to [win]\nend\n\nwhen I receive [setup v]\nhide\nswitch costume to (close v)\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    clone [3529] [35]\nend\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [green flag v]\nhide\n\ndefine go to (x) (y)\ngo to [back v] layer\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine clone (x) (y)\nchange [y v] by (y)\nchange [x v] by (x)\n\nwhen I receive [open portal v]\nswitch costume to (open v)\n\nwhen flag clicked\nhide\n\nwhen I receive [win v]\nforever\n    hide\nend\n\n@Player\n\nwhen flag clicked\nhide variable [collectable fraction v]\nhide\nbroadcast (intro v) and wait\n\nif <(username) = [jaseeeeeey]> then\n\nwhen I receive [green flag v]\n\nwhen I receive [play game v]\nset [level v] to [1]\nforever\n    broadcast (reset v) and wait\n    broadcast (setup v) and wait\n    Game on\n    reset timer\n    repeat until <(EXIT) > []>\n        Tick\n        broadcast (Tick v) and wait\n    end\n    if <(EXIT) = [win]> then\n        Game win\n    else\n        Game Die\n    end\nend\n\ndefine Game on\nshow variable [collectable fraction v]\nset [x v] to [0]\nset [y v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [exit v] to []\npoint in direction (90)\nclear graphic effects\nset size to (100) %\nshow\n\ndefine Tick\nset [collectable fraction v] to (join (COLLECTED) (join [/] (COLLECTED MAX)))\nif <<<(mouse x) > (x position)> and <mouse down?>> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>> then\n    point in direction (90)\n    change [sx v] by (1)\nend\nif <<<(x position) > (mouse x)> and <mouse down?>> or <<key (a v) pressed?> or <key (left arrow v) pressed?>>> then\n    point in direction (-90)\n    change [sx v] by (-1)\nend\nset [sx v] to ((sx) * (0.9))\nif <([abs v] of (sx) ) > [0.9]> then\n    Change Player X by (round (sx))\nend\nif <<<(mouse y) > (y position)> and <mouse down?>> or <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n    if <(in air) < [14]> then\n        set [sy v] to [13]\n    end\nend\nchange [sy v] by (-2)\nif <touching (ladder v)?> then\n    set [in air v] to [0]\n    set [sy v] to [0]\n    if <<<(y position) > (mouse y)> and <mouse down?>> or <<key (s v) pressed?> or <key (down arrow v) pressed?>>> then\n        Change Player Y by [-8]\n    end\n    if <<<(mouse y) > (y position)> and <mouse down?>> or <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n        Change Player Y by [8]\n    end\nend\nChange Player Y by (sy)\nset [scroll x v] to (x)\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nset [scroll y v] to (y)\nPosition\nif <(y) < [-180]> then\n    set [exit v] to [die]\nend\n\ndefine Change Player Y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nTest die\nrepeat until <not <touching (platforms v)?>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\n\ndefine Position\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\ndefine Change Player X by (sx)\nchange [x v] by (sx)\nPosition\nif <touching (platforms v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (platforms v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    if <<<(mouse y) > (y position)> and <mouse down?>> or <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n        if <(sx) > [0]> then\n            set [sx v] to [-7]\n        else\n            set [sx v] to [7]\n            set [in air v] to [0]\n        end\n    else\n        set [sx v] to [0]\n    end\n    repeat until <not <touching (platforms v)?>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\ndefine Game Die\nset [exit v] to []\nrepeat (5)\n    hide\n    wait (0.1) seconds\n    show\n    wait (0.1) seconds\nend\nhide\nwait (0.5) seconds\n\ndefine Test die\nif <touching (danger v)?> then\n    set [exit v] to [die]\nend\n\ndefine Game win\nrepeat (50)\n    point towards (exit v)\n    turn left (65) degrees\n    move ((distance to [exit v]) / (2)) steps\n    change size by (-1)\n    change [ghost v] effect by (2)\nend\nhide\nbroadcast (Win v) and wait\n\nchange [level v] by (1)\nwait (1) seconds\n\nwait (5) seconds\n\nwhen I receive [intro done v]\npoint in direction (90)\nset rotation style [left-right v]\nhide\ngo to [front v] layer\nbroadcast (play game v) and wait\n\nbroadcast (green flag v) and wait\n\nwait (1) seconds\n\nwhen I receive [win v]\nforever\n    hide\n    hide variable [collectable fraction v]\nend\n\nwait (1) seconds\n\nsay [Hello!] for (2) seconds\n\n@danger\n\ndefine clone (x) (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [tick v]\ngo to ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (locust v)\nclone [906] [-47]\nswitch costume to (virus v)\nclone [1206] [8]\nclone [1461] [8]\nclone [1907] [304]\nswitch costume to (locust v)\nclone [1461] [258]\nswitch costume to (fire v)\nclone [2282] [721]\nswitch costume to (3 fire v)\nclone [2530] [765]\nswitch costume to (lava v)\nclone [2957] [-112]\n\ndefine go to (x) (y)\ngo to [back v] layer\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [green flag v]\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [win v]\nforever\n    hide\nend\n\n@Platforms\n\nwhen I receive [green flag v]\nshow\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (level 1 1 v)\nrepeat (4)\n    create clone of (_myself_ v)\n    change [x v] by (480)\n    next costume\nend\ncreate clone of (_myself_ v)\nchange [x v] by (480)\nchange [y v] by (480)\nnext costume\ncreate clone of (_myself_ v)\nchange [x v] by (480)\nchange [y v] by (-480)\nnext costume\ncreate clone of (_myself_ v)\nchange [x v] by (480)\nswitch costume to (level 1 8 v)\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\nswitch costume to (virus v)\n\ndefine Clone at X: (x) Y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen flag clicked\nhide\n\nnext costume\n\n@coins\n\ndefine go to (x) (y)\ngo to [back v] layer\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [tick v]\ngo to ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <touching (player v)?> then\n    change [collected v] by (1)\n    if <(COLLECTED) = (COLLECTED MAX)> then\n        broadcast (open portal v)\n    end\n    delete this clone\nend\n\ndefine clone (x) (y)\nset [x v] to (x)\nset [y v] to (y)\nchange [collected max v] by (1)\ncreate clone of (_myself_ v)\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [setup v]\nhide\nset [collected v] to [0]\nset [collected max v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    clone [770 ] [-43]\n    clone [1025] [-43]\n    clone [1375] [267]\n    clone [1835] [310]\n    clone [2340] [718]\n    clone [2633] [768]\n    clone [2857] [209]\n    clone [3227] [-3]\nend\nset [x v] to [-9999999999999999999999999999999999999999999999]\n\nwhen flag clicked\nhide\n\nwhen I receive [win v]\nforever\n    hide\nend\n\n@win\n\nwhen flag clicked\nhide\n\nwhen I receive [win v]\nswitch costume to ( v)\nshow\ngo to [front v] layer\nstop [all v]\n\nforever\nend\n\n@ladder\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\n\ndefine POSTION (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine CLONE AT X (x) Y (y)\ngo to [back v] layer\nchange [x v] by (x)\nchange [y v] by (y)\ncreate clone of (_myself_ v)\nnext costume\n\nwhen I receive [tick v]\nPOSTION ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [setup v]\nhide\nset [y v] to [0]\nset [x v] to [0]\nif <(LEVEL) = [1]> then\n    CLONE AT X [1625] Y [90]\n    CLONE AT X [375] Y [330]\nend\nset [x v] to [-99999999999999999999999999999999999999999999999999999999999]\n\nwhen I receive [win v]\nforever\n    hide\nend\n\n@Intro\n\nwhen I receive [intro v]\nclear graphic effects\nshow\nset size to (0) %\ngo to x: (0) y: (300)\npoint in direction (0)\nswitch costume to (square v)\nrepeat (20)\n    change size by (((100) - (size)) / (5))\n    turn right (((90) - (direction)) / (5)) degrees\n    change y by (((0) - (y position)) / (5))\nend\npoint in direction (90)\nrepeat (12)\n    next costume\nend\nrepeat (20)\n    switch costume to (blank v)\n    change size by (((2000) - (size)) / (5))\n    switch costume to (square13 v)\nend\nhide\nbroadcast (name v)\nwait (2) seconds\nbroadcast (name done v)\nrepeat (20)\n    show\n    switch costume to (blank v)\n    change size by (((100) - (size)) / (5))\n    switch costume to (square13 v)\nend\nrepeat (12)\n    switch costume to ((costume [number v]) - (1))\n    change size by (-5)\nend\nset [i v] to [-1]\nrepeat (20)\n    change size by ((I) / (3))\n    change [i v] by (join [-] (([abs v] of (I) ) / (4)))\n    turn right ((I) / (-3)) degrees\n    change y by ((I) / (3))\nend\nhide\nbroadcast (last intro v)\npoint in direction (90)\nswitch costume to (rectangle v)\ngo to [front v] layer\ngo [backward v] (1) layers\ngo to x: (0) y: (0)\nset size to (100) %\nshow\n\nwhen I receive [intro done v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\ndelete this clone\n\nwhen flag clicked\nhide\nclear sound effects\nset volume to (100) %\nforever\n    play sound [music v] until done\nend\n\nwhen I receive [win v]\nforever\n    hide\nend\n\nbroadcast (last intro v) and wait\n\n@letter\n\ndefine write (size) (width between) (what they are writing) (x) (y)\nhide\nset size to (size) %\ngo to x: (x) y: (y)\nset [letter v] to [1]\nrepeat (length of (what they are writing))\n    go to [front v] layer\n    switch costume to (letter (Letter) of (what they are writing))\n    stamp\n    change x by (width between)\n    change [letter v] by (1)\nend\n\nwhen [space v] key pressed\nset [mouse v] to (join (mouse x) (join [,] (mouse y)))\n\nwhen I receive [name v]\nwrite [100] [15] [Hi] [-160] [0]\nif <not <(username) = []>> then\n    write [100] [15] (username) [-110] [0]\nelse\n    write [100] [15] [not signed in scratcher] [-110] [0]\nend\n\nwhen flag clicked\nerase all\n\nwhen I receive [name done v]\nerase all\n\nwhen I receive [win v]\nforever\n    hide\nend\n\n@intro 1\n\nwhen I receive [last intro v]\ngo to [front v] layer\nclear graphic effects\npoint in direction (90)\nset size to (0) %\nshow\nrepeat (20)\n    change [ghost v] effect by (-5)\n    turn right (18) degrees\n    change size by (5)\nend\nwait (2) seconds\nbroadcast (Intro done v)\n\nwhen I receive [intro done v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen flag clicked\nhide\n\n@Sprite1\n\nwhen I receive [last intro v]\ngo to x: (-240) y: (-130)\ngo to [front v] layer\nclear graphic effects\npoint in direction (90)\nset size to (100) %\nshow\nglide (1) secs to x: (-7) y: (-130)\n\nwhen I receive [intro done v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen flag clicked\nhide\n\n@tramp\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\n\ndefine POSTION (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine CLONE AT X (x) Y (y)\ngo to [back v] layer\nset [y v] to (x)\nset [x v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [tick v]\nPOSTION ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [setup v]\nhide\nset [y v] to [0]\nset [x v] to [0]\nif <(LEVEL) = [1]> then\n    CLONE AT X [2768] Y [32]\nend\nset [x v] to [-99999999999999999999999999999999999999999999999999999999999]\n\nCLONE AT X [375] Y [330]\n\nchange [x v] by (360)\nchange [y v] by (360)\n\ncreate clone of (_myself_ v)\nnext costume\n\n@thumb\n\nturn left (15) degrees\n\nturn right (25) degrees\n\nwhen flag clicked\nhide\n\nset [ghost v] effect to (0)\n\ngo to [front v] layer\n\nshow\n\n