☁ Two Worlds || A Multiplayer Platformer                    #games #all #art #scrolling

Instructions: ----------ᴛᴡᴏ ᴡᴏʀʟᴅꜱ || ᴀ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ ᴘʟᴀᴛꜰᴏʀᴍᴇʀ---------\nʜɪ ᴀɴᴅ ᴡᴇʟᴄᴏᴍᴇ ᴛᴏ ᴍʏ ʙɪɢɢᴇꜱᴛ ᴘʀᴏᴊᴇᴄᴛ ᴇᴠᴇʀ! ɪᴛ'ꜱ ᴄᴀʟʟᴇᴅ ᴛᴡᴏ ᴡᴏʀʟᴅꜱ ᴀɴᴅ ɪᴛ ᴛᴏᴏᴋ ᴍᴇ ᴀʙᴏᴜᴛ 1,5 ᴍᴏɴᴛʜꜱ ᴛᴏ ᴍᴀᴋᴇ (ɴᴏᴛ ɪɴᴄʟᴜᴅᴇᴅ ꜱᴄʀᴏʟʟɪɴɢ ᴇɴɢɪɴᴇ). ɪ ʜᴏᴘᴇ ʏᴏᴜ ᴡɪʟʟ ʟɪᴋᴇ ɪᴛ:)\nʜᴏᴡ ᴛᴏ ᴘʟᴀʏ:\nᴜꜱᴇ ᴡᴀꜱᴅ, ᴀʀʀᴏᴡꜱ ᴏʀ ᴛᴀᴘ ᴛᴏ ᴍᴏᴠᴇ. ᴛʀʏ ᴛᴏ ɢᴇᴛ ᴛᴏ ᴛʜᴇ ɢᴏᴀʟ ᴀɴᴅ ᴀᴠᴏɪᴅ ꜱᴘɪᴋᴇꜱ ᴀɴᴅ ʟᴀᴠᴀ. ʏᴏᴜ ʜᴀᴠᴇ ᴛʜʀᴇᴇ ʟɪᴠᴇꜱ ᴀɴᴅ ᴡʜᴇɴ ʏᴏᴜ ʟᴏꜱᴇ ᴀʟʟ ʟɪᴠᴇꜱ ʏᴏᴜ ᴅɪᴇ. ʏᴏᴜ ᴄᴀɴ ᴀʟꜱᴏ ʙᴜʏ ᴛʜɪɴɢꜱ ɪɴ ᴛʜᴇ ꜱʜᴏᴘ, ᴛᴀʟᴋ ᴛᴏ ᴏᴛʜᴇʀꜱ ᴀɴᴅ ꜰɪɴᴅ ᴇᴀꜱᴛᴇʀ ᴇɢɢꜱ. ʙᴜᴛ ʀᴇᴍᴇᴍʙᴇʀ: ɴᴇᴡ ꜱᴄʀᴀᴛᴄʜᴇʀꜱ ᴄᴀɴ'ᴛ ᴘʟᴀʏ ᴏɴʟɪɴᴇ!\n\nTags:\n#games #scrolling #multiplayer #cloud #☁ #art

@Stage\n\nwhen [m v] key pressed\nif <(username) = [Ufhire2]> then\n    show variable [mouse v]\n    set [mouse v] to (join ((mouse x) + (SCROLL X)) (join [, ] ((mouse y) + (SCROLL Y))))\nend\n\nwhen flag clicked\nhide variable [mouse v]\n\n@Blank\n\n@Player\n\ndefine Test - Die\nif <<<touching (lava v)?> or <touching (enemies v)?>> or <touching (saws v)?>> then\n    if <(Life) = [0]> then\n        set [exit v] to [die]\n    end\nend\n\ndefine Game - Die\nhide\nwait (0.5) seconds\nset [exit v] to []\n\nwhen flag clicked\nbroadcast (Start Screen v)\n\nwhen I receive [green flag v]\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 [45]\nset [y v] to [1100]\nset [scroll x v] to [0]\nset [scroll y v] to [1055]\nset [sy v] to [0]\nset [sx v] to [0]\nset [in air v] to [0]\nset [costumeandboost v] to [O]\nset [costumesused v] to []\nset [exit v] to []\nset [life v] to [3]\npoint in direction (90)\nset size to (135) %\nswitch costume to (o_c v)\nshow\nset [ghost v] effect to (0)\n\ndefine Tick\ngo to x: (0) y: (0)\nset size to (135) %\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 <(x) > [-270]> then\n        if <(shop2) = [0]> then\n            if <not <<(shop) = [1]> and <mouse down?>>> then\n                set [left or right v] to [Left]\n                change [sx v] by (-1.7)\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 <(x) < [6440]> then\n        if <(shop2) = [0]> then\n            if <not <<(shop) = [1]> and <mouse down?>>> then\n                set [left or right v] to [Right]\n                change [sx v] by (1.7)\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 <(shop2) = [0]> then\n        if <not <<(shop) = [1]> and <mouse down?>>> then\n            if < (CostumesUsed) contains [B]?> then\n                if <(in air) < [4]> then\n                    set [sy v] to [21]\n                end\n            else\n                if <(in air) < [4]> then\n                    set [sy v] to [18]\n                end\n            end\n        end\n    end\nend\nif <not <<<<<key (up arrow v) pressed?> or <<key (space v) pressed?> or <key (w v) pressed?>>> or <<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]\nend\nif <(sy) > [-15]> then\n    change [sy v] by (-2)\nend\nchange player y by (sy)\nTest - Die\nif <<(x) > [-125]> and <(x) < [6260]>> then\n    change [scroll x v] by (round (((x) - (SCROLL X)) / (10)))\nend\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (10)))\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nPosition\nif <(y) < [-180]> then\n    set [exit v] to [die]\nend\n\ndefine change player y by (sy)\nif <not <<touching (water v)?> or <touching (ladder v)?>>> then\n    change [y v] by (sy)\n    change [in air v] by (1)\nelse\n    if <touching (water v)?> then\n        if <not <<<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<(y position) > (mouse y)> and <mouse down?>>> or <<<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) / (4))\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) / (3))\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    else\n        if <touching (ladder v)?> 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\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 [-12]\n        else\n            set [sx v] to [12]\n        end\n        set [in air v] to [0]\n        broadcast (Walljump v)\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)\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 (round (((Volume) / (10)) * (8))) %\nwait (0.3) seconds\nforever\n    play sound (Song) until done\nend\n\nwhen flag clicked\nswitch costume to (o_c v)\nset [costumeandboost v] to [O]\nset [costumesused v] to []\nLook (letter (1) of (CostumeAndBoost)) (Left or Right)\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 (#c9944e)?> 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 [tick v]\nLook (letter (1) of (CostumeAndBoost)) (Left or Right)\nif <<<touching (lava v)?> or <touching (enemies v)?>> or <touching (saws v)?>> then\n    set [lava touch v] to [1]\nelse\n    set [lava touch v] to [0]\nend\n\ndefine Look (letter?) (side?)\nswitch costume to (join (letter?) (join [_] (letter (1) of (side?))))\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 (color 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 [setup v]\nset [color v] effect to (0)\nset [color effect v] to [0]\n\nwhen I receive [tick v]\nif <(letter (1) of (costume [name v])) = [A]> then\n    if <key (c v) pressed?> then\n        broadcast (color v)\n    end\nelse\n    set [color v] effect to (0)\n    set [color effect v] to [0]\nend\n\nwhen I receive [color v]\nwait until <not <key (c v) pressed?>>\nchange [color v] effect by (25)\nchange [color effect v] by (25)\n\nwhen I receive [green flag v]\nforever\n    think (item (Message) of [chat v])\nend\n\nwhen I receive [tick v]\nif <key (u v) pressed?> then\n    set [costumeandboost v] to (join [U] (join (letter (2) of (CostumeAndBoost)) (letter (3) of (CostumeAndBoost))))\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\nset [show names v] to [0]\nset [show players v] to [0]\n\nwhen flag clicked\nif <(username) = [Awesomebricks1]> then\n    change [☁ play v] by (1)\nend\n\nwhen I receive [show players v]\nwait until <not <key (p v) pressed?>>\nif <(show players) = [0]> then\n    set [show players v] to [1]\nelse\n    if <(show players) = [1]> then\n        set [show players v] to [0]\n    end\nend\n\nwhen I receive [joined v]\nforever\n    if <key (p v) pressed?> then\n        broadcast (Show players v) and wait\n    end\nend\n\n@cloud player\n\ndefine tick\nif <(Turbo mode) = [0]> then\n    set size to (135) %\n    value = cloud # (Player #)\n    if <(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\n    else\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]\n    end\n    begin decode of (value)\n    value = read from encoded\n    if <(show names) = [1]> then\n        think (value)\n    else\n        if <(show names) = [0]> then\n            think []\n        end\n    end\n    value = read from encoded\n    if <not <(value) = []>> then\n        think (item (value) of [chat v])\n    end\n    value = read from encoded\n    value = read from encoded\n    set x to ((value) - (SCROLL X))\n    value = read from encoded\n    set y to ((value) - (SCROLL Y))\n    value = read from encoded\n    switch costume to (value)\n    value = read from encoded\n    set [color v] effect to (value)\nend\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]\nhide variable [active players v]\nforever\n    set [active players v] to ((Players) + (1))\nend\n\nwhen I receive [tick v]\nif <(show players) = [1]> then\n    show variable [active players v]\nelse\n    hide variable [active players v]\nend\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]\nset [ghost v] effect to (0)\ngo to [front v] layer\nset size to (100) %\nhide\nset [x v] to [-335]\nset [y v] to [1200]\nswitch costume to (level 1 1 v)\nClone at x: [335] y: [1000]\nClone at x: [400] y: [700]\nClone at x: [200] y: [700]\nClone at x: [0] y: [1000]\nClone at x: [500] y: [1150]\nClone at x: [450] y: [650]\nClone at x: [0] y: [1030]\nClone at x: [-400] y: [1500]\nClone at x: [-250] y: [1750]\nClone at x: [-350] y: [1950]\nset [ghost v] effect to (100)\nClone at x: [-350] y: [2150]\nClone at x: [-350] y: [2250]\nClone at x: [-150] y: [2450]\nClone at x: [400] y: [2550]\nClone at x: [650] y: [2250]\nClone at x: [450] y: [2150]\nClone at x: [450] y: [2100]\nClone at x: [400] y: [2222]\nClone at x: [400] y: [2320]\nClone at x: [200] y: [1220]\nset [ghost v] effect to (0)\nClone at x: [0] y: [920]\nClone at x: [575] y: [920]\nClone at x: [150] y: [1090]\nClone at x: [417] y: [1090]\nClone at x: [200] y: [1300]\nClone at x: [-300] y: [850]\nClone at x: [130] y: [500]\nClone at x: [450] y: [245]\nClone at x: [300] y: [50]\nClone at x: [700] y: [200]\nClone at x: [550] y: [200]\nClone at x: [550] y: [450]\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 [200]\n\nchange [x v] by (50)\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) %\ngo to [front v] layer\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\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    change [coins together v] by (1)\n    change [points v] by (1)\n    broadcast (Show coin v)\n    delete this clone\nend\n\nwhen I receive [setup v]\nset volume to (Volume) %\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: [-255] y: [1325]\nClone at x: [1215] y: [625]\nClone at x: [1770] y: [660]\nClone at x: [-252] y: [2885]\nClone at x: [2640] y: [1320]\nClone at x: [180] y: [2680]\nset [x v] to [-99999999]\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)\nset [x v] to (x)\nset [y v] to (y)\nchange [collected max v] by (1)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nforever\n    broadcast (Flip v)\n    wait (0.1) seconds\nend\n\nwhen I start as a clone\nforever\n    repeat (10)\n        change [y v] by (1)\n    end\n    repeat (10)\n        change [y v] by (-1)\n    end\nend\n\n@Lava\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 [0]\nset [y v] to [1000]\nswitch costume to (level 1 1 v)\nClone at x: [400] y: [700]\nClone at x: [200] y: [1000]\nClone at x: [0] y: [1000]\nClone at x: [500] y: [950]\nClone at x: [0] y: [1150]\nClone at x: [450] y: [650]\nClone at x: [0] y: [1030]\nClone at x: [-400] y: [1500]\nClone at x: [-250] y: [1750]\nClone at x: [-350] y: [1950]\nClone at x: [-350] y: [2150]\nClone at x: [-250] y: [2400]\nClone at x: [-200] y: [2650]\nClone at x: [1000] y: [2250]\nClone at x: [450] y: [2150]\nClone at x: [450] y: [2100]\nClone at x: [400] y: [2222]\nClone at x: [400] y: [2320]\nClone at x: [200] y: [1220]\nClone at x: [0] y: [920]\nClone at x: [575] y: [920]\nClone at x: [150] y: [1090]\nClone at x: [417] y: [1260]\nClone at x: [200] y: [1300]\nClone at x: [-300] y: [850]\nClone at x: [130] y: [500]\nClone at x: [130] y: [500]\nClone at x: [450] y: [245]\nClone at x: [300] y: [50]\nClone at x: [700] y: [200]\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\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]\nset [ghost v] effect to (0)\nhide\nswitch costume to (l v)\nset [kill enemy v] to [0]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nset size to (135) %\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 [tick v]\nswitch costume to (lr)\n\nwhen I receive [move enermie v]\nforever\n    set [x v] to [950]\n    set [y v] to [1207]\n    repeat (90)\n        set [lr v] to [r]\n        change [x v] by (4)\n    end\n    wait (0.1) seconds\n    repeat (90)\n        set [lr v] to [l]\n        change [x v] by (-4)\n    end\n    wait (0.1) seconds\nend\n\nwhen flag clicked\nbroadcast (move enermie v)\n\nwhen I receive [tick v]\nif <touching (player v)?> then\n    if <(player y) > [1220]> then\n        if <(kill enemy) = [0]> then\n            if <(enemy touch) = [0]> then\n                broadcast (kill enemy v)\n                set [kill enemy v] to [1]\n            end\n        end\n    end\nend\n\nwhen I receive [kill enemy v]\nchange [life v] by (1)\nrepeat (3)\n    change [y v] by (-7)\nend\nhide\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@Backround\n\nwhen I receive [setup v]\nshow\nswitch costume to (Background)\ngo to [back v] layer\ngo [forward v] (1) layers\n\nwhen flag clicked\n\nwhen I receive [tick v]\nif <<(player x) > [3540]> and <(player y) < [1250]>> then\n    switch costume to (costume1 v)\nelse\n    switch costume to (Background)\nend\n\n@Bounce\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 [0]\nset [y v] to [0]\nswitch costume to (normal v)\nClone at x: [595] y: [1020]\nClone at x: [530] y: [1990]\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)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nforever\n    if <(y) < [1500]> then\n        if <(bounce) = [1]> then\n            switch costume to (bounce v)\n        else\n            switch costume to (normal v)\n        end\n    else\n        if <(bounce) = [1]> then\n            switch costume to (normal2 v)\n        else\n            switch costume to (bounce2 v)\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(y) < [1500]> then\n        if <(bounce) = [1]> then\n            switch costume to (bounce v)\n        else\n            switch costume to (normal v)\n        end\n    else\n        if <(bounce) = [1]> then\n            switch costume to (normal2 v)\n        else\n            switch costume to (bounce2 v)\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(bounce) = [1]> then\n        set volume to (Volume) %\n        play sound [Boing v] until done\n        wait until <(bounce) = [0]>\n    else\n    end\nend\n\n@Time\n\nwhen I receive [tick v]\ngo to x: (0) y: (0)\n\nwhen I receive [win v]\nset [your time v] to (Timer)\n\nwhen I receive [start screen v]\nhide\nset [win v] to [0]\nset [your time v] to [0]\nhide variable [your time v]\nhide variable [p11 v]\n\nwhen flag clicked\nset [high score? v] to [0]\nswitch costume to (costume1 v)\n\n@Thumbnail\n\nwhen [timer v] > (Timer2)\nswitch costume to (costume3 v)\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\n\nwhen I receive [join game v]\nhide\n\nwhen flag clicked\nhide\nset [continue v] to [0]\n\nwhen I receive [win v]\nset [continue v] to [0]\nstart sound [Tada v]\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\ngo to [front v] layer\nshow\nforever\n    if <key (space v) pressed?> then\n        hide\n        broadcast (Continue v)\n        set [continue v] to [1]\n    end\nend\n\nwhen I receive [tick v]\ngo to [front v] layer\ngo [forward v] (10) layers\nif <(Stop all after win) > [300]> then\n    stop [all v]\nend\n\nwhen I receive [win v]\nset [stop all after win v] to [0]\nforever\n    if <(Continue) = [0]> then\n        repeat until <(Continue) = [1]>\n            change [stop all after win v] by (1)\n        end\n    end\nend\n\nwhen I receive [setup v]\nset [continue v] to [0]\nset [stop all after win v] to [0]\n\nwhen I receive [continue v]\nset [stop all after win v] to [0]\n\n@Button\n\nwhen flag clicked\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to ((size) + (((125) - (size)) / (3))) %\n        set [ghost v] effect to (0)\n    else\n        set size to ((size) + (((99) - (size)) / (2))) %\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen flag clicked\nforever\n    go to x: (((mouse x) / (35)) - (70)) y: ((mouse y) / (35))\nend\n\nwhen I receive [start screen v]\nforever\n    if <<(show instructions) = [0]> and <(show settings) = [0]>> then\n        show\n        go to [front v] layer\n        go [forward v] (3) layers\n    else\n        hide\n        go to x: (-1000) y: (5)\n    end\nend\n\nwhen I receive [start screen v]\nset [start timer v] to [0]\nforever\n    if <(start timer) = [0]> then\n        if <(show instructions) = [0]> then\n            if <<<touching (mouse-pointer v)?> and <mouse down?>> or <key (space v) pressed?>> then\n                set [start timer v] to [1]\n                set [timer v] to [0]\n                broadcast (Start v)\n                hide\n                go to x: (-1000000) y: (-1000000)\n            end\n        end\n    else\n        hide\n    end\nend\n\n@Instruction button\n\nwhen I receive [start screen v]\nset size to (100) %\nshow\ngo to x: (0) y: (-100)\nforever\n    if <(start timer) = [0]> then\n        if <(show settings) = [0]> then\n            show\n        else\n            hide\n        end\n        if <touching (mouse-pointer v)?> then\n            set size to ((size) + (((125) - (size)) / (3))) %\n            set [ghost v] effect to (0)\n        else\n            set size to ((size) + (((99) - (size)) / (2))) %\n            set [ghost v] effect to (0)\n        end\n    end\nend\n\nwhen I receive [start screen v]\nforever\n    if <(show settings) = [0]> then\n        go to [front v] layer\n        go [forward v] (2) layers\n    end\nend\n\nwhen I receive [instructions v]\nforever\n    if <(start timer) = [0]> then\n        if <(show instructions) = [1]> then\n            hide\n        else\n            if <(show settings) = [0]> then\n                show\n            else\n                hide\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(start timer) = [1]> then\n        hide\n    end\nend\n\nwhen I receive [start screen v]\nforever\n    if <(start timer) = [0]> then\n        if <(show settings) = [0]> then\n            go to x: (((mouse x) / (35)) + (70)) y: ((mouse y) / (35))\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                hide\n                broadcast (Instructions v)\n            end\n        end\n    end\nend\n\n@Setting button\n\nwhen I receive [start screen v]\nset size to (100) %\nshow\ngo to x: (0) y: (-100)\nforever\n    if <(start timer) = [0]> then\n        if <(show instructions) = [0]> then\n            show\n        else\n            hide\n        end\n        if <touching (mouse-pointer v)?> then\n            set size to ((size) + (((125) - (size)) / (3))) %\n            set [ghost v] effect to (0)\n        else\n            set size to ((size) + (((99) - (size)) / (2))) %\n            set [ghost v] effect to (0)\n        end\n    end\nend\n\nwhen I receive [start screen v]\nforever\n    if <(show instructions) = [0]> then\n        go to [front v] layer\n        go [forward v] (2) layers\n    end\nend\n\nwhen I receive [settings v]\nforever\n    if <(start timer) = [0]> then\n        if <(show settings) = [1]> then\n            hide\n        else\n            show\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(start timer) = [1]> then\n        hide\n    end\nend\n\nwhen I receive [start screen v]\nforever\n    if <(start timer) = [0]> then\n        if <(show instructions) = [0]> then\n            go to x: ((mouse x) / (35)) y: (((mouse y) / (35)) - (100))\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                if <(show settings) = [0]> then\n                    hide\n                    broadcast (Settings v)\n                end\n            end\n        end\n    end\nend\n\n@Instructions\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen flag clicked\nset [show instructions v] to [0]\nforever\n    if <(start timer) = [0]> then\n        if <(show instructions) = [0]> then\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(show instructions) = [1]> then\n        if <<mouse down?> and <not <touching (mouse-pointer v)?>>> then\n            set [ghost v] effect to (0)\n            wait until <not <mouse down?>>\n            broadcast (Hide instructions v)\n        end\n    end\nend\n\nwhen I receive [instructions v]\ngo to [front v] layer\nshow\nset [ghost v] effect to (0)\nset [show instructions v] to [1]\n\nwhen I receive [hide instructions v]\nset [show instructions v] to [0]\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\n@Settigns\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen flag clicked\nset [show settings v] to [0]\nforever\n    if <(start timer) = [0]> then\n        if <(show settings) = [0]> then\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(show settings) = [1]> then\n        if <<mouse down?> and <not <touching (mouse-pointer v)?>>> then\n            set [ghost v] effect to (0)\n            wait until <not <mouse down?>>\n            broadcast (Hide settings v)\n        end\n    end\nend\n\nwhen I receive [settings v]\nshow\nset [ghost v] effect to (0)\ngo to [front v] layer\nset [show settings v] to [1]\n\nbroadcast (Settings2 v)\n\nwhen I receive [hide settings v]\nset [show settings v] to [0]\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\n@Song\n\nwhen flag clicked\ngo to x: (3) y: (0)\nhide\n\nwhen flag clicked\nswitch costume to (nebula v)\nset [show settings v] to [0]\nforever\n    if <(start timer) = [0]> then\n        if <(show settings) = [0]> then\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    set [song v] to (costume [name v])\n    if <(show settings) = [1]> then\n        if <<mouse down?> and <touching (mouse-pointer v)?>> then\n            wait until <not <mouse down?>>\n            next costume\n        end\n    end\nend\n\nwhen I receive [settings v]\nset [show settings v] to [1]\nshow\ngo to [front v] layer\nset [ghost v] effect to (0)\nrepeat until <(show settings) = [0]>\n    go to [front v] layer\nend\n\nwhen I receive [hide settings v]\nset [show settings v] to [0]\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\n@Volume\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen flag clicked\nswitch costume to (100 v)\nset [show settings v] to [0]\nforever\n    if <(start timer) = [0]> then\n        if <(show settings) = [0]> then\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    set [volume v] to (costume [name v])\n    if <(show settings) = [1]> then\n        if <<mouse down?> and <touching (mouse-pointer v)?>> then\n            wait until <not <mouse down?>>\n            next costume\n        end\n    end\nend\n\nwhen I receive [hide settings v]\nset [show settings v] to [0]\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen I receive [settings v]\nset [show settings v] to [1]\nshow\ngo to [front v] layer\nset [ghost v] effect to (0)\nrepeat until <(show settings) = [0]>\n    go to [front v] layer\nend\n\n@Background Choose\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen flag clicked\nswitch costume to (day v)\nset [show settings v] to [0]\nforever\n    if <(start timer) = [0]> then\n        if <(show settings) = [0]> then\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    set [background v] to (costume [name v])\n    if <(show settings) = [1]> then\n        if <<mouse down?> and <touching (mouse-pointer v)?>> then\n            wait until <not <mouse down?>>\n            next costume\n        end\n    end\nend\n\nwhen I receive [hide settings v]\nset [show settings v] to [0]\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen I receive [settings v]\nset [show settings v] to [1]\nshow\ngo to [front v] layer\nset [ghost v] effect to (0)\nrepeat until <(show settings) = [0]>\n    go to [front v] layer\nend\n\n@Art\n\nwhen flag clicked\nClone\n\nwhen I start as a clone\nset [move speed v] to [3]\nforever\n    if <(costume [number v]) = [1]> then\n        go to x: ((mouse x) / ((17) * (Move speed))) y: ((mouse y) / ((17) * (Move speed)))\n    else\n        if <(costume [number v]) = [2]> then\n            go to x: ((mouse x) / ((10) * (Move speed))) y: ((mouse y) / ((10) * (Move speed)))\n        else\n            if <(costume [number v]) = [3]> then\n                go to x: ((mouse x) / ((11) * (Move speed))) y: ((mouse y) / ((11) * (Move speed)))\n            else\n                if <(costume [number v]) = [4]> then\n                    go to x: ((mouse x) / ((13) * (Move speed))) y: ((mouse y) / ((13) * (Move speed)))\n                else\n                    if <(costume [number v]) = [5]> then\n                        go to x: ((mouse x) / ((12) * (Move speed))) y: ((mouse y) / ((12) * (Move speed)))\n                    else\n                        if <(costume [number v]) = [6]> then\n                            go to x: ((mouse x) / ((9) * (Move speed))) y: ((mouse y) / ((9) * (Move speed)))\n                        else\n                            if <(costume [number v]) = [7]> then\n                                go to x: ((mouse x) / ((8) * (Move speed))) y: ((mouse y) / ((8) * (Move speed)))\n                            else\n                                if <(costume [number v]) = [8]> then\n                                    go to x: ((mouse x) / ((11) * (Move speed))) y: ((mouse y) / ((11) * (Move speed)))\n                                else\n                                    if <(costume [number v]) = [9]> then\n                                        go to x: ((mouse x) / ((9) * (Move speed))) y: ((mouse y) / ((9) * (Move speed)))\n                                        go to [front v] layer\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Clone\nshow\nswitch costume to (costume3 v)\nswitch costume to (background v)\nrepeat (8)\n    create clone of (_myself_ v)\n    next costume\nend\n\nwhen flag clicked\nforever\n    go to x: ((mouse x) / (27)) y: ((mouse y) / (27))\nend\n\nwhen flag clicked\ndelete this clone\n\nwhen I receive [join game v]\nhide\n\n@Server messages\n\nwhen I receive [joined v]\nbroadcast (Green Flag v)\nbroadcast (Play Game v)\nstart sound [Connect v]\n\nwhen I receive [join game v]\nshow\ngo to [front v] layer\nswitch costume to (costume2 v)\nwait (0.5) seconds\nswitch costume to (costume3 v)\nwait (0.5) seconds\nswitch costume to (costume4 v)\nwait (0.5) seconds\nswitch costume to (costume2 v)\nwait (0.5) seconds\nbroadcast (Hide v)\nswitch costume to (costume3 v)\nwait (0.5) seconds\nswitch costume to (costume4 v)\nset [timer v] to [0]\nwait (0.6) seconds\nset [timer v] to [0]\nhide\n\nwhen flag clicked\nhide\nclear graphic effects\n\nwhen I receive [server full v]\nshow\ngo to [front v] layer\nswitch costume to (costume1 v)\n\n@Text\n\nwhen I receive [text v]\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 (0)\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]\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\n@Sans Serif Engine\n\nwhen I start as a clone\nshow\nforever\n    set x to ((x) + (offset x))\n    set y to ((y) + (offset y))\n    set size to ((offset size) + (Sans Serif Engine: size)) %\nend\n\ndefine type (text) at size (size) at x (x) y (y) bright (bright)\nset [sans serif engine: size v] to (size)\ngo to [front v] layer\nclear graphic effects\nswitch costume to (a v)\nset size to (size) %\nset [brightness v] effect to (bright)\ngo to x: (x) y: (y)\nset [count v] to [0]\nhide\nrepeat (length of (text))\n    if <(x position) > ((240) - ((size) * (0.2)))> then\n        set x to (x)\n        change y by ((Sans Serif Engine: size) * (-0.3))\n    end\n    change [count v] by (1)\n    if <<(letter (count) of (text)) = [ ]> and <not <(x) = (x position)>>> then\n        change x by ((size) * (0.14))\n    else\n        switch costume to (cs v)\n        switch costume to (letter (count) of (text))\n        if <(costume [number v]) = [90]> then\n            switch costume to (join (letter (count) of (text)) [2])\n        end\n        set [x v] to (x position)\n        set [y v] to (y position)\n        create clone of (_myself_ v)\n        change x by ((((item (costume [number v]) of [width v]) * (size)) / (100)) + ((size) * (0.1)))\n    end\nend\nhide\n\nwhen I start as a clone\nwait (0.001) seconds\ndelete this clone\n\nwhen I receive [green flag v]\nforever\n    type (join [@ ] (POINTS)) at size (150) at x (174) y (155) bright (0)\nend\n\n@Life\n\nwhen I receive [tick v]\nif <(Life) > [1]> then\n    set x to (join [-] (round ((Life) * (11.666666666666))))\nelse\n    set x to (0)\nend\nClone (Life) times\n\nwhen I start as a clone\nwait (0.01) seconds\ndelete this clone\n\ndefine Clone (#) times\nshow\ngo to [front v] layer\ngo [backward v] (2) layers\nrepeat ((#) - (1))\n    create clone of (_myself_ v)\n    set y to (155)\n    change x by (35)\nend\n\nwhen I receive [change life v]\nchange [life v] by (-1)\n\nwhen flag clicked\nhide\n\ngo to [back v] layer\n\n@Shop Button\n\nwhen I receive [setup v]\ngo to x: (-190) y: (157)\ngo to [front v] layer\nshow\n\nwhen I receive [tick v]\nif <touching (mouse-pointer v)?> then\n    set size to ((size) + (((120) - (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]\ngo to [front v] layer\ngo [backward v] (3) layers\nif <<touching (mouse-pointer v)?> and <mouse down?>> then\n    broadcast (Show shop v)\nend\nif <(shop2) = [1]> then\n    hide\n    go to x: (1000000) y: (100000000)\nelse\n    go to x: (-190) y: (157)\n    show\nend\n\n@Shop\n\nwhen I receive [show shop v]\nif <(start timer) = [1]> then\n    set [shop2 v] to [0]\n    wait until <not <mouse down?>>\n    go to x: (0) y: (-300)\n    hide\n    show\n    set [ghost v] effect to (0)\n    go to [front v] layer\n    go [backward v] (1) layers\n    glide (0.3) secs to x: (0) y: (0)\n    forever\n        if <mouse down?> then\n            if <not <touching (mouse-pointer v)?>> then\n                broadcast (hide shop v)\n            end\n        end\n    end\nelse\n    set [shop2 v] to [0]\n    wait until <not <mouse down?>>\n    go to x: (0) y: (-300)\n    hide\n    show\n    go to [back v] layer\n    forever\n        if <mouse down?> then\n            if <not <touching (mouse-pointer v)?>> then\n                broadcast (hide shop v)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset [start timer v] to [0]\nset [shop2 v] to [0]\nhide\n\nset [ghost v] effect to (0)\n\nwhen I receive [hide shop v]\nif <(shop2) = [1]> then\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    hide\n    wait (0.1) seconds\n    set [shop2 v] to [0]\nend\n\nwhen I receive [setup v]\nhide\n\nwhen I receive [show shop v]\nwait (0.1) seconds\nset [shop2 v] to [1]\n\n@Die\n\nwhen I receive [green flag v]\nforever\n    if <<<touching (lava v)?> or <touching (enemies v)?>> or <touching (saws v)?>> then\n        broadcast (Change life v)\n        wait (1) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    go to [back v] layer\n    go to (player v)\n    set size to (135) %\nend\n\nwhen I receive [tick v]\nif <touching (moving platform v)?> then\n    set [mptouch v] to [1]\nelse\n    set [mptouch v] to [0]\nend\n\n@Saws\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 [0]\nset [y v] to [-1000]\nswitch costume to (wheel v)\nClone at x: [970] y: [540]\nClone at x: [970] y: [685]\nClone at x: [1197] y: [2175]\n\ndefine position (x) (y)\ngo to [back v] layer\ngo [forward v] (33) layers\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\nforever\n    turn right (6) degrees\nend\n\nwhen I start as a clone\nforever\n    turn right (6) degrees\nend\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 [0]\nset [y v] to [1000]\nswitch costume to (level 1 1 v)\nClone at x: [400] y: [700]\nClone at x: [200] y: [1000]\nClone at x: [0] y: [1000]\nClone at x: [500] y: [950]\nClone at x: [0] y: [1150]\nClone at x: [450] y: [650]\nClone at x: [0] y: [1030]\nClone at x: [-400] y: [1500]\nClone at x: [-250] y: [1750]\nClone at x: [-350] y: [1950]\nClone at x: [-350] y: [2150]\nClone at x: [-250] y: [2400]\nClone at x: [-200] y: [2650]\nClone at x: [1000] y: [2250]\nClone at x: [450] y: [2150]\nClone at x: [450] y: [2100]\nClone at x: [400] y: [2222]\nClone at x: [400] y: [2320]\nClone at x: [200] y: [1220]\nClone at x: [0] y: [920]\nClone at x: [575] y: [920]\nClone at x: [150] y: [1090]\nClone at x: [417] y: [1260]\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\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: (-90) y: (-300)\nshow\ngo to [front v] layer\nglide (0.3) secs to x: (-90) y: (-43)\n\nwhen flag clicked\nhide\ngo to x: (-90) y: (-40)\n\nwhen I receive [setup v]\nswitch costume to (costume2 v)\nhide\n\nwhen I receive [hide shop v]\nhide\nwait (0.1) seconds\n\nwhen I receive [tick v]\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 [costumeandboost v] to (join (CostumeAndBoost) [_B])\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 < (CostumeAndBoost) contains [B]?> then\n    switch costume to (costume3 v)\nelse\n    switch costume to (costume2 v)\nend\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: (90) y: (-300)\nshow\ngo to [front v] layer\nglide (0.3) secs to x: (90) y: (-43)\n\nwhen flag clicked\nhide\n\nwhen I receive [setup v]\nhide\n\nwhen I receive [hide shop v]\nhide\nwait (0.1) seconds\n\nwhen I receive [tick v]\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: [I]\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                if <(letter (3) of (CostumeAndBoost)) = [B]> then\n                    set [costumeandboost v] to (join (letter) [_B])\n                    set [costumesused v] to (join (CostumesUsed) (letter))\n                    change [points v] by (join [-] (prize))\n                else\n                    set [costumeandboost v] to (letter)\n                    set [costumesused v] to (join (CostumesUsed) (letter))\n                    change [points v] by (join [-] (prize))\n                end\n            else\n                broadcast (not enough money v)\n            end\n        else\n            if < (CostumesUsed) contains (letter)?> then\n                if < (CostumeAndBoost) contains (letter)?> then\n                    if <(letter (3) of (CostumeAndBoost)) = [B]> then\n                        set [costumeandboost v] to (join (letter) [_B])\n                    else\n                        set [costumeandboost v] to (letter)\n                    end\n                else\n                    if <(letter (3) of (CostumeAndBoost)) = [B]> then\n                        set [costumeandboost v] to (join (letter) [_B])\n                    else\n                        set [costumeandboost v] to (letter)\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Costumes\nif <not < (CostumesUsed) contains [I]?>> then\n    switch costume to (costume2 v)\nelse\n    if < (CostumeAndBoost) contains [I]?> then\n        switch costume to (costume3 v)\n    else\n        switch costume to (costume4 v)\n    end\nend\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: (-90) y: (-300)\nshow\ngo to [front v] layer\nglide (0.3) secs to x: (-90) y: (-160)\n\nwhen flag clicked\nhide\n\nwhen I receive [hide shop v]\nhide\nwait (0.1) seconds\n\nwhen I receive [setup v]\nhide\n\nwhen I receive [tick v]\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: [N]\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                if <(letter (3) of (CostumeAndBoost)) = [B]> then\n                    set [costumeandboost v] to (join (letter) [_B])\n                    set [costumesused v] to (join (CostumesUsed) (letter))\n                    change [points v] by (join [-] (prize))\n                else\n                    set [costumeandboost v] to (letter)\n                    set [costumesused v] to (join (CostumesUsed) (letter))\n                    change [points v] by (join [-] (prize))\n                end\n            else\n                broadcast (not enough money v)\n            end\n        else\n            if < (CostumesUsed) contains (letter)?> then\n                if < (CostumeAndBoost) contains (letter)?> then\n                    if <(letter (3) of (CostumeAndBoost)) = [B]> then\n                        set [costumeandboost v] to (join (letter) [_B])\n                    else\n                        set [costumeandboost v] to (letter)\n                    end\n                else\n                    if <(letter (3) of (CostumeAndBoost)) = [B]> then\n                        set [costumeandboost v] to (join (letter) [_B])\n                    else\n                        set [costumeandboost v] to (letter)\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [setup v]\nswitch costume to (costume2 v)\n\ndefine Costumes\nif <not < (CostumesUsed) contains [N]?>> then\n    switch costume to (costume2 v)\nelse\n    if < (CostumeAndBoost) contains [N]?> then\n        switch costume to (costume3 v)\n    else\n        switch costume to (costume4 v)\n    end\nend\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: (90) y: (-300)\nshow\ngo to [front v] layer\nglide (0.3) secs to x: (90) y: (-160)\n\nwhen flag clicked\nhide\n\nwhen I receive [hide shop v]\nhide\nwait (0.1) seconds\n\nwhen I receive [setup v]\nhide\n\nwhen I receive [tick v]\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: [4] letter: [A]\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                if <(letter (3) of (CostumeAndBoost)) = [B]> then\n                    set [costumeandboost v] to (join (letter) [_B])\n                    set [costumesused v] to (join (CostumesUsed) (letter))\n                    change [points v] by (join [-] (prize))\n                else\n                    set [costumeandboost v] to (letter)\n                    set [costumesused v] to (join (CostumesUsed) (letter))\n                    change [points v] by (join [-] (prize))\n                end\n            else\n                broadcast (not enough money v)\n            end\n        else\n            if < (CostumesUsed) contains (letter)?> then\n                if < (CostumeAndBoost) contains (letter)?> then\n                    if <(letter (3) of (CostumeAndBoost)) = [B]> then\n                        set [costumeandboost v] to (join (letter) [_B])\n                        switch costume to (costume3 v)\n                    else\n                        set [costumeandboost v] to (letter)\n                        switch costume to (costume3 v)\n                    end\n                else\n                    if <(letter (3) of (CostumeAndBoost)) = [B]> then\n                        set [costumeandboost v] to (join (letter) [_B])\n                        switch costume to (costume4 v)\n                    else\n                        set [costumeandboost v] to (letter)\n                        switch costume to (costume4 v)\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [setup v]\nswitch costume to (costume2 v)\n\ndefine Costumes\nif <not < (CostumesUsed) contains [A]?>> then\n    switch costume to (costume2 v)\nelse\n    if < (CostumeAndBoost) contains [A]?> then\n        switch costume to (costume3 v)\n    else\n        switch costume to (costume4 v)\n    end\nend\n\n@Sprite1\n\nwhen I receive [not enough money v]\nshow\ngo to [front v] layer\nset [ghost v] effect to (0)\nwait (0.8) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen flag clicked\nhide\nset [ghost v] effect to (100)\n\n@Water\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]\nset [ghost v] effect to (10)\nhide\nswitch costume to (level 1 1 v)\nset [x v] to [0]\nset [y v] to [1000000]\nClone at x: [970] y: [770]\nClone at x: [1000] y: [700]\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 I start as a clone\nforever\n    if <touching (player v)?> then\n        set volume to (round ((Volume) / (3))) %\n        play sound [Splash v] until done\n        wait until <not <touching (player v)?>>\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        set volume to (round ((Volume) / (3))) %\n        play sound [Splash v] until done\n        wait until <not <touching (player v)?>>\n    end\nend\n\nwhen flag clicked\ngo to x: (-500) y: (2000)\n\n@Sand\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]\nset [ghost v] effect to (0)\nhide\nswitch costume to (level 1 1 v)\nset [x v] to [970]\nset [y v] to [620]\nClone at x: [1000] y: [700]\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\n@Grass\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 [-335]\nset [y v] to [1200]\nswitch costume to (level 1 1 v)\nClone at x: [335] y: [1000]\nClone at x: [400] y: [700]\nClone at x: [200] y: [1000]\nClone at x: [0] y: [1000]\nClone at x: [500] y: [1150]\nClone at x: [450] y: [650]\nClone at x: [0] y: [1030]\nClone at x: [-400] y: [1500]\nClone at x: [-250] y: [1750]\nClone at x: [-350] y: [1950]\nClone at x: [-350] y: [2150]\nClone at x: [-250] y: [2400]\nClone at x: [-200] y: [2650]\nClone at x: [1000] y: [2250]\nClone at x: [450] y: [2150]\nClone at x: [450] y: [2100]\nClone at x: [400] y: [2222]\nClone at x: [400] y: [2320]\nClone at x: [200] y: [1200]\nClone at x: [0] y: [920]\nClone at x: [575] y: [920]\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\n@BackroundThings\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 [-335]\nset [y v] to [1200]\nswitch costume to (level 1 1 v)\nClone at x: [335] y: [1000]\nClone at x: [400] y: [700]\nClone at x: [200] y: [1000]\nClone at x: [0] y: [1000]\nClone at x: [500] y: [1150]\nClone at x: [450] y: [650]\nClone at x: [0] y: [1030]\nClone at x: [-400] y: [1500]\nClone at x: [-250] y: [1750]\nClone at x: [-350] y: [1950]\nClone at x: [-350] y: [2150]\nClone at x: [-250] y: [2400]\nClone at x: [-200] y: [2650]\nClone at x: [1000] y: [2250]\nClone at x: [450] y: [2150]\nClone at x: [450] y: [2100]\nClone at x: [400] y: [2222]\nClone at x: [400] y: [2320]\nClone at x: [200] y: [1200]\nClone at x: [0] y: [920]\nClone at x: [575] y: [920]\nClone at x: [150] y: [1090]\nClone at x: [417] y: [1090]\nClone at x: [200] y: [1300]\nClone at x: [-300] y: [850]\nClone at x: [130] y: [500]\nClone at x: [450] y: [245]\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\n@Clouds\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]\nset [ghost v] effect to (10)\nhide\nset [x v] to [-335]\nset [y v] to [1200]\nswitch costume to (level 1 1 v)\nClone at x: [335] y: [1000]\nClone at x: [400] y: [700]\nClone at x: [200] y: [700]\nClone at x: [0] y: [1000]\nClone at x: [500] y: [1150]\nClone at x: [450] y: [650]\nClone at x: [0] y: [1030]\nClone at x: [-400] y: [1500]\nClone at x: [-250] y: [1750]\nClone at x: [-350] y: [1950]\nClone at x: [-350] y: [2150]\nClone at x: [-350] y: [2250]\nClone at x: [-150] y: [2450]\nClone at x: [400] y: [2550]\nClone at x: [650] y: [2250]\nClone at x: [450] y: [2150]\nClone at x: [450] y: [2100]\nClone at x: [400] y: [2222]\nClone at x: [400] y: [2320]\nClone at x: [200] y: [1200]\nhide\n\ndefine position (x) (y)\ngo to [front v] layer\ngo [backward v] (5) layers\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\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]\nhide\nswitch costume to (exit v)\n\ndefine position (x) (y)\ngo to [back v] layer\ngo [forward v] (33) layers\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\nset [x v] to [6340]\nset [y v] to [475]\n\n