Scratch Cat's Journey | A Scrolling Platformer

Instructions: ᴡɪᴛʜ ᴜɴɪǫᴜᴇ ɢᴀᴍᴇᴘʟᴀʏ ᴀɴᴅ ᴀɴ ᴀᴅᴠᴇɴᴛᴜʀᴏᴜs sᴛᴏʀʏ, ᴛʜɪs ɢᴀᴍᴇ ɪs sᴜʀᴇ ᴛᴏ ᴅʀᴀᴡ ʏᴏᴜ ɪɴ ᴀɴᴅ ᴡɪʟʟ ᴋᴇᴇᴘ sᴜʀᴘʀɪsɪɴɢ ʏᴏᴜ ᴀs ʏᴏᴜ ᴘʟᴀʏ ᴛʜʀᴏᴜɢʜ ᴛʜᴇsᴇ ᴇᴘɪᴄ ʟᴇᴠᴇʟs!!\nI hope you like this game that I put a ton of effort into! :D\n⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯\n- Arrow Keys, WASD, or Mobile to Move :)\nThis was Created in the space of 6 Hours!!! :OOO\nThe unique Gameplay is quite cool actually ;)\nHope you Enjoy!! :D\n⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯\nStory:\n\nScratch Cat was going on his regular morning walk when he got lost, help him find his way home!! :D\n⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯\nSorry about the cheesy blurb lol  :PPP\nbtw, don't press left and right at the same time ;-;\nSorry it's short and sort of boring and easy right now :P\nI only had 6 hours to make all of this xD\n⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯\nSorry, more levels coming soon, \nI totally ran out of time :(

@Stage\n\nwhen flag clicked\nforever\n    reset timer\nend\n\nwhen flag clicked\nset [level v] to [1]\n\n@Thumb\n\nwhen flag clicked\nhide\nset [# v] to [0]\nforever\n    reset timer\nend\n\nwhen [timer v] > (0.1)\nchange [# v] by (1)\nif <(#) = [1]> then\n    set [id v] to [1]\n    switch costume to (thumb 1 v)\n    create clone of (_myself_ v)\n    set [id v] to [0]\nelse\n    switch costume to (thumb 3 v)\n    clear graphic effects\n    go to [front v] layer\n    show\nend\n\nwhen I start as a clone\nshow\nif <(costume [number v]) = [1]> then\n    go to x: (0) y: (0)\n    set [ghost v] effect to (100)\n    go to [front v] layer\n    repeat (50)\n        change [ghost v] effect by (-2)\n    end\nelse\n    go to x: (185) y: (160)\n    set [ghost v] effect to (100)\n    repeat (18)\n        change [ghost v] effect by (-4)\n        go to [front v] layer\n        change x by (-10)\n        change y by (-8.6)\n    end\n    go to x: (0) y: (0)\nend\n\nwhen [timer v] > (1)\nif <(#) = [1]> then\n    if <(ID) = [0]> then\n        set [id v] to [2]\n        switch costume to (thumb 2 v)\n        create clone of (_myself_ v)\n        set [id v] to [0]\n    end\nend\nforever\n    reset timer\nend\n\n@Scratch Cat\n\nwhen flag clicked\nset [cam x v] to [100]\nset [cam y v] to [10]\nset [stars collected v] to [0]\nbroadcast (Begin v)\n\nwhen I receive [begin v]\nbroadcast (Setup Stars v) and wait\nforever\n    Scroll to Beginning\n    Setup\n    broadcast (Start Playing v)\n    repeat until <[] < (end)>\n        Tick\n        broadcast (Tick v)\n    end\n    if <(end) = [:\(]> then\n        broadcast (Die Animation v) and wait\n    else\n        broadcast (Win Animation v) and wait\n        change [level v] by (1)\n        broadcast (Setup v) and wait\n        set [stars collected v] to [0]\n        broadcast (Setup Stars v) and wait\n    end\nend\n\ndefine Tick\nswitch costume to (hitbox v)\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    if <[0] < (SX)> then\n        set [sx v] to ((SX) * (0.9))\n    end\n    point in direction (-90)\n    change [sx v] by (-1)\n    if <(SX) < [-12]> then\n        set [sx v] to [-12]\n    end\n    if <(SY) = [0]> then\n        change [frame v] by (1)\n    end\nend\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(x position) < (mouse x)>>> then\n    if <(SX) < [0]> then\n        set [sx v] to ((SX) * (0.9))\n    end\n    point in direction (90)\n    change [sx v] by (1)\n    if <[12] < (SX)> then\n        set [sx v] to [12]\n    end\n    if <(SY) = [0]> then\n        change [frame v] by (1)\n    end\nend\nif <(SY) = [0]> then\n    if <[19] < (frame)> then\n        set [frame v] to [4]\n    end\n    if <not <<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> or <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(x position) < (mouse x)>>>>> then\n        if <(frame) = [4]> then\n            set [frame v] to [1]\n        end\n        if <(frame) = [1]> then\n            set [sx v] to ((SX) * (0.7))\n        else\n            set [sx v] to ((SX) * (0.9))\n            change [frame v] by (1)\n            if <[19] < (frame)> then\n                set [frame v] to [1]\n            end\n        end\n    end\nend\nif <(SY) < [0]> then\n    set [sx v] to ((SX) * (0.9))\n    set [frame v] to [3]\n    set [was falling v] to [1]\nelse\n    if <(SY) > [0]> then\n        set [sx v] to ((SX) * (0.9))\n        set [frame v] to [2]\n        set [was jumping v] to [1]\n    end\nend\nChange X By (SX)\nchange [sy v] by (-1)\nif <(SY) < [-14]> then\n    set [sy v] to [-14]\nend\nChange Y By (SY)\nif <(was falling) = [1]> then\n    if <(SY) = [0]> then\n        set [was falling v] to [0]\n        if <<[0.3] < ([abs v] of (SX) )> or <(hit wall) = [1]>> then\n            set [frame v] to [4]\n        else\n            set [frame v] to [1]\n        end\n    end\nend\nif <(was jumping) = [1]> then\n    if <(SY) < [0]> then\n        set [frame v] to [3]\n        set [was jumping v] to [0]\n    end\nend\nchange [cam x v] by ((((X) + ((SX) * (20))) - (Cam X)) / (12))\nchange [cam y v] by (((((Y) + ((SY) * (9))) - (60)) - (Cam Y)) / (12))\nMax Cams\nExtra\nPosition\nTest - Die\nswitch costume to (frame)\n\ndefine Setup\nset [end v] to []\nset [sx v] to [0]\nset [sy v] to [0]\nset [x v] to [0]\nset [y v] to [100]\nset [frame v] to [1]\nswitch costume to (frame)\nMax Cams\nPosition\nbroadcast (Setup v) and wait\nbroadcast (Tick v)\npoint in direction (90)\nset [ghost v] effect to (100)\nwait (0.5) seconds\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nwait (0.5) seconds\nclear graphic effects\ngo to [front v] layer\nshow\n\ndefine Change X By (sx)\nset [hit wall v] to [0]\nchange [x v] by (sx)\nPosition\nif <touching (level v)?> then\n    repeat (8)\n        change [y v] by (1)\n        Position\n        if <not <touching (level v)?>> then\n            stop [this script v]\n        end\n    end\n    if <touching (level v)?> then\n        change [y v] by (-8)\n        Position\n        repeat until <not <touching (level v)?>>\n            set [hit wall v] to [1]\n            set [sx v] to [0]\n            change [x v] by ((([abs v] of (sx) ) / (sx)) * (-1))\n            Position\n        end\n    end\nend\n\ndefine Change Y By (sy)\nchange [y v] by (sy)\nPosition\nrepeat until <not <touching (level v)?>>\n    set [sy v] to [0]\n    change [y v] by ((([abs v] of (sy) ) / (sy)) * (-1))\n    Position\nend\nif <(SY) = [0]> then\n    if <(sy) < [0]> then\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <((y position) + (20)) < (mouse y)>>> then\n            set [sy v] to [14]\n        end\n    end\nend\n\ndefine Position\ngo to x: ((X) - (Cam X)) y: ((Y) - (Cam Y))\n\ndefine Max Cams\nif <(Level) = [1]> then\n    if <(Cam Y) < [-70]> then\n        set [cam y v] to [-70]\n    end\n    if <[300] < (Cam Y)> then\n        set [cam y v] to [300]\n    end\n    if <(Cam X) < [100]> then\n        set [cam x v] to [100]\n    end\nend\nif <(Level) = [2]> then\n    if <(Cam Y) < [-70]> then\n        set [cam y v] to [-70]\n    end\n    if <(Cam X) < [-50]> then\n        set [cam x v] to [-50]\n    end\n    if <[50] < (Cam X)> then\n        set [cam x v] to [50]\n    end\nend\n\ndefine Test - Die\nif <touching (danger v)?> then\n    set [end v] to [:\(]\nend\nif <(Level) = [1]> then\n    if <(Y) < [-250]> then\n        set [end v] to [:\(]\n    end\nend\nif <(Level) = [2]> then\n    if <(Y) < [-240]> then\n        set [end v] to [:\(]\n    end\nend\n\nwhen I receive [die animation v]\nrepeat (2)\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    wait (0.1) seconds\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    wait (0.1) seconds\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\ndefine Extra\nif <touching (end v)?> then\n    if <([costume name v] of [end v]) = [Open]> then\n        set [end v] to [:\)]\n    end\nend\nif <(Level) = [1]> then\n    if <(X) < [-120]> then\n        set [x v] to [-120]\n        set [sx v] to [0]\n    end\nend\n\nwhen I receive [win animation v]\nrepeat until <<(round (X)) = ([x v] of [end v])> and <(round (Y)) = ([y v] of [end v])>>\n    change [x v] by ((([x v] of [end v]) - (X)) / (12))\n    change [y v] by ((([y v] of [end v]) - (Y)) / (12))\n    change [ghost v] effect by (1)\n    Position\nend\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nwait (1) seconds\n\ndefine Scroll to Beginning\nif <(Level) = [1]> then\n    repeat until <<(round (Cam X)) = (round (100))> and <(round (Cam Y)) = (round (10))>>\n        change [cam x v] by (((100) - (Cam X)) / (8))\n        change [cam y v] by (((10) - (Cam Y)) / (8))\n        broadcast (Tick v)\n        Position\n    end\nend\nif <(Level) = [2]> then\n    repeat until <<(round (Cam X)) = (round (0))> and <(round (Cam Y)) = (round (10))>>\n        change [cam x v] by (((0) - (Cam X)) / (8))\n        change [cam y v] by (((10) - (Cam Y)) / (8))\n        broadcast (Tick v)\n        Position\n    end\nend\nif <(Level) = [3]> then\n    repeat until <<(round (Cam X)) = (round (0))> and <(round (Cam Y)) = (round (10))>>\n        change [cam x v] by (((0) - (Cam X)) / (8))\n        change [cam y v] by (((10) - (Cam Y)) / (8))\n        broadcast (Tick v)\n        Position\n    end\nend\n\nwhen [r v] key pressed\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [stars collected v] to [0]\nbroadcast (Begin v)\n\n@Level\n\nwhen flag clicked\nhide\n\nwhen I receive [setup v]\nhide\nswitch costume to (join (Level) (join [ - ] [1]))\nif <(Level) = [1]> then\n    Clone | X: [0] Y: [0]\n    Clone | X: [500] Y: [80]\n    Clone | X: [800] Y: [20]\n    switch costume to ((costume [number v]) - (1))\n    Clone | X: [800] Y: [-300]\n    Clone | X: [1200] Y: [-100]\nend\nif <(Level) = [2]> then\n    Clone | X: [0] Y: [0]\n    Clone | X: [0] Y: [650]\nend\nif <(Level) = [3]> then\n    Clone | X: [0] Y: [0]\nend\nswitch costume to ( v)\n\ndefine Clone | X: (x) Y: (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\nnext costume\n\nwhen I receive [tick v]\nPosition | X: ((x) - (Cam X)) Y: ((y) - (Cam Y))\n\ndefine Position | X: (x) Y: (y)\ngo to x: (round (x)) y: (round (y))\nif <<(round (x)) = (round (x position))> and <(round (y)) = (round (y position))>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [setup v]\ndelete this clone\n\nbroadcast (Setup v) and wait\n\n@Danger\n\nwhen flag clicked\nhide\n\nwhen I receive [setup v]\nswitch costume to (join (Level) (join [ - ] [1]))\nif <(Level) = [1]> then\n    Clone | X: [500] Y: [80]\nend\nswitch costume to ( v)\n\ndefine Clone | X: (x) Y: (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\nnext costume\n\nwhen I receive [tick v]\nPosition | X: ((x) - (Cam X)) Y: ((y) - (Cam Y))\n\ndefine Position | X: (x) Y: (y)\ngo to x: (round (x)) y: (round (y))\nif <<(round (x)) = (round (x position))> and <(round (y)) = (round (y position))>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [setup v]\ndelete this clone\n\n@Art\n\nwhen flag clicked\nhide\n\nwhen I receive [setup v]\nswitch costume to (join (Level) (join [ - ] [1]))\nif <(Level) = [1]> then\n    Clone | X: [50] Y: [0]\n    Clone | X: [800] Y: [0]\nend\nswitch costume to ( v)\n\ndefine Clone | X: (x) Y: (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\nnext costume\n\nwhen I receive [tick v]\nPosition | X: ((x) - (Cam X)) Y: ((y) - (Cam Y))\n\ndefine Position | X: (x) Y: (y)\ngo to x: (round (x)) y: (round (y))\nif <<(round (x)) = (round (x position))> and <(round (y)) = (round (y position))>> then\n    show\nelse\n    hide\nend\ngo to [back v] layer\n\nwhen I receive [setup v]\ndelete this clone\n\n@Stars\n\nwhen flag clicked\nhide\n\nwhen I receive [setup stars v]\nwait (0) seconds\nswitch costume to (1 - 1 v)\nset [falling? v] to [0]\nset [stars collected v] to [0]\nif <(Level) = [1]> then\n    Clone | X: [810] Y: [-130]\n    Clone | X: [1170] Y: [180]\n    Clone | X: [600] Y: [230]\nend\nif <(Level) = [2]> then\n    Clone | X: [200] Y: [200]\n    Clone | X: [0] Y: [280]\n    Clone | X: [-40] Y: [700]\nend\nswitch costume to ( v)\n\ndefine Clone | X: (x) Y: (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [tick v]\nPosition | X: ((x) - (Cam X)) Y: ((y) - (Cam Y))\n\ndefine Position | X: (x) Y: (y)\ngo to x: (round (x)) y: (round (y))\nif <<(round (x)) = (round (x position))> and <(round (y)) = (round (y position))>> then\n    show\nelse\n    hide\nend\nif <touching (scratch cat v)?> then\n    if <(falling?) = [0]> then\n        set [falling? v] to [1]\n        change [stars collected v] by (1)\n        set [sy v] to [5]\n    end\nend\nif <(falling?) = [1]> then\n    change [sy v] by (-0.25)\n    change [y v] by (sy)\n    change [ghost v] effect by (5)\n    if <(y) < [-500]> then\n        delete this clone\n    end\nend\ngo to [front v] layer\n\nwhen I receive [setup stars v]\ndelete this clone\n\nbroadcast (Setup Stars v)\n\n@Boost\n\nwhen flag clicked\nhide\n\nwhen I receive [setup v]\nswitch costume to (join (Level) (join [ - ] [1]))\nif <(Level) = [1]> then\n    Clone | X: [800] Y: [-200]\n    Clone | X: [1000] Y: [0]\nend\nif <(Level) = [2]> then\n    Clone | X: [50] Y: [0]\n    Clone | X: [-50] Y: [100]\n    Clone | X: [-50] Y: [300]\n    Clone | X: [50] Y: [650]\nend\nswitch costume to ( v)\n\ndefine Clone | X: (x) Y: (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\nnext costume\n\nwhen I receive [tick v]\nPosition | X: ((x) - (Cam X)) Y: ((y) - (Cam Y))\n\ndefine Position | X: (x) Y: (y)\ngo to x: (round (x)) y: (round (y))\nif <<(round (x)) = (round (x position))> and <(round (y)) = (round (y position))>> then\n    show\nelse\n    hide\nend\ngo to [back v] layer\nif <touching (scratch cat v)?> then\n    if <(costume [number v]) = [2]> then\n        set [sx v] to [40]\n        set [sy v] to [12]\n    end\n    if <(costume [number v]) = [3]> then\n        set [sx v] to [-5]\n        set [sy v] to [15]\n    end\n    if <(costume [number v]) = [4]> then\n        set [sx v] to [-40]\n        set [sy v] to [20]\n    end\n    if <(costume [number v]) = [5]> then\n        set [sx v] to [10]\n        set [sy v] to [18]\n    end\n    if <(costume [number v]) = [6]> then\n        set [sx v] to [10]\n        set [sy v] to [18]\n    end\n    if <(costume [number v]) = [7]> then\n        set [sx v] to [-30]\n        set [sy v] to [2]\n    end\nend\n\nwhen I receive [setup v]\ndelete this clone\n\n@End\n\nwhen flag clicked\nhide\n\nwhen I receive [setup v]\nif <(Level) = [1]> then\n    Go To | X: [1700] Y: [100]\nend\nif <(Level) = [2]> then\n    Go To | X: [-150] Y: [700]\nend\n\ndefine Go To | X: (x) Y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\nwhen I receive [tick v]\nPosition | X: ((x) - (Cam X)) Y: ((y) - (Cam Y))\n\ndefine Position | X: (x) Y: (y)\ngo to x: (round (x)) y: (round (y))\nif <<(round (x)) = (round (x position))> and <(round (y)) = (round (y position))>> then\n    show\nelse\n    hide\nend\nif <(Stars Collected) = [3]> then\n    turn left (5) degrees\n    switch costume to (open v)\nelse\n    switch costume to (closed v)\nend\n\n@Tiles\n\n@Collected #\n\nwhen I receive [start playing v]\nshow\nswitch costume to (join [#] (Stars Collected))\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nforever\n    switch costume to (join [#] (Stars Collected))\nend\n\nwhen flag clicked\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [die animation v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\n