Scratch Cat Platformer V.1.1

Instructions: Hello Guys i got a big gift for you, it is a Scratch cat Platformer. i made this around 5 - 7 days. i didn't remember it (because i'm very sleepy). okay don't forget to love and fav this okay and don't forget to follow me more follows,fav and love, make me more excited to make projects.\n\nControls :\nWASD or Arrow keys to move\npress 1, 2, and 3 for changing the backdrops\n\nFollow :\n@Guinno\n@griffpatch\n@2895045mno\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nStop scrolling\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\ni said stop\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\njust play the game\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nyou reached the END OF THE SCROLLING\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nSpoiler\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nNo spoiler\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\njust kidding \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\ni will add the multiplayer version \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n follow me already pls

@Stage\n\nwhen flag clicked\nforever\n    switch backdrop to (sky v)\n    play sound [minecraft_holder_trap_remix v] until done\nend\n\nwhen [1 v] key pressed\nswitch backdrop to (sky v)\n\nwhen [2 v] key pressed\nswitch backdrop to (sky2 v)\n\nwhen [3 v] key pressed\nswitch backdrop to (sky3 v)\n\n@Scratch Cat_Player\n\ndefine limit camera edge x: (edge x) edge y: (edge y)\nif <(CAMERA X) < (edge x)> then\n    set [camera x v] to (edge x)\nend\nif <(CAMERA Y) < (edge y)> then\n    set [camera y v] to (edge y)\nend\nif <(CAMERA X) > (((32) * (GRID WIDTH)) - (edge x))> then\n    set [camera x v] to (((32) * (GRID WIDTH)) - (edge x))\nend\nif <(CAMERA Y) > (((32) * (GRID HEIGHT)) - (edge y))> then\n    set [camera y v] to (((32) * (GRID HEIGHT)) - (edge y))\nend\n\nwhen flag clicked\nbroadcast (generate level v) and wait\nbroadcast (clone level tiles v) and wait\nreset player\ngame loop\n\ndefine move camera\nset [camera x v] to (x)\nchange [camera y v] by (((y) - (CAMERA Y)) / (4))\nif <(EDITOR) > [0]> then\n    limit camera edge x: [240] edge y: [180]\nelse\n    limit camera edge x: [272] edge y: [180]\nend\n\ndefine reset player\nset [-tiny v] to [-0.000001]\nset [x v] to [100]\nset [y v] to [100]\nset [width v] to [8]\nset [height v] to [24]\nset [camera x v] to [240]\nset [camera y v] to [180]\nset [jumping v] to [99]\nset [falling v] to [99]\nmove camera\n\ndefine game loop\nforever\n    broadcast (check controls v)\n    broadcast (move player v)\n    broadcast (position tiles v)\nend\n\nwhen I receive [move player v]\nif <(EDITOR) > [0]> then\n    handle - God Mode\nelse\n    handle keys - left right\n    handle keys - jump\n    move sprite x\n    move sprite y\n    check around player\nend\nmove camera\npaint sprite\n\ndefine get tile at x: (x) y: (y)\nset [tile grid x v] to ([floor v] of ((x) / (32)) )\nset [tile grid y v] to ([floor v] of ((y) / (32)) )\nset [tile index v] to (((1) + (tile grid y)) + ((tile grid x) * (GRID HEIGHT)))\nif <(tile grid y) < [0]> then\n    set [tile v] to []\nelse\n    set [tile v] to (item (tile index) of [tile grid v])\nend\n\ndefine fix collision in direction dx: (dx) dy: (dy)\nset [fix dx v] to (dx)\nset [fix dy v] to (dy)\nset [solid v] to []\nfix collision at point x: ((x) - (width)) y: ((y) - (height))\nfix collision at point x: ((x) - (width)) y: (y)\nfix collision at point x: ((x) - (width)) y: ((y) + (height))\nfix collision at point x: ((x) + ((width) + (-TINY))) y: ((y) - (height))\nfix collision at point x: ((x) + ((width) + (-TINY))) y: (y)\nfix collision at point x: ((x) + ((width) + (-TINY))) y: ((y) + (height))\n\ndefine fix collision at point x: (x) y: (y)\nget tile at x: (x) y: (y)\nif <(tile) > [2]> then\n    set [solid v] to [10]\n    set [mod x v] to ((x) mod (32))\n    set [mod y v] to ((y) mod (32))\n    if <(fix dy) < [0]> then\n        change [y v] by ((32) - (mod y))\n    end\n    if <(fix dx) < [0]> then\n        change [x v] by ((32) - (mod x))\n    end\n    if <(fix dy) > [0]> then\n        change [y v] by ((-TINY) - (mod y))\n    end\n    if <(fix dx) > [0]> then\n        change [x v] by ((-TINY) - (mod x))\n    end\nend\n\ndefine handle keys - left right\nset [player action v] to [walk]\nset [key walk v] to ([x axis v] of [controls v])\nif <(KEY WALK) = [0]> then\n    if <(falling) < [2]> then\n        if <(speed x) > [0.4]> then\n            change [speed x v] by (-0.4)\n        else\n            if <(speed x) < [-0.4]> then\n                change [speed x v] by (0.4)\n            else\n                set [speed x v] to [0]\n                set [player frame v] to [0]\n            end\n        end\n    end\nelse\n    point in direction ((90) * (KEY WALK))\n    if <((KEY WALK) * (speed x)) < [10]> then\n        if <((KEY WALK) * (speed x)) < [0]> then\n            change [speed x v] by ((KEY WALK) * (0.8))\n            if <(falling) < [2]> then\n                set [player action v] to [turn]\n            end\n        else\n            change [speed x v] by ((KEY WALK) * (0.4))\n        end\n    end\nend\nset [temp v] to (([abs v] of (speed x) ) / (19))\nif <(temp) < [0.2]> then\n    set [temp v] to [0.2]\nend\nchange [player frame v] by (temp)\n\ndefine handle keys - jump\nchange [speed y v] by (-2)\nif <(speed y) < [-22]> then\n    set [speed y v] to [-22]\nend\nif <([up v] of [controls v]) > [0]> then\n    if <<(falling) < [2]> or <(jumping) > [0]>> then\n        change [jumping v] by (1)\n        if <(jumping) < [11]> then\n            set [speed y v] to [13]\n        end\n    end\nelse\n    set [jumping v] to [0]\nend\n\ndefine move sprite x\nchange [x v] by (speed x)\nfix collision in direction dx: (speed x) dy: [0]\nif <(solid) > [0]> then\n    set [speed x v] to [0]\nend\n\ndefine move sprite y\nchange [y v] by (speed y)\nchange [falling v] by (1)\nfix collision in direction dx: [0] dy: (speed y)\nif <(solid) > [0]> then\n    if <(speed y) < [0]> then\n        set [falling v] to [0]\n    else\n        set [jumping v] to [99]\n    end\n    set [speed y v] to [0]\nend\n\ndefine paint sprite\ngo to x: ((x) - (CAMERA X)) y: ((y) - (CAMERA Y))\nif <(falling) > [1]> then\n    if <(speed y) > [0]> then\n        switch costume to (jumping v)\n    else\n        switch costume to (falling v)\n    end\n    stop [this script v]\nend\nif <(player action) = [turn]> then\n    switch costume to (turn v)\n    stop [this script v]\nend\nswitch costume to ((1) + (([floor v] of (player frame) ) mod (16)))\nif <not <key (any v) pressed?>> then\n    switch costume to (standing v)\nend\n\ndefine handle - God Mode\nchange [speed x v] by ((6) * ([x axis v] of [controls v]))\nchange [speed y v] by ((6) * ([y axis v] of [controls v]))\nset [speed x v] to ((0.7) * (speed x))\nset [speed y v] to ((0.7) * (speed y))\nchange [x v] by (speed x)\nchange [y v] by (speed y)\n\ndefine check around player\nif <(y) < [0]> then\n    reset player\nend\n\nwhen I receive [level - stop!!! v]\nstop [other scripts in sprite v]\n\nwhen I receive [level - start game loop v]\ngame loop\n\nwhen flag clicked\nset size to (50) %\nforever\n    go to [front v] layer\nend\n\ndefine YAY !!!!!!!!!! FINALLY I FINISHED\n\nwhen flag clicked\nforever\n    if <<touching color (#00cfff)?> or <touching color (#2e7259)?>> then\n        broadcast (!!!! YOU WIN !!!! v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [!!!! you win !!!! v]\nstop [this script v]\n\n@Tiles\n\ndefine setup\nshow\nset [tile index v] to [1]\nset [tile x v] to [16]\nrepeat (CLONE COUNT X)\n    set [tile y v] to [16]\n    repeat (CLONE COUNT Y)\n        create clone of (_myself_ v)\n        change [tile y v] by (32)\n        change [tile index v] by (1)\n    end\n    change [tile x v] by (32)\n    change [tile index v] by ((GRID HEIGHT) - (CLONE COUNT Y))\nend\nhide\nset [tile index v] to []\n\nwhen I receive [position tiles v]\nif <(tile index) = []> then\n    editor brush\nelse\n    if <([abs v] of ((tile x) - (CAMERA X)) ) > ((CLONE COUNT X) * (16))> then\n        if <(tile x) < (CAMERA X)> then\n            loop tile x (CLONE COUNT X)\n        else\n            loop tile x ((0) - (CLONE COUNT X))\n        end\n    end\n    if <([abs v] of ((tile y) - (CAMERA Y)) ) > ((CLONE COUNT Y) * (16))> then\n        if <(tile y) < (CAMERA Y)> then\n            loop tile y (CLONE COUNT Y)\n        else\n            loop tile y ((0) - (CLONE COUNT Y))\n        end\n    end\n    set [tile v] to (item (tile index) of [tile grid v])\nend\nswitch costume to (big v)\ngo to x: ((tile x) - (CAMERA X)) y: ((tile y) - (CAMERA Y))\nif <(tile) < [2]> then\n    set [tile v] to [2]\nelse\n    if <<(tile) = [20]> or <(tile) = [24]>> then\n        change [tile v] by (([floor v] of ((timer) * (8)) ) mod (4))\n    end\nend\nswitch costume to (tile)\n\ndefine loop tile x (tile skip)\nchange [tile x v] by ((tile skip) * (32))\nchange [tile index v] by ((tile skip) * (GRID HEIGHT))\n\ndefine loop tile y (tile skip)\nchange [tile y v] by ((tile skip) * (32))\nchange [tile index v] by (tile skip)\n\nwhen I receive [clone level tiles v]\nset size to (200) %\nset [clone count x v] to [16]\nset [clone count y v] to [13]\nsetup\n\ndefine editor brush\nif <<(EDITOR) < [1]> or <mouse down?>> then\n    hide\n    stop [this script v]\nend\nset [tile x v] to (((32) * ([tile grid x v] of [editor v])) + (16))\nset [tile y v] to (((32) * ([tile grid y v] of [editor v])) + (16))\nset [tile v] to ([chosen brush v] of [editor v])\nset [ghost v] effect to (50)\nshow\n\nwhen I receive [level - done loading... v]\nif <(tile index) > []> then\n    set [tile index v] to ((1) + ([floor v] of ((tile y) / (32)) ))\n    change [tile index v] by ((GRID HEIGHT) * ([floor v] of ((tile x) / (32)) ))\nend\n\nwhen I receive [!!!! you win !!!! v]\nstop [this script v]\n\n@Controls\n\nwhen I receive [check controls v]\nset [left v] to <<key (left arrow v) pressed?> or <key (a v) pressed?>>\nset [right v] to <<key (right arrow v) pressed?> or <key (d v) pressed?>>\nset [down v] to <<key (down arrow v) pressed?> or <key (s v) pressed?>>\nset [up v] to <<key (up arrow v) pressed?> or <key (w v) pressed?>>\nset [x axis v] to ((right) - (left))\nset [y axis v] to ((up) - (down))\n\nwhen I receive [!!!! you win !!!! v]\nstop [this script v]\n\n@Cloud\n\nwhen flag clicked\ngo to x: (239) y: (142)\nforever\n    go to [back v] layer\n    hide\n    wait (0.5) seconds\n    go to x: (-239) y: (142)\n    show\n    glide (12) secs to x: (239) y: (142)\nend\n\nwhen flag clicked\nforever\n    if <(backdrop [number v]) = [3]> then\n        switch costume to (costume2 v)\n    end\n    if <<(backdrop [number v]) = [1]> or <(backdrop [number v]) = [2]>> then\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [!!!! you win !!!! v]\nstop [this script v]\n\n@Cloud2\n\nwhen flag clicked\ngo to x: (239) y: (-2)\nforever\n    go to [back v] layer\n    hide\n    wait (0.5) seconds\n    go to x: (-239) y: (2)\n    show\n    glide (15) secs to x: (239) y: (-2)\nend\n\nwhen flag clicked\nforever\n    if <(backdrop [number v]) = [3]> then\n        switch costume to (costume2 v)\n    end\n    if <<(backdrop [number v]) = [1]> or <(backdrop [number v]) = [2]>> then\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [!!!! you win !!!! v]\nstop [this script v]\n\n@Cloud3\n\nwhen flag clicked\ngo to x: (239) y: (79)\nforever\n    go to [back v] layer\n    hide\n    wait (0.5) seconds\n    go to x: (-239) y: (79)\n    show\n    glide (20) secs to x: (239) y: (79)\nend\n\nwhen flag clicked\nforever\n    if <(backdrop [number v]) = [3]> then\n        switch costume to (costume2 v)\n    end\n    if <<(backdrop [number v]) = [1]> or <(backdrop [number v]) = [2]>> then\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [!!!! you win !!!! v]\nstop [this script v]\n\n@Level Store\n\ndefine write value (value) delimiter (letter)\nset [encoded v] to (join (encoded) (join (value) (letter)))\n\ndefine save level (level #)\nset [encoded v] to []\nwrite value [1] delimiter [_]\nwrite value (GRID WIDTH) delimiter [_]\nwrite value (GRID HEIGHT) delimiter [_]\nset [tile index v] to [1]\nset [tile v] to (item (tile index) of [tile grid v])\nset [length v] to [0]\nrepeat (GRID HEIGHT)\n    repeat (GRID WIDTH)\n        if <<(length) < [26]> and <(tile) = (item (tile index) of [tile grid v])>> then\n            change [length v] by (1)\n        else\n            if <(tile) = [2]> then\n                set [tile v] to []\n            end\n            write value (tile) delimiter (item (length) of [a to z v])\n            set [tile v] to (item (tile index) of [tile grid v])\n            set [length v] to [1]\n        end\n        change [tile index v] by (GRID HEIGHT)\n    end\n    change [tile index v] by ((1) - ((GRID WIDTH) * (GRID HEIGHT)))\nend\nwrite value (tile) delimiter (item (length) of [a to z v])\nrepeat ((level #) - (length of [level store v]))\n    add [] to [level store v]\nend\nreplace item (level #) of [level store v] with (encoded)\n\ndefine load level (level #)\nset [encoded v] to (item (level #) of [level store v])\nset [read index v] to [1]\nread value\nif <not <(value) = [1]>> then\n    stop [this script v]\nend\ndelete all of [tile grid v]\nread value\nset [grid width v] to (value)\nread value\nset [grid height v] to (value)\nrepeat ((GRID WIDTH) * (GRID HEIGHT))\n    add [] to [tile grid v]\nend\nset [tile index v] to [1]\nrepeat until <(read index) > (length of (encoded))>\n    read value\n    if <(value) = []> then\n        set [value v] to [2]\n    end\n    repeat (item # of (letter) in [a to z v])\n        replace item (tile index) of [tile grid v] with (value)\n        change [tile index v] by (GRID HEIGHT)\n        if <(tile index) > ((GRID WIDTH) * (GRID HEIGHT))> then\n            change [tile index v] by ((1) - ((GRID WIDTH) * (GRID HEIGHT)))\n        end\n    end\nend\n\ndefine read letter\nset [letter v] to (letter (read index) of (encoded))\nchange [read index v] by (1)\n\ndefine read value\nset [value v] to []\nread letter\nrepeat until <<(letter) > [9]> or <(letter) = []>>\n    set [value v] to (join (value) (letter))\n    read letter\nend\n\nwhen I receive [level - save v]\nsave level (LEVEL #)\n\nwhen I receive [level - load v]\nload level (LEVEL #)\nbroadcast (LEVEL - Done Loading... v) and wait\n\nwhen I receive [!!!! you win !!!! v]\nstop [this script v]\n\n@Congratulations\n\nwhen I receive [!!!! you win !!!! v]\nshow\n\nwhen flag clicked\nhide\n\n@Thumbnail\n\nwhen flag clicked\nshow\ngo to [front v] layer\nrepeat (25)\n    change [ghost v] effect by (4)\nend\n\n@Other_Players\n\n