Super Scratch Cat! - Platformer | #games #all
@Stage\n\nwhen I receive [start game v]\nset [music v] to [2]\nstop all sounds\nrepeat until <(flag?) = [1]>\n    play sound [Blue Skies, White Clouds v] until done\nend\n\nwhen flag clicked\nset [music v] to [1]\nrepeat until <(music) = [2]>\n    play sound [Menu v] until done\nend\n\n@Player\n\nwhen flag clicked\nhide variable [time: v]\nset [flag? v] to [0]\nhide\n\ndefine Move\nset rotation style [don't rotate v]\nswitch costume to (hitbox v)\nif <(flag?) = [0]> then\n    if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n        point in direction (90)\n        change [xvel v] by (speed)\n    end\n    if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n        point in direction (-90)\n        change [xvel v] by ((0) - (speed))\n    end\n    change x by (xVel)\n    if <<touching (level v)?> or <<touching (blocks v)?> or <touching (invisible walls v)?>>> then\n        change x by ((xVel) * (-1))\n        set [xvel v] to [0]\n    else\n        set [xvel v] to ((xVel) * (0.9))\n    end\n    change y by (yVel)\n    if <<touching (level v)?> or <<touching (blocks v)?> or <touching (invisible walls v)?>>> then\n        change y by ((yVel) * (-1))\n        set [yvel v] to [0]\n        if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n            start sound [Jump v]\n            set [yvel v] to (gravity)\n        end\n    else\n        change [yvel v] by (-1)\n    end\nend\nset rotation style [left-right v]\nswitch costume to (SKIN)\nchange [scroll x v] by ((x position) * (-1))\nchange [scroll y v] by ((y position) * (-1))\ngo to x: (0) y: (0)\n\nwhen I receive [setup v]\nset rotation style [left-right v]\npoint in direction (90)\ngo to x: (-160) y: (0)\nclear graphic effects\nset size to (70) %\nshow\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [xvel v] to [0]\nset [yvel v] to [0]\nset [speed v] to [1]\nset [gravity v] to [15]\nset [powerup v] to [0]\nforever\n    Move\n    if <touching (traps v)?> then\n        broadcast (Setup v)\n    end\n    if <(SCROLL Y) > [1000]> then\n        broadcast (Setup v)\n    end\nend\n\nwhen [r v] key pressed\nif <(flag?) = [0]> then\n    stop [other scripts in sprite v]\n    broadcast (Setup v)\nend\n\nwhen I receive [start game v]\nbroadcast (Setup v)\nwait until <touching (flagpole hitbox v)?>\nset [flag? v] to [1]\nbroadcast (Win v)\n\nwhen I receive [powerup v]\nif <(POWERUP) = [1]> then\n    set [speed v] to [2]\n    set [color v] effect to (85)\n    wait (10) seconds\n    set [speed v] to [1]\n    set [color v] effect to (0)\nend\nif <(POWERUP) = [2]> then\n    set [gravity v] to [20]\n    set [color v] effect to (5)\n    wait (10) seconds\n    set [gravity v] to [15]\n    set [color v] effect to (0)\nend\n\nwhen I receive [pause v]\nif <(flag?) = [0]> then\n    stop [other scripts in sprite v]\nend\n\nwhen I receive [unpause v]\nbroadcast (Timer v)\nforever\n    Move\n    if <touching (traps v)?> then\n        broadcast (Setup v)\n    end\n    if <(SCROLL Y) > [1000]> then\n        broadcast (Setup v)\n    end\nend\n\nwhen I receive [start game v]\nforever\n    if <<<key (d v) pressed?> or <<key (right arrow v) pressed?> or <<key (a v) pressed?> or <key (left arrow v) pressed?>>>> and <<touching (level v)?> or <touching (blocks v)?>>> then\n        repeat until <not <<<key (d v) pressed?> or <<key (right arrow v) pressed?> or <<key (a v) pressed?> or <key (left arrow v) pressed?>>>> and <<touching (level v)?> or <touching (blocks v)?>>>>\n            play sound [Walking v] until done\n        end\n    end\nend\n\nwhen I receive [win music v]\nplay sound [Win v] until done\nplay sound [Meow v] until done\nstop [all v]\n\nwhen I receive [win v]\nstop all sounds\npoint in direction (90)\nwait (0.5) seconds\nstart sound [Flagpole v]\nrepeat until <touching (level v)?>\n    change y by (-5)\nend\nbroadcast (Win Music v)\nrepeat until <touching (castle hitbox v)?>\n    change x by (5)\nend\nhide\n\nwhen I receive [start game v]\nset [time: v] to [0]\nshow variable [time: v]\nbroadcast (Timer v)\n\nwhen I receive [timer v]\nforever\n    if <(flag?) = [0]> then\n        wait (1) seconds\n        change [time: v] by (1)\n    else\n        stop [this script v]\n    end\nend\n\nwhen I receive [unpause v]\nforever\n    if <<<key (d v) pressed?> or <<key (right arrow v) pressed?> or <<key (a v) pressed?> or <key (left arrow v) pressed?>>>> and <<touching (level v)?> or <touching (blocks v)?>>> then\n        repeat until <not <<<key (d v) pressed?> or <<key (right arrow v) pressed?> or <<key (a v) pressed?> or <key (left arrow v) pressed?>>>> and <<touching (level v)?> or <touching (blocks v)?>>>>\n            play sound [Walking v] until done\n        end\n    end\nend\n\n@Level\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\nforever\n    switch costume to (big v)\n    if <(clone #) = [1]> then\n        go to x: ((SCROLL X) - (20)) y: (SCROLL Y)\n    end\n    if <(clone #) = [2]> then\n        go to x: ((SCROLL X) + (459)) y: (SCROLL Y)\n    end\n    if <(clone #) = [3]> then\n        go to x: ((SCROLL X) + (938)) y: (SCROLL Y)\n    end\n    if <(clone #) = [4]> then\n        go to x: ((SCROLL X) + (1417)) y: (SCROLL Y)\n    end\n    if <(clone #) = [5]> then\n        go to x: ((SCROLL X) + (1895)) y: (SCROLL Y)\n    end\n    if <(clone #) = [6]> then\n        go to x: ((SCROLL X) + (2375)) y: (SCROLL Y)\n    end\n    if <(clone #) = [7]> then\n        go to x: ((SCROLL X) + (2855)) y: (SCROLL Y)\n    end\n    if <(clone #) = [8]> then\n        go to x: ((SCROLL X) + (3335)) y: (SCROLL Y)\n    end\n    if <(clone #) = [9]> then\n        go to x: ((SCROLL X) + (3815)) y: (SCROLL Y)\n    end\n    if <(clone #) = [10]> then\n        go to x: ((SCROLL X) + (4295)) y: (SCROLL Y)\n    end\n    if <(clone #) = [11]> then\n        go to x: ((SCROLL X) + (4775)) y: (SCROLL Y)\n    end\n    switch costume to (clone #)\nend\n\nwhen I receive [start game v]\nset [clone # v] to [1]\ncreate clone of (_myself_ v)\nset [clone # v] to [2]\ncreate clone of (_myself_ v)\nset [clone # v] to [3]\ncreate clone of (_myself_ v)\nset [clone # v] to [4]\ncreate clone of (_myself_ v)\nset [clone # v] to [5]\ncreate clone of (_myself_ v)\nset [clone # v] to [6]\ncreate clone of (_myself_ v)\nset [clone # v] to [7]\ncreate clone of (_myself_ v)\nset [clone # v] to [8]\ncreate clone of (_myself_ v)\nset [clone # v] to [9]\ncreate clone of (_myself_ v)\nset [clone # v] to [10]\ncreate clone of (_myself_ v)\nset [clone # v] to [11]\ncreate clone of (_myself_ v)\n\n@Invisible Walls\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\nswitch costume to (clone #)\nforever\n    set [ghost v] effect to (100)\n    if <(clone #) = [1]> then\n        go to x: ((SCROLL X) - (20)) y: (SCROLL Y)\n    end\n    if <(clone #) = [2]> then\n        go to x: ((SCROLL X) + (4775)) y: (SCROLL Y)\n    end\nend\n\nwhen I receive [start game v]\nset [clone # v] to [1]\ncreate clone of (_myself_ v)\nset [clone # v] to [2]\ncreate clone of (_myself_ v)\n\n@Blocks\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\nforever\n    if <(clone #) = [1]> then\n        go to x: ((SCROLL X) + (1417)) y: (SCROLL Y)\n    end\n    if <(clone #) = [2]> then\n        go to x: ((SCROLL X) + (3335)) y: (SCROLL Y)\n    end\nend\n\nwhen I receive [start game v]\nset [clone # v] to [1]\ncreate clone of (_myself_ v)\nset [clone # v] to [2]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nset [state v] to [unused]\nforever\n    switch costume to (join (clone #) (join [_hitbox_] (state)))\n    if <touching (player v)?> then\n        set [powerup v] to (pick random (1) to (2))\n        set [state v] to [used]\n        broadcast (Powerup v)\n    end\n    switch costume to (join (clone #) (state))\nend\n\n@Traps\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\nswitch costume to (clone #)\nforever\n    if <(clone #) = [1]> then\n        go to x: ((SCROLL X) + (938)) y: (SCROLL Y)\n    end\n    if <(clone #) = [2]> then\n        go to x: ((SCROLL X) + (459)) y: (SCROLL Y)\n    end\n    if <(clone #) = [3]> then\n        go to x: ((SCROLL X) + (1895)) y: (SCROLL Y)\n    end\n    if <(clone #) = [4]> then\n        go to x: ((SCROLL X) + (2855)) y: (SCROLL Y)\n    end\n    if <(clone #) = [5]> then\n        go to x: ((SCROLL X) + (3815)) y: (SCROLL Y)\n    end\nend\n\nwhen I receive [start game v]\nset [clone # v] to [1]\ncreate clone of (_myself_ v)\nset [clone # v] to [2]\ncreate clone of (_myself_ v)\nset [clone # v] to [3]\ncreate clone of (_myself_ v)\nset [clone # v] to [4]\ncreate clone of (_myself_ v)\nset [clone # v] to [5]\ncreate clone of (_myself_ v)\n\n@Enemies\n\n@Clouds\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nset [ghost v] effect to (50)\nshow\nforever\n    go to [back v] layer\n    change x by (-0.3)\n    if <(x position) < [-464]> then\n        set x to (465)\n    end\nend\n\nwhen I receive [start game v]\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\ncreate clone of (_myself_ v)\nswitch costume to (costume2 v)\ngo to x: (465) y: (0)\ncreate clone of (_myself_ v)\n\nwhen I receive [pause v]\nif <(flag?) = [0]> then\n    stop [other scripts in sprite v]\nend\n\nwhen I receive [unpause v]\nforever\n    go to [back v] layer\n    change x by (-0.3)\n    if <(x position) < [-464]> then\n        set x to (465)\n    end\nend\n\n@Flagpole\n\nwhen flag clicked\nhide\n\nwhen I receive [start game v]\nshow\nforever\n    switch costume to (big v)\n    go to x: ((SCROLL X) + (4775)) y: (SCROLL Y)\n    switch costume to (flag v)\nend\n\n@Castle Hitbox\n\nwhen flag clicked\nhide\n\nwhen I receive [start game v]\nshow\nforever\n    set [ghost v] effect to (100)\n    go to x: ((SCROLL X) + (4775)) y: (SCROLL Y)\nend\n\n@Flagpole Hitbox\n\nwhen flag clicked\nhide\n\nwhen I receive [start game v]\nshow\nforever\n    set [ghost v] effect to (100)\n    go to x: ((SCROLL X) + (4775)) y: (SCROLL Y)\nend\n\n@Border\n\nwhen flag clicked\nhide\n\nwhen I receive [start game v]\n\nshow\ngo to [front v] layer\nforever\n    go to x: (0) y: (0)\nend\n\n@GUI\n\nwhen flag clicked\nhide\n\ndefine Create Clones\nset [_id v] to [screenshade]\ncreate clone of (_myself_ v)\nset [_id v] to [resume]\ncreate clone of (_myself_ v)\nset [_id v] to [settings]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nswitch costume to (join [skin] (SKIN))\nswitch costume to (_id)\nshow\ngo to [front v] layer\ngo to x: (0) y: (0)\nif <(_id) = [pause]> then\n    go to x: (190) y: (130)\n    forever\n        Button Tick\n    end\nelse\n    if <(_id) = [resume]> then\n        go to x: (0) y: (50)\n        forever\n            Button Tick\n        end\n    else\n        if <(_id) = [settings]> then\n            go to x: (0) y: (-50)\n            forever\n                Button Tick\n            end\n        else\n            if <(_id) = [back]> then\n                go to x: (-190) y: (130)\n                forever\n                    Button Tick\n                end\n            else\n                if <(_id) = [skin]> then\n                    go to x: (0) y: (0)\n                    forever\n                        Button Tick\n                    end\n                else\n                    if <(_id) = [screenshade]> then\n                        go to x: (0) y: (0)\n                        set [ghost v] effect to (70)\n                    else\n                        if <(_id) = [skinlabel]> then\n                            go to x: (0) y: (100)\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Button Tick\nset [touchingmouse? v] to <touching (mouse-pointer v)?>\nswitch costume to (_id)\nif <(touchingmouse?) = [true]> then\n    set [brightness v] effect to (5)\n    set size to (110) %\nelse\n    set [brightness v] effect to (0)\n    set size to (100) %\nend\nif <<(touchingmouse?) = [true]> and <mouse down?>> then\n    wait until <not <mouse down?>>\n    if <(_id) = [pause]> then\n        Create Clones\n        broadcast (Pause v)\n        delete this clone\n    else\n        if <(_id) = [resume]> then\n            broadcast (Unpause v)\n        else\n            if <(_id) = [settings]> then\n                broadcast (Settings v)\n            else\n                if <(_id) = [skin]> then\n                    change [skin v] by (1)\n                    if <(SKIN) > [5]> then\n                        set [skin v] to [1]\n                    end\n                    switch costume to (join [skin] (SKIN))\n                else\n                    if <(_id) = [back]> then\n                        broadcast (Back v)\n                        Create Clones\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [start game v]\nCreate Pause\n\ndefine Create Pause\nset [_id v] to [pause]\ncreate clone of (_myself_ v)\n\nwhen I receive [unpause v]\nwait (0) seconds\nCreate Pause\n\nwhen I receive [unpause v]\nshow variable [time: v]\ndelete this clone\n\nwhen I receive [settings v]\ndelete this clone\n\nwhen I receive [settings v]\nset [_id v] to [screenshade]\ncreate clone of (_myself_ v)\nwait (0) seconds\nCreate Settings\n\ndefine Create Settings\nset [_id v] to [back]\ncreate clone of (_myself_ v)\nset [_id v] to [skin]\ncreate clone of (_myself_ v)\nset [_id v] to [skinlabel]\ncreate clone of (_myself_ v)\n\nwhen I receive [back v]\ndelete this clone\n\nswitch costume to (join (_id) [_hitbox])\n\nwhen I receive [pause v]\nhide variable [time: v]\n\n@Title Screen\n\nwhen flag clicked\nhide\nCreate Clones\n\ndefine Create Clones\nset [_id v] to [title]\ncreate clone of (_myself_ v)\nset [_id v] to [skin]\ncreate clone of (_myself_ v)\nset [_id v] to [play]\ncreate clone of (_myself_ v)\nset [_id v] to [bg]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nswitch costume to (skin1 v)\nswitch costume to (_id)\nshow\ngo to [front v] layer\ngo to x: (0) y: (0)\nif <(_id) = [title]> then\n    go to x: (100) y: (100)\nelse\n    if <(_id) = [play]> then\n        set y to (-90)\n        forever\n            Button Tick\n        end\n    else\n        if <(_id) = [skin]> then\n            set [skin v] to [1]\n            go to x: (-118) y: (39)\n            forever\n                Button Tick\n            end\n        else\n            if <(_id) = [bg]> then\n                go to [back v] layer\n                forever\n                    go to x: ((mouse x) / (15)) y: ((mouse y) / (15))\n                end\n            end\n        end\n    end\nend\n\ndefine Button Tick\nswitch costume to (_id)\nif <touching (mouse-pointer v)?> then\n    set [brightness v] effect to (5)\n    set size to (110) %\nelse\n    set [brightness v] effect to (0)\n    set size to (100) %\nend\nif <<touching (mouse-pointer v)?> and <mouse down?>> then\n    wait until <not <mouse down?>>\n    if <(_id) = [play]> then\n        broadcast (Start Game v)\n    else\n        if <(_id) = [skin]> then\n            change [skin v] by (1)\n            if <(SKIN) > [5]> then\n                set [skin v] to [1]\n            end\n            switch costume to (join [skin] (SKIN))\n        end\n    end\nend\n\nwhen I receive [start game v]\ndelete this clone\n\n@Thumbnail\n\nwhen flag clicked\ngo to [front v] layer\nclear graphic effects\nset [brightness v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nforever\n    go to x: (0) y: (0)\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    set [brightness v] effect to (0)\n    show\nend\n\nswitch costume to (advertisement v)\n\n
Press Green Flag 2-4 times to avoid any possible glitches.\n\nA/D & </> - Walk\nW & ^ - Jump\nR - Reset (if you get softlocked)\n=========================================\nPlease help this project get on featured by proposing in this studio! https://scratch.mit.edu/studios/28715018/comments\n=========================================\nIf you want more games like this, please\n❤️, ⭐, and follow.\nIt would be very appreciated!