Scratch Cat Platformer 

Instructions: Hello,\nUse arrow keys to move.\nMobile Controls Are In The Settings.\nNote - Mobile Controls Make The Game A Bit Laggy.\nCollect as many apples as you can.\nAlso Did Anyone Break The Record But It Not Showing, comment it down below.\nAlso There Is A Update And Therefore The Highscore Is High.

@Stage\n\n@player\n\nwhen flag clicked\nset [mobile-activate v] to [0]\nset [my score v] to [0]\nbroadcast (Main Menu v)\n\ndefine move-in steps (steps)\nchange [falling v] by (1)\nrepeat (steps)\n    set [last value v] to (x position)\n    change x by ((speed x) / (steps))\n    check touching solids\n    if <(touching) > [0]> then\n        collide x - slope or wall?\n    end\n    set [last value v] to (y position)\n    change y by ((speed y) / (steps))\n    check touching solids\n    if <(touching) > [0]> then\n        collide y- celling or floor?\n    end\nend\n\ndefine check touching solids\nif <<touching (level v)?> or <touching (plaforms v)?>> then\n    set [touching v] to [1]\nelse\n    set [touching v] to [0]\nend\n\nwhen I receive [tick player v]\nmoved by moving platform\nswitch backdrop to <touching (level v)?>\ncontrols up and down\ncontrols left and right\nmove-in steps (([abs v] of (speed x) ) + ([abs v] of (speed y) ))\nset costume\n\ndefine controls up and down\nif <<key (up arrow v) pressed?> or <(Stick Y) > [0.5]>> then\n    if <<(wall slide) > [0]> and <(jumping) = [0]>> then\n        if <(Mute) = [off]> then\n            start sound [Jump v]\n        end\n        set [jumping v] to [1]\n        set [falling v] to [3]\n        set [wall slide v] to [0]\n        turn right (180) degrees\n        set [speed x v] to (((direction) / (90)) * (7))\n        set [long jump v] to [12]\n    end\n    if <<(falling) < [3]> and <(jumping) = [0]>> then\n        if <(Mute) = [off]> then\n            start sound [Jump v]\n        end\n        set [jumping v] to [1]\n        set [falling v] to [3]\n    end\n    if <<(jumping) > [0]> and <(jumping) < (jump duration)>> then\n        change [jumping v] by (1)\n        set [speed y v] to (jump force)\n    end\nelse\n    set [jumping v] to [0]\nend\nchange [speed y v] by (gravity)\nif <(wall slide) > [0]> then\n    check can wall slide?\n    if <(speed y) < [0]> then\n        set [speed y v] to ((speed y) * (0.6))\n    end\nend\n\ndefine controls left and right\nif <(long jump) > [0]> then\n    change [long jump v] by (-1)\n    stop [this script v]\nend\nset [key x v] to (<<key (right arrow v) pressed?> or <(Stick X) > [0.5]>> - <<key (left arrow v) pressed?> or <(Stick X) < [-0.5]>>)\nif <(key x) = [0]> then\n    if <<(falling) > [2]> and <(wall slide) < [1]>> then\n        set [speed x v] to ((speed x) * (0.98))\n        stop [this script v]\n    end\n    if <([abs v] of (speed x) ) < [1]> then\n        set [frame v] to [0]\n        set [speed x v] to [0]\n    else\n        change [frame v] by (0.5)\n    end\nelse\n    change [speed x v] by ((acceleration) * (key x))\n    if <not <(direction) = ((key x) * (90))>> then\n        set [wall slide v] to [0]\n    end\n    point in direction ((key x) * (90))\n    change [frame v] by (1.05)\nend\nset [speed x v] to ((speed x) * (resistance))\n\ndefine reset and begin level\nset [invulnerable v] to [0]\nset [speed y v] to [0]\nset [speed x v] to [0]\nset [falling v] to [99]\nset [wall slide v] to [0]\nset [jumping v] to [0]\nset [long jump v] to [0]\npoint in direction (90)\nbegin scene# (spawn scene) go to y and x: (spawn x) (spawn y)\n\nwhen I receive [game loop v]\nset [ghost v] effect to (0)\nforever\n    broadcast (tick first v)\n    broadcast (tick platforms v)\n    broadcast (tick player v)\n    broadcast (tick last v)\n    broadcast (Score Change v)\nend\n\nwhen I receive [tick last v]\nif <(x position) > [235]> then\n    begin scene# ((Scene#) + (1)) go to y and x: [-235] []\nend\nif <(x position) < [-235]> then\n    begin scene# ((Scene#) + (-1)) go to y and x: [235] []\nend\nif <(y position) > [180]> then\n    begin scene# ((Scene#) + (100)) go to y and x: [] [-160]\nend\nif <(y position) < [-180]> then\n    begin scene# ((Scene#) + (-100)) go to y and x: [] [180]\nend\nif <touching (danger v)?> then\n    broadcast (lose life v)\nend\n\ndefine begin scene# (scene#) go to y and x: (x) (y)\nset [scene# v] to (scene#)\nif <(x) > []> then\n    set x to (x)\nend\nif <(y) > []> then\n    set y to (y)\nend\nbroadcast (leave scene v)\nbroadcast (change scene v)\nstop [other scripts in sprite v]\nwait (0) seconds\nswitch costume to (hitbox v2 v)\nset rotation style [don't rotate v]\nif <(x) > []> then\n    fix collision in direction [0]\nelse\n    fix collision in direction [90]\nend\nset costume\nbroadcast (game loop v)\n\ndefine fix collision in direction (dir)\nset [temp v] to (direction)\nset [distance v] to [1]\npoint in direction (dir)\nrepeat (128)\n    check touching solids\n    if <(touching) < [1]> then\n        point in direction (temp)\n        stop [this script v]\n    end\n    move (distance) steps\n    turn right (180) degrees\n    change [distance v] by (1)\nend\n\nwhen I receive [tick first v]\nswitch costume to (hitbox v2 v)\nset rotation style [don't rotate v]\nset [platform dx v] to []\nset [platform dy v] to []\n\ndefine set costume\nset rotation style [left-right v]\nif <(wall slide) > [0]> then\n    switch costume to (hangon01 v)\n    stop [this script v]\nend\nif <(falling) > [1]> then\n    if <(speed y) > [0]> then\n        switch costume to (jump01 v)\n    else\n        switch costume to (run_j2 v)\n    end\n    stop [this script v]\nend\nif <(frame) > [0]> then\n    switch costume to ((1) + ([floor v] of ((frame) mod (16)) ))\nelse\n    switch costume to (hit angle 0 v)\n    repeat (5)\n        check touching solids\n        if <(touching) < [1]> then\n            switch costume to ((costume [number v]) + (5))\n            stop [this script v]\n        end\n        next costume\n    end\n    switch costume to (stand v)\nend\n\ndefine collide x - slope or wall?\ncheck can wall slide?\nchange y by (1)\ncheck touching solids\nif <(touching) > [0]> then\n    change y by (1)\n    check touching solids\n    if <(touching) > [0]> then\n        change y by (-2)\n        set x to (last value)\n        set [speed x v] to [0]\n        stop [this script v]\n    end\n    set [speed x v] to ((speed x) * (0.8))\nend\nset [speed x v] to ((speed x) * (0.95))\nslip\n\ndefine collide y- celling or floor?\nset y to (last value)\nif <(speed y) > [0]> then\n    set [speed y v] to [0]\n    stop [this script v]\nend\nif <(falling) > [0]> then\n    set [falling v] to [0]\n    slip\nend\nset [speed y v] to ((speed y) * (0.8))\n\ndefine slip\nchange y by (-2)\nchange x by (1)\ncheck touching solids\nif <(touching) < [1]> then\n    set [falling v] to [9]\n    change [speed x v] by (1)\n    stop [this script v]\nend\nchange x by (-2)\ncheck touching solids\nif <(touching) < [1]> then\n    set [falling v] to [9]\n    change [speed x v] by (-1)\n    stop [this script v]\nend\nchange y by (2)\nchange x by (1)\n\ndefine check can wall slide?\nif <(falling) < [2]> then\n    set [wall slide v] to [0]\n    stop [this script v]\nend\nswitch costume to (hitbox wallslide v)\nset rotation style [left-right v]\ncheck touching solids\nset [wall slide v] to (touching)\nswitch costume to (hitbox v2 v)\nset rotation style [don't rotate v]\n\nwhen I receive [lose life v]\nset [invulnerable v] to [1]\nstop [other scripts in sprite v]\nif <(Mute) = [Off]> then\n    start sound [Oops v]\nend\nrepeat (20)\n    change [ghost v] effect by (5)\n    change y by (5)\nend\nwait (0.5) seconds\nchange [lives v] by (-1)\nif <(Lives) > [0]> then\n    reset and begin level\nelse\n    broadcast (Game Over v)\nend\n\ndefine moved by moving platform\nchange x by (platform dx)\nchange y by (platform dy)\ncheck touching solids\nif <(touching) > [0]> then\n    find closest place to (x position) (y position) max [20]\n    if <(touching) > [0]> then\n        broadcast (lose life v)\n    end\nend\n\ndefine find closest place to (x) (y) max (max)\nset [temp v] to (direction)\nset [distance v] to [1]\npoint in direction (0)\nrepeat (max)\n    repeat (16)\n        go to x: (x) y: (y)\n        move (distance) steps\n        check touching solids\n        if <(touching) < [1]> then\n            point in direction (temp)\n            stop [this script v]\n        end\n        turn right (22.5) degrees\n    end\n    change [distance v] by (1)\nend\ngo to x: (x) y: (y)\npoint in direction (temp)\n\nwhen I receive [start game v]\nset [mobile-activate v] to [1]\nset [gravity v] to [-1]\nset [jump force v] to [12]\nset [jump duration v] to [6]\nset [acceleration v] to [1.5]\nset [resistance v] to [0.8]\nbroadcast (reset game v) and wait\nbroadcast (setup v) and wait\nset [lives v] to [3]\nset [spawn scene v] to [1]\nset [spawn x v] to [-150]\nset [spawn y v] to [50]\nset [apples v] to [0]\nreset and begin level\n\nwhen I receive [player-bounce v]\nset [speed y v] to [13]\n\nset [scene# v] to [1]\nset [☁ highscore v] to [91]\n\n@level\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [back v] layer\n\nwhen I receive [change scene v]\nswitch costume to (join [Scene] (Scene#))\nerase all\nstamp outline\nstamp shadow\n\ndefine stamp shadow\nset [brightness v] effect to (-100)\nset [ghost v] effect to (90)\nchange y by (-10)\nstamp\nchange y by (10)\nclear graphic effects\n\ndefine stamp outline\nset rotation style [don't rotate v]\nset [brightness v] effect to (-100)\nrepeat (8)\n    move (3) steps\n    stamp\n    move (-3) steps\n    turn right (45) degrees\nend\nclear graphic effects\n\n@Safe Zones\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [back v] layer\nset [ghost v] effect to (100)\n\nwhen I receive [change scene v]\nswitch costume to (scene1 v)\nswitch costume to (join [Scene] (Scene#))\n\n@Collectables\n\nwhen I receive [change scene v]\nif <(Scene#) = (my scene)> then\n    show\nelse\n    hide\nend\n\nwhen I start as a clone\nrepeat until <touching (player v)?>\n    if <not <<(costume [name v]) = [respawn-done2]> or <(costume [name v]) = [respawn flag]>>> then\n        change y by (([sin v] of (frame) ) * (0.5))\n        change [frame v] by (5)\n    end\nend\nset [my scene v] to []\nif <(costume [name v]) = [apple]> then\n    if <(Mute) = [Off]> then\n        start sound [Chomp v]\n    end\n    change [apples v] by (1)\nelse\n    if <(costume [name v]) = [Life]> then\n        if <not <(Lives) = [3]>> then\n            change [lives v] by (1)\n        end\n        if <(Mute) = [Off]> then\n            start sound [Coin v]\n        end\n    else\n        if <(costume [name v]) = [respawn flag]> then\n            place [respawn-done2] scene [3] x and y [-150] [-90]\n            switch costume to (respawn-done v)\n            if <(Mute) = [Off]> then\n                start sound [Coin v]\n            end\n            set [spawn scene v] to (Scene#)\n            set [spawn x v] to ([x position v] of [player v])\n            set [spawn y v] to ([y position v] of [player v])\n        else\n            if <(costume [name v]) = [Big Apple]> then\n                set [game-completed v] to [1]\n                broadcast (highscore v)\n            else\n                if <(Mute) = [Off]> then\n                    start sound [Coin v]\n                end\n                if <not <<(costume [name v]) = [respawn-done2]> or <(costume [name v]) = [Big Apple]>>> then\n                    add (costume [name v]) to [collected v]\n                end\n            end\n        end\n    end\nend\nrepeat (20)\n    if <not <(costume [name v]) = [respawn-done]>> then\n        change y by (2)\n        change [ghost v] effect by (5)\n    end\nend\nif <not <(costume [name v]) = [respawn-done]>> then\n    hide\nend\nwait (1) seconds\n\nwhen I receive [setup v]\ndelete all of [collected v]\nset [apples v] to [0]\nset [frame v] to [0]\nhide\nplace [apple] scene [1] x and y [-24] [73]\nplace [apple] scene [1] x and y [-25] [-97]\nplace [apple] scene [2] x and y [213] [-85]\nplace [apple] scene [101] x and y [213] [-85]\nplace [Key 1] scene [103] x and y [161] [-73]\nplace [Key 2] scene [107] x and y [-162] [65]\nplace [Key 3] scene [-93] x and y [-141] [-108]\nplace [respawn flag] scene [3] x and y [-150] [-90]\nplace [respawn flag] scene [7] x and y [-145] [-89]\nplace [Big Apple] scene [110] x and y [153] [-84]\nplace [Life] scene [105] x and y [137] [-102]\nplace [apple] scene [104] x and y [-97] [-106]\n\ndefine place (costume) scene (scene) x and y (x) (y)\nset [my scene v] to (scene)\nswitch costume to (costume)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\nset [my scene v] to []\n\nwhen I receive [reset game v]\ndelete this clone\n\n@danger\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [back v] layer\n\nwhen I receive [change scene v]\nswitch costume to (blank v)\nswitch costume to (join [Scene] (Scene#))\nif <<<<(Scene#) = [103]> or <(Scene#) = [3]>> or <(Scene#) = [6]>> or <(Scene#) = [110]>> then\n    forever\n        set y to ((5) * ([sin v] of ((timer) * (300)) ))\n    end\nend\n\n@plaforms\n\nwhen I receive [change scene v]\ngo to [back v] layer\nhide\nif <(Scene#) = [1]> then\n    show\n    animate platform\nend\nif <(Scene#) = [108]> then\n    show\n    Animate Platform 2\nend\nif <(Scene#) = [3]> then\n    spawn [Key 1] at: [-77] [32] Dir- [90] turn []\nend\nif <(Scene#) = [8]> then\n    spawn [Key 2] at: [181] [-67] Dir- [90] turn []\nend\nif <(Scene#) = [109]> then\n    spawn [Key 3] at: [2] [-92] Dir- [90] turn []\nend\nif <(Scene#) = [100]> then\n    spawn [costume2] at: [-15] [17] Dir- [90] turn []\n    spawn [costume3] at: [-130] [17] Dir- [90] turn [1]\nend\n\ndefine animate platform\nswitch costume to (costume1 v)\ngo to x: (-91) y: (54)\nforever\n    glide (0.3) secs to x: (-91) y: (-71)\n    wait (1) seconds\n    glide (1.3) secs to x: (-91) y: (54)\n    wait (1) seconds\nend\n\nwhen I receive [tick platforms v]\ntick (x position) (y position)\nset [last x v] to (x position)\nset [last y v] to (y position)\n\ndefine tick (new x) (new y)\nif <(turn) > []> then\n    change y by (4)\n    if <touching (player v)?> then\n        Rotation Maths CCW ((0) - (turn))\n    end\nelse\n    if <(new y) > (last y)> then\n        change y by (1)\n    else\n        set y to ((last y) + (1))\n    end\n    if <touching (player v)?> then\n        set [platform dx v] to ((new x) - (last x))\n        set [platform dy v] to ((new y) - (last y))\n    end\nend\ngo to x: (new x) y: (new y)\n\ndefine door at (x) (y) key (key name)\nshow\nswitch costume to (key name)\ngo to x: (x) y: (y)\nforever\n    wait until <touching (player v)?>\n    if <[collected v] contains (key name)?> then\n        if <(Mute) = [Off]> then\n            start sound [Buzz Whir v]\n        end\n        repeat (25)\n            change y by (4)\n        end\n        wait (1) seconds\n        if <(Mute) = [Off]> then\n            start sound [Buzz Whir v]\n        end\n        repeat (25)\n            change y by (-4)\n        end\n        if <(Mute) = [Off]> then\n            start sound [Crunch v]\n        end\n    else\n        if <(Mute) = [Off]> then\n            start sound [Low Squeak v]\n        end\n        wait until <not <touching (player v)?>>\n    end\nend\n\ndefine Animate Platform 2\nswitch costume to (costume2 v)\ngo to x: (163) y: (-67)\nforever\n    glide (1) secs to x: (-40) y: (-67)\n    wait (1) seconds\n    glide (1) secs to x: (163) y: (-67)\n    wait (1) seconds\nend\n\ndefine animate platform 3\nshow\nswitch costume to (costume2 v)\nforever\n    glide (1) secs to x: (x position) y: ((y position) - (90))\n    wait (1) seconds\n    glide (1) secs to x: (x position) y: ((y position) + (90))\n    wait (1) seconds\nend\n\nwhen flag clicked\nset rotation style [left-right v]\nhide\n\nwhen I receive [leave scene v]\ndelete this clone\n\ndefine spawn (type) at: (x) (y) Dir- (dir) turn (degrees)\nset [turn v] to (degrees)\ngo to x: (x) y: (y)\npoint in direction (dir)\nswitch costume to (type)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif < (costume [name v]) contains [Key]?> then\n    door at (x position) (y position) key (costume [name v])\nend\nif <(Scene#) = [1]> then\n    animate platform\nelse\n    if <(Scene#) = [2]> then\n        Animate Platform 2\n    else\n        if <(turn) > []> then\n            show\n            set rotation style [all around v]\n            forever\n                turn right (turn) degrees\n            end\n        else\n            animate platform 3\n        end\n    end\nend\n\ndefine Rotation Maths CCW (ccw)\nset [dx v] to (([x position v] of [player v]) - (x position))\nset [dy v] to (([y position v] of [player v]) - (y position))\nset [sin v] to ([sin v] of (ccw) )\nset [cos v] to ([cos v] of (ccw) )\nset [platform dx v] to ((((Dx) * (cos)) - ((Dy) * (sin))) - (Dx))\nset [platform dy v] to ((((Dx) * (sin)) + ((Dy) * (cos))) - (Dy))\n\n@Thumbnail\n\nwhen flag clicked\nswitch costume to (costume5 v)\ngo to [front v] layer\nset [ghost v] effect to (100)\nforever\n    if <(Mute) = [On]> then\n        set [volume v] to [0]\n    else\n        set volume to (volume) %\n    end\nend\n\nset [volume v] to (Volume)\n\nwhen flag clicked\nset [music v] to [1]\nbroadcast (start music v)\n\nwhen I receive [hide music v]\nif <(Music Change) = [True]> then\n    broadcast (start music v)\nend\nstop [this script v]\n\nwhen I receive [start music v]\nstop all sounds\nforever\n    play sound (music) until done\nend\n\n@Splash Screen\n\nwhen flag clicked\nset [game over v] to [false]\ngo to x: (0) y: (28)\nswitch costume to (costume3 v)\ngo to [front v] layer\nshow\nforever\n    change [color v] effect by (0.2)\nend\n\nwhen I receive [game over v]\nset [game over v] to [true]\ngo to x: (0) y: (28)\nswitch costume to (game over v)\ngo to [front v] layer\nshow\nbroadcast (Main Menu v)\nset size to (10) %\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by ((0.2) * ((110) - (size)))\n    else\n        change size by ((0.2) * ((100) - (size)))\n    end\nend\n\nwhen I receive [start game v]\nhide\n\n@Main Menu\n\nwhen I receive [main menu v]\nwait (0.1) seconds\ngo to [front v] layer\nshow\nset size to (10) %\ngo to x: (0) y: (-47)\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by ((0.2) * ((110) - (size)))\n    else\n        change size by ((0.2) * ((100) - (size)))\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nhide\nbroadcast (Start Game v)\n\n@Apples:\n\nwhen flag clicked\ngo to x: (150) y: (152)\n\n@Lives\n\nwhen flag clicked\ngo to x: (-167) y: (-153)\nforever\n    switch costume to (Lives)\nend\n\n@Music\n\nwhen flag clicked\ngo to x: (-205) y: (149)\nshow\nset size to (60) %\nforever\n    go to [front v] layer\n    if <touching (mouse-pointer v)?> then\n        change size by ((0.2) * ((39) - (size)))\n    else\n        change size by ((0.2) * ((30) - (size)))\n    end\nend\n\nwhen I receive [start game v]\nhide\n\nwhen this sprite clicked\nset [music change v] to [False]\nbroadcast (music v)\n\n@Volume\n\nwhen flag clicked\nhide variable [volume v]\ngo to x: (-90) y: (148)\nshow\nset size to (60) %\nforever\n    go to [front v] layer\n    if <(Volume) = [0]> then\n        switch costume to (musicoff v)\n    else\n        switch costume to (musicon v)\n    end\n    if <touching (mouse-pointer v)?> then\n        change size by ((0.2) * ((36) - (size)))\n    else\n        change size by ((0.2) * ((30) - (size)))\n    end\nend\n\nwhen I receive [start game v]\nhide\n\nwhen this sprite clicked\nbroadcast (Hide Settings v)\nbroadcast (hide music v)\nbroadcast (sound v)\n\nwhen I receive [sound v]\nbroadcast (Show scroller v)\n\n@Settings\n\nwhen flag clicked\ngo to x: (-150) y: (148)\nshow\nset size to (60) %\nforever\n    go to [front v] layer\n    if <touching (mouse-pointer v)?> then\n        change size by ((0.2) * ((33) - (size)))\n    else\n        change size by ((0.2) * ((26) - (size)))\n    end\nend\n\nwhen I receive [start game v]\nhide\n\nwhen this sprite clicked\nbroadcast (Settings v)\n\n@Music/Settings choose\n\nwhen I receive [start game v]\nhide\n\nwhen I receive [music v]\nswitch costume to (1 v)\nset [settings/music v] to [music]\nclear graphic effects\ngo to x: (0) y: (0)\nshow\nset size to (30) %\ngo to [front v] layer\nforever\n    change size by ((0.2) * ((100) - (size)))\nend\n\nwhen this sprite clicked\nif <(Settings/Music) = [settings]> then\n    broadcast (Hide Settings v)\nelse\n    broadcast (hide music v)\n    broadcast (hide info v)\nend\n\nwhen I receive [hide music v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [settings v]\nswitch costume to (2 v)\nset [settings/music v] to [settings]\nclear graphic effects\ngo to x: (0) y: (0)\nshow\nset size to (30) %\ngo to [front v] layer\nforever\n    change size by ((0.2) * ((100) - (size)))\nend\n\nwhen I receive [hide settings v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen flag clicked\nbroadcast (hide music v)\nbroadcast (Hide Settings v)\n\nwhen I receive [info v]\nswitch costume to (3 v)\nset [settings/music v] to [settings]\nclear graphic effects\ngo to x: (0) y: (0)\nshow\nset size to (30) %\nforever\n    go to [front v] layer\n    change size by ((0.2) * ((100) - (size)))\nend\n\nwhen I receive [hide info v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\n@Waterflame-jumper\n\nwhen I receive [music v]\ngo to x: (0) y: (40)\nshow\nset size to (30) %\nforever\n    switch costume to (music)\n    go to [front v] layer\n    change size by ((0.2) * ((100) - (size)))\nend\n\nwhen this sprite clicked\nif <not <(music) = [1]>> then\n    set [music change v] to [True]\nend\nset [music v] to [1]\nbroadcast (hide music v)\nstop [this script v]\n\nwhen I receive [hide music v]\nhide\n\nwhen I receive [settings v]\nhide\n\n@Twenty-Six-O-Eight\n\nwhen I receive [music v]\ngo to x: (0) y: (-50)\nshow\nset size to (30) %\nforever\n    switch costume to (music)\n    go to [front v] layer\n    change size by ((0.2) * ((100) - (size)))\nend\n\nwhen this sprite clicked\nif <not <(music) = [2]>> then\n    set [music change v] to [True]\nend\nset [music v] to [2]\nbroadcast (hide music v)\nstop [this script v]\n\nwhen I receive [hide music v]\nhide\n\nwhen I receive [settings v]\nhide\n\nwhen flag clicked\nset [music change v] to [False]\n\n@Mobile Control\n\nwhen I receive [settings v]\ngo to x: (0) y: (40)\nshow\nset size to (30) %\nforever\n    switch costume to (Mobile Controls)\n    go to [front v] layer\n    change size by ((0.2) * ((100) - (size)))\nend\n\nwhen this sprite clicked\nif <(Mobile Controls) = [Off]> then\n    set [mobile controls v] to [On]\nelse\n    set [mobile controls v] to [Off]\nend\nbroadcast (Hide Settings v)\n\nwhen I receive [hide music v]\nhide\n\nwhen I receive [hide settings v]\nhide\n\nwhen I receive [music v]\nhide\n\n@Mute\n\nwhen I receive [settings v]\ngo to x: (0) y: (-40)\nshow\nset size to (30) %\nforever\n    switch costume to (Mute)\n    go to [front v] layer\n    change size by ((0.2) * ((100) - (size)))\nend\n\nwhen this sprite clicked\nif <(Mute) = [Off]> then\n    set [mute v] to [On]\nelse\n    set [mute v] to [Off]\nend\nbroadcast (Hide Settings v)\n\nwhen I receive [hide music v]\nhide\n\nwhen I receive [hide settings v]\nhide\n\nwhen flag clicked\nset [mute v] to [Off]\n\nwhen I receive [music v]\nhide\n\n@Music choose Done\n\nwhen I receive [sound v]\nclear graphic effects\ngo to x: (0) y: (-50)\nshow\nset size to (40) %\ngo to [front v] layer\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by ((0.2) * ((120) - (size)))\n    else\n        change size by ((0.2) * ((110) - (size)))\n    end\nend\n\nwhen this sprite clicked\nbroadcast (Hide Scroller v)\nhide variable [volume v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@highscore manager\n\nwhen I receive [highscore v]\nforever\n    if <(My score) > [50]> then\n        if <(My score) < (☁ Highscore)> then\n            set [☁ highscore v] to (My score)\n        else\n            set [☁ highscore v] to (☁ Highscore)\n        end\n    end\nend\n\nwhen I receive [start game v]\nreset timer\nforever\n    if <(Game-Completed) = [1]> then\n        stop [this script v]\n    end\n    set [my score v] to (round (timer))\nend\n\nwhen flag clicked\nset [game-completed v] to [0]\n\n@Apple counter\n\nwhen flag clicked\nsetup\n\ndefine setup\nhide\nswitch costume to (n9 v)\nset size to (100) %\ngo to x: (210) y: (140)\nset [idx v] to [1]\nrepeat (5)\n    create clone of (_myself_ v)\n    change [idx v] by (1)\n    change x by (22)\nend\n\ndefine Switch (costume)\nif <not <(costume) = (costume [name v])>> then\n    switch costume to (costume)\n    set size to (120) %\nend\n\nwhen I start as a clone\nshow\nforever\n    Switch (join [N] (letter (idx) of (Apples)))\n    change size by ((0.2) * ((100) - (size)))\nend\n\n@My Score\n\nwhen I start as a clone\nshow\nforever\n    Switch (join [N] (letter (idx) of (My score)))\n    change size by ((0.2) * ((100) - (size)))\nend\n\ndefine setup\nset [my score v] to [0]\nhide\nswitch costume to (n9 v)\nset size to (100) %\ngo to x: (-220) y: (135)\nset [idx v] to [1]\nrepeat (5)\n    create clone of (_myself_ v)\n    change [idx v] by (1)\n    change x by (22)\nend\n\ndefine Switch (costume)\nif <not <(costume) = (costume [name v])>> then\n    switch costume to (costume)\n    set size to (120) %\nend\n\nwhen I receive [start game v]\nsetup\n\n@Highscore\n\nwhen flag clicked\nsetup\n\ndefine setup\nhide\nswitch costume to (9 v)\nset size to (100) %\ngo to x: (30) y: (-160)\nset [idx v] to [1]\nrepeat (5)\n    create clone of (_myself_ v)\n    change [idx v] by (1)\n    change x by (22)\nend\n\ndefine Switch (costume)\nif <not <(costume) = (costume [name v])>> then\n    switch costume to (costume)\n    set size to (120) %\nend\n\nwhen I start as a clone\ngo to [front v] layer\nshow\nforever\n    Switch (letter (idx) of (☁ Highscore))\n    change size by ((0.2) * ((100) - (size)))\nend\n\nwhen I receive [start game v]\nhide\n\n@Highscore (written)\n\nwhen flag clicked\ngo to x: (-41) y: (-148)\nshow\nset size to (120) %\nforever\n    go to [front v] layer\n    change size by ((0.2) * ((100) - (size)))\nend\n\nwhen I receive [start game v]\nhide\n\n@Control Stick\n\nwhen flag clicked\nshow\nset [mobile controls v] to [Off]\nforever\n    if <(Mobile Controls) = [On]> then\n        broadcast (Mobile v)\n        stop [this script v]\n    else\n        hide\n    end\nend\n\nwhen I start as a clone\nswitch costume to (stick v)\ngo [forward v] (1) layers\nset [ghost v] effect to (25)\nforever\n    set [stick power v] to []\n    set [stick x v] to [0]\n    set [stick y v] to [0]\n    repeat until <mouse down?>\n        go to (Myself)\n    end\n    if <(distance to [mouse-pointer v]) < ((size) * (1))> then\n        Stick Drag\n    else\n        wait until <not <mouse down?>>\n    end\nend\n\ndefine Stick Drag\nrepeat until <not <mouse down?>>\n    go to (mouse-pointer v)\n    point towards (Myself)\n    turn right (180) degrees\n    set [stick direction v] to (direction)\n    set [stick power v] to (distance to [(Myself) v])\n    if <(Stick Power) > (Max Stick)> then\n        move ((Max Stick) - (Stick Power)) steps\n        set [stick power v] to (Max Stick)\n    end\n    set [stick power v] to ((Stick Power) / (Max Stick))\n    set [stick x v] to ((Stick Power) * ([sin v] of (Stick Direction) ))\n    set [stick y v] to ((Stick Power) * ([cos v] of (Stick Direction) ))\nend\n\nwhen I receive [mobile v]\nwait until <(Mobile-Activate) = [1]>\nif <(Mobile Controls) = [Off]> then\n    stop [this script v]\nend\nshow\ngo to [front v] layer\ngo to x: (-177) y: (-104)\nset [myself v] to [Control Stick]\nset [max stick v] to [24.5]\nswitch costume to (base v)\nset [ghost v] effect to (60)\ncreate clone of (_myself_ v)\n\n@Main Menu Cat\n\nwhen I receive [main menu v]\nif <(game over) = [false]> then\n    wait (0.1) seconds\n    go to [front v] layer\n    show\n    set size to (10) %\n    go to x: (-173) y: (-86)\n    forever\n        point towards (mouse-pointer v)\n        change size by ((0.2) * ((100) - (size)))\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [start game v]\nhide\n\n@enemy\n\nwhen I receive [change scene v]\nif <(Scene#) = [1]> then\n    if <([x position v] of [player v]) < [0]> then\n        spawn [Red] at: [33] [-99] Dir- [-90]\n    else\n        spawn [Red] at: [-128] [-99] Dir- [90]\n    end\nend\nif <(Scene#) = [3]> then\n    spawn [Red] at: [100] [-99] Dir- [-90]\nend\nif <(Scene#) = [5]> then\n    if <([x position v] of [player v]) < [0]> then\n        spawn [Red] at: [124] [-100] Dir- [-90]\n    else\n        spawn [Red] at: [-124] [-100] Dir- [90]\n    end\nend\nif <(Scene#) = [7]> then\n    spawn [Red] at: [7] [-100] Dir- [-90]\nend\nif <(Scene#) = [107]> then\n    spawn [Red] at: [-181] [-124] Dir- [-90]\nend\nif <(Scene#) = [-92]> then\n    if <([x position v] of [player v]) < [0]> then\n        spawn [Red] at: [90] [-124] Dir- [-90]\n    else\n        spawn [Red] at: [-181] [-124] Dir- [90]\n    end\nend\nif <(Scene#) = [109]> then\n    if <([x position v] of [player v]) < [0]> then\n        spawn [Red] at: [180] [-124] Dir- [-90]\n    else\n        spawn [Red] at: [-187] [-124] Dir- [90]\n    end\nend\n\nwhen flag clicked\nset rotation style [left-right v]\nhide\n\nwhen I start as a clone\ngo to [front v] layer\nshow\nset [speed y v] to [0]\nset [frame v] to [0]\nforever\n    switch costume to (red 1 v)\n    set rotation style [don't rotate v]\n    move - left right\n    move down\n    change [frame v] by (0.33)\n    switch costume to ((1) + (([floor v] of (frame) ) mod (4)))\n    set rotation style [left-right v]\n    if <<touching (player v)?> and <(invulnerable) = [0]>> then\n        touching player\n    end\nend\n\nwhen I receive [leave scene v]\ndelete this clone\n\ndefine move down\nchange [speed y v] by (-1)\nchange y by (speed y)\nrepeat until <not <touching (level v)?>>\n    change y by (1)\n    set [speed y v] to [0]\nend\n\ndefine move - left right\nmove (2) steps\nrepeat (4)\n    if <not <<touching (level v)?> or <touching (_edge_ v)?>>> then\n        if <not <<touching (safe zones v)?> or <touching (plaforms v)?>>> then\n            stop [this script v]\n        end\n    end\n    change y by (1)\nend\nchange y by (-4)\nmove (-2) steps\nturn right (180) degrees\n\ndefine touching player\nif <([speed y v] of [player v]) < [-3]> then\n    broadcast (player-bounce v)\n    if <(Mute) = [Off]> then\n        start sound [squish v]\n    end\n    switch costume to (red 5 v)\n    wait (0.3) seconds\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\nbroadcast (lose life v)\n\ndefine spawn (type) at: (x) (y) Dir- (dir)\ngo to x: (x) y: (y)\npoint in direction (dir)\ncreate clone of (_myself_ v)\n\n@Vol. Hitbox\n\nwhen I receive [show scroller v]\nset [ghost v] effect to (0)\ngo to [front v] layer\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        set [touching? v] to [1]\n    else\n        set [touching? v] to [0]\n    end\nend\n\nwhen I receive [start game v]\nset [ghost v] effect to (100)\n\nwhen I receive [hide scroller v]\nrepeat (20)\n    change [ghost v] effect by (5)\nend\n\n@Slider\n\nwhen flag clicked\nset [showing scroller v] to [0]\nset x to (200)\nshow\nforever\n    set [volume v] to (round (((x position) / (4)) + (50)))\nend\n\nwhen I receive [show scroller v]\nforever\n    if <(mouse down?) = [1]> then\n        set x to (mouse x)\n    end\n    if <(x position) < [-200]> then\n        set x to (-200)\n    end\n    if <(x position) > [200]> then\n        set x to (200)\n    end\n    if <key (left arrow v) pressed?> then\n        if <(showing scroller) = [1]> then\n            if <(x position) > [-197]> then\n                change x by (-4)\n            else\n                set x to (-200)\n            end\n        end\n    end\n    if <(showing scroller) = [1]> then\n        if <key (right arrow v) pressed?> then\n            if <(x position) < [197]> then\n                change x by (4)\n            else\n                set x to (200)\n            end\n        end\n    end\nend\n\nwhen I receive [show scroller v]\nset [showing scroller v] to [1]\nset [ghost v] effect to (0)\nforever\n    go to [front v] layer\n    if <<mouse down?> and <(Touching?) = [1]>> then\n        set [mouse down? v] to [1]\n        wait until <not <mouse down?>>\n        set [mouse down? v] to [0]\n    end\nend\n\nwhen I receive [start game v]\nset [ghost v] effect to (100)\n\nwhen I receive [hide scroller v]\nset [showing scroller v] to [0]\nrepeat (20)\n    change [ghost v] effect by (5)\nend\n\n@Main Menu Cat eyes\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    go to x: (-173) y: (-86)\n    point towards (mouse-pointer v)\n    move (1) steps\n    if <touching color (#8e5322)?> then\n        move (-1) steps\n    end\n    if <<(direction) < [30]> and <(direction) > [-30]>> then\n        change y by (1)\n        if <touching color (#8e5322)?> then\n            change y by (-1)\n        end\n    end\nend\n\nwhen I receive [main menu v]\nif <(game over) = [false]> then\n    wait (0.1) seconds\n    show\n    set size to (10) %\n    go to x: (-173) y: (-86)\n    forever\n        point towards (mouse-pointer v)\n        change size by ((0.2) * ((100) - (size)))\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [start game v]\nhide\n\n@Main Menu gimba\n\nwhen I receive [main menu v]\nif <(game over) = [false]> then\n    wait (0.1) seconds\n    go to [front v] layer\n    show\n    set size to (10) %\n    go to x: (173) y: (-112)\n    forever\n        change size by ((0.2) * ((100) - (size)))\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [start game v]\nhide\n\nwhen I receive [main menu v]\nif <(game over) = [false]> then\n    forever\n        wait (0) seconds\n        next costume\n    end\nend\n\n@info\n\nwhen flag clicked\ngo to x: (205) y: (149)\nshow\nset size to (60) %\nforever\n    go to [front v] layer\n    if <touching (mouse-pointer v)?> then\n        change size by ((0.2) * ((39) - (size)))\n    else\n        change size by ((0.2) * ((30) - (size)))\n    end\nend\n\nwhen I receive [start game v]\nhide\n\nwhen this sprite clicked\nset [music change v] to [False]\nbroadcast (info v)\n\n