ᑭІаႶʈаხІe - A Scrolling Platformer

Instructions: ᴜꜱᴇ ᴀʀʀᴏᴡ ᴋᴇʏꜱ, ᴡᴀᴅ, ᴏʀ ᴛᴀᴘ ᴛᴏ ʙʀᴇᴇᴢᴇ ᴛʜʀᴏᴜɢʜ ᴛʜᴇ ɪɴᴄʀᴇᴅɪʙʟᴇ ᴀʀᴛ ᴏꜰ ʜᴀɴᴅ ᴅʀᴀᴡɴ ᴘɪxᴇʟꜱ! ꜰɪɴᴅ, ᴀɴᴅ ᴄᴏʟʟᴇᴄᴛ, ᴀ ᴄᴏɪɴ ᴛᴏ ᴘʀᴏɢʀᴇꜱꜱ ᴛᴏ ᴛʜᴇ ɴᴇxᴛ ʟᴇᴠᴇʟ ᴡʜɪʟᴇ ᴀᴠᴏɪᴅɪɴɢ ʜᴏᴛ ʟᴀᴠᴀ ᴀɴᴅ ꜱᴘɪᴋᴇꜱ! ᴊᴜᴍᴘ ᴏɴ ᴄʟᴏᴜᴅꜱ ᴀɴᴅ ꜱᴡɪᴍ ᴛᴏ ᴘʀᴏɢʀᴇꜱꜱ ᴛʜʀᴏᴜɢʜ ᴛʜᴇ ᴛᴏᴜɢʜ ᴘɪxᴇʟ ʟᴇᴠᴇʟꜱ. ᴛʀʏ ᴛᴏ ᴍᴀᴋᴇ ɪᴛ ᴛᴏ ᴛʜᴇ ᴇɴᴅ ɪɴ ᴀꜱ ʟɪᴛᴛʟᴇ ᴅᴇᴀᴛʜꜱ ᴀꜱ ᴘᴏꜱꜱɪʙʟᴇ. ᴄᴀɴ ʏᴏᴜ ᴅᴏ ɪᴛ?

@Stage\n\n@Thumb\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\nwhen flag clicked\nforever\n    play sound [TheFatRat   Never Be Alone \[Tasty Release\] v] until done\nend\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (100)\n    go to [front v] layer\nend\n\n@Sprite4\n\ndefine Set Costume\n\ndefine reset\nset [sprite2: x v] to [0]\nset [sprite2: y v] to [0]\nset [scroll x v] to [0]\nset [scroll y v] to [75]\n\nwhen I start as a clone\nrepeat (50)\n    change x by (-1)\n    change size by (-2)\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\ndefine game on!\nset [sprite2: x v] to [0]\nset [sprite2: y v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nbroadcast (close space v)\nshow\n\nwhen I receive [green flag v]\nset size to (100) %\nset [level v] to [1]\nforever\n    broadcast (Tick v)\nend\n\nwhen flag clicked\nbroadcast (green flag v)\n\nwhen I receive [setup v]\nset [sprite2: x v] to [0]\nset [sprite2: y v] to [0]\n\nwhen flag clicked\nset volume to (100) %\nbroadcast (start! v) and wait\n\ndefine Tick\nswitch costume to (hitbox v)\nchange player x by (Xv)\nif <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > [10]>>>> then\n    change [xv v] by (3.5)\n    change [frame v] by (0.5)\n    point in direction (90)\nelse\n    if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(mouse x) < [-10]>>>> then\n        change [xv v] by (-3.5)\n        change [frame v] by (0.5)\n        point in direction (-90)\n    else\n        set [frame v] to [0]\n    end\nend\nif <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>> then\n    if <(in air) < [4]> then\n        set [sy v] to [15]\n    end\nend\nif <touching (water v)?> then\n    change [sy v] by (-1.5)\nelse\n    change [sy v] by (-2)\nend\nchange player y by (sy)\nPosition\ntest die\nchange [scroll x v] by (round (((Sprite2: x) - (SCROLL X)) / (10)))\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nchange [scroll y v] by (round (((Sprite2: y) - (SCROLL Y)) / (10)))\nif <<(Sprite2: y) < [-750]> or <touching (spikes v)?>> then\n    reset\n    start sound [Suction Cup v]\nend\nset [xv v] to ((Xv) * (0.7))\nCostume\n\nwhen flag clicked\nreset\nset [level v] to [1]\n\ndefine change player x by (sx)\nchange [sprite2: x v] by ((sx) * (1.1))\nposition\nif <touching (ground v)?> then\n    repeat (10)\n        change [sprite2: y v] by (1)\n        position\n        if <not <touching (ground v)?>> then\n            stop [this script v]\n        end\n    end\n    change [sprite2: y v] by (-10)\n    repeat until <not <touching (ground v)?>>\n        if <(sx) > [0]> then\n            change [sprite2: x v] by (-1)\n        else\n            change [sprite2: x v] by (1)\n        end\n        position\n    end\nend\n\nwhen I receive [green flag v]\ngo to [front v] layer\ngo [backward v] (1) layers\n\nwhen I receive [tick v]\nTick\n\ndefine position\ngo to x: ((Sprite2: x) - (SCROLL X)) y: ((Sprite2: y) - (SCROLL Y))\n\ndefine game - win\npoint in direction (90)\n\ndefine test die\nif <touching (danger v)?> then\n    game-die\nend\n\ndefine change player y by (sy)\nchange [sprite2: y v] by (sy)\nchange [in air v] by (1)\nposition\nrepeat until <not <touching (ground v)?>>\n    if <(sy) > [0]> then\n        change [sprite2: y v] by (-1)\n    else\n        change [sprite2: y v] by (1)\n        set [in air v] to [0]\n    end\n    position\n    set [sy v] to [0]\nend\n\ndefine Run\n\nwhen flag clicked\nset size to (100) %\n\nwhen I receive [tick v]\nset size to (100) %\n\ndefine Set Costume\n\ndefine Set Costume\n\nwhen flag clicked\nset [wait v] to [0]\n\nwhen I receive [wait v]\nstart sound [Connect v]\nwait (0.5) seconds\nset [wait v] to [0]\n\nwhen [timer v] > (CheckTimer)\nhide\n\nwhen flag clicked\nshow\n\nwhen I receive [tick v]\nif <<(sy) = [-17]> or <(sy) < [-17]>> then\n    set [sy v] to [-16]\nend\n\nwhen flag clicked\nforever\n    if <touching (portal v)?> then\n        if <<(LEVEL) = [1]> and <not <(wait) = [1]>>> then\n            set [level v] to [2]\n            change [wait v] by (1)\n            broadcast (wait v)\n        end\n        if <<(LEVEL) = [2]> and <not <(wait) = [1]>>> then\n            set [level v] to [3]\n            change [wait v] by (1)\n            broadcast (wait v)\n        end\n        if <<(LEVEL) = [3]> and <not <(wait) = [1]>>> then\n            set [level v] to [4]\n            change [wait v] by (1)\n            broadcast (wait v)\n        end\n        if <<(LEVEL) = [4]> and <not <(wait) = [1]>>> then\n            set [level v] to [5]\n            change [wait v] by (1)\n            broadcast (wait v)\n        end\n        if <<(LEVEL) = [5]> and <not <(wait) = [1]>>> then\n            set [level v] to [6]\n            change [wait v] by (1)\n            broadcast (wait v)\n        end\n        broadcast (Delete all clones v)\n        broadcast (Setup v)\n        reset\n        set [scroll x v] to [0]\n        set [scroll y v] to [0]\n        set [sprite2: x v] to [0]\n        set [sprite2: y v] to [0]\n        wait until <not <touching (portal v)?>>\n    end\nend\n\nwhen I receive [tick v]\nif <<<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>> and <touching (water v)?>> then\n    set [sy v] to [10]\nend\n\nwhen I receive [tick v]\nif <touching (water v)?> then\n    set [sy v] to ((sy) * (0.5))\nend\n\nwhen I receive [tick v]\nshow\n\nwhen I receive [tick v]\nset size to (100) %\n\ndefine Costume\nswitch costume to (c v)\nif <key (right arrow v) pressed?> then\n    switch costume to (r v)\nend\nif <key (left arrow v) pressed?> then\n    switch costume to (l v)\nend\n\nif <(in air) < [6]> then\n    if <(frame) = [0]> then\n        switch costume to (stand_1 v)\n    else\n        switch costume to ([floor v] of ((4) + ((frame) mod (8))) )\n    end\nelse\n    if <(speed y) > [0]> then\n        switch costume to (jump_1 v)\n    else\n        switch costume to (fall_1 v)\n    end\nend\n\ndefine game-die\nreset\n\n@Ground\n\nwhen flag clicked\ngo to [front v] layer\nset [level v] to [1]\n\nwhen I receive [setup v]\nrepeat (1)\n    delete this clone\nend\nset [ground: i am a clone? v] to [0]\nswitch costume to (costume1 v)\nset [ground: x v] to [0]\nset [ground: y v] to [0]\nhide\nif <(LEVEL) = [1]> then\n    switch costume to (costume1 v)\n    Clone [0] [0]\n    switch costume to (costume2 v)\n    Clone [480] [0]\n    switch costume to (costume3 v)\n    Clone [480] [200]\nend\nif <(LEVEL) = [2]> then\n    switch costume to (costume4 v)\n    Clone [0] [0]\n    switch costume to (costume5 v)\n    Clone [0] [-200]\n    switch costume to (costume6 v)\n    Clone [480] [200]\nend\nif <(LEVEL) = [3]> then\n    switch costume to (costume7 v)\n    Clone [0] [0]\n    switch costume to (costume8 v)\n    Clone [0] [200]\n    switch costume to (costume9 v)\n    Clone [0] [200]\nend\nif <(LEVEL) = [4]> then\n    switch costume to (costume11 v)\n    Clone [0] [0]\n    switch costume to (costume12 v)\n    Clone [480] [0]\n    switch costume to (costume13 v)\n    Clone [480] [0]\nend\nif <(LEVEL) = [5]> then\n    switch costume to (costume14 v)\n    Clone [0] [0]\n    switch costume to (costume15 v)\n    Clone [480] [0]\n    switch costume to (costume16 v)\n    Clone [480] [0]\nend\nif <(LEVEL) = [6]> then\n    switch costume to (costume10 v)\n    Clone [0] [0]\nend\n\nwhen flag clicked\nbroadcast (Setup v)\n\nwhen flag clicked\nbroadcast (Delete all clones v)\nbroadcast (Setup v)\nset [level v] to [1]\n\nwhen I receive [tick v]\nGo to ((Ground: x) + ((0) - (SCROLL X))) ((Ground: y) + ((0) - (SCROLL Y)))\n\ndefine Clone (x) (y)\nchange [ground: x v] by (x)\nchange [ground: y v] by (y)\ncreate clone of (_myself_ v)\nnext costume\n\nwhen I start as a clone\nset [ground: i am a clone? v] to [1]\nshow\n\ndefine Go to (x) (y)\ngo to x: (x) y: (y)\nif <<(x position) = (x)> and <(y position) = (y)>> then\n    show\nelse\n    hide\nend\nif <(Ground: I am a clone?) = [0]> then\n    hide\nend\n\n@EFFECTS\n\nwhen flag clicked\ngo to [front v] layer\nset [level v] to [1]\n\nwhen I receive [setup v]\nrepeat (1)\n    delete this clone\nend\nset [ground: i am a clone? v] to [0]\nswitch costume to (costume1 v)\nset [ground: x v] to [0]\nset [ground: y v] to [0]\nhide\nif <(LEVEL) = [1]> then\n    switch costume to (costume1 v)\n    Clone [0] [0]\n    switch costume to (costume2 v)\n    Clone [480] [0]\n    switch costume to (costume3 v)\n    Clone [480] [200]\nend\nif <(LEVEL) = [2]> then\n    switch costume to (costume4 v)\n    Clone [0] [0]\n    switch costume to (costume5 v)\n    Clone [0] [-200]\n    switch costume to (costume6 v)\n    Clone [480] [200]\nend\nif <(LEVEL) = [3]> then\n    switch costume to (costume7 v)\n    Clone [0] [0]\n    switch costume to (costume8 v)\n    Clone [0] [200]\n    switch costume to (costume9 v)\n    Clone [0] [200]\nend\nif <(LEVEL) = [4]> then\n    switch costume to (costume11 v)\n    Clone [0] [0]\n    switch costume to (costume12 v)\n    Clone [480] [0]\n    switch costume to (costume13 v)\n    Clone [480] [0]\nend\nif <(LEVEL) = [5]> then\n    switch costume to (costume14 v)\n    Clone [0] [0]\n    switch costume to (costume15 v)\n    Clone [480] [0]\n    switch costume to (costume16 v)\n    Clone [480] [0]\nend\nif <(LEVEL) = [6]> then\n    switch costume to (costume10 v)\n    Clone [0] [0]\nend\n\nwhen flag clicked\nbroadcast (Setup v)\n\nwhen flag clicked\nbroadcast (Delete all clones v)\nbroadcast (Setup v)\nset [level v] to [1]\n\nwhen I receive [tick v]\nGo to ((Ground: x) + ((0) - (SCROLL X))) ((Ground: y) + ((0) - (SCROLL Y)))\n\ndefine Clone (x) (y)\nchange [ground: x v] by (x)\nchange [ground: y v] by (y)\ncreate clone of (_myself_ v)\nnext costume\n\nwhen I start as a clone\nset [ground: i am a clone? v] to [1]\nshow\n\ndefine Go to (x) (y)\ngo to x: (x) y: (y)\nif <<(x position) = (x)> and <(y position) = (y)>> then\n    show\nelse\n    hide\nend\nif <(Ground: I am a clone?) = [0]> then\n    hide\nend\n\nwhen I start as a clone\ngo to [back v] layer\n\nwhen I receive [tick v]\ngo to [back v] layer\n\n@Sprite2\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@DANGER\n\nwhen flag clicked\ngo to [front v] layer\nset [level v] to [1]\n\nwhen I receive [setup v]\nrepeat (1)\n    delete this clone\nend\nset [ground: i am a clone? v] to [0]\nswitch costume to (costume1 v)\nset [ground: x v] to [0]\nset [ground: y v] to [0]\nhide\nif <(LEVEL) = [1]> then\n    switch costume to (costume1 v)\n    Clone [0] [0]\n    switch costume to (costume2 v)\n    Clone [480] [0]\n    switch costume to (costume3 v)\n    Clone [480] [200]\nend\nif <(LEVEL) = [2]> then\n    switch costume to (costume4 v)\n    Clone [0] [0]\n    switch costume to (costume5 v)\n    Clone [0] [-200]\n    switch costume to (costume6 v)\n    Clone [480] [200]\nend\nif <(LEVEL) = [3]> then\n    switch costume to (costume2 v)\n    Clone [0] [0]\nend\nif <(LEVEL) = [5]> then\n    switch costume to (costume7 v)\n    Clone [0] [0]\n    switch costume to (costume8 v)\n    Clone [480] [0]\n    switch costume to (costume9 v)\n    Clone [480] [0]\nend\n\nwhen flag clicked\nbroadcast (Setup v)\n\nwhen flag clicked\nbroadcast (Delete all clones v)\nbroadcast (Setup v)\nset [level v] to [1]\n\nwhen I receive [tick v]\nGo to ((Ground: x) + ((0) - (SCROLL X))) ((Ground: y) + ((0) - (SCROLL Y)))\n\ndefine Clone (x) (y)\nchange [ground: x v] by (x)\nchange [ground: y v] by (y)\ncreate clone of (_myself_ v)\nnext costume\n\nwhen I start as a clone\nset [ground: i am a clone? v] to [1]\nshow\n\ndefine Go to (x) (y)\ngo to x: (x) y: (y)\nif <<(x position) = (x)> and <(y position) = (y)>> then\n    show\nelse\n    hide\nend\nif <(Ground: I am a clone?) = [0]> then\n    hide\nend\n\nwhen I start as a clone\ngo to [back v] layer\ngo [forward v] (1) layers\n\n@Portal\n\nwhen flag clicked\ngo to [front v] layer\nset [level v] to [1]\n\nwhen I receive [setup v]\nrepeat (1)\n    delete this clone\nend\nset [ground: i am a clone? v] to [0]\nswitch costume to (costume1 v)\nset [ground: x v] to [0]\nset [ground: y v] to [0]\nhide\nif <(LEVEL) = [1]> then\n    switch costume to (costume1 v)\n    Clone [0] [0]\n    switch costume to (costume2 v)\n    Clone [480] [0]\n    switch costume to (costume3 v)\n    Clone [525] [450]\nend\nif <(LEVEL) = [2]> then\n    switch costume to (costume3 v)\n    Clone [595] [275]\nend\nif <(LEVEL) = [3]> then\n    switch costume to (costume3 v)\n    Clone [225] [100]\nend\nif <(LEVEL) = [4]> then\n    switch costume to (costume3 v)\n    Clone [1300] [200]\nend\nif <(LEVEL) = [5]> then\n    switch costume to (costume3 v)\n    Clone [1300] [200]\nend\n\nwhen flag clicked\nbroadcast (Setup v)\n\nwhen flag clicked\nbroadcast (Delete all clones v)\nbroadcast (Setup v)\nset [level v] to [1]\n\nwhen I receive [tick v]\nGo to ((Ground: x) + ((0) - (SCROLL X))) ((Ground: y) + ((0) - (SCROLL Y)))\n\ndefine Clone (x) (y)\nchange [ground: x v] by (x)\nchange [ground: y v] by (y)\ncreate clone of (_myself_ v)\nnext costume\n\nwhen I start as a clone\nset [ground: i am a clone? v] to [1]\nshow\n\ndefine Go to (x) (y)\ngo to x: (x) y: (y)\nif <<(x position) = (x)> and <(y position) = (y)>> then\n    show\nelse\n    hide\nend\nif <(Ground: I am a clone?) = [0]> then\n    hide\nend\n\nwhen I start as a clone\ngo to [front v] layer\n\nwhen I start as a clone\nset size to (150) %\nforever\n    if <(costume [name v]) = [costume3]> then\n        switch costume to (costume4 v)\n        wait (0.1) seconds\n        switch costume to (costume5 v)\n        wait (0.1) seconds\n        switch costume to (costume4 v)\n        wait (0.1) seconds\n        switch costume to (costume3 v)\n        wait (0.1) seconds\n    end\nend\n\n@Water\n\nwhen flag clicked\ngo to [front v] layer\nset [level v] to [1]\n\nwhen I receive [setup v]\nrepeat (1)\n    delete this clone\nend\nset [ground: i am a clone? v] to [0]\nswitch costume to (costume1 v)\nset [ground: x v] to [0]\nset [ground: y v] to [0]\nhide\nif <(LEVEL) = [1]> then\n    switch costume to (costume1 v)\n    Clone [0] [0]\n    switch costume to (costume2 v)\n    Clone [480] [0]\n    switch costume to (costume3 v)\n    Clone [480] [200]\nend\nif <(LEVEL) = [2]> then\n    switch costume to (costume4 v)\n    Clone [0] [0]\n    switch costume to (costume5 v)\n    Clone [0] [-200]\n    switch costume to (costume6 v)\n    Clone [480] [200]\nend\n\nwhen flag clicked\nbroadcast (Setup v)\n\nwhen flag clicked\nbroadcast (Delete all clones v)\nbroadcast (Setup v)\nset [level v] to [1]\n\nwhen I receive [tick v]\nGo to ((Ground: x) + ((0) - (SCROLL X))) ((Ground: y) + ((0) - (SCROLL Y)))\n\ndefine Clone (x) (y)\nchange [ground: x v] by (x)\nchange [ground: y v] by (y)\ncreate clone of (_myself_ v)\nnext costume\n\nwhen I start as a clone\nset [ground: i am a clone? v] to [1]\nshow\n\ndefine Go to (x) (y)\ngo to x: (x) y: (y)\nif <<(x position) = (x)> and <(y position) = (y)>> then\n    show\nelse\n    hide\nend\nif <(Ground: I am a clone?) = [0]> then\n    hide\nend\n\nwhen I start as a clone\nrepeat (2)\n    go to [back v] layer\nend\n\n