Morning | Multiplayer Platformer Remix 

Instructions: -----------------ɪ ɴ ꜱ ᴛ ᴜ ᴄ ᴛ ɪ ᴏ ɴ ꜱ-----------------------------\n★ ᴜꜱᴇ ᴡᴀꜱᴅ, ᴀʀʀᴏᴡꜱ ᴏʀ ᴛᴀᴘ ᴛᴏ ᴍᴏᴠᴇ!\n★ ꜰɪɴᴅ ᴛʜᴇ ɢᴏᴀʟ!\n★ ᴅᴏɴ'ᴛ ᴛᴏᴜᴄʜ ꜱᴘɪᴋᴇꜱ!\n★ ᴄʜᴀᴛ ᴀɴᴅ ᴘʟᴀʏ ᴡɪᴛʜ ꜰʀɪᴇɴᴅꜱ!\n★ ᴛ ᴛᴏ ᴄʜᴀᴛ!\n★ ɴ ᴛᴏ ꜱʜᴏᴡ ɴᴀᴍᴇꜱ!\n

@Stage\n\nwhen [m v] key pressed\nif < (username) contains [Ufhire]?> then\n    show variable [mouse v]\n    set [mouse v] to (join ((mouse x) + (SCROLL X)) (join [, ] (round ((mouse y) + (SCROLL Y)))))\nend\n\nwhen flag clicked\nhide variable [mouse v]\nforever\n    if <(player y) < [670]> then\n        switch backdrop to (backdrop1 v)\n    else\n        switch backdrop to (backdrop3 v)\n    end\nend\n\n@Blank\n\n@Player\n\ndefine Test - Die\nif <<touching (lava v)?> or <<touching (enemies v)?> or <touching (enemies2 v)?>>> then\n    if <(Life2) = [0]> then\n        set [exit v] to [die]\n    end\nend\n\ndefine Game - Die\nbroadcast (Die v) and wait\n\nwhen I receive [green flag v]\ngo to [front v] layer\nset size to (100) %\nhide\n\nwhen I receive [play game v]\nforever\n    broadcast (Reset v) and wait\n    broadcast (Setup v) and wait\n    game on\n    repeat until <(EXIT) > []>\n        Tick\n        broadcast (Tick v)\n    end\n    if <(EXIT) = [win]> then\n        Game - Win\n    else\n        Game - Die\n    end\nend\n\ndefine game on\nset [x v] to (CheckX)\nset [lava touch v] to [0]\nset [y v] to (CheckY)\nset [scroll x v] to ((x) + (100))\nset [scroll y v] to ((y) + (50))\nset [connection time v] to [0]\nset [sy v] to [0]\nset [sx v] to [0]\nset [in air v] to [0]\nset [life2 v] to [3]\nset [costumesused v] to []\nset [exit v] to []\nset [eye v] to [100]\nset [show names v] to [0]\nset [flip v] to [0]\npoint in direction (90)\nset size to (80) %\nswitch costume to (o_c v)\nshow\nset [ghost v] effect to (0)\nset [player ghost effect v] to [0]\n\ndefine Tick\nif <(shop2) = [0]> then\n    if <not <touching (cloud v)?>> then\n        if <(Continue Playing) = [1]> then\n            Layer [15]\n        else\n            go to [back v] layer\n        end\n    else\n        go to [back v] layer\n    end\nelse\n    go to [back v] layer\nend\ngo to x: (0) y: (0)\nswitch costume to (player v)\nif <(MPTouch) = [1]> then\n    if <(MPlr) = [R]> then\n        change [sx v] by (0.8)\n    else\n        if <(MPlr) = [L]> then\n            change [sx v] by (-0.8)\n        end\n    end\nend\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<(mouse x) < (x position)> and <mouse down?>>> then\n    if <(shop) = [0]> then\n        if <(shop2) = [0]> then\n            set [left or right v] to [Right]\n            if <not < (CostumesUsed) contains [S]?>> then\n                change [sx v] by (-1.7)\n            else\n                change [sx v] by (-2)\n            end\n        end\n    end\nend\nset [sx v] to ((sx) * (0.8))\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<(mouse x) > (x position)> and <mouse down?>>> then\n    if <(shop) = [0]> then\n        if <(shop2) = [0]> then\n            set [left or right v] to [Left]\n            if <not < (CostumesUsed) contains [S]?>> then\n                change [sx v] by (1.7)\n            else\n                change [sx v] by (2)\n            end\n        end\n    end\nend\nif <([abs v] of (sx) ) > [0.9]> then\n    Cange player x by (round (sx))\nend\nif <<<key (up arrow v) pressed?> or <<key (space v) pressed?> or <key (w v) pressed?>>> or <<(mouse y) > (y position)> and <mouse down?>>> then\n    if <[20] > (Jump)> then\n        if <(shop) = [0]> then\n            if <(shop2) = [0]> then\n                if <(in air) < [4]> then\n                    if <not < (CostumesUsed) contains [B]?>> then\n                        set [sy v] to [18]\n                    else\n                        set [sy v] to [20]\n                    end\n                end\n            end\n        end\n        if <not <<touching (ladder v)?> or <touching (water v)?>>> then\n            change [jump v] by (1)\n        else\n            set [jump v] to [0]\n        end\n    end\nelse\n    set [jump v] to [0]\nend\nif <(sy) > [-15]> then\n    change [sy v] by (-2)\nend\nif <not <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <mouse down?>>>> then\n    set [left or right v] to [Center]\n    if <not <<key (up arrow v) pressed?> or <<key (space v) pressed?> or <key (w v) pressed?>>>> then\n        change [connection time v] by (1)\n    else\n        set [connection time v] to [0]\n    end\nelse\n    set [connection time v] to [0]\nend\nchange player y by (sy)\nTest - Die\nif <(Eye) < [23]> then\n    switch costume to (join (join (letter (1) of (Left or Right)) [Eye]) (Eye))\nelse\n    switch costume to (letter (1) of (Left or Right))\nend\nif <<(x) > [-400]> and <(x) < [8400]>> then\n    change [scroll x v] by (round (((x) - (SCROLL X)) / (11)))\nend\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (11)))\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nPosition\nif <(y) < [400]> then\n    set [exit v] to [die]\nend\n\ndefine change player y by (sy)\nif <(Ladder) = [0]> then\n    if <not <touching (water v)?>> then\n        if <not <touching (ladder v)?>> then\n            change [y v] by (sy)\n            change [in air v] by (1)\n        else\n            set [in air v] to [0]\n        end\n    else\n        change [y v] by ((sy) / (5))\n        set [in air v] to [0]\n    end\nelse\n    if <(Ladder) = [1]> then\n        if <not <<<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<(mouse y) < (y position)> and <mouse down?>>> or <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<(mouse y) > (y position)> and <mouse down?>>>>> then\n            set [in air v] to [0]\n        else\n            if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<(mouse y) > (y position)> and <mouse down?>>> then\n                change [y v] by ((sy) / (2))\n                set [in air v] to [0]\n            else\n                change [y v] by ((sy) / (2))\n                set [in air v] to [0]\n            end\n        end\n    end\nend\nPosition\nrepeat until <not <<<touching (platform v)?> or <touching (sand v)?>> or <touching (moving platform v)?>>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\n\ndefine Position\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\ndefine Cange player x by (sx)\nchange [x v] by (sx)\nPosition\nif <<<touching (platform v)?> or <touching (sand v)?>> or <touching (moving platform v)?>> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <<<touching (platform v)?> or <touching (sand v)?>> or <touching (moving platform v)?>>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<(mouse y) > (y position)> and <mouse down?>>> then\n        if <(sx) > [0]> then\n            set [sx v] to [-20]\n        else\n            set [sx v] to [20]\n        end\n        set [in air v] to [0]\n    else\n        set [sx v] to [0]\n    end\n    repeat until <not <<<touching (platform v)?> or <touching (sand v)?>> or <touching (moving platform v)?>>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\ndefine Game - Win\nrepeat (10)\n    change [ghost v] effect by (10)\n    change [player ghost effect v] by (10)\nend\nhide\nwait (1) seconds\n\nwhen I receive [tick v]\nset [player x v] to (x)\nset [player y v] to (y)\n\nwhen flag clicked\nset [timer2 v] to [0.1]\nforever\n    set [timer2 v] to (timer)\nend\n\nwhen I receive [play game v]\nset [pitch v] effect to (0)\nset [pan left/right v] effect to (0)\nset volume to (100) %\nwait (0.3) seconds\nforever\n    play sound [Unlimited v] until done\nend\n\nwhen flag clicked\nswitch costume to (o_c v)\nset [costumesused v] to []\nhide variable [timer v]\nforever\n    if <(start timer) = [1]> then\n        set [timer v] to [0]\n        forever\n            wait (0.1) seconds\n            change [timer v] by (0.1)\n        end\n    end\nend\n\nwhen I receive [tick v]\nif <touching (bounce v)?> then\n    if <touching color (#000000)?> then\n        set [sy v] to [33]\n        set [bounce v] to [1]\n    end\nelse\n    set [bounce v] to [0]\nend\n\nwhen I receive [joined v]\nforever\n    if <key (n v) pressed?> then\n        broadcast (show names v) and wait\n    end\nend\n\nwhen I receive [show names v]\nwait until <not <key (n v) pressed?>>\nif <(show names) = [0]> then\n    set [show names v] to [1]\nelse\n    if <(show names) = [1]> then\n        set [show names v] to [0]\n    end\nend\n\nwhen I receive [join game v]\nstop all sounds\n\ndefine send cloud data\nset [encoded v] to []\nwrite (username) to encoded\nwrite (Message) to encoded\nwrite (round ((timer) * (10))) to encoded\nwrite (x) to encoded\nwrite (y) to encoded\nwrite (costume [number v]) to encoded\nwrite (size) to encoded\nwrite (Player ghost effect) to encoded\nset cloud # (MY PLAYER #) to (encoded)\n\ndefine set cloud # (player) to (value)\nif <(player) = [1]> then\n    set [☁ p1 v] to (value)\nelse\n    if <(player) = [2]> then\n        set [☁ p2 v] to (value)\n    else\n        if <(player) = [3]> then\n            set [☁ p3 v] to (value)\n        else\n            if <(player) = [4]> then\n                set [☁ p4 v] to (value)\n            else\n                if <(player) = [5]> then\n                    set [☁ p5 v] to (value)\n                else\n                    if <(player) = [6]> then\n                        set [☁ p6 v] to (value)\n                    else\n                        if <(player) = [7]> then\n                            set [☁ p7 v] to (value)\n                        else\n                            if <(player) = [8]> then\n                                set [☁ p8 v] to (value)\n                            else\n                                if <(player) = [9]> then\n                                    set [☁ p9 v] to (value)\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine write (val) to encoded\nset [letter # v] to [1]\nrepeat (length of (val))\n    set [encoded v] to (join (encoded) (item # of (letter (letter #) of (val)) in [code v]))\n    change [letter # v] by (1)\nend\nset [encoded v] to (join (encoded) [00])\n\nwhen I receive [start v]\nset [my player # v] to [0]\nset [max players v] to [10]\nbroadcast (setup-opponents v) and wait\nbroadcast (join game v) and wait\nif <(MY PLAYER #) > [0]> then\n    broadcast (joined v)\nelse\n    broadcast (server full v)\nend\nbroadcast (begin v)\n\nwhen I receive [begin v]\nforever\n    if <(MY PLAYER #) > [0]> then\n        send cloud data\n    end\nend\n\nwhen I receive [green flag v]\nforever\n    think (item (Message) of [chat v])\nend\n\nwhen I receive [win v]\nset volume to (0) %\n\nwhen I receive [continue v]\nset volume to (round (((Volume) / (10)) * (8))) %\n\nwhen flag clicked\nbroadcast (Green Flag v)\nbroadcast (Play Game v)\nbroadcast (Start v)\n\nturn right (15) degrees\n\nwhen I receive [die v]\nset [exit v] to []\n\nwrite [] to encoded\n\nchange [y v] by (sy)\nchange [in air v] by (1)\n\nwhen I receive [tick v]\nif <touching (ladder v)?> then\n    set [ladder v] to [1]\nelse\n    set [ladder v] to [0]\nend\n\nwhen flag clicked\nforever\n    if <(Die) = [0]> then\n        if <<touching (lava v)?> or <<<touching (enemies v)?> and <(kill enemy) = [0]>> or <<touching (enemies2 v)?> and <(kill enemy 2) = [0]>>>> then\n            if <not <(EXIT) = [die]>> then\n                set [die v] to [1]\n                change [life2 v] by (-1)\n                wait (0.25) seconds\n                set [ghost v] effect to (100)\n                wait (0.25) seconds\n                set [ghost v] effect to (0)\n                wait (0.25) seconds\n                set [ghost v] effect to (100)\n                wait (0.25) seconds\n                set [ghost v] effect to (0)\n                wait (0.25) seconds\n                set [ghost v] effect to (100)\n                wait (0.25) seconds\n                set [ghost v] effect to (0)\n                set [die v] to [0]\n            end\n        end\n    end\nend\n\ndefine Layer (layer)\ngo to [front v] layer\ngo [backward v] ((layer) - (1)) layers\n\nwhen I receive [tick v]\nchange [eye v] by (1)\nif <(Eye) > [200]> then\n    set [eye v] to [1]\nend\n\nset [☁ p1 v] to [0]\n\nwhen I receive [die v]\nwait (0.5) seconds\nhide\n\nif <(Continue Playing) = [1]> then\n    Layer [15]\nelse\n    go to [back v] layer\nend\n\n@cloud player\n\ndefine tick\nLayer [16]\nset size to (135) %\nvalue = cloud # (Player #)\nif <(join [A] (value)) = (last value)> then\n    change [offline v] by (1)\n    if <(offline) = [100]> then\n        hide\n        change [players v] by (-1)\n    end\nelse\n    set [last value v] to (join [A] (value))\n    if <(offline) > [99]> then\n        show\n        set [players v] to [1]\n    end\n    set [offline v] to [0]\nend\nbegin decode of (value)\nvalue = read from encoded\nif <(show names) = [1]> then\n    think (value)\nelse\n    if <(show names) = [0]> then\n        think []\n    end\nend\nvalue = read from encoded\nif <not <(value) = []>> then\n    think (item (value) of [chat v])\nend\nvalue = read from encoded\nvalue = read from encoded\nset x to ((value) - (SCROLL X))\nvalue = read from encoded\nset y to ((value) - (SCROLL Y))\nvalue = read from encoded\nif <<(x position) > [210]> or <<(x position) < [-210]> or <<(y position) > [160]> or <(y position) < [-160]>>>> then\n    show\n    point towards (player v)\n    switch costume to (arrow v)\n    if on edge, bounce\n    set size to (100) %\nelse\n    switch costume to (value)\n    point in direction (90)\nend\nvalue = read from encoded\nset size to (80) %\nvalue = read from encoded\nset [ghost v] effect to (value)\n\ndefine begin decode of (encoded)\nset [encoded v] to (encoded)\nset [letter # v] to [1]\n\ndefine value = read from encoded\nset [value v] to []\nforever\n    set [idx v] to (join (letter (letter #) of (encoded)) (letter ((letter #) + (1)) of (encoded)))\n    change [letter # v] by (2)\n    if <(idx) < [1]> then\n        stop [this script v]\n    end\n    set [value v] to (join (value) (item (idx) of [code v]))\nend\n\ndefine players setup\nset [color v] effect to (0)\nhide\nset [offline v] to [100]\nset [player # v] to [1]\nrepeat ((Max Players) - (1))\n    create clone of (_myself_ v)\n    change [player # v] by (1)\nend\n\nwhen I receive [begin v]\nforever\n    if <(MY PLAYER #) = (Player #)> then\n        set [offline v] to [100]\n        hide\n    else\n        tick\n    end\nend\n\nwhen I receive [setup-opponents v]\nplayers setup\n\ndefine value = cloud # (player)\nif <(player) = [1]> then\n    set [value v] to (☁ P1)\nelse\n    if <(player) = [2]> then\n        set [value v] to (☁ P2)\n    else\n        if <(player) = [3]> then\n            set [value v] to (☁ P3)\n        else\n            if <(player) = [4]> then\n                set [value v] to (☁ P4)\n            else\n                if <(player) = [5]> then\n                    set [value v] to (☁ P5)\n                else\n                    if <(player) = [6]> then\n                        set [value v] to (☁ P6)\n                    else\n                        if <(player) = [7]> then\n                            set [value v] to (☁ P7)\n                        else\n                            if <(player) = [8]> then\n                                set [value v] to (☁ P8)\n                            else\n                                if <(player) = [9]> then\n                                    set [value v] to (☁ P9)\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [join game v]\nvalue = cloud # (Player #)\nset [last value v] to (join [A] (value))\nwait (3) seconds\nvalue = cloud # (Player #)\nif <(join [A] (value)) = (last value)> then\n    set [my player # v] to (Player #)\nend\n\nwhen flag clicked\nset [players v] to [0]\nforever\n    set [active players v] to ((Players) + (1))\nend\n\ndefine Layer (layer)\ngo to [front v] layer\ngo [backward v] ((layer) - (1)) layers\n\n@Platform\n\nwhen I receive [start screen v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nLayer [19]\nswitch costume to (point v)\nset size to (100) %\nset [ghost v] effect to (0)\nhide\nset [x v] to [-335]\nset [y v] to [1000]\nswitch costume to (level 1 1 v)\nClone at x: [500] y: [1000]\nClone at x: [500] y: [860]\nClone at x: [500] y: [860]\nClone at x: [350] y: [1100]\nClone at x: [550] y: [1100]\nClone at x: [800] y: [860]\nClone at x: [300] y: [1300]\nset [ghost v] effect to (100)\nClone at x: [200] y: [1550]\nClone at x: [-300] y: [1550]\nClone at x: [-300] y: [1650]\nClone at x: [150] y: [1950]\nClone at x: [330] y: [2050]\nClone at x: [250] y: [2310]\nClone at x: [300] y: [2310]\nClone at x: [-150] y: [1650]\nClone at x: [200] y: [1890]\nClone at x: [350] y: [2000]\nClone at x: [-100] y: [2260]\nClone at x: [-100] y: [2580]\nClone at x: [300] y: [2700]\nClone at x: [-700] y: [1000]\nset [ghost v] effect to (0)\nClone at x: [450] y: [1150]\nClone at x: [400] y: [900]\nClone at x: [-200] y: [530]\nClone at x: [400] y: [400]\nClone at x: [350] y: [350]\nClone at x: [500] y: [460]\nClone at x: [-300] y: [870]\nClone at x: [-300] y: [1000]\nClone at x: [350] y: [1275]\nClone at x: [600] y: [1400]\nClone at x: [350] y: [1500]\nClone at x: [350] y: [1400]\nClone at x: [400] y: [1275]\nClone at x: [900] y: [1275]\nClone at x: [450] y: [1350]\nClone at x: [100] y: [1500]\nset [ghost v] effect to (100)\n\nClone at x: [425] y: [2200]\nClone at x: [325] y: [2150]\nClone at x: [325] y: [2100]\nClone at x: [400] y: [2100]\nhide\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nset [y v] to (y)\nnext costume\n\nset [y v] to [860]\n\nset [y v] to [900]\n\nchange [x v] by (-50)\n\ndefine Layer (layer)\ngo to [front v] layer\ngo [backward v] ((layer) - (1)) layers\n\nset size to (100) %\n\n@Moving Platform\n\nwhen I receive [start screen v]\nhide\n\nwhen I receive [tick v]\nposition ((Moving platform x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nset [ghost v] effect to (0)\nset size to (100) %\nhide\nset [moving platform x v] to [4020]\nset [y v] to [120]\nbroadcast (Move platform v)\n\nClone at x: [425] y: [2200]\nClone at x: [325] y: [2150]\nClone at x: [325] y: [2100]\nClone at x: [400] y: [2100]\nhide\n\ndefine position (x) (y)\nset size to (100) %\nLayer [19]\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nset [moving platform x v] to (x)\nset [y v] to (y)\nnext costume\n\nwhen I receive [move platform v]\nforever\n    set [moving platform x v] to [4520]\n    set [y v] to [120]\n    repeat (90)\n        set [mplr v] to [R]\n        change [moving platform x v] by (3)\n    end\n    set [mplr v] to [C]\n    wait (0.1) seconds\n    repeat (90)\n        set [mplr v] to [L]\n        change [moving platform x v] by (-3)\n    end\n    set [mplr v] to [C]\n    wait (0.1) seconds\nend\n\ndefine Layer (layer)\ngo to [front v] layer\ngo [backward v] ((layer) - (1)) layers\n\n@Collectables\n\nwhen I receive [start screen v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <touching (player v)?> then\n    start sound [Magic Spell v]\n    switch costume to (collectable2 v)\n    change [coins together v] by (1)\n    change [points v] by (1)\n    set [money y v] to (y)\n    set [money x v] to (x)\n    broadcast (Earn Money v)\n    broadcast (Show coin v)\n    delete this clone\nend\n\nwhen I receive [setup v]\n\ndefine position (x) (y)\nLayer [10]\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\nchange [collected max v] by (1)\ncreate clone of (_myself_ v)\n\ndefine Layer (layer)\ngo to [front v] layer\ngo [backward v] ((layer) - (1)) layers\n\nwhen flag clicked\nset volume to (Volume) %\nswitch costume to (collectable2 v)\nset [ghost v] effect to (0)\nhide\nset [x v] to [0]\nset [y v] to [0]\nset [collected max v] to [0]\nset [coins together v] to [0]\nswitch costume to (collectable v)\nset [points v] to [0]\nClone at x: [280] y: [655]\nClone at x: [3065] y: [740]\nClone at x: [4333] y: [2800]\nClone at x: [5010] y: [590]\nset [y v] to [-10000]\n\n@Lava\n\nwhen I receive [start screen v]\nhide\n\nwhen I receive [tick v]\nLayer [13]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nset [ghost v] effect to (0)\ngo to [back v] layer\nset size to (100) %\nhide\nset [x v] to [-335]\nset [y v] to [1000]\nswitch costume to (level 1 1 v)\nClone at x: [500] y: [1000]\nClone at x: [500] y: [860]\nClone at x: [500] y: [860]\nClone at x: [350] y: [1100]\nClone at x: [550] y: [1100]\nClone at x: [800] y: [860]\nClone at x: [300] y: [1300]\nClone at x: [200] y: [1550]\nClone at x: [-300] y: [1550]\nClone at x: [-300] y: [1650]\nClone at x: [150] y: [1950]\nClone at x: [330] y: [2050]\nClone at x: [250] y: [2310]\nClone at x: [300] y: [2310]\nClone at x: [-150] y: [1650]\nClone at x: [200] y: [1890]\nClone at x: [350] y: [2000]\nClone at x: [-100] y: [2260]\nClone at x: [-100] y: [2580]\nClone at x: [300] y: [2700]\nClone at x: [-700] y: [1000]\nClone at x: [450] y: [1150]\nClone at x: [400] y: [900]\nClone at x: [-200] y: [530]\nClone at x: [400] y: [400]\nClone at x: [350] y: [350]\nClone at x: [500] y: [460]\nClone at x: [-300] y: [870]\nClone at x: [-300] y: [1000]\nClone at x: [350] y: [1275]\nClone at x: [600] y: [1400]\nClone at x: [350] y: [1500]\nClone at x: [350] y: [1400]\nClone at x: [400] y: [1275]\nClone at x: [900] y: [1275]\n\nClone at x: [425] y: [2200]\nClone at x: [325] y: [2150]\nClone at x: [325] y: [2100]\nClone at x: [400] y: [2100]\nhide\n\ndefine position (x) (y)\nset size to (100) %\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nset [y v] to (y)\nnext costume\n\nset [y v] to [1900]\n\ndefine Layer (layer)\ngo to [front v] layer\ngo [backward v] ((layer) - (1)) layers\n\n@Thumbnail\n\nwhen [timer v] > (Timer2)\nif <[5000] < (Connection time)> then\n    set [ghost v] effect to (100)\n    switch costume to (costume5 v)\n    repeat (10)\n        change [ghost v] effect by (-10)\n        show\n        go to [front v] layer\n    end\nelse\n    set [ghost v] effect to (100)\n    switch costume to (costume2 v)\n    repeat (10)\n        change [ghost v] effect by (-10)\n        show\n        go to [front v] layer\n    end\nend\n\nwhen I receive [join game v]\nhide\n\nwhen flag clicked\nswitch costume to (costume3 v)\nhide\nset [continue playing v] to [1]\n\nwhen I receive [win v]\nset [continue playing v] to [0]\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nswitch costume to (costume4 v)\nrepeat (10)\n    change [ghost v] effect by (-10)\n    show\n    go to [front v] layer\nend\n\nwhen I receive [tick v]\nset size to (100) %\nif <[5000] < (Connection time)> then\n    stop [all v]\nend\n\nwhen I receive [win v]\nset [stop all after win v] to [0]\nforever\n    if <(Continue Playing) = [0]> then\n        repeat until <(Continue Playing) = [1]>\n            change [stop all after win v] by (1)\n        end\n        if <(Stop all after win) = [400]> then\n            stop [all v]\n        end\n    end\nend\n\nwhen I receive [setup v]\ngo to [front v] layer\nset [continue playing v] to [1]\nset [stop all after win v] to [0]\n\nwhen I receive [continue v]\nset [stop all after win v] to [0]\nhide\n\ndefine Layer (layer)\ngo to [front v] layer\ngo [backward v] ((layer) - (1)) layers\n\n@Life\n\nwhen I receive [life up v]\nif <(Life2) < [4]> then\n    change [life2 v] by (1)\nend\n\nwhen I receive [reset life v]\nset [life2 v] to [3]\n\nwhen I receive [tick v]\nif <(Life2) > [3]> then\n    set x to (-40)\nelse\n    if <(Life2) > [2]> then\n        set x to (-27)\n    else\n        if <(Life2) > [1]> then\n            set x to (-13.5)\n        else\n            set x to (0)\n        end\n    end\nend\nClone (Life2) times\n\nwhen I start as a clone\nwait (0.01) seconds\ndelete this clone\n\ndefine Clone (#) times\nif <(Continue Playing) = [1]> then\n    Layer [6]\nelse\n    go to [back v] layer\nend\nif <(menu show) = [1]> then\n    if <(shop2) = [0]> then\n        show\n    else\n        hide\n    end\nelse\n    hide\nend\nrepeat ((#) - (1))\n    create clone of (_myself_ v)\n    set y to (165)\n    change x by (27)\nend\n\nwhen flag clicked\nhide\n\ndefine Layer (layer)\ngo to [front v] layer\ngo [backward v] ((layer) - (1)) layers\n\n@TextBackground\n\nwhen I receive [text v]\nLayer [7]\nwait until <not <key (t v) pressed?>>\nset [text v] to [Start screen text]\nif <(show) = [0]> then\n    switch costume to (start screen text v)\n    show\n    set [ghost v] effect to (30)\n    go to [front v] layer\n    set [show v] to [1]\n    broadcast (Setup text v)\nelse\n    if <(show) = [1]> then\n        hide\n        set [show v] to [0]\n    end\nend\n\nwhen flag clicked\nhide\nset [show v] to [0]\nset [text v] to [Start screen text]\n\nwhen I receive [tick v]\nset [messagetext v] to (text)\nswitch costume to (text)\nif <key (t v) pressed?> then\n    broadcast (Text v)\nend\n\nbroadcast (Write v)\n\nwhen I receive [write v]\nset [message v] to (text)\nset [text v] to [Start screen text]\nhide\nset [show v] to [0]\nwait (2) seconds\nset [message v] to []\n\nwhen I receive [setup text v]\nforever\n    if <(show) = [1]> then\n        if <(text) = [Start screen text]> then\n            if <key (1 v) pressed?> then\n                wait until <not <key (1 v) pressed?>>\n                broadcast (process text v)\n                set [text v] to [Hi!]\n            end\n            if <key (2 v) pressed?> then\n                wait until <not <key (2 v) pressed?>>\n                broadcast (process text v)\n                set [text v] to [Bye!]\n            end\n            if <key (3 v) pressed?> then\n                wait until <not <key (3 v) pressed?>>\n                broadcast (process text v)\n                set [text v] to [Where is...]\n            end\n            if <key (4 v) pressed?> then\n                wait until <not <key (4 v) pressed?>>\n                broadcast (process text v)\n                set [text v] to [Thanks!]\n            end\n            if <key (5 v) pressed?> then\n                wait until <not <key (5 v) pressed?>>\n                broadcast (process text v)\n                set [text v] to [Sorry!]\n            end\n            if <key (6 v) pressed?> then\n                wait until <not <key (6 v) pressed?>>\n                broadcast (process text v)\n                set [text v] to [No!]\n            end\n            if <key (7 v) pressed?> then\n                wait until <not <key (7 v) pressed?>>\n                broadcast (process text v)\n                set [text v] to [Yes!]\n            end\n            if <key (8 v) pressed?> then\n                wait until <not <key (8 v) pressed?>>\n                broadcast (process text v)\n                set [text v] to [I can help you!]\n            end\n            if <key (9 v) pressed?> then\n                wait until <not <key (9 v) pressed?>>\n                broadcast (process text v)\n                set [text v] to [How do you play?]\n            end\n        end\n    end\nend\n\nwhen I receive [process text v]\nif <(show) = [1]> then\n    forever\n        if <(text) = [Hi!]> then\n            if <key (1 v) pressed?> then\n                set [text v] to [1]\n                broadcast (Write v)\n            end\n            if <key (2 v) pressed?> then\n                set [text v] to [2]\n                broadcast (Write v)\n            end\n            if <key (3 v) pressed?> then\n                set [text v] to [3]\n                broadcast (Write v)\n            end\n            if <key (4 v) pressed?> then\n                set [text v] to [4]\n                broadcast (Write v)\n            end\n            if <key (5 v) pressed?> then\n                set [text v] to [5]\n                broadcast (Write v)\n            end\n            if <key (6 v) pressed?> then\n                set [text v] to [6]\n                broadcast (Write v)\n            end\n            if <key (7 v) pressed?> then\n                set [text v] to [7]\n                broadcast (Write v)\n            end\n            if <key (8 v) pressed?> then\n                set [text v] to [8]\n            end\n            if <key (9 v) pressed?> then\n                set [text v] to [9]\n                broadcast (Write v)\n            end\n        else\n            if <(text) = [Bye!]> then\n                if <key (1 v) pressed?> then\n                    set [text v] to [10]\n                    broadcast (Write v)\n                end\n                if <key (2 v) pressed?> then\n                    set [text v] to [11]\n                    broadcast (Write v)\n                end\n                if <key (3 v) pressed?> then\n                    set [text v] to [12]\n                    broadcast (Write v)\n                end\n                if <key (4 v) pressed?> then\n                    set [text v] to [13]\n                    broadcast (Write v)\n                end\n                if <key (5 v) pressed?> then\n                    set [text v] to [14]\n                    broadcast (Write v)\n                end\n                if <key (6 v) pressed?> then\n                    set [text v] to [15]\n                    broadcast (Write v)\n                end\n                if <key (7 v) pressed?> then\n                    set [text v] to [16]\n                    broadcast (Write v)\n                end\n                if <key (8 v) pressed?> then\n                    set [text v] to [17]\n                    broadcast (Write v)\n                end\n            else\n                if <(text) = [Where is...]> then\n                    if <key (1 v) pressed?> then\n                        set [text v] to [18]\n                        broadcast (Write v)\n                    end\n                    if <key (2 v) pressed?> then\n                        set [text v] to [19]\n                        broadcast (Write v)\n                    end\n                    if <key (3 v) pressed?> then\n                        set [text v] to [20]\n                        broadcast (Write v)\n                    end\n                    if <key (4 v) pressed?> then\n                        set [text v] to [21]\n                        broadcast (Write v)\n                    end\n                    if <key (5 v) pressed?> then\n                        set [text v] to [22]\n                        broadcast (Write v)\n                    end\n                    if <key (6 v) pressed?> then\n                        set [text v] to [23]\n                        broadcast (Write v)\n                    end\n                    if <key (7 v) pressed?> then\n                        set [text v] to [24]\n                        broadcast (Write v)\n                    end\n                    if <key (8 v) pressed?> then\n                        set [text v] to [25]\n                        broadcast (Write v)\n                    end\n                    if <key (9 v) pressed?> then\n                        set [text v] to [26]\n                        broadcast (Write v)\n                    end\n                else\n                    if <(text) = [Thanks!]> then\n                        if <key (1 v) pressed?> then\n                            set [text v] to [27]\n                            broadcast (Write v)\n                        end\n                        if <key (2 v) pressed?> then\n                            set [text v] to [28]\n                            broadcast (Write v)\n                        end\n                        if <key (3 v) pressed?> then\n                            set [text v] to [29]\n                            broadcast (Write v)\n                        end\n                        if <key (4 v) pressed?> then\n                            set [text v] to [30]\n                            broadcast (Write v)\n                        end\n                        if <key (5 v) pressed?> then\n                            set [text v] to [31]\n                            broadcast (Write v)\n                        end\n                        if <key (6 v) pressed?> then\n                            set [text v] to [32]\n                            broadcast (Write v)\n                        end\n                        if <key (7 v) pressed?> then\n                            set [text v] to [33]\n                            broadcast (Write v)\n                        end\n                        if <key (8 v) pressed?> then\n                            set [text v] to [34]\n                            broadcast (Write v)\n                        end\n                    else\n                        if <(text) = [Sorry!]> then\n                            if <key (1 v) pressed?> then\n                                set [text v] to [35]\n                                broadcast (Write v)\n                            end\n                            if <key (2 v) pressed?> then\n                                set [text v] to [36]\n                                broadcast (Write v)\n                            end\n                            if <key (3 v) pressed?> then\n                                set [text v] to [37]\n                                broadcast (Write v)\n                            end\n                            if <key (4 v) pressed?> then\n                                set [text v] to [38]\n                                broadcast (Write v)\n                            end\n                            if <key (5 v) pressed?> then\n                                set [text v] to [39]\n                                broadcast (Write v)\n                            end\n                            if <key (6 v) pressed?> then\n                                set [text v] to [40]\n                                broadcast (Write v)\n                            end\n                            if <key (7 v) pressed?> then\n                                set [text v] to [41]\n                                broadcast (Write v)\n                            end\n                        else\n                            if <(text) = [No!]> then\n                                if <key (1 v) pressed?> then\n                                    set [text v] to [42]\n                                    broadcast (Write v)\n                                end\n                                if <key (2 v) pressed?> then\n                                    set [text v] to [43]\n                                    broadcast (Write v)\n                                end\n                                if <key (3 v) pressed?> then\n                                    set [text v] to [44]\n                                    broadcast (Write v)\n                                end\n                                if <key (4 v) pressed?> then\n                                    set [text v] to [45]\n                                    broadcast (Write v)\n                                end\n                                if <key (5 v) pressed?> then\n                                    set [text v] to [46]\n                                    broadcast (Write v)\n                                end\n                                if <key (6 v) pressed?> then\n                                    set [text v] to [47]\n                                    broadcast (Write v)\n                                end\n                                if <key (7 v) pressed?> then\n                                    set [text v] to [48]\n                                    broadcast (Write v)\n                                    if <key (8 v) pressed?> then\n                                        set [text v] to [49]\n                                        broadcast (Write v)\n                                    end\n                                end\n                            else\n                                if <(text) = [Yes!]> then\n                                    if <key (1 v) pressed?> then\n                                        set [text v] to [50]\n                                        broadcast (Write v)\n                                    end\n                                    if <key (2 v) pressed?> then\n                                        set [text v] to [51]\n                                        broadcast (Write v)\n                                    end\n                                    if <key (3 v) pressed?> then\n                                        set [text v] to [52]\n                                        broadcast (Write v)\n                                    end\n                                    if <key (4 v) pressed?> then\n                                        set [text v] to [53]\n                                        broadcast (Write v)\n                                    end\n                                    if <key (5 v) pressed?> then\n                                        set [text v] to [54]\n                                        broadcast (Write v)\n                                    end\n                                    if <key (6 v) pressed?> then\n                                        set [text v] to [55]\n                                        broadcast (Write v)\n                                    end\n                                    if <key (7 v) pressed?> then\n                                        set [text v] to [56]\n                                        broadcast (Write v)\n                                        if <key (8 v) pressed?> then\n                                            set [text v] to [57]\n                                            broadcast (Write v)\n                                        end\n                                        if <key (9 v) pressed?> then\n                                            set [text v] to [58]\n                                            broadcast (Write v)\n                                        end\n                                    end\n                                else\n                                    if <(text) = [I can help you!]> then\n                                        if <key (1 v) pressed?> then\n                                            set [text v] to [59]\n                                            broadcast (Write v)\n                                        end\n                                        if <key (2 v) pressed?> then\n                                            set [text v] to [60]\n                                            broadcast (Write v)\n                                        end\n                                        if <key (3 v) pressed?> then\n                                            set [text v] to [61]\n                                            broadcast (Write v)\n                                        end\n                                        if <key (4 v) pressed?> then\n                                            set [text v] to [62]\n                                            broadcast (Write v)\n                                        end\n                                        if <key (5 v) pressed?> then\n                                            set [text v] to [63]\n                                            broadcast (Write v)\n                                        end\n                                        if <key (6 v) pressed?> then\n                                            set [text v] to [64]\n                                            broadcast (Write v)\n                                        end\n                                    else\n                                        if <(text) = [How do you play?]> then\n                                            if <key (1 v) pressed?> then\n                                                set [text v] to [65]\n                                                broadcast (Write v)\n                                            end\n                                            if <key (2 v) pressed?> then\n                                                set [text v] to [66]\n                                                broadcast (Write v)\n                                            end\n                                            if <key (3 v) pressed?> then\n                                                set [text v] to [67]\n                                                broadcast (Write v)\n                                            end\n                                            if <key (4 v) pressed?> then\n                                                set [text v] to [68]\n                                                broadcast (Write v)\n                                            end\n                                            if <key (5 v) pressed?> then\n                                                set [text v] to [69]\n                                                broadcast (Write v)\n                                            end\n                                            if <key (6 v) pressed?> then\n                                                set [text v] to [70]\n                                                broadcast (Write v)\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Layer (layer)\ngo to [front v] layer\ngo [backward v] ((layer) - (1)) layers\n\n@Text\n\nwhen I receive [text v]\nLayer [6]\nwait until <not <key (t v) pressed?>>\nif <(show) = [0]> then\n    switch costume to (start screen text v)\n    show\n    set [ghost v] effect to (0)\n    go to [front v] layer\nelse\n    if <(show) = [1]> then\n        hide\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [tick v]\nswitch costume to (MessageText)\n\nbroadcast (Write v)\n\nwhen I receive [write v]\nhide\nset [show v] to [0]\nwait (2) seconds\n\ndefine Layer (layer)\ngo to [front v] layer\ngo [backward v] ((layer) - (1)) layers\n\n@Shop Button\n\nwhen I receive [setup v]\ngo to x: (-190) y: (160)\nshow\n\nwhen I receive [tick v]\nif <(Continue Playing) = [1]> then\n    Layer [8]\nelse\n    go to [back v] layer\nend\nif <touching (mouse-pointer v)?> then\n    set size to ((size) + (((105) - (size)) / (3))) %\n    set [ghost v] effect to (3)\n    set [shop v] to [1]\nelse\n    set size to ((size) + (((99) - (size)) / (3))) %\n    set [ghost v] effect to (0)\n    set [shop v] to [0]\nend\n\nwhen flag clicked\nhide\nset [shop v] to [0]\n\nwhen I receive [tick v]\nif <<touching (mouse-pointer v)?> and <mouse down?>> then\n    broadcast (Show shop v)\n    set [shop2 v] to [1]\nend\ngo to x: (-190) y: (163)\nif <(menu show) = [1]> then\n    if <(shop2) = [1]> then\n        hide\n        go to x: (1000000) y: (100000000)\n    else\n        show\n    end\nelse\n    hide\nend\n\ndefine Layer (layer)\ngo to [front v] layer\ngo [backward v] ((layer) - (1)) layers\n\n@S_B_1\n\nwhen I receive [show shop v]\nwait until <not <mouse down?>>\nset drag mode [not draggable v]\ngo to x: (-160) y: (240)\nshow\nglide (0.7) secs to x: (-160) y: (-10)\n\nwhen flag clicked\nhide\ngo to x: (-160) y: (240)\n\nwhen I receive [setup v]\nswitch costume to (costume2 v)\nhide\n\nwhen I receive [hide shop v]\nglide (0.7) secs to x: (-160) y: (240)\nhide\nwait (0.1) seconds\n\nwhen I receive [tick v]\nLayer [3]\nif <touching (mouse-pointer v)?> then\n    set size to ((size) + (((125) - (size)) / (4))) %\n    set [ghost v] effect to (3)\nelse\n    set size to ((size) + (((99) - (size)) / (3))) %\n    set [ghost v] effect to (0)\nend\n\nwhen I receive [tick v]\nCostumes\nShop: Prize: [1] letter: [B]\n\ndefine Shop: Prize: (prize) letter: (letter)\nif <(shop2) = [1]> then\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        if <not < (CostumesUsed) contains (letter)?>> then\n            if <(POINTS) > ((prize) - (1))> then\n                set [costumesused v] to (join (CostumesUsed) (letter))\n                change [points v] by (join [-] (prize))\n            else\n                broadcast (not enough money v)\n            end\n        else\n            switch costume to (costume3 v)\n        end\n    end\nend\n\nwhen flag clicked\nbroadcast (Show shop v)\nbroadcast (hide shop v)\n\ndefine Costumes\nif < (CostumesUsed) contains [B]?> then\n    switch costume to (costume3 v)\nelse\n    switch costume to (costume2 v)\nend\n\ndefine Layer (layer)\ngo to [front v] layer\ngo [backward v] ((layer) - (1)) layers\n\n@Server messages\n\nwhen I receive [joined v]\nstart sound [Connect v]\nswitch costume to (connected v)\nwait (1) seconds\nhide\n\nwhen I receive [join game v]\nshow\nswitch costume to (connecting v)\nwait (3) seconds\nset [timer v] to [0]\nset [timer v] to [0]\n\nwhen flag clicked\nhide\nclear graphic effects\n\nwhen I receive [server full v]\nshow\nswitch costume to (server full v)\nwait (2) seconds\nhide\n\nwhen I receive [tick v]\nLayer [2]\nLayer [1]\n\ndefine Layer (layer)\ngo to [front v] layer\ngo [backward v] ((layer) - (1)) layers\n\n@S_B_2\n\nwhen I receive [show shop v]\nwait until <not <mouse down?>>\nset drag mode [not draggable v]\ngo to x: (-50) y: (240)\nshow\nglide (0.7) secs to x: (-50) y: (-10)\n\nwhen flag clicked\nhide\n\nwhen I receive [setup v]\nhide\n\nwhen I receive [hide shop v]\nglide (0.7) secs to x: (-50) y: (240)\nhide\nwait (0.1) seconds\n\nwhen I receive [tick v]\nLayer [3]\nif <touching (mouse-pointer v)?> then\n    set size to ((size) + (((125) - (size)) / (4))) %\n    set [ghost v] effect to (3)\nelse\n    set size to ((size) + (((99) - (size)) / (3))) %\n    set [ghost v] effect to (0)\nend\n\nwhen I receive [tick v]\nCostumes\nShop: Prize: [1] letter: [S]\n\ndefine Shop: Prize: (prize) letter: (letter)\nif <(shop2) = [1]> then\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        if <not < (CostumesUsed) contains (letter)?>> then\n            if <(POINTS) > ((prize) - (1))> then\n                set [costumesused v] to (join (CostumesUsed) (letter))\n                change [points v] by (join [-] (prize))\n            else\n                broadcast (not enough money v)\n            end\n        else\n            switch costume to (costume3 v)\n        end\n    end\nend\n\ndefine Costumes\nif < (CostumesUsed) contains [S]?> then\n    switch costume to (costume3 v)\nelse\n    switch costume to (costume2 v)\nend\n\ndefine Layer (layer)\ngo to [front v] layer\ngo [backward v] ((layer) - (1)) layers\n\n@S_B_3\n\nwhen I receive [show shop v]\nwait until <not <mouse down?>>\nset drag mode [not draggable v]\ngo to x: (50) y: (240)\nshow\nglide (0.7) secs to x: (50) y: (-10)\n\nwhen flag clicked\nhide\n\nwhen I receive [hide shop v]\nglide (0.7) secs to x: (50) y: (240)\nhide\nwait (0.1) seconds\n\nwhen I receive [setup v]\nhide\n\nwhen I receive [tick v]\nLayer [3]\nif <touching (mouse-pointer v)?> then\n    set size to ((size) + (((125) - (size)) / (4))) %\n    set [ghost v] effect to (3)\nelse\n    set size to ((size) + (((99) - (size)) / (3))) %\n    set [ghost v] effect to (0)\nend\n\nwhen I receive [tick v]\nCostumes\nShop: Prize: [2] letter: [H]\n\ndefine Shop: Prize: (prize) letter: (letter)\nif <(shop2) = [1]> then\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        if <not < (CostumesUsed) contains (letter)?>> then\n            if <(POINTS) > ((prize) - (1))> then\n                set [costumesused v] to (join (CostumesUsed) (letter))\n                change [points v] by (join [-] (prize))\n                broadcast (Life up v)\n            else\n                broadcast (not enough money v)\n            end\n        else\n            switch costume to (costume3 v)\n        end\n    end\nend\n\nwhen I receive [setup v]\nswitch costume to (costume2 v)\n\ndefine Costumes\nif < (CostumesUsed) contains [H]?> then\n    switch costume to (costume3 v)\nelse\n    switch costume to (costume2 v)\nend\n\ndefine Layer (layer)\ngo to [front v] layer\ngo [backward v] ((layer) - (1)) layers\n\n@S_B_4\n\nwhen I receive [show shop v]\nwait until <not <mouse down?>>\nset drag mode [not draggable v]\ngo to x: (160) y: (240)\nshow\nglide (0.7) secs to x: (160) y: (-10)\n\nwhen flag clicked\nhide\n\nwhen I receive [hide shop v]\nglide (0.7) secs to x: (160) y: (240)\nhide\nwait (0.1) seconds\n\nwhen I receive [setup v]\nhide\n\nwhen I receive [tick v]\nLayer [3]\nif <touching (mouse-pointer v)?> then\n    set size to ((size) + (((125) - (size)) / (4))) %\n    set [ghost v] effect to (3)\nelse\n    set size to ((size) + (((99) - (size)) / (3))) %\n    set [ghost v] effect to (0)\nend\n\nwhen I receive [tick v]\nCostumes\nShop: Prize: [3] letter: [R]\n\ndefine Shop: Prize: (prize) letter: (letter)\nif <(shop2) = [1]> then\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        if <not < (CostumesUsed) contains (letter)?>> then\n            if <(POINTS) > ((prize) - (1))> then\n                set [costumesused v] to (join (CostumesUsed) (letter))\n                change [points v] by (join [-] (prize))\n                broadcast (Reset life v)\n            else\n                broadcast (not enough money v)\n            end\n        else\n            switch costume to (costume3 v)\n        end\n    end\nend\n\nwhen I receive [setup v]\nswitch costume to (costume2 v)\n\ndefine Costumes\nif < (CostumesUsed) contains [R]?> then\n    switch costume to (costume3 v)\nelse\n    switch costume to (costume2 v)\nend\n\ndefine Layer (layer)\ngo to [front v] layer\ngo [backward v] ((layer) - (1)) layers\n\n@Water\n\nwhen I receive [start screen v]\nhide\n\nwhen I receive [tick v]\ngo to [back v] layer\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nswitch costume to (level 1 1 v)\nset [x v] to [0]\nset [y v] to [1000000]\nClone at x: [-250] y: [820]\nClone at x: [800] y: [600]\nClone at x: [1630] y: [850]\nClone at x: [800] y: [850]\nClone at x: [4700] y: [1180]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nset [y v] to (y)\n\nwhen flag clicked\ngo to x: (-500) y: (2000)\n\nchange [x v] by (-100)\n\nset [y v] to [800]\n\n@Sand\n\nwhen I receive [start screen v]\nhide\n\nwhen I receive [tick v]\ngo to [back v] layer\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nset rotation style [left-right v]\nset [ghost v] effect to (0)\nhide\nswitch costume to (level 1 1 v)\nset [x v] to [0]\nset [y v] to [1000000]\nClone at x: [-250] y: [820]\nClone at x: [900] y: [820]\nClone at x: [1400] y: [1050]\nClone at x: [900] y: [900]\nClone at x: [4700] y: [1400]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nset [y v] to ((y) - (150))\n\nchange [x v] by (100)\n\n@Exit\n\nwhen I receive [start screen v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <touching (player v)?> then\n    set [win v] to [1]\n    broadcast (Win v) and wait\nend\n\nwhen I receive [setup v]\nset [win v] to [0]\nhide\nswitch costume to (exit v)\nset [x v] to [8490]\nset [y v] to [1510]\ngo to [back v] layer\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    if <(win) = [0]> then\n        show\n    else\n        hide\n    end\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nset [x v] to (x)\nset [y v] to (y)\n\n@Bsckground2\n\nwhen I receive [start screen v]\nhide\n\nwhen I receive [tick v]\nposition (((x) - (SCROLL X)) / (8)) (((y) - (SCROLL Y)) / (8))\n\nwhen I receive [setup v]\nhide\nset [x v] to [-300]\nset [y v] to [1200]\nset rotation style [left-right v]\nswitch costume to (bakcground v)\nClone at x: [3000] y: [1200]\nClone at x: [3000] y: [1200]\nClone at x: [3000] y: [1200]\nClone at x: [3000] y: [1200]\n\ndefine position (x) (y)\ngo to [back v] layer\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    if <(player y) < [670]> then\n        hide\n    else\n        show\n    end\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nset [y v] to (y)\n\nset [y v] to [3189]\n\nwhen flag clicked\n\n@Menu\n\nwhen I receive [tick v]\nif <(Continue Playing) = [1]> then\n    Layer [5]\nelse\n    go to [back v] layer\nend\nforever\n    if <touching (mouse-pointer v)?> then\n        if <(shop2) = [0]> then\n            set [menu show v] to [1]\n            switch costume to (costume1 v)\n            go to x: (0) y: (330)\n            wait until <not <touching (mouse-pointer v)?>>\n        end\n    else\n        if <(shop2) = [0]> then\n            set [menu show v] to [0]\n            go to x: (0) y: (360)\n        end\n    end\nend\n\nwhen flag clicked\nset [menu show v] to [0]\n\nwhen I receive [show shop v]\nswitch costume to (costume2 v)\nwait until <not <mouse down?>>\nglide (0.7) secs to x: (0) y: (100)\nforever\n    if <(shop2) = [1]> then\n        if <<not <touching (mouse-pointer v)?>> and <mouse down?>> then\n            broadcast (hide shop v)\n            glide (0.7) secs to x: (0) y: (330)\n            set [shop2 v] to [0]\n            set [menu show v] to [0]\n        end\n    end\nend\n\nwhen I receive [setup v]\nset [shop2 v] to [0]\n\nwhen I receive [not enough money v]\nswitch costume to (costume3 v)\nwait (2) seconds\nswitch costume to (costume2 v)\n\ndefine Layer (layer)\ngo to [front v] layer\ngo [backward v] ((layer) - (1)) layers\n\n@Cloud\n\nwhen I receive [start screen v]\nhide\n\nwhen I receive [tick v]\nLayer [80]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nset [ghost v] effect to (20)\nset size to (100) %\nhide\nset [x v] to [-335]\nset [y v] to [1000]\nswitch costume to (level 1 1 v)\nClone at x: [500] y: [1000]\nClone at x: [500] y: [860]\nClone at x: [500] y: [860]\nClone at x: [350] y: [1100]\nClone at x: [550] y: [1100]\nClone at x: [800] y: [860]\nClone at x: [300] y: [1300]\nClone at x: [200] y: [1550]\nClone at x: [-300] y: [1550]\nClone at x: [-300] y: [1650]\nClone at x: [150] y: [1950]\nClone at x: [330] y: [2050]\nClone at x: [250] y: [2310]\nClone at x: [300] y: [2310]\nClone at x: [-150] y: [1650]\nClone at x: [200] y: [1890]\nClone at x: [350] y: [2000]\nClone at x: [-100] y: [2260]\nClone at x: [-100] y: [2580]\nClone at x: [300] y: [2700]\n\nClone at x: [425] y: [2200]\nClone at x: [325] y: [2150]\nClone at x: [325] y: [2100]\nClone at x: [400] y: [2100]\nhide\n\ndefine position (x) (y)\nset size to (100) %\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nset [y v] to (y)\nnext costume\n\nset [y v] to [2170]\n\ndefine Layer (layer)\ngo to [front v] layer\ngo [backward v] ((layer) - (1)) layers\n\n@Sprite1\n\nwhen I receive [tick v]\nhide\nswitch costume to (letter (1) of (POINTS))\nif <(menu show) = [1]> then\n    if <(shop2) = [0]> then\n        if <(Timer2) > [4]> then\n            if <(Continue Playing) = [1]> then\n                show\n                Layer [6]\n            else\n                go to [back v] layer\n            end\n        else\n            hide\n        end\n    else\n        hide\n    end\nelse\n    hide\nend\n\ndefine Layer (layer)\ngo to [front v] layer\ngo [backward v] ((layer) - (1)) layers\n\n@Love and Fave\n\nwhen flag clicked\nhide\ngo to x: (142) y: (-200)\nwait (15) seconds\nforever\n    if <(win) = [0]> then\n        show\n        glide (1) secs to x: (142) y: (-160)\n        wait (2) seconds\n        glide (1) secs to x: (142) y: (-200)\n        hide\n        wait (30) seconds\n    end\nend\n\nwhen I receive [tick v]\ngo to [front v] layer\n\n@Enemies\n\nwhen I receive [start screen v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nset size to (80) %\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    if <(kill enemy) = [0]> then\n        show\n    end\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nset [y v] to (y)\nnext costume\n\nwhen I receive [move enermie v]\nforever\n    switch costume to (r v)\n    repeat (60)\n        change [x v] by (4)\n    end\n    switch costume to (c v)\n    wait (0.1) seconds\n    switch costume to (l v)\n    repeat (60)\n        change [x v] by (-4)\n    end\n    switch costume to (c v)\n    wait (0.1) seconds\nend\n\nwhen flag clicked\nset [ghost v] effect to (0)\nhide\nswitch costume to (c v)\nset [kill enemy v] to [0]\nset [x v] to [600]\nset [y v] to [940]\nbroadcast (move enermie v)\n\nwhen I receive [tick v]\nif <touching (player v)?> then\n    if <(player y) > [965]> then\n        if <(kill enemy) = [0]> then\n            if <(enemy touch) = [0]> then\n                set [kill enemy v] to [1]\n                broadcast (kill enemy v)\n            end\n        end\n    end\nend\n\nwhen I receive [kill enemy v]\nset [money x v] to (x)\nset [money y v] to (y)\nrepeat (3)\n    change [y v] by (-7)\nend\nchange [points v] by (1)\nbroadcast (Earn Money v)\nhide\n\nchange [life2 v] by (1)\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        set [enemy touch v] to [1]\n    else\n        set [enemy touch v] to [0]\n    end\nend\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        set [enemy touch v] to [1]\n    else\n        set [enemy touch v] to [0]\n    end\nend\n\n@Sprite2\n\nwhen I receive [earn money v]\nset [ghost v] effect to (0)\nshow\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [tick v]\ngo to [front v] layer\ngo to x: ((Money x) - (SCROLL X)) y: ((Money y) - (SCROLL Y))\n\n@Sprite3\n\nwhen I receive [tick v]\ngo to [front v] layer\n\nwhen flag clicked\ngo to x: (500) y: (-500)\nwait (1) seconds\nforever\n    point in direction (135)\n    if <(EXIT) = [die]> then\n        go to x: (500) y: (-500)\n        glide (2) secs to x: (-1500) y: (1500)\n    end\nend\n\n@BackgroundText\n\nwhen I receive [start screen v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nLayer [25]\nswitch costume to (point v)\nset size to (100) %\nset [ghost v] effect to (0)\nhide\nset [x v] to [3020]\nset [y v] to [1130]\nswitch costume to (level 1 1 v)\n\nClone at x: [425] y: [2200]\nClone at x: [325] y: [2150]\nClone at x: [325] y: [2100]\nClone at x: [400] y: [2100]\nhide\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nset [x v] to (x)\nset [y v] to (y)\nnext costume\n\nset [y v] to [860]\n\nset [y v] to [2250]\n\nchange [x v] by (-100)\n\ndefine Layer (layer)\ngo to [front v] layer\ngo [backward v] ((layer) - (1)) layers\n\nset size to (100) %\n\n@Ladder\n\nwhen I receive [start screen v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [3220]\nset [y v] to [1370]\nswitch costume to (ladder v)\nClone at x: [2760] y: [1725]\nClone at x: [3333] y: [2125]\nClone at x: [3700] y: [1715]\nClone at x: [4250] y: [2080]\nClone at x: [3830] y: [2380]\nClone at x: [5565] y: [630]\nClone at x: [5370] y: [850]\nClone at x: [4850] y: [1215]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nset [x v] to (x)\nset [y v] to (y)\n\n@Checkpoint\n\nwhen I receive [start screen v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <touching (player v)?> then\n    set [checkx v] to (player x)\n    set [checky v] to (player y)\n    switch costume to (checkpoint2 v)\nend\n\nwhen I receive [setup v]\ngo to [back v] layer\nhide\nswitch costume to (checkpoint v)\nset [x v] to [2850]\nset [y v] to [1140]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nset [x v] to (x)\nset [y v] to (y)\n\nwhen flag clicked\nset [checkx v] to [0]\nset [checky v] to [1100]\n\n@Background2\n\nwhen I receive [start screen v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nswitch costume to (point v)\nset size to (100) %\nset [ghost v] effect to (0)\nhide\nset [x v] to [-335]\nset [y v] to [1000]\nswitch costume to (level 1 1 v)\nClone at x: [500] y: [1000]\nClone at x: [500] y: [860]\nClone at x: [500] y: [860]\nClone at x: [350] y: [1100]\nClone at x: [550] y: [1100]\nClone at x: [800] y: [860]\nClone at x: [300] y: [1300]\nset [ghost v] effect to (100)\nClone at x: [200] y: [1550]\nClone at x: [-300] y: [1550]\nClone at x: [-300] y: [1650]\nClone at x: [150] y: [1950]\nClone at x: [330] y: [2050]\nClone at x: [250] y: [2310]\nClone at x: [300] y: [2310]\nClone at x: [-150] y: [1650]\nClone at x: [200] y: [1890]\nClone at x: [350] y: [2000]\nClone at x: [-100] y: [2260]\nClone at x: [-100] y: [2580]\nClone at x: [300] y: [2700]\nClone at x: [-700] y: [1000]\nset [ghost v] effect to (0)\nClone at x: [450] y: [1150]\nClone at x: [400] y: [900]\nClone at x: [-200] y: [530]\nClone at x: [400] y: [400]\nClone at x: [350] y: [350]\nClone at x: [500] y: [460]\nClone at x: [-300] y: [870]\nClone at x: [-300] y: [1000]\nClone at x: [350] y: [1275]\n\nClone at x: [425] y: [2200]\nClone at x: [325] y: [2150]\nClone at x: [325] y: [2100]\nClone at x: [400] y: [2100]\nhide\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nset [y v] to (y)\nnext costume\n\nset [y v] to [860]\n\nset [y v] to [900]\n\nchange [x v] by (-50)\n\nset size to (100) %\n\nwhen flag clicked\ngo to [back v] layer\n\n@Enemies2\n\nwhen I receive [start screen v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nset size to (80) %\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    if <(kill enemy 2) = [0]> then\n        show\n    end\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nset [y v] to (y)\nnext costume\n\nwhen I receive [move enermie v]\nforever\n    set [x v] to [6800]\n    set [y v] to [1439]\n    switch costume to (r v)\n    repeat (80)\n        change [x v] by (4)\n    end\n    switch costume to (c v)\n    wait (0.1) seconds\n    switch costume to (l v)\n    repeat (80)\n        change [x v] by (-4)\n    end\n    switch costume to (c v)\n    wait (0.1) seconds\nend\n\nwhen flag clicked\nset [ghost v] effect to (0)\nhide\nswitch costume to (l v)\nset [kill enemy 2 v] to [0]\n\nwhen I receive [tick v]\nif <touching (player v)?> then\n    if <(player y) > [1465]> then\n        if <(kill enemy 2) = [0]> then\n            if <(enemy touch 2) = [0]> then\n                broadcast (kill enemy 2 v)\n                set [kill enemy 2 v] to [1]\n            end\n        end\n    end\nend\n\nwhen I receive [kill enemy 2 v]\nset [money x v] to (x)\nset [money y v] to (y)\nrepeat (3)\n    change [y v] by (-7)\nend\nchange [points v] by (1)\nbroadcast (Earn Money v)\nhide\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        set [enemy touch 2 v] to [1]\n    else\n        set [enemy touch 2 v] to [0]\n    end\nend\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        set [enemy touch 2 v] to [1]\n    else\n        set [enemy touch 2 v] to [0]\n    end\nend\n\n@Yes\n\nwhen flag clicked\nswitch costume to (yes v)\nhide\n\nwhen I receive [win v]\nstart sound [Tada v]\nset size to (100) %\ngo to x: (90) y: (-160)\nswitch costume to (yes v)\nshow\n\nwhen I receive [tick v]\nLayer [1]\nif <touching (mouse-pointer v)?> then\n    set size to ((size) + (((125) - (size)) / (6))) %\n    set [ghost v] effect to (3)\nelse\n    set size to ((size) + (((99) - (size)) / (3))) %\n    set [ghost v] effect to (0)\nend\n\nwhen I receive [win v]\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        hide\n        broadcast (Continue v)\n        set [continue playing v] to [1]\n    end\nend\n\ndefine Layer (layer)\ngo to [front v] layer\ngo [backward v] ((layer) - (1)) layers\n\n@No\n\nwhen flag clicked\nswitch costume to (yes v)\nhide\n\nwhen I receive [win v]\nset size to (100) %\nstart sound [Tada v]\ngo to x: (150) y: (-160)\nswitch costume to (yes v)\nshow\n\nwhen I receive [tick v]\nLayer [1]\n\nwhen I receive [win v]\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        stop [all v]\n    end\nend\n\ndefine Layer (layer)\ngo to [front v] layer\ngo [backward v] ((layer) - (1)) layers\nif <touching (mouse-pointer v)?> then\n    set size to ((size) + (((125) - (size)) / (6))) %\n    set [ghost v] effect to (3)\nelse\n    set size to ((size) + (((99) - (size)) / (3))) %\n    set [ghost v] effect to (0)\nend\n\nwhen I receive [continue v]\nhide\n\n