Scratchland || A scrolling platformer

Instructions: Hello, welcome to Sctachland!\nThis is my second platformer in my scrolling platformer series!\nControls - Arrow keys or wasd to move. Its also mobile friendly! Onluy two levels!  All the levels are 100% possible.  :)\nDon't touch Die or any other computer language or alse you'll die!\nSorry, for the art its not so good...\nAnyways, Thanks for playing. Please love, fav and follow me for more like this!\nI'm working on the online version. If it fails I can't share sorry.  I'll try my best!  Thank you.

@Stage\n\nwhen flag clicked\nforever\n    play sound [Clean_Soul_Calming v] until done\nend\n\nwhen [space v] key pressed\nset [mouse v] to (join ((mouse x) + (scroll x)) (join [,] ((mouse y) + (scroll y))))\n\n@Blank\n\n@Blank2\n\n@Player\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    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\nset [x v] to [0]\nset [y v] to [0]\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [sx v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset size to (100) %\ngo to [front v] layer\nset [ghost v] effect to (0)\nshow\n\ndefine tick\nif <<<(mouse x) < (x position)> and <mouse down?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n    change [sx v] by (-2)\nend\nif <<<(x position) < (mouse x)> and <mouse down?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n    change [sx v] by (2)\nend\nset [sx v] to ((sx) * (0.8))\nif <([abs v] of (sx) ) > [0.9]> then\n    Change player x (round (sx))\nend\nif <<<(y position) < (mouse y)> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n    if <(in air) < [4]> then\n        set [sy v] to [16]\n    end\nend\nif <(sy) > [-20]> then\n    change [sy v] by (-2)\nend\nChange player y (sy)\ntest-die\nset [scroll x v] to (x)\nif <(scroll x) < [0]> then\n    set [scroll x v] to [0]\nend\nchange [scroll y v] by (round (((y) - (scroll y)) / (10)))\nif <(scroll y) < [0]> then\n    set [scroll y v] to [0]\nend\nposition\nif <(y position) < [-170]> then\n    set [exit v] to [die]\nend\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\n\nwhen flag clicked\nbroadcast (play game v) and wait\nbroadcast (green flag v) and wait\n\ndefine Change player y (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nposition\nrepeat until <not <touching (platform 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 (sx)\nchange [x v] by (sx)\nposition\nif <touching (platform v)?> then\n    repeat (12)\n        change [y v] by (1)\n        position\n        if <not <touching (platform v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n        if <(sx) > [0]> then\n            set [sx v] to [-16]\n        else\n            set [sx v] to [16]\n        end\n        set [in air v] to [0]\n    else\n        set [sx v] to [0]\n    end\n    repeat until <not <touching (platform 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 right (65) degrees\n    move ((distance to [exit v]) / (2)) steps\n    change size by (-1)\n    change [ghost v] effect by (-2)\nend\nhide\nchange [level v] by (1)\nwait (1) seconds\n\nwhen I receive [next level v]\nwait (3) seconds\ncreate clone of (_myself_ v)\nset size to (100) %\nset [ghost v] effect to (0)\n\nwhen I start as a clone\nset size to (100) %\nset [ghost v] effect to (0)\nrepeat (25)\n    turn right (5) degrees\n    change [ghost v] effect by (5)\n    change size by (10)\nend\nwait (0.01) seconds\ndelete this clone\n\n@Platform\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [850] y: [50]\n    Clone at x: [300] y: [500]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 2 1 v)\n        Clone at x: [-63] y: [183]\n        Clone at x: [200] y: [600]\n        Clone at x: [750] y: [0]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (level 3 1 v)\n        end\n    end\nend\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\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\n@Danger\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 2 1 v)\n        Clone at x: [150] y: [300]\n        Clone at x: [300] y: [700]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (level 3 1 v)\n        end\n    end\nend\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\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\n@Collectables\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((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 v)\n    end\n    delete this clone\nend\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nset [collected v] to [0]\nset [collected max v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (dot v)\n    Clone at x: [50] y: [-25]\n    Clone at x: [-88] y: [116]\n    Clone at x: [384] y: [76]\n    Clone at x: [745] y: [41]\n    Clone at x: [947] y: [-25]\n    Clone at x: [1366] y: [50]\n    Clone at x: [2009] y: [234]\n    Clone at x: [2194] y: [425]\n    Clone at x: [2406] y: [697]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (dot v)\n        Clone at x: [-66] y: [67]\n        Clone at x: [130] y: [185]\n        Clone at x: [36] y: [618]\n        Clone at x: [119] y: [713]\n        Clone at x: [163] y: [938]\n        Clone at x: [176] y: [1029]\n        Clone at x: [171] y: [1226]\n        Clone at x: [224] y: [1392]\n        Clone at x: [321] y: [1163]\n        Clone at x: [612] y: [947]\n        Clone at x: [880] y: [966]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (dot v)\n        else\n        end\n    end\nend\nset [x v] to [-999999999]\n\nif <(LEVEL) = [4]> then\n    switch costume to (dot v)\n    Clone at x: [181] y: [4]\n    Clone at x: [-7] y: [108]\n    Clone at x: [334] y: [185]\n    Clone at x: [68] y: [235]\n    Clone at x: [161] y: [365]\n    Clone at x: [225] y: [306]\n    Clone at x: [285] y: [365]\n    Clone at x: [430] y: [208]\n    Clone at x: [614] y: [173]\n    Clone at x: [577] y: [379]\n    Clone at x: [882] y: [463]\n    Clone at x: [1021] y: [539]\n    Clone at x: [1135] y: [539]\n    Clone at x: [1280] y: [432]\nelse\n    if <(LEVEL) = [5]> then\n        switch costume to (dot v)\n        Clone at x: [-16] y: [-67]\n        Clone at x: [-56] y: [238]\n        Clone at x: [52] y: [238]\n        Clone at x: [99] y: [711]\n        Clone at x: [498] y: [746]\n        Clone at x: [743] y: [811]\n        Clone at x: [736] y: [658]\n        Clone at x: [474] y: [608]\n        Clone at x: [629] y: [935]\n        Clone at x: [906] y: [1038]\n        Clone at x: [1071] y: [1038]\n        Clone at x: [1194] y: [1038]\n        Clone at x: [1378] y: [1038]\n        Clone at x: [1677] y: [1038]\n        Clone at x: [14] y: [403]\n        Clone at x: [1819] y: [850]\n        Clone at x: [1963] y: [1057]\n    end\nend\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\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\nchange [collected max v] by (1)\ncreate clone of (_myself_ v)\n\n@EXIT\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (scroll x)) ((y) - (scroll y))\nif <<touching (player v)?> and <(costume [name v]) = [OPEN]>> then\n    set [exit v] to [win]\n    broadcast (next level v)\nend\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nset [collected v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (close v)\n    Clone at x: [1873] y: [788]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (close v)\n        Clone at x: [1161] y: [944]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (close v)\n            Clone at x: [7777] y: [7890]\n        else\n        end\n    end\nend\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\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\nwhen I receive [open v]\nswitch costume to (open v)\n\n@Thumbnail\n\nwhen I receive [tick v]\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\n\n