Alien - Platformer

Instructions: Arrows keys. I have made a sequel to this game that has more levels and mechanics, so if you get bored of this one, go check it out at:\nhttps://scratch.mit.edu/projects/124304799/

@Stage\n\nwhen flag clicked\nset [reset v] to [0]\nset [heart # v] to [0]\nset [achivements v] to [0/9]\nforever\n    if <<<(mouse x) = [-222]> and <(mouse y) = [-180]>> and <mouse down?>> then\n        broadcast (Tick - Heart v)\n    end\n    if <<(SCENE #) = [12]> and <(COINS) > [147]>> then\n        broadcast (GG v)\n    end\n    if <<(SCENE #) = [12]> and <(RESET) = [0]>> then\n        set [reset v] to [1]\n        if <(LIVES) > (ORGINALLY LIVES)> then\n            set [lives v] to (LIVES)\n        else\n            set [lives v] to (ORGINALLY LIVES)\n        end\n    end\nend\n\nwhen I receive [tick - heart v]\nset [heart # v] to [1]\n\nwhen flag clicked\nset volume to (50) %\nforever\n    play sound [Alan Walker - The Spectre v] until done\n    play sound [Alan Walker - Alone v] until done\nend\n\nwhen I receive [start game v]\nif <[admin v] contains (username)?> then\n    set [coins v] to [9999]\n    set [lives v] to [9999]\n    show variable [achivements v]\nelse\n    set [coins v] to [0]\n    set [lives v] to [6]\n    hide variable [achivements v]\nend\nset [orginally lives v] to (LIVES)\n\n@Thumbnail\n\nwhen flag clicked\nThumbnail\n\nshow\n\ndefine Thumbnail\nrepeat (10)\n    go to x: (0) y: (0)\n    switch costume to (thumbnail v)\n    repeat (10)\n        hide\n        go to [front v] layer\n        stop [this script v]\n    end\nend\n\nbroadcast (Thumbnail v)\n\n@Player\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 Solid\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 Solid\n    if <(touching) > [0]> then\n        Collide Y - Celling or Floor ?\n    end\nend\n\ndefine Check Touching Solid\nif <<<touching (level v)?> or <touching (platform v)?>> or <touching (invisable wall v)?>> then\n    set [touching v] to [1]\n    stop [this script v]\nend\nset [touching v] to [0]\nset [hit costume v] to (costume [name v])\nif <(hit costume) = [hitbox v2]> then\n    switch costume to (hitbox feet v)\nend\nif <touching (jump through v)?> then\n    if <(jump through) < [1]> then\n        change y by (-6)\n        if <(hit costume) = [hitbox v2]> then\n            switch costume to (hitbox feet2 v)\n        end\n        if <touching (jump through v)?> then\n            set [touching v] to [1]\n        else\n            set [jump through v] to [1]\n        end\n        change y by (6)\n    end\nelse\n    set [jump through v] to [0]\nend\nswitch costume to (hit costume)\n\nwhen I receive [tick - player v]\nMoved by Moving Platform\nswitch backdrop to <touching (level v)?>\nif <(SHOP MOVEMENT #) = [0]> then\n    Contorls - Up and Down\n    Controls - Left and RIght\n    move - in steps (([abs v] of (speed x) ) + ([abs v] of (speed y) ))\nend\nSet Costume\n\ndefine Contorls - Up and Down\nif <key (w v) pressed?> then\n    set [player actions v] to [Jumping]\n    if <<(wall slide) > [0]> and <(jumping) = [0]>> then\n        start sound [Jump v]\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        start sound [Jump v]\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 (d v) pressed?> - <key (a v) pressed?>)\nif <(KEY X) = [0]> then\n    if <key (w v) pressed?> then\n    else\n        set [player actions v] to [Standing]\n    end\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    set [player actions v] to [Running]\n    change [speed x v] by ((KEY X) * (ACCELERATION))\n    point in direction ((KEY X) * (90))\n    change [frame v] by (1)\nend\nset [speed x v] to ((speed x) * (RESISTANCE))\n\ndefine Reset and Begin Level\nclear graphic effects\nset [player actions v] to []\nset [invulnerable v] to [0]\nset [speed x v] to [0]\nset [speed y 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]\nset [touching shop v] to [0]\npoint in direction (90)\nBegin Scene # (SPAWN SCENE) go to x, y : (SPAWN X) (speed x)\n\nwhen I receive [game loop v]\nshow\nset [ghost v] effect to (0)\nforever\n    broadcast (World Record v)\n    broadcast (Tick First v)\n    broadcast (Tick - Platform v)\n    broadcast (Tick - Player v)\n    broadcast (Touching shop ? v)\n    add (x position) to [my values to send v]\n    add (y position) to [my values to send v]\n    add (costume [number v]) to [my values to send v]\n    add (direction) to [my values to send v]\n    add (SCENE #) to [my values to send v]\n    add (PLAYER SAY #) to [my values to send v]\n    add (SAY # FOR SEC) to [my values to send v]\n    broadcast (Cloud Tick v)\n    broadcast (Tick - Last v)\nend\n\nwhen I receive [tick - last v]\nif <(x position) > [235]> then\n    Begin Scene # ((SCENE #) + (1)) go to x, y : [-235] []\nend\nif <(x position) < [-235]> then\n    Begin Scene # ((SCENE #) + (-1)) go to x, y : [235] []\nend\nif <(y position) > [180]> then\n    Begin Scene # ((SCENE #) + (100)) go to x, y : [] [-160]\nend\nif <(y position) < [-180]> then\n    Begin Scene # ((SCENE #) + (-100)) go to x, y : [] [180]\nend\nif <touching (danger v)?> then\n    broadcast (Loose Life v)\n    if <touching color (#ff5b3e)?> then\n        set [player actions v] to [Spiky]\n    else\n        if <touching color (#ff7f1f)?> then\n            set [player actions v] to [Fell in lava]\n        else\n            set [player actions v] to [Loosing a life]\n        end\n    end\nend\n\ndefine Begin Scene # (scene #) go to x, y : (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 (About to Change 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 Solid\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 Solid\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 Solid\nif <(touching) > [0]> then\n    change y by (1)\n    Check Touching Solid\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 Solid\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 Solid\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 Solid\nset [wall slide v] to (touching)\nswitch costume to (hitbox v2 v)\nset rotation style [don't rotate v]\n\nwhen I receive [loose life v]\nset [invulnerable v] to [1]\nstop [other scripts in sprite v]\nif <touching (platform v)?> then\n    if <<touching color (#ffde00)?> or <touching color (#000000)?>> then\n        set [player actions v] to [Crushed]\n    else\n        set [player actions v] to [Loosing a life]\n    end\nend\nstart sound [Oops v]\nrepeat (10)\n    change [ghost v] effect by (10)\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)\n    set [player actions v] to [Died]\nend\n\ndefine Moved by Moving Platform\nchange x by (PLATFORM DX)\nchange y by (PLATFORM DY)\nCheck Touching Solid\nif <(touching) > [0]> then\n    Find Closest Space to (x position) (y position) max [2]\n    if <(touching) > [0]> then\n        broadcast (Loose Life v)\n    end\nend\n\ndefine Find Closest Space 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 Solid\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]\ngo to [front v] layer\ngo [forward v] (1) layers\nset [gravity v] to [-1]\nset [jump force v] to [12]\nset [jump duration v] to [6]\nif <[admin v] contains (username)?> then\n    set [acceleration v] to [5]\nelse\n    set [acceleration v] to [1.2]\nend\nset [resistance v] to [0.8]\nbroadcast (Reset Game v) and wait\nbroadcast (Setup v) and wait\nset [spawn scene v] to [1]\nset [spawn x v] to [-150]\nset [spawn y v] to [55]\nset [movement of actions v] to []\nReset and Begin Level\n\nwhen flag clicked\nbroadcast (Cloud - Setup v) and wait\nbroadcast (Main Menu v)\n\nwhen I receive [player - bounce v]\nset [spawn y v] to [10]\n\nwhen I receive [player - say v]\nset [player actions v] to [Saying]\nsay (PLAYER SAY #) for (SAY # FOR SEC) seconds\n\nwhen I receive [set x of player v]\npoint in direction (90)\ngo to x: (-154) y: (-83)\n\nwhen I receive [moblie_left v]\nset [movement of actions v] to [-1]\nControls - Left and RIght\n\nwhen I receive [touching shop ? v]\nif <touching (shop v)?> then\n    set [touching shop v] to [1]\n    if <key (e v) pressed?> then\n        broadcast (Open Shop v)\n    end\nelse\n    set [touching shop v] to [0]\nend\n\nwhen I receive [thumbnail v]\nhide\n\ndefine Set Player Width\nif <<(costume [number v]) = [1]> or <(costume [number v]) = [9]>> then\n    set [player length v] to [93]\nelse\n    if <<(costume [number v]) = [2]> or <<(costume [number v]) = [3]> or <<(costume [number v]) = [4]> or <<<(costume [number v]) = [10]> or <(costume [number v]) = [11]>> or <<(costume [number v]) = [12]> or <(costume [number v]) = [30]>>>>>> then\n        set [player length v] to [97]\n    else\n        if <<(costume [number v]) = [5]> or <<<(costume [number v]) = [6]> or <(costume [number v]) = [7]>> or <<(costume [number v]) = [13]> or <<(costume [number v]) = [14]> or <(costume [number v]) = [15]>>>>> then\n            set [player length v] to [95]\n        else\n            if <<(costume [number v]) = [8]> or <(costume [number v]) = [16]>> then\n                set [player length v] to [92]\n            else\n                if <(costume [number v]) = [17]> then\n                    set [player length v] to [102]\n                else\n                    if <<(costume [number v]) = [18]> or <(costume [number v]) = [19]>> then\n                        set [player length v] to [98]\n                    else\n                        if <(costume [number v]) = [31]> then\n                            set [player length v] to [105]\n                        else\n                            if <(costume [number v]) = [32]> then\n                                set [player length v] to [106]\n                            else\n                                if <(costume [number v]) = [33]> then\n                                    set [player length v] to [103]\n                                else\n                                    if <(costume [number v]) = [34]> then\n                                        set [player length v] to [104]\n                                    else\n                                        set [player length v] to []\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\n@Cloud Player\n\ndefine Write Number (val) to encoded string\nset [val v] to (round (val))\nif <(val) < [0]> then\n    set [val v] to (join [0] ([abs v] of (val) ))\nend\nset [encoded string v] to (join (encoded string) (join (length of (val)) (val)))\n\ndefine val = READ NUMBER from "encoded string"\nset [val v] to []\nrepeat (letter (encoded idx) of (encoded string))\n    change [encoded idx v] by (1)\n    set [val v] to (join (val) (letter (encoded idx) of (encoded string)))\nend\nchange [encoded idx v] by (1)\nif <(letter (1) of (val)) = [0]> then\n    set [val v] to ((0) - (val))\nend\n\nwhen I receive [cloud - setup v]\nhide\nset [cloud - tick v] to [0]\ndelete all of [my values to send v]\ndelete all of [cloud values v]\ndelete all of [player uids v]\ndelete all of [player data v]\nadd (join [c] (☁ CLOUD 1)) to [cloud values v]\nadd (join [c] (☁ CLOUD 2)) to [cloud values v]\nadd (join [c] (☁ CLOUD 3)) to [cloud values v]\nadd (join [c] (☁ CLOUD 4)) to [cloud values v]\nadd (join [c] (☁ CLOUD 5)) to [cloud values v]\nadd (join [c] (☁ CLOUD 6)) to [cloud values v]\nadd (join [c] (☁ CLOUD 7)) to [cloud values v]\nadd (join [c] (☁ CLOUD 8)) to [cloud values v]\nset [my player uid v] to (pick random (1) to (9999999))\nset [player # v] to []\n\nwhen I receive [cloud tick v]\nif <(player #) > []> then\n    Player Clone Tick\n    stop [this script v]\nend\nchange [cloud - tick v] by (1)\nProcess Cloud Item [1] value (join [c] (☁ CLOUD 1))\nProcess Cloud Item [2] value (join [c] (☁ CLOUD 2))\nProcess Cloud Item [3] value (join [c] (☁ CLOUD 3))\nProcess Cloud Item [4] value (join [c] (☁ CLOUD 4))\nProcess Cloud Item [5] value (join [c] (☁ CLOUD 5))\nProcess Cloud Item [6] value (join [c] (☁ CLOUD 6))\nProcess Cloud Item [7] value (join [c] (☁ CLOUD 7))\nProcess Cloud Item [8] value (join [c] (☁ CLOUD 8))\nSend my Cloud Data after [4] ticks\n\ndefine Send my Cloud Data after (count) ticks\nif <((CLOUD - Tick) mod (count)) > [0]> then\n    stop [this script v]\nend\nset [encoded string v] to []\nWrite Number (MY PLAYER UID) to encoded string\nrepeat (length of [my values to send v])\n    Write Number (item (1) of [my values to send v]) to encoded string\n    delete (1) of [my values to send v]\nend\nset [my channel v] to (pick random (1) to (length of [cloud values v]))\nif <(MY CHANNEL) < [5]> then\n    if <(MY CHANNEL) < [3]> then\n        if <(MY CHANNEL) < [2]> then\n            set [☁ cloud 1 v] to (encoded string)\n        else\n            set [☁ cloud 2 v] to (encoded string)\n        end\n    else\n        if <(MY CHANNEL) < [4]> then\n            set [☁ cloud 3 v] to (encoded string)\n        else\n            set [☁ cloud 4 v] to (encoded string)\n        end\n    end\nelse\n    if <(MY CHANNEL) < [7]> then\n        if <(MY CHANNEL) < [6]> then\n            set [☁ cloud 5 v] to (encoded string)\n        else\n            set [☁ cloud 6 v] to (encoded string)\n        end\n    else\n        if <(MY CHANNEL) < [8]> then\n            set [☁ cloud 7 v] to (encoded string)\n        else\n            set [☁ cloud 8 v] to (encoded string)\n        end\n    end\nend\n\ndefine Process Cloud Item (which?) value (new value)\nif <(new value) = (item (which?) of [cloud values v])> then\n    stop [this script v]\nend\nreplace item (which?) of [cloud values v] with (new value)\nset [encoded string v] to (new value)\nset [encoded idx v] to [2]\nval = READ NUMBER from "encoded string"\nif <<(val) < [1]> or <(val) = (MY PLAYER UID)>> then\n    stop [this script v]\nend\nset [player # v] to (item # of (val) in [player uids v])\nif <(player #) = [0]> then\n    set [player # v] to (item # of [] in [player uids v])\n    if <(player #) = [0]> then\n        add (val) to [player uids v]\n        add [] to [player data v]\n        set [player # v] to (length of [player data v])\n        create clone of (_myself_ v)\n    else\n        replace item (player #) of [player uids v] with (val)\n    end\nend\nreplace item (player #) of [player data v] with (new value)\nset [player # v] to []\n\ndefine Player Clone Tick\nif <(encoded idx) > (length of (encoded string))> then\n    Get Next Data Packet\n    if <(encoded string) = []> then\n        change [inactive v] by (1)\n        if <(inactive) > [150]> then\n            replace item (player #) of [player uids v] with []\n            hide\n        end\n        stop [this script v]\n    end\nend\nset [inactive v] to [0]\nval = READ NUMBER from "encoded string"\nset x to (val)\nval = READ NUMBER from "encoded string"\nset y to (val)\nval = READ NUMBER from "encoded string"\nswitch costume to (val)\nval = READ NUMBER from "encoded string"\npoint in direction (val)\nval = READ NUMBER from "encoded string"\nset [clone scene # v] to (val)\nif <(clone scene #) = (SCENE #)> then\n    show\nelse\n    hide\nend\n\ndefine Get Next Data Packet\nset [encoded string v] to (item (player #) of [player data v])\nreplace item (player #) of [player data v] with []\nset [encoded idx v] to [2]\nval = READ NUMBER from "encoded string"\n\nbroadcast (Cloud - Setup v) and wait\nforever\n    add (x position) to [my values to send v]\n    add (y position) to [my values to send v]\n    add (costume [number v]) to [my values to send v]\n    add (direction) to [my values to send v]\n    broadcast (Cloud Tick v)\nend\n\nwhen I receive [change scene v]\nif <(player #) > []> then\n    if <(clone scene #) = (SCENE #)> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\n\nclear graphic effects\nset [color v] effect to (170)\n\nval = READ NUMBER from "encoded string"\nsay (PLAYER SAY #) for (SAY # FOR SEC) seconds\n\n@Level\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [back v] layer\nset [scene # v] to [1]\ngo [forward v] (2) layers\n\nwhen I receive [change scene v]\nswitch costume to (join [Scene] (SCENE #))\nStamp Outline\nStamp Shawdow\n\ndefine Stamp Outline\nerase all\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\ndefine Stamp Shawdow\nset [brightness v] effect to (-100)\nset [ghost v] effect to (90)\nchange y by (-20)\nstamp\nchange y by (20)\nclear graphic effects\n\nset [scene # v] to [11]\nbroadcast (Change Scene v)\n\nwhen I receive [about to change scene v]\nerase all\n\nwait (0.000000000001) seconds\n\n@Danger\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [back v] layer\ngo [forward v] (2) layers\n\nwhen I receive [change scene v]\nswitch costume to (blank v)\nswitch costume to (join [Scene] (SCENE #))\nif <<<(SCENE #) = [104]> or <(SCENE #) = [106]>> or <<(SCENE #) = [7]> or <(SCENE #) = [15]>>> then\n    forever\n        go to [back v] layer\n        set y to ((3) * ([sin v] of ((timer) * (180)) ))\n    end\nend\n\n@Platform\n\nwhen I receive [change scene v]\ngo to [back v] layer\nhide\nif <(SCENE #) = [6]> then\n    Spawn [Sqisher] at [-38] [55] dir [90] turn []\nend\nif <(SCENE #) = [102]> then\n    Spawn [Flying Ground] at [44] [16] dir [90] turn []\nend\nif <(SCENE #) = [103]> then\n    Spawn [Key1] at [98] [106] dir [90] turn []\nend\nif <(SCENE #) = [104]> then\n    Spawn [Key2] at [141] [112] dir [90] turn []\nend\n\ndefine Animate Platform\nforever\n    glide (0.5) secs to x: (-38) y: (-27)\n    glide (1.3) secs to x: (-38) y: (55)\nend\n\nwhen I receive [tick - platform 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        Roation Maths CCW ((0) - (turn))\n    end\nelse\n    if <(new y) > (last x)> 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 Animate 2\ngo to x: (44) y: (16)\nforever\n    glide (2) secs to x: (148) y: (-48)\n    wait (1) seconds\n    glide (2) secs to x: (148) y: (98)\n    wait (1) seconds\n    glide (2) secs to x: (44) y: (16)\n    wait (1) seconds\nend\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)?> or <[admin v] contains (username)?>> then\n        start sound [Buzz Whir v]\n        broadcast (It Fits Achivement v)\n        repeat (24)\n            change y by (4)\n        end\n        wait (1) seconds\n        start sound [Buzz Whir v]\n        repeat (24)\n            change y by (-4)\n        end\n        start sound [Crunch v]\n    else\n        start sound [Low Squeak v]\n    end\n    wait until <not <touching (player v)?>>\nend\n\ndefine Animate 3\nshow\nforever\n    glide (1) secs to x: (x position) y: ((y position) - (90))\n    wait (0) seconds\n    glide (1) secs to x: (x position) y: ((y position) + (90))\n    wait (0) seconds\nend\n\nwhen flag clicked\nset rotation style [left-right v]\nhide\n\nwhen I receive [about to change 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\nshow\nif < (costume [name v]) contains [Key]?> then\n    Door at (x position) (y position) key (costume [name v])\nend\nif <(turn) > []> then\n    set rotation style [all around v]\n    forever\n        turn right (turn) degrees\n    end\nend\nif <(SCENE #) = [6]> then\n    Animate Platform\nend\nif <(SCENE #) = [102]> then\n    Animate 2\nend\n\ndefine Roation 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\nshow\n\n@Jump Through\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [back v] layer\ngo [forward v] (5) layers\n\nwhen I receive [change scene v]\nswitch costume to (blank v)\nswitch costume to (join [Scene] (SCENE #))\nStamp Outline\nStamp Shawdow\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\ndefine Stamp Shawdow\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\nset [scene # v] to [12]\nbroadcast (Change Scene v)\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\nhide\nrepeat until <touching (player v)?>\n    change y by ((0.5) * ([sin v] of (frame) ))\n    change [frame v] by (5)\nend\nset [player actions v] to [Grabbing]\nset [my scene v] to []\nif <(costume [name v]) = [Coin]> then\n    show\n    start sound [Coin v]\n    change [coins v] by (1)\nelse\n    if <<(costume [name v]) = [Coin_Big]> or <(costume [name v]) = [Invisible Coin_Big]>> then\n        show\n        start sound [Coin v]\n        change [coins v] by (10)\n    else\n        if <<(costume [name v]) = [Green Flag]> or <(costume [name v]) = [Invisible Flag]>> then\n            show\n            start sound [Collect v]\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]) = [Invisible Coin]> then\n                show\n                start sound [Coin v]\n                change [coins v] by (1)\n            else\n                if <(costume [name v]) = [Teleporter]> then\n                    add (costume [name v]) to [collected v]\n                    show\n                    start sound [Teleporter Sound v]\n                    broadcast (Set X of Player v)\n                    set [scene # v] to [24]\n                    broadcast (Change Scene v) and wait\n                else\n                    start sound [Collect v]\n                    add (costume [name v]) to [collected v]\n                end\n            end\n        end\n    end\nend\nrepeat (20)\n    change y by (2)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen I receive [setup v]\ndelete all of [collected v]\nset [frame v] to [0]\nhide\nPlace [Coin] scene [1] xy [20] [8]\nPlace [Coin] scene [1] xy [170] [36]\nPlace [Coin] scene [2] xy [-120] [34]\nPlace [Coin] scene [2] xy [0] [-24]\nPlace [Coin] scene [2] xy [158] [-36]\nPlace [Coin] scene [3] xy [-52] [-42]\nPlace [Coin] scene [3] xy [28] [74]\nPlace [Key1] scene [3] xy [158] [-40]\nPlace [Coin_Big] scene [103] xy [178] [106]\nPlace [Key2] scene [104] xy [-122] [56]\nPlace [Green Flag] scene [4] xy [-188] [-22]\nPlace [Green Flag] scene [6] xy [176] [-22]\nPlace [Coin] scene [101] xy [10] [-116]\nPlace [Coin] scene [101] xy [190] [-40]\nPlace [Coin] scene [101] xy [190] [-40]\nPlace [Coin] scene [101] xy [136] [90]\nPlace [Coin] scene [101] xy [136] [90]\nPlace [Coin] scene [101] xy [-2] [106]\nPlace [Coin_Big] scene [101] xy [-152] [120]\nPlace [Coin] scene [4] xy [-50] [-37]\nPlace [Coin] scene [4] xy [94] [33]\nPlace [Coin] scene [5] xy [-105] [154]\nPlace [Coin] scene [5] xy [87] [-52]\nPlace [Coin] scene [5] xy [195] [-52]\nPlace [Coin] scene [6] xy [-103] [-52]\nPlace [Coin] scene [102] xy [-165] [-38]\nPlace [Coin] scene [102] xy [-41] [88]\nPlace [Coin] scene [102] xy [79] [48]\nPlace [Coin] scene [102] xy [-89] [-122]\nPlace [Coin] scene [102] xy [33] [-66]\nPlace [Coin] scene [103] xy [-143] [-12]\nPlace [Coin] scene [103] xy [-25] [-20]\nPlace [Coin] scene [103] xy [37] [62]\nPlace [Coin] scene [104] xy [-15] [92]\nPlace [Coin] scene [104] xy [203] [92]\nPlace [Coin] scene [105] xy [-171] [92]\nPlace [Coin] scene [105] xy [27] [-32]\nPlace [Coin] scene [105] xy [143] [64]\nPlace [Coin] scene [105] xy [181] [-100]\nPlace [Coin] scene [7] xy [-137] [-44]\nPlace [Coin] scene [7] xy [-41] [34]\nPlace [Coin] scene [7] xy [86] [90]\nPlace [Coin] scene [7] xy [167] [-44]\nPlace [Coin] scene [8] xy [-137] [-44]\nPlace [Coin] scene [8] xy [11] [28]\nPlace [Coin] scene [8] xy [183] [-44]\nPlace [Invisible Flag] scene [8] xy [53] [90]\nPlace [Coin] scene [9] xy [-119] [-2]\nPlace [Coin] scene [9] xy [15] [20]\nPlace [Invisible Coin] scene [9] xy [-129] [89]\nPlace [Green Flag] scene [9] xy [209] [-41]\nPlace [Coin] scene [10] xy [-195] [-5]\nPlace [Coin] scene [10] xy [-115] [17]\nPlace [Coin] scene [10] xy [7] [17]\nPlace [Coin] scene [10] xy [117] [17]\nPlace [Coin] scene [11] xy [-189] [23]\nPlace [Coin] scene [11] xy [-87] [-77]\nPlace [Coin] scene [11] xy [137] [-109]\nPlace [Coin] scene [11] xy [137] [15]\nPlace [Coin_Big] scene [12] xy [-121] [-97]\nPlace [Green Flag] scene [12] xy [5] [-97]\nPlace [Coin_Big] scene [12] xy [121] [-97]\nPlace [Teleporter] scene [104] xy [144] [-117]\nif <(TELEPORTER #) = [1]> then\n    show\nelse\n    hide\nend\nPlace [Coin] scene [13] xy [-32] [-91]\nPlace [Coin] scene [13] xy [60] [-89]\nPlace [Coin] scene [13] xy [204] [-39]\nPlace [Coin] scene [14] xy [-78] [37]\nPlace [Coin] scene [14] xy [40] [93]\nPlace [Coin] scene [14] xy [148] [41]\nPlace [Coin] scene [15] xy [-52] [-27]\nPlace [Coin] scene [15] xy [82] [-27]\nPlace [Coin] scene [15] xy [-208] [83]\nPlace [Green Flag] scene [15] xy [136] [53]\nPlace [Coin] scene [16] xy [-156] [-79]\nPlace [Coin] scene [16] xy [0] [43]\nPlace [Coin] scene [16] xy [136] [43]\nPlace [Invisible Coin_Big] scene [16] xy [67] [105]\nPlace [Coin] scene [17] xy [-149] [-33]\nPlace [Coin] scene [17] xy [33] [11]\nPlace [Key1] scene [17] xy [106] [100]\nPlace [Coin] scene [17] xy [148] [-76]\nPlace [Coin] scene [18] xy [-46] [6]\nPlace [Coin] scene [18] xy [128] [-74]\nPlace [Coin] scene [19] xy [8] [4]\nPlace [Coin] scene [19] xy [118] [86]\nPlace [Coin] scene [19] xy [216] [96]\n\ndefine Place (costume name) scene (scene) xy (x) (y)\nset [my scene v] to (scene)\nswitch costume to (costume name)\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@Invisable Wall\n\nwhen flag clicked\ngo to [back v] layer\nforever\n    if <(SCENE #) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\n@Splash Screen\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (main menu v)\ngo to [front v] layer\nshow\n\nwhen I receive [game over v]\ngo to x: (0) y: (0)\nswitch costume to (game over v)\ngo to [front v] layer\nshow\nbroadcast (Main Menu v)\n\nwhen I receive [start game v]\nhide\n\nwhen I receive [tick - planet v]\n\nswitch costume to (main menu v)\n\nwhen I receive [moblie or pc ? 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: (0)\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 variable [coins v]\nhide\n\nwhen this sprite clicked\nhide\nshow variable [coins v]\nshow variable [lives v]\nbroadcast (Start Game v)\n\nbroadcast (Tick - Planet v)\n\nbroadcast (Moblie Or PC ? v) and wait\n\nwhen I receive [thumbnail v]\nhide\n\nwhen flag clicked\nhide variable [lives v]\n\n@Enemy\n\nwhen flag clicked\nset rotation style [left-right v]\nhide\n\nwhen I receive [change scene v]\nif <(SCENE #) = [103]> then\n    if <([x position v] of [player v]) < [0]> then\n        Spawn [Cat] at [-166] [-82] dir [90]\n    else\n        Spawn [Cat] at [-100] [-82] dir [-90]\n    end\nend\nif <(SCENE #) = [9]> then\n    Spawn [Cat] at [-48] [-56] dir [90]\n    Spawn [Cat] at [6] [-56] dir [90]\nend\n\nwhen I start as a clone\nshow\nset [speed y v] to [0]\nset [frame v] to [0]\nforever\n    switch costume to (cat1 v)\n    set rotation style [don't rotate v]\n    Move - Left or 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 <<(INVULNERABLE) = [0]> and <touching (player v)?>> then\n        Touching Player\n    end\nend\n\nwhen I receive [about to change 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)?> or <touching (jump through v)?>>>\n    change y by (1)\n    set [speed y v] to [0]\nend\n\ndefine Move - Left or 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 (platform v)?>>> then\n            if <not <touching (jump through v)?>> then\n                stop [this script v]\n            end\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    start sound [Meow  v]\n    start sound [Squish Pop v]\n    switch costume to (cat squash v)\n    wait (0.3) seconds\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\nbroadcast (Loose 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@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 (blank v)\nswitch costume to (join [Scene] (SCENE #))\n\n@Lives Count\n\nwhen flag clicked\nhide\n\nswitch costume to (3 v)\ngo to [front v] layer\ngo [forward v] (10) layers\ngo to x: (0) y: (150)\n\nwhen I receive [start game v]\n\nshow\nbroadcast (Switch Lives v)\n\nwhen I receive [switch lives v]\n\nforever\n    switch costume to (LIVES)\nend\n\n@Chat\n\nwhen I receive [start game v]\nforever\n    if <key (t v) pressed?> then\n        wait until <not <key (t v) pressed?>>\n        change [chat # v] by (1)\n    end\n    if <((CHAT #) mod (2)) = [1]> then\n        show list [chat v]\n    else\n        hide list [chat v]\n        ask [] and wait\n        if <(answer) = [1]> then\n            Say [Hi] & change Chat by [1] for [4] seconds\n        else\n            if <(answer) = [2]> then\n                Say [Bye.] & change Chat by [1] for [4] seconds\n            else\n                if <(answer) = [3]> then\n                    Say [Lol.] & change Chat by [1] for [4] seconds\n                else\n                    if <(answer) = [4]> then\n                        Say [Long time no see.] & change Chat by [1] for [4] seconds\n                    else\n                        if <(answer) = [5]> then\n                            Say [Need help ?] & change Chat by [1] for [4] seconds\n                        else\n                            if <(answer) = [6]> then\n                                Say [Yes.] & change Chat by [1] for [4] seconds\n                            else\n                                if <(answer) = [7]> then\n                                    Say [No thanks.] & change Chat by [1] for [4] seconds\n                                else\n                                    if <(answer) = [8]> then\n                                        Say [Thank you.] & change Chat by [1] for [4] seconds\n                                    else\n                                        if <(answer) = [9]> then\n                                            Say [Jump !] & change Chat by [1] for [4] seconds\n                                        else\n                                            Say (answer) & change Chat by [1] for [4] seconds\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        if < (answer) contains [/]?> then\n            if < (answer) contains [/give @s coin]?> then\n                change [coins v] by (letter (15) of (answer))\n            end\n        end\n    end\nend\n\nwhen flag clicked\nshow list [chat v]\nset [chat # v] to [1]\nset [player say # v] to []\nset [say # for sec v] to []\n\ndefine Say (word) & change Chat by (value) for (#) seconds\nset [chat # v] to (value)\nshow list [chat v]\nset [player say # v] to (word)\nset [say # for sec v] to (#)\nbroadcast (Player - Say v)\n\n@Part 3\n\nwhen flag clicked\ngo to x: (-236) y: (117)\nswitch costume to (costume1 v)\nhide\n\nwhen I receive [start game v]\nrepeat until <(HEART #) = [1]>\n    wait (10) seconds\n    Part 2 Animataions x : [-186] movement speed x : [5] x2 : [-236] movement speed x2 : [-5] secs to wait [3]\nend\n\ndefine Part 2 Animataions x : (x) movement speed x : (movement speed x ) x2 : (x2) movement speed x2 : (movement speed x2 ) secs to wait (secs)\nshow\nrepeat until <(x position) = (x)>\n    change x by (movement speed x )\nend\nwait (secs) seconds\nrepeat until <(x position) = (x2)>\n    change x by (movement speed x2 )\nend\nhide\n\n@Heart & Star\n\nwhen I receive [tick - heart v]\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nrepeat (10)\n    change size by (10)\nend\nrepeat (10)\n    change size by (-10)\nend\nset size to (100) %\nwait (3) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen flag clicked\nset size to (100) %\nhide\nset [ghost v] effect to (100)\n\n@SECRET WALL\n\nwhen flag clicked\nclear graphic effects\nswitch costume to (costume1 v)\ngo to [front v] layer\ngo [backward v] (1) layers\nset [teleporter # v] to [0]\nforever\n    if <(SCENE #) = [104]> then\n        show\n        if <touching (player v)?> then\n            set [teleporter # v] to [1]\n            set [ghost v] effect to (50)\n        else\n            set [teleporter # v] to [0]\n            set [ghost v] effect to (0)\n        end\n    else\n        hide\n    end\nend\n\n@Shop\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = (join [Scene] (SCENE #))> then\n        switch costume to (scene10 v)\n        go to [back v] layer\n        go to x: (-8) y: (-90)\n        show\n    else\n        hide\n    end\nend\n\n@Interact\n\nwhen flag clicked\nhide\nforever\n    if <<(SCENE #) = [10]> and <([touching shop v] of [player v]) = [1]>> then\n        go to x: (-40) y: (-100)\n        show\n        wait (0) seconds\n        go to [front v] layer\n        repeat until <not <([touching shop v] of [player v]) = [1]>>\n            change y by ((0.5) * ([sin v] of (frame) ))\n            change [frame v] by (5)\n        end\n    else\n        hide\n    end\nend\n\n@Select\n\nwhen flag clicked\nset [shop movement # v] to [0]\nhide\n\nwhen I receive [open shop v]\nswitch costume to (frame v)\nset [brightness v] effect to (0)\nset [shop movement # v] to [1]\ngo to x: (0) y: (0)\nshow\nwait (0) seconds\ngo to [front v] layer\nwait until <key (space v) pressed?>\nset [shop movement # v] to [0]\nhide\n\n@Item1\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [item1 bought v] to [0]\nset [partical_ v] to [0]\nforever\n    if <(SHOP MOVEMENT #) = [0]> then\n        hide\n    else\n        show\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (75)\n            if <mouse down?> then\n                wait until <not <mouse down?>>\n                if <<(COINS) > [9]> and <(item1 bought) < [3]>> then\n                    add (costume [name v]) to [collected v]\n                    change [coins v] by (-10)\n                    change [acceleration v] by (0.5)\n                    change [item1 bought v] by (1)\n                    if <(PARTICAL_) = [0]> then\n                        broadcast (item1 bought v)\n                    end\n                else\n                    if <(item1 bought) < [2]> then\n                        set [message costume # v] to [Not cool]\n                    else\n                        set [message costume # v] to [Cold]\n                    end\n                    broadcast (Messager v)\n                end\n            end\n        else\n            set [brightness v] effect to (0)\n        end\n    end\nend\n\n@Item2\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [item2 bought v] to [0]\nset [partical_ v] to [0]\nforever\n    if <(SHOP MOVEMENT #) = [0]> then\n        hide\n    else\n        show\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (75)\n            if <mouse down?> then\n                wait until <not <mouse down?>>\n                if <<(COINS) > [19]> and <(item2 bought) < [3]>> then\n                    add (costume [name v]) to [collected v]\n                    change [coins v] by (-20)\n                    change [jump force v] by (1.5)\n                    change [item2 bought v] by (1)\n                    if <(PARTICAL_) = [0]> then\n                        broadcast (item1 bought v)\n                    end\n                else\n                    if <(item2 bought) < [2]> then\n                        set [message costume # v] to [Not cool]\n                    else\n                        set [message costume # v] to [Cold]\n                    end\n                    broadcast (Messager v)\n                end\n            end\n        else\n            set [brightness v] effect to (0)\n        end\n    end\nend\n\n@Item3\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [item3 bought v] to [0]\nset [partical_ v] to [0]\nforever\n    if <(SHOP MOVEMENT #) = [0]> then\n        hide\n    else\n        show\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (75)\n            if <mouse down?> then\n                wait until <not <mouse down?>>\n                if <<(COINS) > [39]> and <(item3 bought) < [3]>> then\n                    add (costume [name v]) to [collected v]\n                    change [coins v] by (-40)\n                    change [lives v] by (1)\n                    change [item3 bought v] by (1)\n                    if <(PARTICAL_) = [0]> then\n                        broadcast (item1 bought v)\n                    end\n                else\n                    if <(item3 bought) < [2]> then\n                        set [message costume # v] to [Not cool]\n                    else\n                        set [message costume # v] to [Cold]\n                    end\n                    broadcast (Messager v)\n                end\n            end\n        else\n            set [brightness v] effect to (0)\n        end\n    end\nend\n\n@Partical\n\nwhen I start as a clone\ngo to [front v] layer\ngo to [front v] layer\ngo to [front v] layer\nswitch costume to (clone ID)\nshow\nrepeat until <(y position) = [-180]>\n    change y by (partical speed)\n    if <(clone ID) = [Fall Leaves]> then\n        point in direction ((direction) + (1))\n    end\nend\ndelete this clone\n\nwhen I receive [start game v]\npoint in direction (90)\nclear graphic effects\nif <<(current [month v]) = [11]> or <(current [month v]) = [12]>> then\n    set [clone id v] to [Snow]\n    hide\n    forever\n        go to x: (pick random (-240) to (240)) y: (180)\n        create clone of (_myself_ v)\n        if <(pick random (1) to (2)) = [1]> then\n            set [partical speed v] to [-2]\n        else\n            set [partical speed v] to [-4]\n        end\n        wait (0.1) seconds\n    end\nend\nif <<(current [month v]) = [8]> or <<(current [month v]) = [9]> or <(current [month v]) = [10]>>> then\n    set [clone id v] to [Fall Leaves]\n    hide\n    set [color v] effect to (0)\n    forever\n        go to x: (pick random (-240) to (240)) y: (180)\n        point in direction (pick random (0) to (360))\n        create clone of (_myself_ v)\n        if <(pick random (1) to (2)) = [1]> then\n            set [partical speed v] to [-2]\n            set [leaves color v] to [18]\n        else\n            if <(pick random (1) to (2)) = [1]> then\n                set [leaves color v] to [-10]\n            else\n                set [partical speed v] to [-4]\n                set [leaves color v] to [0]\n            end\n        end\n        set [color v] effect to (leaves color)\n        wait (0.3) seconds\n    end\nend\nif <<(current [month v]) = [1]> or <<<(current [month v]) = [2]> or <(current [month v]) = [3]>> or <<<(current [month v]) = [4]> or <(current [month v]) = [5]>> or <<(current [month v]) = [6]> or <(current [month v]) = [7]>>>>> then\n    set [clone id v] to [Rain]\n    hide\n    set [color v] effect to (0)\n    forever\n        Reset all clones\n        go to x: (pick random (-240) to (240)) y: (180)\n        point in direction (90)\n        create clone of (_myself_ v)\n        set [partical speed v] to [-2]\n        wait (0.01) seconds\n    end\nend\n\nwhen I start as a clone\nif <(clone ID) = [item1 bought]> then\n    show\n    repeat until <(x position) = (PLAYER LENGTH)>\n        change y by (2)\n    end\n    hide\n    delete this clone\nend\n\nswitch costume to (item1 partical v)\nhide\nset [partical_ v] to [1]\nforever\n    go to (player v)\n    go to x: (pick random ((10) - (x position)) to ((x position) - (10))) y: ((y position) - (PLAYER LENGTH))\n    create clone of (_myself_ v)\n    wait (0.5) seconds\nend\n\ndefine Reset all clones\nrepeat (300)\n    delete this clone\nend\n\n@Message of Coin\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset size to (100) %\ngo to [front v] layer\ngo to [front v] layer\nhide\n\nwhen I receive [messager v]\nswitch costume to (MESSAGE COSTUME #)\nshow\nset size to (20) %\nrepeat (5)\n    change size by (20)\nend\nwait (3) seconds\nrepeat (5)\n    change size by (-20)\nend\nhide\n\n@Achivements\n\nwhen I receive [start game v]\nforever\n    Achivement ID : [I Love Gold] How much ? [9] Var of Item (ilovegold) ID much (COINS)\n    Achivement ID : [Rich] How much ? [99] Var of Item (rich) ID much (COINS)\n    Achivement ID : [Scene 101 ?] How much ? [101] Var of Item (scene101?) ID much []\n    Achivement ID : [A Key !] How much ? [Key1] Var of Item (akey1) ID much []\n    Achivement ID : [It Burns, It Burns !] How much ? [Fell in lava] Var of Item (itburns,itburns!) ID much []\n    Achivement ID : [Split In Half !] How much ? [Spiky] Var of Item (splitinhalf!) ID much []\n    Achivement ID : [Crushed Off !] How much ? [Crushed] Var of Item (crushedoff!) ID much []\n    Achivement ID : [EZ Game] How much ? [Teleporter] Var of Item (ezgame) ID much []\nend\n\nwhen flag clicked\ngo to x: (160) y: (184)\nhide\nset [achivement # v] to [-1]\nset [ilovegold v] to [0]\nset [rich v] to [0]\nset [scene101? v] to [0]\nset [akey1 v] to [0]\nset [itfits! v] to [0]\nset [itburns,itburns! v] to [0]\nset [splitinhalf! v] to [0]\nset [crushedoff! v] to [0]\nset [ezgame v] to [0]\nset [id v] to []\n\ndefine Achivement ID : (id) How much ? (how much ?) Var of Item (var) ID much (id much)\nif << or > and <(username) = [Herobrinehk]>> then\n    set [id v] to (id)\n    switch costume to (id)\n    if <(id) = [I Love Gold]> then\n        change [achivement # v] by (1)\n        set [ilovegold v] to [1]\n        set [achivements v] to (join ((ACHIVEMENT #) + (1)) [/10])\n    else\n        if <(id) = [Rich]> then\n            change [achivement # v] by (1)\n            set [rich v] to [1]\n            set [achivements v] to (join ((ACHIVEMENT #) + (1)) [/10])\n        else\n            if <(id) = [Scene 101 ?]> then\n                change [achivement # v] by (1)\n                set [scene101? v] to [1]\n                set [achivements v] to (join ((ACHIVEMENT #) + (1)) [/10])\n            else\n                if <(id) = [A Key !]> then\n                    change [achivement # v] by (1)\n                    set [akey1 v] to [1]\n                    set [achivements v] to (join ((ACHIVEMENT #) + (1)) [/9])\n                else\n                    if <(id) = [It Burns, It Burns !]> then\n                        change [achivement # v] by (1)\n                        set [itburns,itburns! v] to [1]\n                        set [achivements v] to (join ((ACHIVEMENT #) + (1)) [/10])\n                    else\n                        if <(id) = [Split In Half !]> then\n                            change [achivement # v] by (1)\n                            set [splitinhalf! v] to [1]\n                            set [achivements v] to (join ((ACHIVEMENT #) + (1)) [/10])\n                        else\n                            if <(id) = [Crushed Off !]> then\n                                change [achivement # v] by (1)\n                                set [crushedoff! v] to [1]\n                                set [achivements v] to (join ((ACHIVEMENT #) + (1)) [/10])\n                            else\n                                if <(id) = [EZ Game]> then\n                                    change [achivement # v] by (1)\n                                    set [ezgame v] to [1]\n                                    set [achivements v] to (join ((ACHIVEMENT #) + (1)) [/10])\n                                else\n                                    if <(id) = [Shopping]> then\n                                        change [achivement # v] by (1)\n                                        set [shopping v] to [1]\n                                        set [achivements v] to (join ((ACHIVEMENT #) + (1)) [/10])\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    show\n    repeat until <(y position) = [124]>\n        change y by (-4)\n    end\n    wait (3) seconds\n    repeat until <(y position) = [184]>\n        change y by (4)\n    end\n    hide\nend\n\nwhen I receive [it fits achivement v]\nif <(itfits!) = [0]> then\n    change [achivement # v] by (1)\n    set [achivements v] to (join ((ACHIVEMENT #) + (1)) [/10])\n    set [itfits! v] to [1]\n    set [id v] to [It Fits !]\n    switch costume to (id)\n    show\n    repeat until <(y position) = [124]>\n        change y by (-4)\n    end\n    wait (3) seconds\n    repeat until <(y position) = [184]>\n        change y by (4)\n    end\n    hide\nend\n\nAchivement ID : [Shopping] How much ? [] Var of Item (shopping) ID much []\n\n@Assets\n\nwhen flag clicked\nhide\n\n