Gadget || ☁ A Scrolling Mobile-Friendly Multiplayer Platformer ☁ 

Instructions: -------------------------------INTRO-------------------------------\nGadget || etc. has saws, moving platforms, checkpoints, coins, and 27 cloud chats. If you're on mobile, double click to let the rest of the players know.\n----------------------------CONTROLS----------------------------\nAs usual, arrow keys or tap mouse to move (no crouching in this game). Collect all of the coins to open the portal and touch checkpoints to save your progress. If you see me playing, comment down below!\n------------------------------ISSUES------------------------------\nUnfortunately, because everyone's timer starts when they click the flag, it may appear as though people are floating when they are on their moving platforms.\n------------------------☁ CHATTING ☁------------------------\n0 to open up the chat help, although you can chat when it's closed as well. Space to turn off usernames. Space again to turn of chats as well. Space again to turn it all back on.\n---------------------------STOPPING---------------------------\nIf you want to actually stop the project, hit stop super fast twice.\n----------------------------UPDATES----------------------------\nRecent Updates: \nAdded new level three and bumped old level three up \n         to level four\nAdded to level three and made it more difficult\nAdded text when you press space

@Stage\n\nwhen [m v] key pressed\nset [mouse v] to (join ((mouse x) + (SCROLLX)) (join [, ] ((mouse y) + (SCROLLY))))\n\nwhen flag clicked\nset volume to (70) %\nforever\n    play sound [Xaf - Unlimited \(1\) v] until done\nend\n\n@Blank\n\n@Player\n\nwhen flag clicked\nhide\ndelete all of [buffer v]\nset [my player # v] to [0]\nset [max players v] to [8]\nbroadcast (setup - opponents v) and wait\nswitch backdrop to (joining v)\nbroadcast (join game v) and wait\nif <(MY PLAYER #) > [0]> then\n    switch backdrop to (joined v)\nelse\n    switch backdrop to (full v)\nend\nwait (.6) seconds\nswitch backdrop to (game v)\nbroadcast (begin v)\nbroadcast ( Green Flag v) and wait\nbroadcast (Play Game v) and wait\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\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                            set [☁ p8 v] to (value)\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine send cloud data\nif <(MY PLAYER #) < [1]> then\n    stop [this script v]\nend\nadd (x) to [buffer v]\nadd (y) to [buffer v]\nchange [cloud timer v] by (1)\nif <(cloud timer) < [3]> then\n    stop [this script v]\nend\nset [cloud timer v] to [0]\nset [encoded v] to []\nwrite (LEVEL) to encoded\nwrite (size) to encoded\nwrite (ghost effect) to encoded\nwrite (username) to encoded\nwrite (CHAT) to encoded\nwrite (round ((timer) * (10))) to encoded\nrepeat (length of [buffer v])\n    write (item (1) of [buffer v]) to encoded\n    delete (1) of [buffer v]\nend\nset cloud # (MY PLAYER #) to (encoded)\n\ndefine Tick\nif <(wait) < [1]> then\n    if <(chatting) < [1]> then\n        if <key (any v) pressed?> then\n            key\n        end\n        if <mouse down?> then\n            if <(mouse down) = [no]> then\n                double clicked\n            end\n            set [mouse down v] to [yes]\n        else\n            set [mouse down v] to [no]\n        end\n        say []\n    else\n        change [chatting v] by (-1)\n        if <not <(Show Text) = [none]>> then\n            say (item (CHAT) of [chats v])\n        else\n            say []\n        end\n    end\n    if <(double clicked) > [0]> then\n        change [double clicked v] by (-1)\n    end\n    Zero Pressed?\n    Space Pressed?\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(x position) > (mouse x)>>> then\n        change [sx v] by (-1)\n    end\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [sx v] by (1)\n    end\n    set [sx v] to ((sx) * (.9))\n    if <touching (moving platforms v)?> then\n        get out of moving platforms\n    end\n    change y by (-3)\n    if <touching (moving platforms v)?> then\n        set [touching platform v] to [yes]\n    else\n        if <(touching platform) = [yes]> then\n            change [sx v] by ((GLIDESPEED) * (-1))\n        end\n        set [touching platform v] to [no]\n    end\n    change y by (3)\n    if <<([abs v] of (sx) ) > [1]> or <(touching platform) = [yes]>> then\n        if <(touching platform) = [yes]> then\n            Change Player X by (round ((sx) + ((GLIDESPEED) * (-1))))\n        else\n            Change Player X by (round (sx))\n        end\n    end\n    if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > ((y position) + (15))>>> then\n        if <(in air) < [3]> then\n            set [sy v] to [12]\n        end\n    end\n    if <(sy) > [-19]> then\n        change [sy v] by (-1)\n    end\n    if <(touching platform) = [yes]> then\n        change [x v] by (GLIDESPEED)\n    end\n    Change Player Y by (sy)\n    if <(touching platform) = [yes]> then\n        change [x v] by ((-1) * (GLIDESPEED))\n    end\n    test - die\n    if <(y) < [-180]> then\n        set [exit v] to [die]\n    end\nelse\n    change [wait v] by (-1)\nend\nchange [scrollx v] by (round (((x) - (SCROLLX)) / (1)))\nif <(SCROLLX) < [-50]> then\n    set [scrollx v] to [-50]\nend\nchange [scrolly v] by (round (((y) - (SCROLLY)) / (9)))\nif <(SCROLLY) < [0]> then\n    set [scrolly v] to [0]\nend\nposition\n\nwhen I receive [ green flag v]\nhide\ngo to [front v] layer\ndelete all of [platform speeds v]\ndelete all of [playerstartingpos v]\nChat - Help\nadd [0] to [playerstartingpos v]\nadd [0] to [playerstartingpos v]\n\nwhen I receive [play game v]\nset [show text v] to [all]\nswitch costume to (costume1 v)\nshow\nset [level v] to [1]\nbroadcast (Reset v) and wait\nbroadcast (Setup v) and wait\nforever\n    Game On\n    repeat until <(EXIT) > []>\n        if <(username) = [rudytudy]> then\n            if <key (1 v) pressed?> then\n                if <(key1pressed) = [no]> then\n                    if <(flymode) = [off]> then\n                        set [flymode v] to [on]\n                    else\n                        set [flymode v] to [off]\n                    end\n                end\n                set [key1pressed v] to [yes]\n            else\n                set [key1pressed v] to [no]\n            end\n            if <(flymode) = [on]> then\n                Fly\n            else\n                Tick\n            end\n        else\n            Tick\n        end\n        broadcast (tick v) and wait\n        send cloud data\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 (item (1) of [playerstartingpos v])\nset [y v] to (item (2) of [playerstartingpos v])\nset [sy v] to [0]\nset [in air v] to [5]\nset [exit v] to []\nset [scrollx v] to (item (1) of [playerstartingpos v])\nset [scrolly v] to (item (2) of [playerstartingpos v])\nset [sx v] to [0]\nset [wait v] to [5]\nset [touching platform v] to [no]\nset size to (100) %\nset [ghost effect v] to [0]\nset [ghost v] effect to (ghost effect)\nshow\n\ndefine Change Player Y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nposition\nrepeat until <not <<touching (platforms v)?> or <touching (moving platforms 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) - (SCROLLX)) y: ((y) - (SCROLLY))\n\ndefine Change Player X by (sx)\nchange [x v] by (sx)\nposition\nif <<touching (platforms v)?> or <touching (moving platforms v)?>> then\n    repeat (12)\n        change [y v] by (1)\n        position\n        if <not <<touching (platforms v)?> or <touching (moving platforms 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 <<mouse down?> and <(mouse y) > ((y position) + (15))>>> 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    else\n        set [sx v] to [0]\n    end\n    repeat until <not <<touching (platforms v)?> or <touching (moving platforms 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 - Die\nset [exit v] to []\nrepeat (20)\n    create clone of (_myself_ v)\n    change size by (-3)\n    change [ghost effect v] by (3)\n    set [ghost v] effect to (ghost effect)\n    send cloud data\nend\nhide\nwait (1.5) seconds\nset size to (100) %\nset [ghost effect v] to [0]\nset [ghost v] effect to (ghost effect)\n\ndefine test - die\nif <<touching (saws v)?> or <touching (danger v)?>> then\n    set [exit v] to [die]\nend\n\nwhen I start as a clone\nswitch costume to (costume2 v)\nset [ghost effect v] to [0]\nset [ghost v] effect to (ghost effect)\nshow\nset [sy v] to (pick random (4.0) to (7))\nset [sx v] to (pick random (-5.0) to (5.0))\nchange x by (pick random (-2) to (2))\nchange y by (pick random (-2) to (2))\nrepeat (20)\n    change x by (sx)\n    change y by (sy)\n    change [ghost effect v] by (4)\n    set [ghost v] effect to (ghost effect)\n    change [sy v] by (-.5)\nend\ndelete this clone\n\ndefine Game - Win\nrepeat (50)\n    point towards (portal v)\n    turn right (65) degrees\n    move ((distance to [portal v]) / (2)) steps\n    change size by (-2)\n    change [ghost effect v] by (2)\n    set [ghost v] effect to (ghost effect)\n    send cloud data\nend\nhide\nchange [level v] by (1)\nwait (1) seconds\nif <(LEVEL) > [4]> then\n    stop [all v]\nend\ndelete all of [playerstartingpos v]\nadd [0] to [playerstartingpos v]\nadd [-25] to [playerstartingpos v]\nbroadcast (Reset v) and wait\nbroadcast (Setup v) and wait\n\nstop [all v]\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 get out of moving platforms\nrepeat (10)\n    change [x v] by (2)\n    position\n    if <not <touching (moving platforms v)?>> then\n        stop [this script v]\n    end\nend\nchange [x v] by (-20)\nrepeat until <not <touching (moving platforms v)?>>\n    change [x v] by (-2)\n    position\nend\n\ndefine key\nset [i v] to [0]\nrepeat (length of [chats v])\n    change [i v] by (1)\n    set [pressed v] to (item (i) of [alphabet v])\n    if <key ((pressed) v) pressed?> then\n        set [chatting v] to [50]\n        set [chat v] to (i)\n        stop [this script v]\n    end\nend\nset [chat v] to [0]\n\ndefine Chat - Help\ndelete all of [chat - help v]\nset [i v] to [0]\nrepeat (length of [chats v])\n    change [i v] by (1)\n    add (join (join (item (i) of [alphabet v]) [ = "]) (join (item (i) of [chats v]) ["])) to [chat - help v]\nend\n\ndefine Space Pressed?\nif <key (space v) pressed?> then\n    if <(space pressed) = [no]> then\n        if <(Show Text) = [all]> then\n            set [show text v] to [some]\n        else\n            if <(Show Text) = [none]> then\n                set [show text v] to [all]\n            else\n                set [show text v] to [none]\n            end\n        end\n        broadcast (Space v)\n    end\n    set [space pressed v] to [yes]\nelse\n    set [space pressed v] to [no]\nend\n\ndefine Zero Pressed?\nif <key (0 v) pressed?> then\n    if <(0 pressed?) = [no]> then\n        if <(chat showing?) = [yes]> then\n            set [chat showing? v] to [no]\n            show list [chat - help v]\n        else\n            set [chat showing? v] to [yes]\n            hide list [chat - help v]\n        end\n    end\n    set [0 pressed? v] to [yes]\nelse\n    set [0 pressed? v] to [no]\nend\n\ndefine Fly\nif <key (left arrow v) pressed?> then\n    change [sx v] by (-2)\nend\nif <key (right arrow v) pressed?> then\n    change [sx v] by (2)\nend\nif <key (up arrow v) pressed?> then\n    change [sy v] by (2)\nend\nif <key (down arrow v) pressed?> then\n    change [sy v] by (-2)\nend\nset [sx v] to ((sx) * (.9))\nset [sy v] to ((sy) * (.9))\nchange [x v] by (round (sx))\nchange [y v] by (round (sy))\nchange [scrollx v] by (round (((x) - (SCROLLX)) / (1)))\nif <(SCROLLX) < [-50]> then\n    set [scrollx v] to [-50]\nend\nchange [scrolly v] by (round (((y) - (SCROLLY)) / (10)))\nif <(SCROLLY) < [0]> then\n    set [scrolly v] to [0]\nend\nposition\n\ndefine double clicked\nif <(double clicked) > [0]> then\n    set [chatting v] to [50]\n    set [chat v] to [27]\nend\nset [double clicked v] to [6]\n\nif <touching (moving platforms v)?> then\n    set [x v] to (GLIDESPEED)\nend\n\n@Other players\n\ndefine setup players\ndelete all of [buffer v]\ndelete all of [effectx v]\ndelete all of [effecty v]\nhide\nset [offline v] to [100]\nset [player # v] to [1]\nrepeat ((MAX PLAYERS) - (1))\n    create clone of (_myself_ v)\n    add [] to [effectx v]\n    add [] to [effecty v]\n    change [player # v] by (1)\nend\nadd [] to [effectx v]\nadd [] to [effecty v]\n\nwhen I receive [tick v]\nif <(MY PLAYER #) = (player #)> then\n    set [offline v] to [100]\n    set [x v] to [-999]\n    hide\nelse\n    tick\nend\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                            set [value v] to (☁ P8)\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [setup - opponents v]\nsetup players\n\ndefine tick\nhide\nvalue = cloud # (player #)\nif <(join [A] (value)) = (last value)> then\n    change [offline v] by (1)\n    if <(Offline) = [100]> then\n        hide\n    end\nelse\n    set [last value v] to (join [A] (value))\n    if <(Offline) > [99]> then\n        show\n    end\n    set [offline v] to [0]\n    Begin decode of (value)\n    value = read from encoded\n    set [my level v] to (value)\n    value = read from encoded\n    set size to (value) %\n    value = read from encoded\n    set [ghost v] effect to (value)\n    value = read from encoded\n    if <(Show Text) = [all]> then\n        say (join (player #) (join [: ] (value)))\n    else\n        say []\n    end\n    value = read from encoded\n    if <(value) > [0]> then\n        if <not <(Show Text) = [none]>> then\n            say (item (value) of [chats v])\n        else\n            say []\n        end\n    end\n    value = read from encoded\n    value = read from encoded\n    repeat until <(value) = []>\n        add (value) to [buffer v]\n        value = read from encoded\n    end\nend\nif <(length of [buffer v]) > [0]> then\n    set [x v] to (item (1) of [buffer v])\n    delete (1) of [buffer v]\n    set [y v] to (item (1) of [buffer v])\n    delete (1) of [buffer v]\nend\nposition ((x) - (SCROLLX)) ((y) - (SCROLLY))\n\ndefine Begin decode of (encoded)\nset [encoded v] to (encoded)\nset [letter # v] to [1]\n\nwhen I receive [join game v]\nvalue = cloud # (player #)\nset [last value v] to (join [A] (value))\nwait (2) seconds\nvalue = cloud # (player #)\nif <(join [A] (value)) = (last value)> then\n    set [my player # v] to (player #)\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<<(x) = (x position)> and <(y) = (y position)>> and <<[100] > (Offline)> and <(my level) = (LEVEL)>>> then\n    show\n    replace item (player #) of [effectx v] with (x)\n    replace item (player #) of [effecty v] with (y)\nelse\n    hide\n    replace item (player #) of [effectx v] with []\n    replace item (player #) of [effecty v] with []\nend\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\nwhen flag clicked\nhide\n\n@Platforms\n\nwhen I receive [ green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLLX)) ((y) - (SCROLLY))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    Clone at X: [1000] Y: [0]\n    Clone at X: [720] Y: [140]\n    Clone at X: [680] Y: [218]\n    Clone at X: [-880] Y: [153]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 2 1 v)\n        Clone at X: [903] Y: [359]\n        Clone at X: [800] Y: [350]\n        Clone at X: [950] Y: [0]\n        Clone at X: [250] Y: [-600]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (level 3 1 v)\n            Clone at X: [790] Y: [0]\n            Clone at X: [-160] Y: [490]\n            Clone at X: [170] Y: [230]\n            Clone at X: [1000] Y: [337]\n            Clone at X: [600] Y: [-330]\n            Clone at X: [600] Y: [20]\n            Clone at X: [-600] Y: [380]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (level 4 1 v)\n                Clone at X: [1140] Y: [176]\n                Clone at X: [-550] Y: [400]\n                Clone at X: [-700] Y: [20]\n                Clone at X: [750] Y: [350]\n                Clone at X: [750] Y: [-150]\n                Clone at X: [520] Y: [-10]\n                Clone at X: [500] Y: [93]\n                Clone at X: [800] Y: [0]\n            end\n        end\n    end\nend\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)\nchange [y v] by (y)\nnext costume\n\nwhen flag clicked\nhide\n\ndelete this clone\n\n@11\n\nwhen I receive [ green flag v]\nhide\n\nwhen I receive [tick v]\nif <(collecting) = [n/a]> then\n    set [addedx v] to (round ((([sin v] of ((timer) * (200)) ) * (float)) + (4)))\n    position ((x) - (SCROLLX)) (((y) - (SCROLLY)) + (addedX))\n    if <touching (player v)?> then\n        set [collecting v] to [15]\n        change [collected v] by (1)\n        if <(COLLECTED) = (COLLECTED MAX)> then\n            broadcast (Open Portal v)\n        end\n    end\nelse\n    if <(collecting) > [0]> then\n        change [collecting v] by (-1)\n        position ((x) - (SCROLLX)) ((((y) - (SCROLLY)) + ((60) - ((collecting) * (4)))) + (addedX))\n        set [ghost v] effect to ((100) - ((collecting) * (8)))\n    else\n        delete this clone\n    end\nend\nif <(wait) < [1]> then\n    next costume\n    set [wait v] to [1]\nelse\n    change [wait v] by (-1)\nend\n\nwhen I receive [setup v]\npoint in direction (90)\nhide\nset [float v] to [8]\nset [x v] to [0]\nset [y v] to [0]\nset [collecting v] to [n/a]\nset [collected v] to [0]\nset [collected max v] to [0]\nswitch costume to (1 v)\nif <(LEVEL) = [1]> then\n    Clone at X: [49] Y: [-5] Float: [8]\n    Clone at X: [109] Y: [-5] Float: [-8]\n    Clone at X: [375] Y: [-9] Float: [8]\n    Clone at X: [445] Y: [-9] Float: [-8]\n    Clone at X: [515] Y: [-9] Float: [8]\n    Clone at X: [585] Y: [-9] Float: [-8]\n    Clone at X: [861] Y: [80] Float: [8]\n    Clone at X: [1140] Y: [80] Float: [8]\n    Clone at X: [1485] Y: [-5] Float: [8]\n    Clone at X: ((1485) + ((70) * (1))) Y: [-5] Float: [-8]\n    Clone at X: [2170] Y: [260] Float: [-8]\n    Clone at X: [2225] Y: [260] Float: [8]\n    Clone at X: [2280] Y: [260] Float: [-8]\n    Clone at X: [1335] Y: [554] Float: [-8]\n    Clone at X: [1706] Y: [554] Float: [8]\n    Clone at X: [1721] Y: [254] Float: [8]\n    Clone at X: [2152] Y: [561] Float: [8]\n    Clone at X: [2316] Y: [561] Float: [8]\nelse\n    if <(LEVEL) = [2]> then\n        Clone at X: [-30] Y: [237] Float: [8]\n        Clone at X: [30] Y: [237] Float: [-8]\n        Clone at X: [280] Y: [260] Float: [8]\n        Clone at X: [340] Y: [260] Float: [-8]\n        Clone at X: [400] Y: [260] Float: [8]\n        Clone at X: [460] Y: [260] Float: [-8]\n        Clone at X: [520] Y: [260] Float: [8]\n        Clone at X: [695] Y: [260] Float: [-8]\n        Clone at X: [785] Y: [260] Float: [-8]\n        Clone at X: ((1505) + ((80) * (0))) Y: [612] Float: [-2]\n        Clone at X: ((1505) + ((80) * (1))) Y: [612] Float: [2]\n        Clone at X: ((1505) + ((80) * (2))) Y: [612] Float: [-2]\n        Clone at X: ((1505) + ((80) * (3))) Y: [612] Float: [2]\n        Clone at X: ((1505) + ((80) * (4))) Y: [612] Float: [-2]\n        Clone at X: [1905] Y: [612] Float: [-2]\n        Clone at X: ((960) + ((80) * (0))) Y: [610] Float: [8]\n        Clone at X: ((960) + ((80) * (1))) Y: [610] Float: [-8]\n        Clone at X: ((960) + ((80) * (2))) Y: [610] Float: [8]\n        Clone at X: ((960) + ((80) * (3))) Y: [610] Float: [-8]\n        Clone at X: ((960) + ((80) * (4))) Y: [610] Float: [8]\n    else\n        if <(LEVEL) = [3]> then\n            Clone at X: [71] Y: [5] Float: [8]\n            Clone at X: [141] Y: [5] Float: [-8]\n            Clone at X: [360] Y: [5] Float: [8]\n            Clone at X: [554] Y: [5] Float: [-8]\n            Clone at X: [700] Y: [355] Float: [-8]\n            Clone at X: [770] Y: [355] Float: [8]\n            Clone at X: [840] Y: [355] Float: [-8]\n            Clone at X: [700] Y: [946] Float: [-8]\n            Clone at X: [775] Y: [946] Float: [8]\n            Clone at X: [742] Y: [604] Float: [8]\n            Clone at X: [855] Y: [716] Float: [-8]\n            Clone at X: [613] Y: [716] Float: [-8]\n            Clone at X: [742] Y: [849] Float: [8]\n            Clone at X: [2287] Y: [804] Float: [8]\n            Clone at X: [2513] Y: [804] Float: [8]\n            Clone at X: [2401] Y: [844] Float: [-8]\n            Clone at X: [2401] Y: [764] Float: [-8]\n            Clone at X: [2401] Y: [684] Float: [-8]\n            Clone at X: [2692] Y: [594] Float: [8]\n            Clone at X: [2612] Y: [594] Float: [-8]\n            Clone at X: [2772] Y: [594] Float: [-8]\n            Clone at X: [2924] Y: [909] Float: [-8]\n            Clone at X: [3076] Y: [909] Float: [8]\n            Clone at X: [2496] Y: [1176] Float: [8]\n            Clone at X: [2214] Y: [1176] Float: [8]\n            Clone at X: [2576] Y: [1176] Float: [-8]\n            Clone at X: [2294] Y: [1176] Float: [-8]\n        else\n            if <(LEVEL) = [4]> then\n                Clone at X: [99] Y: [-31] Float: [8]\n                Clone at X: [195] Y: [71] Float: [-8]\n                Clone at X: ((950) + ((60) * (0))) Y: [75] Float: [-2]\n                Clone at X: ((950) + ((60) * (1))) Y: [75] Float: [-2]\n                Clone at X: ((950) + ((60) * (2))) Y: [75] Float: [-2]\n                Clone at X: ((950) + ((60) * (3))) Y: [75] Float: [-2]\n                Clone at X: ((950) + ((60) * (4))) Y: [75] Float: [-2]\n                Clone at X: ((950) + ((60) * (5))) Y: [75] Float: [-2]\n                Clone at X: ((950) + ((60) * (6))) Y: [75] Float: [-2]\n                Clone at X: ((950) + ((60) * (7))) Y: [75] Float: [-2]\n                Clone at X: [600] Y: [462] Float: [8]\n                Clone at X: [486] Y: [462] Float: [-8]\n                Clone at X: [-153] Y: [688] Float: [8]\n                Clone at X: [-153] Y: [638] Float: [8]\n                Clone at X: [-153] Y: [588] Float: [8]\n                Clone at X: [-153] Y: [538] Float: [8]\n                Clone at X: [1248] Y: [827] Float: [8]\n                Clone at X: [1391] Y: [827] Float: [-8]\n                Clone at X: [1541] Y: [827] Float: [8]\n                Clone at X: [433] Y: [830] Float: [8]\n                Clone at X: [643] Y: [830] Float: [-8]\n                Clone at X: [850] Y: [830] Float: [8]\n                Clone at X: [551] Y: [70] Float: [8]\n                Clone at X: [451] Y: [70] Float: [-8]\n                Clone at X: [651] Y: [70] Float: [8]\n                Clone at X: [2420] Y: [1105] Float: [8]\n                Clone at X: [2500] Y: [1105] Float: [-8]\n                Clone at X: [2580] Y: [1105] Float: [8]\n                Clone at X: [1911] Y: [833] Float: [8]\n                Clone at X: [3252] Y: [1023] Float: [8]\n                Clone at X: [3316] Y: [1023] Float: [-8]\n                Clone at X: [3380] Y: [1023] Float: [8]\n            end\n        end\n    end\nend\nset [x v] to [-1000]\n\ndefine position (x) (y)\nset size to (150) %\ngo to x: (x) y: (y)\nset size to (100) %\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) Float: (float)\nset [float v] to (float)\nset [x v] to (x)\nset [y v] to (y)\nchange [collected max v] by (1)\ncreate clone of (_myself_ v)\n\ndelete this clone\n\nwhen flag clicked\nhide\n\n@Saws\n\nwhen I receive [ green flag v]\nhide\n\nwhen I receive [tick v]\nif <(cos/sin) = [cos]> then\n    position (((x) - (SCROLLX)) + (round (([cos v] of ((timer) * (speedx)) ) * (widthx)))) (((y) - (SCROLLY)) + (round (([cos v] of ((timer) * (speedy)) ) * (widthy))))\nelse\n    if <(cos/sin) = [cir]> then\n        position (((x) - (SCROLLX)) + (round (([sin v] of ((timer) * (speedx)) ) * (widthx)))) (((y) - (SCROLLY)) + (round (([cos v] of ((timer) * (speedy)) ) * (widthy))))\n    else\n        position (((x) - (SCROLLX)) + (round (([sin v] of ((timer) * (speedx)) ) * (widthx)))) (((y) - (SCROLLY)) + (round (([sin v] of ((timer) * (speedy)) ) * (widthy))))\n    end\nend\nturn right (15) degrees\n\nwhen I receive [setup v]\npoint in direction (90)\nhide\ngo to [back v] layer\nset [x v] to [0]\nset [y v] to [0]\nset [cos/sin v] to [sin]\nif <(LEVEL) = [1]> then\n    switch costume to (1 v)\n    Clone at X: [110] Y: [-30] speedx [100] widthx [70] speedy [0] widthy [0] size [90] cos/sin []\n    Clone at X: [784] Y: [13] speedx [80] widthx [48] speedy [80] widthy [29] size [90] cos/sin [cos]\n    Clone at X: [937] Y: [13] speedx [-80] widthx [48] speedy [80] widthy [29] size [90] cos/sin []\n    Clone at X: [1064] Y: [13] speedx [80] widthx [48] speedy [80] widthy [29] size [90] cos/sin [cos]\n    Clone at X: [1216] Y: [13] speedx [-80] widthx [48] speedy [80] widthy [29] size [90] cos/sin []\n    Clone at X: [1840] Y: [5] speedx [0] widthx [0] speedy [0] widthy [0] size [130] cos/sin []\n    Clone at X: [2170] Y: [422] speedx [0] widthx [0] speedy [80] widthy [100] size [80] cos/sin []\n    Clone at X: [2300] Y: [422] speedx [0] widthx [0] speedy [80] widthy [100] size [75] cos/sin [cos]\n    Clone at X: [1518] Y: [527] speedx [70] widthx [170] speedy [0] widthy [0] size [75] cos/sin [cos]\n    Clone at X: [1518] Y: [630] speedx [70] widthx [170] speedy [0] widthy [0] size [75] cos/sin [sin]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (1 v)\n        Clone at X: [0] Y: [116] speedx [100] widthx [70] speedy [-50] widthy [100] size [90] cos/sin []\n        Clone at X: [0] Y: [116] speedx [-100] widthx [70] speedy [50] widthy [100] size [90] cos/sin []\n        Clone at X: [-145] Y: [134] speedx [0] widthx [0] speedy [100] widthy [85] size [80] cos/sin []\n        Clone at X: [-145] Y: [134] speedx [0] widthx [0] speedy [-100] widthy [85] size [80] cos/sin []\n        Clone at X: [803] Y: [430] speedx [0] widthx [0] speedy [40] widthy [100] size [75] cos/sin []\n        Clone at X: [670] Y: [430] speedx [0] widthx [0] speedy [-40] widthy [100] size [75] cos/sin []\n        Clone at X: [1705] Y: [583] speedx [90] widthx [205] speedy [0] widthy [0] size [70] cos/sin []\n        Clone at X: [1705] Y: [650] speedx [-90] widthx [205] speedy [0] widthy [0] size [70] cos/sin []\n        Clone at X: [2425] Y: [690] speedx [0] widthx [0] speedy [50] widthy [70] size [100] cos/sin []\n        Clone at X: [2653] Y: [690] speedx [0] widthx [0] speedy [-50] widthy [70] size [100] cos/sin []\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (1 v)\n            Clone at X: [265] Y: [70] speedx [150] widthx [90] speedy [300] widthy [80] size [80] cos/sin [cir]\n            Clone at X: [280] Y: [500] speedx [110] widthx [150] speedy [0] widthy [0] size [80] cos/sin [sin]\n            Clone at X: [736] Y: [726] speedx [50] widthx [150] speedy [50] widthy [150] size [60] cos/sin [cir]\n            Clone at X: [736] Y: [726] speedx [50] widthx [-100] speedy [50] widthy [100] size [60] cos/sin [cir]\n            Clone at X: [1265] Y: [935] speedx [0] widthx [0] speedy [0] widthy [0] size [100] cos/sin []\n            Clone at X: [1592] Y: [1040] speedx [-160] widthx [120] speedy [160] widthy [120] size [100] cos/sin [cir]\n            Clone at X: [2400] Y: [890] speedx [-150] widthx [160] speedy [0] widthy [0] size [80] cos/sin []\n            Clone at X: [3063] Y: [754] speedx [0] widthx [0] speedy [80] widthy [100] size [80] cos/sin []\n            Clone at X: [2937] Y: [754] speedx [0] widthx [0] speedy [-80] widthy [100] size [80] cos/sin []\n            Clone at X: [3011] Y: [1093] speedx [0] widthx [0] speedy [0] widthy [0] size [120] cos/sin []\n            Clone at X: [2400] Y: [1153] speedx [-90] widthx [180] speedy [0] widthy [0] size [80] cos/sin [sin]\n            Clone at X: [2400] Y: [1210] speedx [90] widthx [180] speedy [0] widthy [0] size [60] cos/sin [sin]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (1 v)\n                Clone at X: [48] Y: [-66] speedx [0] widthx [0] speedy [-100] widthy [100] size [80] cos/sin []\n                Clone at X: [145] Y: [31] speedx [0] widthx [0] speedy [100] widthy [100] size [80] cos/sin []\n                Clone at X: [145] Y: [31] speedx [0] widthx [0] speedy [100] widthy [100] size [80] cos/sin [cos]\n                Clone at X: [500] Y: [50] speedx [-80] widthx [200] speedy [0] widthy [0] size [80] cos/sin [sin]\n                Clone at X: [660] Y: [526] speedx [0] widthx [0] speedy [80] widthy [55] size [100] cos/sin [cos]\n                Clone at X: [540] Y: [526] speedx [0] widthx [0] speedy [80] widthy [55] size [100] cos/sin [sin]\n                Clone at X: [420] Y: [526] speedx [0] widthx [0] speedy [80] widthy [-55] size [100] cos/sin [cos]\n                Clone at X: [580] Y: [513] speedx [130] widthx [200] speedy [0] widthy [0] size [80] cos/sin [cos]\n                Clone at X: [-111] Y: [716] speedx [80] widthx [150] speedy [0] widthy [0] size [80] cos/sin [cos]\n                Clone at X: [1175] Y: [227] speedx [80] widthx [150] speedy [0] widthy [0] size [80] cos/sin [cos]\n                Clone at X: [1161] Y: [127] speedx [80] widthx [120] speedy [0] widthy [0] size [80] cos/sin [cos]\n                Clone at X: [641] Y: [800] speedx [115] widthx [200] speedy [0] widthy [0] size [100] cos/sin [sin]\n                Clone at X: [641] Y: [900] speedx [115] widthx [-200] speedy [0] widthy [0] size [100] cos/sin [sin]\n                Clone at X: [1605] Y: [800] speedx [0] widthx [0] speedy [100] widthy [80] size [70] cos/sin [cos]\n                Clone at X: [1463] Y: [800] speedx [0] widthx [0] speedy [100] widthy [80] size [70] cos/sin [sin]\n                Clone at X: [1316] Y: [800] speedx [0] widthx [0] speedy [-100] widthy [80] size [70] cos/sin [cos]\n                Clone at X: [1179] Y: [800] speedx [0] widthx [0] speedy [-100] widthy [80] size [70] cos/sin [sin]\n                Clone at X: [1910] Y: [802] speedx [140] widthx [100] speedy [0] widthy [0] size [80] cos/sin [sin]\n                Clone at X: [2500] Y: [1055] speedx [230] widthx [100] speedy [0] widthy [0] size [65] cos/sin [sin]\n            end\n        end\n    end\nend\nset [x v] to [-1000]\n\ndefine position (x) (y)\nset size to ((size) + (50)) %\ngo to x: (x) y: (y)\nset size to (size) %\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) speedx (speedx) widthx (widthx) speedy (speedy) widthy (widthy) size (size) cos/sin (cos/sin)\nset [x v] to (x)\nset [y v] to (y)\nset [speedx v] to (speedx)\nset [widthx v] to (widthx)\nset [speedy v] to (speedy)\nset [widthy v] to (widthy)\nset [size v] to (size)\nset [cos/sin v] to (cos/sin)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nhide\n\ndelete this clone\n\n@Portal\n\nwhen I receive [ green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLLX)) ((y) - (SCROLLY))\nset size to (round ((([sin v] of ((timer) * (100)) ) * (14)) + (100))) %\nif <<touching (player v)?> and <(costume [name v]) = [Open]>> then\n    set [exit v] to [win]\nend\n\nwhen I receive [setup v]\npoint in direction (90)\nhide\nset [x v] to [0]\nset [y v] to [0]\nset [collecting v] to [n/a]\nswitch costume to (closed v)\nif <(LEVEL) = [1]> then\n    Clone at X: [1163] Y: [534]\nelse\n    if <(LEVEL) = [2]> then\n        Clone at X: [3079] Y: [574]\n    else\n        if <(LEVEL) = [3]> then\n            Clone at X: [2025] Y: [1142]\n        else\n            if <(LEVEL) = [4]> then\n                Clone at X: [3315] Y: [1096]\n            else\n                Clone at X: [800] Y: [50]\n            end\n        end\n    end\nend\n\ndefine position (x) (y)\nset size to (150) %\ngo to x: (x) y: (y)\nset size to (100) %\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)\n\nwhen I receive [open portal v]\nswitch costume to (open v)\n\nwhen flag clicked\nhide\n\nClone at X: [2500] Y: [1025] Float: [8]\n\n@Moving Platforms\n\nwhen I receive [ green flag v]\nhide\n\nwhen I receive [tick v]\nposition (((x) - (SCROLLX)) + (last x)) ((y) - (SCROLLY))\nset [last speed v] to ((last x) - (round (([sin v] of ((timer) * (speedx)) ) * (widthx))))\nreplace item (clone#) of [platform speeds v] with (last speed)\nset [last x v] to (round (([sin v] of ((timer) * (speedx)) ) * (widthx)))\nchange y by (2)\nchange x by (4)\nif <touching (player v)?> then\n    set [glidespeed v] to (item (clone#) of [platform speeds v])\nend\nchange x by (-8)\nif <touching (player v)?> then\n    set [glidespeed v] to (item (clone#) of [platform speeds v])\nend\nchange x by (4)\nchange y by (-2)\n\nwhen I receive [setup v]\npoint in direction (90)\nhide\ngo to [front v] layer\nset [x v] to [0]\nset [y v] to [0]\nset [clone# v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (1 v)\n    Clone at X: [463] Y: [-45] speedx [50] widthx [115] size [2]\n    Clone at X: [1700] Y: [-45] speedx [80] widthx [250] size [1]\n    Clone at X: [1926] Y: [213] speedx [70] widthx [100] size [1]\n    Clone at X: [1924] Y: [513] speedx [70] widthx [100] size [1]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (1 v)\n        Clone at X: [400] Y: [217] speedx [50] widthx [110] size [2]\n        Clone at X: [1161] Y: [565] speedx [40] widthx [200] size [1]\n        Clone at X: [2315] Y: [570] speedx [-40] widthx [128] size [3]\n        Clone at X: [2730] Y: [570] speedx [40] widthx [128] size [3]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (1 v)\n            Clone at X: [798] Y: [-38] speedx [80] widthx [100] size [1]\n            Clone at X: [380] Y: [430] speedx [55] widthx [160] size [2]\n            Clone at X: [280] Y: [520] speedx [55] widthx [-130] size [1]\n            Clone at X: [1173] Y: [910] speedx [80] widthx [215] size [2]\n            Clone at X: [1900] Y: [910] speedx [80] widthx [150] size [1]\n            Clone at X: [2816] Y: [555] speedx [120] widthx [170] size [2]\n            Clone at X: [3304] Y: [965] speedx [70] widthx [120] size [2]\n            Clone at X: [3031] Y: [1062] speedx [-70] widthx [220] size [2]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (1 v)\n                Clone at X: [550] Y: [30] speedx [30] widthx [200] size [2]\n                Clone at X: [1220] Y: [114] speedx [60] widthx [100] size [2]\n                Clone at X: [1084] Y: [208] speedx [90] widthx [100] size [1]\n                Clone at X: [1064] Y: [311] speedx [-60] widthx [120] size [2]\n                Clone at X: [95] Y: [431] speedx [50] widthx [130] size [2]\n                Clone at X: [150] Y: [778] speedx [50] widthx [100] size [2]\n                Clone at X: [1365] Y: [783] speedx [50] widthx [300] size [3]\n                Clone at X: [2342] Y: [792] speedx [100] widthx [220] size [2]\n                Clone at X: [2900] Y: [983] speedx [100] widthx [130] size [2]\n            end\n        end\n    end\nend\nset [x v] to [-1000]\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) speedx (speedx) widthx (widthx) size (size)\nset [x v] to (x)\nset [y v] to (y)\nset [speedx v] to (speedx)\nset [widthx v] to (widthx)\nset [speedy v] to (speedy)\nset [widthy v] to (widthy)\nchange [clone# v] by (1)\nadd [] to [platform speeds v]\nswitch costume to (size)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nhide\n\ndelete this clone\n\n@Checkpoints\n\nwhen I receive [ green flag v]\nhide\n\nwhen I receive [tick v]\nif <(collecting) = [n/a]> then\n    position ((x) - (SCROLLX)) (((y) + (([sin v] of ((timer) * (200)) ) * (float))) - (SCROLLY))\n    if <<touching (player v)?> and <(already touched) = [no]>> then\n        set [already touched v] to [yes]\n        switch costume to (1 v)\n        replace item (1) of [playerstartingpos v] with (x)\n        replace item (2) of [playerstartingpos v] with (y)\n        explode\n    end\nelse\n    if <(collecting) > [0]> then\n        switch costume to (3 v)\n        change [collecting v] by (-1)\n        change [yv v] by (-1)\n        change [x v] by (xv)\n        change [y v] by (yv)\n        turn right (rotate) degrees\n        position ((x) - (SCROLLX)) ((y) - (SCROLLY))\n        set [ghost v] effect to ((100) - ((collecting) * (10)))\n    else\n        delete this clone\n    end\nend\n\nwhen I receive [setup v]\npoint in direction (90)\nhide\nset [float v] to [8]\nset [x v] to [0]\nset [y v] to [0]\nset [collecting v] to [n/a]\nset [already touched v] to [no]\nif <(LEVEL) = [1]> then\n    switch costume to (2 v)\n    Clone at X: [1326] Y: [-7] Float: [8]\n    Clone at X: [2241] Y: [500] Float: [8]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (2 v)\n        Clone at X: [740] Y: [264] Float: [8]\n        Clone at X: [1971] Y: [629] Float: [8]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (2 v)\n            Clone at X: [620] Y: [401] Float: [8]\n            Clone at X: [2402] Y: [591] Float: [8]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (2 v)\n                Clone at X: [738] Y: [464] Float: [8]\n                Clone at X: [1390] Y: [1008] Float: [8]\n            end\n        end\n    end\nend\nset [x v] to [-1000]\n\nClone at X: [1390] Y: [1008] Float: [8]\n\nClone at X: [-155] Y: [527] Float: [8]\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) Float: (float)\nset [float v] to (float)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\ndefine explode\nset [y v] to ((y) + ())\nset [collecting v] to [15]\nrepeat (5)\n    set [xv v] to (pick random (0) to (6))\n    set [yv v] to (pick random (8) to (14))\n    set [rotate v] to (pick random (-10) to (10))\n    set size to (pick random (80) to (120)) %\n    create clone of (_myself_ v)\nend\nrepeat (5)\n    set [xv v] to (pick random (-6) to (0))\n    set [yv v] to (pick random (8) to (14))\n    set [rotate v] to (pick random (-10) to (10))\n    set size to (pick random (80) to (120)) %\n    create clone of (_myself_ v)\nend\nset size to (100) %\nset [collecting v] to [n/a]\n\ndelete this clone\n\nwhen flag clicked\nhide\n\n@Clouds\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (cloud-a v)\n    Clone at X: [400] Y: [250]\n    Clone at X: [40] Y: [100]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 2 1 v)\n        Clone at X: [180] Y: [200]\n        Clone at X: [800] Y: [600]\n        Clone at X: [2000] Y: [520]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (level 3 1 v)\n            Clone at X: [0] Y: [0]\n            Clone at X: [320] Y: [300]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (level 3 1 v)\n                Clone at X: [0] Y: [0]\n                Clone at X: [320] Y: [300]\n            end\n        end\n    end\nend\nset [x v] to [-9999]\n\nClone at X: [40] Y: [100]\n\ndefine Clone at X: (x) Y: (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\ndefine position (x) (y)\nset [ghost v] effect to (50)\ngo to [back 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 [tick v]\nposition (round ((x) - ((SCROLLX) / (6)))) (round ((y) - ((SCROLLY) / (6))))\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen flag clicked\nhide\n\n@Coin Counter\n\nwhen I receive [setup v]\nsetup\n\ndefine setup\nset [digits v] to [0]\ngo to [front v] layer\nrepeat (6)\n    change [digits v] by (1)\n    create clone of (_myself_ v)\nend\nchange [digits v] by (1)\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [tick v]\ngo to x: (((220) + ((digits) * (16))) - ((length of (join (COLLECTED) (join [/] (COLLECTED MAX)))) * (16))) y: (155)\nset size to (25) %\nif <(length of (join (COLLECTED) (join [/] (COLLECTED MAX)))) < (digits)> then\n    hide\nelse\n    show\n    switch costume to (letter (digits) of (join (COLLECTED) (join [/] (COLLECTED MAX))))\nend\nif <key (9 v) pressed?> then\n    point towards (mouse-pointer v)\n    turn left (180) degrees\nelse\n    point in direction (90)\nend\n\nwhen flag clicked\nhide\n\n@Thumbnail\n\nwhen flag clicked\nhide\nforever\n    set [timer v] to ((timer) + (.1))\nend\n\nwhen [timer v] > (TIMER)\nshow list [chat - help v]\nstart sound [Xaf - Inferno v]\nshow\ngo to x: (0) y: (0)\ngo to [front v] layer\nset volume to (70) %\nforever\n    switch costume to (costume2 v)\n    set size to ((([sin v] of ((timer) * (200)) ) * (8)) + (100)) %\n    point in direction ((([sin v] of ((timer) * (100)) ) * (8)) + (90))\n    switch costume to (costume1 v)\n    set [timer v] to ((timer) + (.1))\nend\n\n@Sprite1\n\nwhen I receive [space v]\ngo to [front v] layer\nshow\ngo to x: (0) y: (-100)\nswitch costume to (Show Text)\nset [showing v] to [45]\nset [ghost v] effect to (0)\n\nwhen I receive [tick v]\nif <<(showing) > [0]> and <(showing) < [21]>> then\n    change [ghost v] effect by (5)\nend\nif <(showing) > [0]> then\n    change [showing v] by (-1)\nelse\n    hide\nend\n\nwhen flag clicked\nhide\n\n@Danger\n\nwhen I receive [ green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLLX)) ((y) - (SCROLLY))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    Clone at X: [1000] Y: [0]\n    Clone at X: [720] Y: [140]\n    Clone at X: [680] Y: [218]\n    Clone at X: [-880] Y: [153]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 2 1 v)\n        Clone at X: [903] Y: [359]\n        Clone at X: [800] Y: [350]\n        Clone at X: [950] Y: [0]\n        Clone at X: [250] Y: [-600]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (level 3 1 v)\n            Clone at X: [790] Y: [0]\n            Clone at X: [-160] Y: [490]\n            Clone at X: [170] Y: [230]\n            Clone at X: [1000] Y: [337]\n            Clone at X: [600] Y: [-330]\n            Clone at X: [600] Y: [20]\n            Clone at X: [-600] Y: [380]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (level 4 1 v)\n                Clone at X: [1140] Y: [176]\n                Clone at X: [-550] Y: [400]\n                Clone at X: [-700] Y: [20]\n                Clone at X: [750] Y: [350]\n                Clone at X: [750] Y: [-150]\n                Clone at X: [520] Y: [-10]\n                Clone at X: [500] Y: [93]\n                Clone at X: [800] Y: [0]\n            end\n        end\n    end\nend\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)\nchange [y v] by (y)\nnext costume\n\nwhen flag clicked\nhide\n\ndelete this clone\n\n