Drawn(Platformer) Mobile Friendly #games

Instructions: \nAll levels are Possible i've beat this many times.\nWASD or arrows to move. \n\nhttps://scratch.mit.edu/projects/664812217\n

@Stage\n\nwhen [m v] key pressed\n\nset [mouse v] to (join ((mouse x) + (SCROLL X)) (join [, ] ((mouse y) + (SCROLL Y))))\nshow variable [mouse v]\n\nwhen stage clicked\nhide variable [mouse v]\n\nwhen I receive [tick v]\nset [color v] effect to (COLOR)\nif <(LEVEL) = [1]> then\n    set [color v] to [0]\nend\nif <(LEVEL) = [2]> then\n    set [color v] to [143]\nend\n\nwhen I receive [play game v]\nset volume to (100) %\nforever\n    play sound [POL-bright-future-short v] until done\nend\n\nwhen [m v] key pressed\nif <(volume) = [100]> then\n    set volume to (0) %\nend\n\nwhen [u v] key pressed\nif <(volume) = [0]> then\n    set volume to (100) %\nend\n\n@Blank\n\n@Player\n\nwhen [u v] key pressed\nif <(volume) = [0]> then\n    set volume to (100) %\nend\n\nwhen [m v] key pressed\nif <(volume) = [100]> then\n    set volume to (0) %\nend\n\ndefine Game - Win\nset rotation style [all around v]\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\nclear graphic effects\nset rotation style [left-right v]\n\ndefine Game - Die\nset [exit v] to []\nrepeat (5)\n    hide\n    wait (0.1) seconds\n    show\nend\nwait (0.5) seconds\n\nwhen I receive [tick v]\nset [color v] effect to (COLOR)\nif <(LEVEL) = [1]> then\n    set [color v] to [0]\nend\nif <(LEVEL) = [2]> then\n    set [color v] to [143]\nend\nif <(LEVEL) = [3]> then\n    set [color v] to [75]\nend\nif <(LEVEL) = [4]> then\n    set [color v] to [15]\nend\n\ndefine Clone (num)\nrepeat (num)\n    create clone of (particles v)\nend\n\nwhen flag clicked\nbroadcast (Green Flag v) and wait\nbroadcast (Play Game v) and wait\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\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        Clone [20]\n        Game - Die\n    end\nend\n\ndefine Game On\nset rotation style [left-right v]\nset [x v] to [0]\nset [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) %\nshow\n\ndefine Tick\nif <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<<mouse down?> and <(x position) > (mouse x)>> and <(distance to [mouse-pointer v]) > [20]>>>> then\n    Change Player x by [-8]\n    point in direction (-90)\nend\nif <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<<mouse down?> and <(mouse x) > (x position)>> and <(distance to [mouse-pointer v]) > [20]>>>> then\n    Change Player x by [8]\n    point in direction (90)\nend\nset [sx v] to ((sx) * (0.8))\nif <([abs v] of (sx) ) > [0.9]> then\n    Change Player x by (round (sx))\nend\nif <<key (up arrow v) pressed?> or <<key (space v) pressed?> or <<key (w v) pressed?> or <<<mouse down?> and <(mouse y) > (y position)>> and <(distance to [mouse-pointer v]) > [20]>>>>> 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 by (sy)\nPosition\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) < [-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\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 (15)\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 <<key (up arrow v) pressed?> or <<key (space v) pressed?> or <<key (w v) pressed?> or <<<mouse down?> and <(mouse y) > (y position)>> and <(distance to [mouse-pointer v]) > [20]>>>>> 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 (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 Test - Die\nif <touching (danger v)?> then\n    set [exit v] to [die]\nend\nif <touching (bounce v)?> then\n    set [sy v] to [22]\nend\n\nwhen flag clicked\nhide\n\nchange [sx v] by (-2)\n\nchange [sx v] by (2)\n\n@Platforms\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]\n    Clone at x: [-80] y: [400]\n    Clone at x: [-470] y: [200]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 2 1 v)\n        Clone at x: [600] y: [-8]\n        Clone at x: [600] y: [400]\n        Clone at x: [640] y: [150]\n        Clone at x: [400] y: [100]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (level 3 1 v)\n            Clone at x: [360] y: [-8]\n            Clone at x: [480] y: [250]\n            Clone at x: [-250] y: [600]\n            Clone at x: [-400] y: [400]\n            Clone at x: [-300] y: [300]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (level 4 1 v)\n            end\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\nwhen I receive [tick v]\nset [color v] effect to (COLOR)\nif <(LEVEL) = [1]> then\n    set [color v] to [0]\nend\nif <(LEVEL) = [2]> then\n    set [color v] to [143]\nend\nif <(LEVEL) = [3]> then\n    set [color v] to [75]\nend\nif <(LEVEL) = [4]> then\n    set [color v] to [15]\nend\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]\n    Clone at x: [360] y: [0]\n    Clone at x: [-1000] y: [500]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 2 1 v)\n        Clone at x: [600] y: [0]\n        Clone at x: [600] y: [400]\n        Clone at x: [640] y: [150]\n        Clone at x: [400] y: [100]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (level 3 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: [-800] y: [1100]\n            Clone at x: [-100] y: [600]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (level 4 1 v)\n            end\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\nwhen I receive [tick v]\nset [color v] effect to (COLOR)\nif <(LEVEL) = [1]> then\n    set [color v] to [0]\nend\nif <(LEVEL) = [2]> then\n    set [color v] to [143]\nend\nif <(LEVEL) = [3]> then\n    set [color v] to [75]\nend\n\nwhen flag clicked\ngo to [back v] layer\n\n@Collectables\n\nwhen I receive [tick v]\nswitch costume to ((((timer) * (15)) mod (6)) + (1))\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 Portal v)\n        start sound [smb3_nspade_match v]\n    else\n        start sound [Coin v]\n    end\n    delete this clone\nend\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    switch costume to (dot v)\n    Clone at x: [270] y: [-73]\n    Clone at x: [434] y: [14]\n    Clone at x: [686] y: [83]\n    Clone at x: [1021] y: [68]\n    Clone at x: [1238] y: [43]\n    Clone at x: [1428] y: [421]\n    Clone at x: [1297] y: [613]\n    Clone at x: [926] y: [672]\n    Clone at x: [915] y: [572]\n    Clone at x: [825] y: [614]\n    Clone at x: [901] y: [852]\n    Clone at x: [727] y: [1017]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (dot v)\n        Clone at x: [206] y: [44]\n        Clone at x: [-198] y: [118]\n        Clone at x: [832] y: [282]\n        Clone at x: [628] y: [-48]\n        Clone at x: [1165] y: [337]\n        Clone at x: [1425] y: [411]\n        Clone at x: [1057] y: [483]\n        Clone at x: [931] y: [619]\n        Clone at x: [1828] y: [578]\n        Clone at x: [2165] y: [639]\n        Clone at x: [2320] y: [718]\n        Clone at x: [1974] y: [938]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (dot v)\n            Clone at x: [-119] y: [167]\n            Clone at x: [214] y: [49]\n            Clone at x: [451] y: [125]\n            Clone at x: [716] y: [274]\n            Clone at x: [1075] y: [280]\n            Clone at x: [677] y: [365]\n            Clone at x: [1059] y: [447]\n            Clone at x: [655] y: [547]\n            Clone at x: [374] y: [680]\n            Clone at x: [191] y: [1239]\n            Clone at x: [161] y: [1085]\n            Clone at x: [-158] y: [1750]\n            Clone at x: [272] y: [1979]\n        end\n    end\nend\nset [x v] to [-9999999]\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\nwhen I receive [tick v]\nset [color v] effect to (COLOR)\nif <(LEVEL) = [1]> then\n    set [color v] to [0]\nend\nif <(LEVEL) = [2]> then\n    set [color v] to [143]\nend\nif <(LEVEL) = [3]> then\n    set [color v] to [75]\nend\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 <<(costume [name v]) = [Open]> and <touching (player v)?>> then\n    set [exit v] to [Win]\nend\n\nwhen I receive [setup v]\nhide\nset [collected v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (closed v)\n    Clone at x: [619] y: [1030]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (closed v)\n        Clone at x: [1865] y: [916]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (closed v)\n            Clone at x: [376] y: [1967]\n        else\n            set [x v] to [-9999999]\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 [tick v]\nset [color v] effect to (COLOR)\nif <(LEVEL) = [1]> then\n    set [color v] to [0]\nend\nif <(LEVEL) = [2]> then\n    set [color v] to [143]\nend\nif <(LEVEL) = [3]> then\n    set [color v] to [75]\nend\n\nwhen I receive [open portal v]\nswitch costume to (open v)\n\n@Particles\n\nwhen I start as a clone\ngo to (player v)\nset [xv v] to (pick random (-10) to (10))\nclear graphic effects\nshow\nset size to (pick random (80) to (120)) %\nset [color v] effect to (COLOR)\nset [yv v] to (pick random (5) to (30))\nrepeat (50)\n    change [yv v] by (-2)\n    go to x: ((x position) + (Xv)) y: ((y position) + (Yv))\n    change [ghost v] effect by (2)\n    if <touching (_edge_ v)?> then\n        delete this clone\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [tick v]\nset [color v] effect to (COLOR)\nif <(LEVEL) = [1]> then\n    set [color v] to [0]\nend\nif <(LEVEL) = [2]> then\n    set [color v] to [143]\nend\nif <(LEVEL) = [3]> then\n    set [color v] to [75]\nend\n\nif <(LEVEL) = [3]> then\n    set [color v] to [75]\nend\n\n@Thumbnail\n\nwhen flag clicked\nset [ghost v] effect to (0)\nshow\nwait (1) seconds\nrepeat (25)\n    change [ghost v] effect by (4)\nend\nset [ghost v] effect to (100)\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\n\n