Sunset - a Scrolling Platformer

Instructions: Use WASD or the arrow keys to move.\nIt's mobile as well so you can tap to move.\nEvery level is possible!\nAlso, say "I did!" in the comments if you followed me and I will probably respond to you.\nNO ADVERTISING PLEASE!\nFor less lag, press the green flag multiple times.

@Stage\n\nwhen I receive [play game v]\nset volume to (140) %\nforever\n    play sound [c418-sweden-minecraft-volume-alpha v] until done\nend\n\nwhen [m v] key pressed\nif <(username) = [Berger_Boy]> then\n    set [mouse thing v] to (join ((mouse x) + (SCROLL X)) (join [, ] ((mouse y) + (SCROLL Y))))\n    show variable [mouse thing v]\nend\n\nwhen flag clicked\nhide variable [mouse thing v]\n\n@Blank thanks griffypatchy for the tip\n\n@I am Thy Player\n\nwhen flag clicked\nbroadcast (Poo Flag start v) and wait\nbroadcast (Play Game v) and wait\n\nwhen I receive [poo flag start v]\nhide\ngo to [front v] layer\n\nwhen I receive [play game v]\nset [level v] to [1]\ncreate clone of (_myself_ v)\nforever\n    broadcast (REset v) and wait\n    broadcast (Setup v) and wait\n    Game ON!\n    repeat until <(EXITE) > []>\n        Tick\n        broadcast (tick v) and wait\n    end\n    if <(EXITE) = [win]> then\n        game win yea\n    else\n        Game - You are Die\n    end\nend\n\ndefine Game ON!\nset [sx asdf v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nset [sy v] to [0]\nset [in da air v] to [0]\nset [exite v] to []\npoint in direction (90)\nset size to (90) %\nclear graphic effects\nshow\n\ndefine Tick\nif <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>>> then\n    change [sx asdf v] by (-2)\n    switch costume to (cool kid a;sldkfj3 v)\nend\nif <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>>> then\n    change [sx asdf v] by (2)\n    switch costume to (cool kid a;sldkfj2 v)\nend\nset [sx asdf v] to ((sx asdf) * (0.8))\nif <([abs v] of (sx asdf) ) > [0.9]> then\n    Change pasldkj player x by (round (sx asdf))\nend\nif <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(y position) < (mouse y)>>>> then\n    if <(in da air) < [4]> then\n        set [sy v] to [16]\n        switch costume to (cool kid a;sldkfj4 v)\n    end\nend\nif <(sy) > [-20]> then\n    change [sy v] by (-2)\nend\nChange play dude y by yeet (sy)\nTest - Are you 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\nif <touching (water swim in v)?> then\n    set [exite v] to [die]\nend\nposition chickin fingas\nif <not <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<key (d v) pressed?> or <<key (right arrow v) pressed?> or <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <mouse down?>>>>>>> then\n    switch costume to (cool kid a;sldkfj v)\nend\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n    switch costume to (cool kid a;sldkfj5 v)\nend\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n    switch costume to (cool kid a;sldkfj6 v)\nend\n\ndefine Change play dude y by yeet (sy)\nchange [y v] by (sy)\nchange [in da air v] by (1)\nposition chickin fingas\nrepeat until <not <touching (thick chubby platforms v)?>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in da air v] to [0]\n    end\n    position chickin fingas\n    set [sy v] to [0]\nend\n\ndefine position chickin fingas\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\ndefine Change pasldkj player x by (sx)\nchange [x v] by (sx)\nposition chickin fingas\nif <touching (thick chubby platforms v)?> then\n    repeat (12)\n        change [y v] by (1)\n        position chickin fingas\n        if <not <touching (thick chubby 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 (w v) pressed?>> then\n        if <(sx) > [0]> then\n            set [sx asdf v] to [-16]\n        else\n            set [sx asdf v] to [16]\n        end\n        set [in da air v] to [0]\n    else\n        set [sx asdf v] to [0]\n    end\n    repeat until <not <touching (thick chubby 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 chickin fingas\n    end\nend\n\ndefine Game - You are Die\nset [exite v] to []\nrepeat (3)\n    hide\n    wait (0.1) seconds\n    show\n    wait (0.1) seconds\nend\nhide\nwait (0.5) seconds\n\ndefine Test - Are you Die\nif <touching (thick chubby danger v)?> then\n    set [exite v] to [die]\nend\n\ndefine game win yea\nrepeat (50)\n    point towards (exite tasdf v)\n    turn right (65) degrees\n    move ((distance to [exite tasdf v]) / (2)) steps\n    change size by (-1)\n    change [ghost v] effect by (2)\nend\nhide\nclear graphic effects\npoint in direction (90)\nset size to (90) %\nchange [level v] by (1)\nwait (1) seconds\n\n@Thick Chubby Platforms\n\nwhen I receive [poo flag start 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]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 2-1 v)\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\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        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 [x v] by (y)\nnext costume\n\n@Coins stuff\n\nwhen I receive [poo flag start v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <touching (i am thy player v)?> then\n    change [collected aldksfj v] by (1)\n    start sound [Collect v]\n    if <(Collected aldksfj) = (Collected max thing)> then\n        broadcast (portal commence open v)\n    end\n    delete this clone\nend\n\nwhen I receive [setup v]\nhide\nset [collected aldksfj v] to [0]\nset [collected max thing v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (coin v)\n    Clone at x: [50] y: [0]\n    Clone at x: [483] y: [63]\n    Clone at x: [830] y: [24]\n    Clone at x: [1069] y: [33]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (coin v)\n        Clone at x: [99] y: [165]\n        Clone at x: [197] y: [-14]\n        Clone at x: [986] y: [-19]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (coin v)\n            Clone at x: [184] y: [222]\n            Clone at x: [878] y: [144]\n        end\n    end\nend\nset [x v] to [-99999]\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 thing v] by (1)\ncreate clone of (_myself_ v)\n\nset [collected aldksfj v] to [0]\n\n@Thick Chubby Danger\n\nwhen I receive [poo flag start 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]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 2-1 v)\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (level 3-1 v)\n            Clone at x: [360] y: [0]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (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 [x v] by (y)\nnext costume\n\n@Exite tasdf\n\nwhen I receive [poo flag start v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <<(costume [name v]) = [Open Portal]> and <touching (i am thy player v)?>> then\n    set [exite v] to [win]\nend\n\nwhen I receive [setup v]\nhide\nset [collected aldksfj v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (closed portal v)\n    Clone at x: [1400] y: [30]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (closed portal v)\n        Clone at x: [1400] y: [30]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (closed portal v)\n            Clone at x: [1129] y: [176]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (closed portal v)\n                Clone at x: [1129] y: [176]\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)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [portal commence open v]\nswitch costume to (open portal v)\n\n@Water swim in\n\nwhen I receive [level beat v]\ngo to [back v] layer\n\nClone at x: [150] y: [-100]\n\nClone at x: [930] y: [0]\nClone at x: [360] y: [0]\nClone at x: [580] y: [0]\nClone at x: [480] y: [0]\nClone at x: [0] y: [360]\n\nClone at x: [-600] y: [1140]\nClone at x: [400] y: [175]\nClone at x: [490] y: [0]\nClone at x: [400] y: [-20]\nClone at x: [550] y: [-200]\nClone at x: [0] y: [-160]\nClone at x: [520] y: [450]\nClone at x: [400] y: [0]\nClone at x: [300] y: [-50]\n\nClone at x: [360] y: [0]\n\nClone at x: [0] y: [0]\n\nClone at x: [360] y: [0]\n\nClone at x: [840] y: [0]\n\nwhen I receive [yay! v]\nchange [level v] by (1)\n\nif <(LEVEL) = [4]> then\n    broadcast (level 4 v)\n    switch costume to (level 4 1 v)\nelse\n    if <(LEVEL) = [5]> then\n        broadcast (level 5 v)\n        switch costume to (level 5 1 v)\n    else\n        if <(LEVEL) = [77]> then\n    end\nend\n\nbroadcast (Level 77 v)\n\ngo to [back v] layer\n\nwhen I start as a clone\n\ngo to [back v] layer\n\nbroadcast (Reset v)\nbroadcast (Setup v)\n\nwhen I receive [tick v]\nPosition ((round ((x) - (SCROLL X))) + (menu x)) ((round ((y) - (SCROLL Y))) + (([sin v] of ((timer) * (250)) ) * (5)))\n\nwhen I receive [setup v]\nhide\nset [y v] to [-100]\nset [x v] to [-300]\nset [p timer v] to [0]\nswitch costume to (agua a;lskdfj v)\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\n\ndefine Position (x) (y)\nback\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\n    back\n    set [brightness v] effect to (-13)\nelse\n    hide\n    back\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 flag clicked\nhide\n\nset [whirl v] effect to (50)\n\nchange [brightness v] effect by (5)\n\nwhen flag clicked\nhide\n\ndefine back\ngo to [back v] layer\n\n@I have a nail in my thumb\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nset [ghost v] effect to (100)\ngo to [front v] layer\n\nwhen I receive [tick v]\nshow\nset [ghost v] effect to (100)\ngo to [front v] layer\n\n@Words\n\nwhen I receive [poo flag start 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) = [4]> then\n    switch costume to (word al;skdfj v)\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <(LEVEL) = [4]> then\n    if <<(x) = (x position)> and <(y) = (y position)>> then\n        show\n    else\n        hide\n    end\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 [x v] by (y)\nnext costume\n\n