Platformer Creator 2.1!

Instructions:                     Platformer Creator 2.1!\n\n• Hover the mouse over the bottom of the screen for more functions.\n\narrow keys or WASD - character movement\n\nSaving and loading can only be done in EDIT mode!\n\nIn EDIT mode:\narrow keys - move the screen\nclick - place blocks\na/d - change block\nw - use air block\nSpace bar and click - copy the block under the cursor.\nc/v - adjust brightness\nz - undo\nx and z - redo\n\nBlock Info:\n\nSlime block - softens the character's fall.\nButton - activates the solid and unsolid blocks for 10 seconds.\nSolid block - solid until activated.\nUnsolid block - not solid until activated.\nDownward - disables jumping\nUpward - pushes the character into the air.\nRight - pushes the character right.\nLeft - pushes the character left.

@Stage\n\nwhen flag clicked\nif <is compiled?> then\n    switch backdrop to (editor v)\nelse\n    switch backdrop to (turbowarp v)\n    forever\n        change [color v] effect by (1)\n    end\nend\n\nwhen I receive [play v]\nswitch backdrop to (editor v)\n\nwhen I receive [menu v]\nswitch backdrop to (menu v)\n\n@lag reduce\n\nbroadcast (play v)\n\nset [# v] to [0]\nrepeat (length of [order v])\n    change [# v] by (1)\n    if <not <(#) = (item # of (item (#) of [order v]) in [order v])>> then\n        delete (#) of [order v]\n    end\nend\n\n​​breakpoint​​\n\ninsert (order) at (1) of [order v] \n\n@Jungojim\n\nwhen I start as a clone\nshow\npen up\nclear graphic effects\nset [jungojim: # v] to [1e-9]\nif <not <[jungoball] = ([costume name v] of [jungojim v])>> then\n    switch costume to (particles v)\n    go to x: ((pick random ((90) + ((10) * ([size v] of [jungojim v]))) to ((100) + ((10) * ([size v] of [jungojim v])))) * ([cos v] of (pick random (0) to (360)) )) y: ((pick random ((90) + ((10) * ([size v] of [jungojim v]))) to ((100) + ((10) * ([size v] of [jungojim v])))) * ([sin v] of (pick random (0) to (360)) ))\n    forever\n        go to x: ((((0) - (x position)) / (7)) + (x position)) y: ((((0) - (y position)) / (7)) + (y position))\n        set [ghost v] effect to ((distance to [jungojim v]) - ((3) * ([size v] of [jungojim v])))\n        set size to ((distance to [jungojim v]) / (2)) %\n        if <<(distance to [jungojim v]) < [5]> or <([costume name v] of [jungojim v]) = [jungoball]>> then\n            wait until <([costume name v] of [jungojim v]) = [boom]>\n            go to x: (pick random (-230) to (230)) y: (pick random (-170) to (170))\n            set [bounce v] to (pick random (0) to (10))\n            set [x v] to (pick random (-10) to (10))\n            set size to (pick random (80) to (120)) %\n            set [ghost v] effect to (pick random (0) to (50))\n            go to [front v] layer\n            forever\n                go to x: ((x position) + (x)) y: ((y position) + (bounce))\n                change [bounce v] by (-1)\n                if <(y position) < [-190]> then\n                    delete this clone\n                end\n            end\n        end\n    end\nelse\n    set [jungojim: # v] to [0]\n    go to [front v] layer\n    point in direction (_)\n    change [_ v] by (1)\n    switch costume to (_)\n    set rotation style [don't rotate v]\n    set [x v] to ((11) * ((_) - ((9) / (2))))\n    forever\n        change [bounce v] by (((((70) + ((30) * <not <([x v] of [jungojim v]) = (Jungojim: #)>>)) - (size)) / (3)) - ((bounce) / (3)))\n        if <not <([x v] of [jungojim v]) = (Jungojim: #)>> then\n            set [jungojim: # v] to ([x v] of [jungojim v])\n        end\n        go to x: ((((x) - (4)) * (5)) * ((1) + (((size) - (71)) / (70)))) y: ((20) * ([sin v] of (((30) * ((direction) - (3.5))) + ((180) * (timer))) ))\n        change [color v] effect by (((1) + (direction)) / (20))\n        change size by (bounce)\n        if <([bounce v] of [jungojim v]) = [100]> then\n            delete this clone\n        end\n    end\nend\n\nwhen flag clicked\ndelete all of [turbowarp link v]\nadd [https://turbowarp.org/545711542?hqpen&clones=Infinity] to [turbowarp link v]\nreset timer\nhide list [turbowarp link v]\nif <not <is compiled?>> then\n    show\n    set size to (100) %\n    set [_ v] to [0]\n    go to x: (0) y: (0)\n    point in direction (90)\n    switch costume to (turbowarp v)\n    forever\n        change [_ v] by (.05)\n        point in direction ((90) + ((3) * ([sin v] of ((60) * (_)) )))\n        set y to ((5) * ([sin v] of ((120) * (_)) ))\n        change [color v] effect by (1)\n        switch backdrop to (turbowarp v)\n    end\nelse\n    show list [turbowarp link v]\n    switch costume to (boom v)\n    set volume to (100) %\n    go to x: (0) y: (0)\n    point in direction (90)\n    show\n    erase all\n    pen up\n    set size to (100) %\n    stamp\n    reset timer\n    start sound [Savor the Moment2 v]\n    switch costume to (jungoball v)\n    set size to (1e4) %\n    repeat until <(timer) > ((3) * ((58) / (105)))>\n        set [ghost v] effect to ((size) - (140))\n        change size by (bounce)\n        change [bounce v] by ((((80) - (size)) / (20)) - ((bounce) / (2)))\n    end\n    wait ((58) / (105)) seconds\n    set [bounce v] to [0]\n    repeat until <(size) < [3]>\n        turn right (bounce) degrees\n        change size by (bounce)\n        set [brightness v] effect to ((100) - (size))\n        change [bounce v] by ((((0) - (size)) / (100)) - ((bounce) / (10)))\n    end\n    switch costume to (particles v)\n    set [bounce v] to [0]\n    reset timer\n    hide\n    point in direction (0)\n    set pen size to (0)\n    set pen color to (#fffdff)\n    repeat until <(bounce) > [100]>\n        pen down\n        turn right (1) degrees\n        create clone of (_myself_ v)\n        change size by ((bounce) / (100))\n        change pen size by (bounce)\n        change [bounce v] by ((.1) + ((bounce) / (10)))\n    end\n    switch costume to (jungoball v)\n    create [8] clones\n    erase all\n    wait (0) seconds\n    point in direction (90)\n    switch costume to (boom v)\n    set size to (100) %\n    show\n    clear graphic effects\n    set [x v] to [0]\n    repeat until <(x) > [10]>\n        set [x v] to ((round ((timer) / ((60) / (105)))) * (1))\n    end\n    show\n    stamp\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    repeat (50)\n        change volume by (-2)\n        change [ghost v] effect by (-2)\n        set [x v] to ((round ((timer) / ((60) / (105)))) * (1))\n    end\n    stop all sounds\n    set [bounce v] to [100]\n    broadcast (menu v)\n    erase all\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    set volume to (100) %\n    hide\nend\n\ndefine create (#) clones\nset [_ v] to [0]\nrepeat (#)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [play v]\nhide\n\n@blocks\n\ndefine Replace (x) of 1 of block info w/ (#)\ndelete all of [list v]\nrepeat (length of (item (1) of [your level v]))\n    add (letter ((length of [list v]) + (1)) of (item (1) of [your level v])) to [list v]\nend\nreplace item (x) of [list v] with (#)\nrepeat (length of [list v])\n    replace item (1) of [list v] with (join (item (1) of [list v]) (item (2) of [list v]))\n    delete (2) of [list v]\nend\nreplace item (1) of [your level v] with (item (1) of [list v])\n\ndefine create (#) clones\nset [# v] to [0]\nrepeat (#)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nshow\ndelete all of [list v]\nset size to (100) %\ngo to [front v] layer\nchange [# v] by (1)\ndelete all of [light v]\nadd [] to [light v]\nset rotation style [don't rotate v]\nswitch costume to (metal v)\nset [x v] to (([floor v] of ((#) / (11)) ) - (6))\nset [y v] to (((#) - (5)) - ((11) * ([floor v] of ((#) / (11)) )))\nforever\n    say []\n    if <<key (space v) pressed?> and <<<[1] = (length of [your level v])> and <[1] = (item (3) of [v v])>> and <(((x) + (round ((scrollx) / (40)))) + ((100) * ((y) + (round ((scrolly) / (40)))))) = ((round (((mouse x) + (scrollx)) / (40))) + ((100) * (round (((mouse y) + (scrolly)) / (40)))))>>> then\n        say [click to use this block type]\n        if <mouse down?> then\n            replace item (11) of [v v] with (costume [number v])\n        end\n    end\n    go to x: ((((x) * (40)) - (scrollx)) + ((40) * (round ((scrollx) / (40))))) y: ((((y) * (40)) - (scrolly)) + ((40) * (round ((scrolly) / (40)))))\n    switch costume to (item # of (letter (((x) + (round ((scrollx) / (40)))) + ((100) * ((y) + (round ((scrolly) / (40)))))) of (item (1) of [your level v])) in [order v])\n    show\n    if <<<((y) + (round ((scrolly) / (40)))) < [0]> or <((y) + (round ((scrolly) / (40)))) > [99]>> or <<((x) + (round ((scrollx) / (40)))) < [1]> or <((x) + (round ((scrollx) / (40)))) > [100]>>> then\n        hide\n    end\n    if <<[0] = (item (3) of [v v])> and <[start position*] = (costume [name v])>> then\n        switch costume to (eraser* v)\n    end\n    set [whirl v] effect to (((10) * ([sin v] of ((180) * ((timer) + ((x) + (round ((scrollx) / (40)))))) )) * <<< (costume [name v]) contains [lava]?> or < (costume [name v]) contains [water]?>> and <(item (1) of [order v]) = (letter (((x) + (round ((scrollx) / (40)))) + ((100) * (((y) + (1)) + (round ((scrolly) / (40)))))) of (item (1) of [your level v]))>>)\n    set [ghost v] effect to (((([y position v] of [names v]) + (190)) / (100)) * (((-2) * (y position)) * <(y position) < [0]>))\n    change size by ((((100) - ((5) * <[1] = (item (3) of [v v])>)) - (size)) / (5))\n    if < (costume [name v]) contains [rainbow]?> then\n        set [color v] effect to ((15) * (timer))\n    else\n        set [color v] effect to (0)\n    end\n    if < (costume [name v]) contains [grass]?> then\n        go [forward v] (5) layers\n    else\n        go to [back v] layer\n    end\n    if <<(letter (((x) + (round ((scrollx) / (40)))) + ((100) * (((y) - (1)) + (round ((scrolly) / (40)))))) of (item (1) of [your level v])) = (item (13) of [order v])> and <not << (costume [name v]) contains [*]?> or < [spike ball^light] contains (costume [name v])?>>>> then\n        Replace (((x) + (round ((scrollx) / (40)))) + ((100) * (((y) - (1)) + (round ((scrolly) / (40)))))) of 1 of block info w/ (item (14) of [order v])\n    end\n    if <<< (costume [name v]) contains [solid]?> and <(item (8) of [v v]) = [0]>> and <<[38] > ([abs v] of ((item (5) of [v v]) - (((y) * (40)) + ((40) * (round ((scrolly) / (40)))))) )> and <[38] > ([abs v] of (((item (4) of [v v]) - (item (1) of [v v])) - (((x) * (40)) + ((40) * (round ((scrollx) / (40)))))) )>>> then\n        if <[1] = (([abs v] of (((item (10) of [v v]) / (item (10) of [v v])) - <(costume [name v]) = [solid block]>) ) * < (costume [name v]) contains [solid block]?>)> then\n            replace item (8) of [v v] with [1]\n        end\n    end\n    if <<< (costume [name v]) contains [water]?> and <(item (8) of [v v]) = [0]>> and <<[40] > ([abs v] of ((item (5) of [v v]) - (((y) * (40)) + ((40) * (round ((scrolly) / (40)))))) )> and <[40] > ([abs v] of (((item (4) of [v v]) - (item (1) of [v v])) - (((x) * (40)) + ((40) * (round ((scrollx) / (40)))))) )>>> then\n        replace item (2) of [v v] with ((.85) * (item (2) of [v v]))\n        replace item (2) of [v v] with ((item (2) of [v v]) + (((1.5) * <<key (up arrow v) pressed?> or <key (w v) pressed?>>) - ((.5) * <<key (down arrow v) pressed?> or <key (s v) pressed?>>)))\n        replace item (11) of [v v] with [0]\n        create clone of (bubbles v)\n    end\n    if <<<(item (3) of [v v]) = [0]> and <(item (8) of [v v]) = [0]>> and <<<[0] < ([abs v] of (((item (10) of [v v]) / (item (10) of [v v])) - <(costume [name v]) = [solid block]>) )> and < (costume [name v]) contains [solid block]?>> or <<not < (costume [name v]) contains [*]?>> and <not < (costume [name v]) contains [solid block]?>>>>> then\n        if <<[40] > ([abs v] of (((item (5) of [v v]) + (item (2) of [v v])) - (((y) * (40)) + ((40) * (round ((scrolly) / (40)))))) )> and <[37] > ([abs v] of (((item (4) of [v v]) - (item (1) of [v v])) - (((x) * (40)) + ((40) * (round ((scrollx) / (40)))))) )>> then\n            replace item (5) of [v v] with (((40) * ((y) + (round ((scrolly) / (40))))) + ((40) * (([abs v] of ((item (5) of [v v]) - (((y) * (40)) + ((40) * (round ((scrolly) / (40)))))) ) / ((item (5) of [v v]) - (((y) * (40)) + ((40) * (round ((scrolly) / (40)))))))))\n            replace item (8) of [v v] with ((item (8) of [v v]) + < (costume [name v]) contains [^]?>)\n            if <[1] = (([abs v] of ((item (5) of [v v]) - (((y) * (40)) + ((40) * (round ((scrolly) / (40)))))) ) / ((item (5) of [v v]) - (((y) * (40)) + ((40) * (round ((scrolly) / (40)))))))> then\n                replace item (2) of [v v] with ((((item (2) of [v v]) / (-1.5)) * <<(costume [name v]) = [slime]> and <<not <([abs v] of (item (2) of [v v]) ) < [3]>> and <not <<key (up arrow v) pressed?> or <key (w v) pressed?>>>>>) + (<not < (costume [name v]) contains [downward]?>> * (((15) * <(costume [name v]) = [upward]>) + ((10) * <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <not <(costume [name v]) = [upward]>>>))))\n            else\n                replace item (2) of [v v] with (((3) * <(costume [name v]) = [upward]>) - (1))\n            end\n            if < (costume [name v]) contains [button]?> then\n                replace item (10) of [v v] with ((5) * < (costume [name v]) contains [button]?>)\n            end\n            replace item (1) of [v v] with ((item (1) of [v v]) + ((3) * (<[right] = (costume [name v])> - <[left] = (costume [name v])>)))\n            if < (costume [name v]) contains [finish]?> then\n                replace item (11) of [v v] with [1]\n            end\n        end\n        if <<<((-1) * ((item (1) of [v v]) / ([abs v] of (item (1) of [v v]) ))) = (((item (4) of [v v]) - (((x) * (40)) + ((40) * (round ((scrollx) / (40)))))) / ([abs v] of ((item (4) of [v v]) - (((x) * (40)) + ((40) * (round ((scrollx) / (40)))))) ))> and <[41] > ([abs v] of ((item (4) of [v v]) - (((x) * (40)) + ((40) * (round ((scrollx) / (40)))))) )>> and <[37] > ([abs v] of (((item (5) of [v v]) + (item (2) of [v v])) - (((y) * (40)) + ((40) * (round ((scrolly) / (40)))))) )>> then\n            replace item (4) of [v v] with (((40) * ((x) + (round ((scrollx) / (40))))) + ((40) * (([abs v] of ((item (4) of [v v]) - (((x) * (40)) + ((40) * (round ((scrollx) / (40)))))) ) / ((item (4) of [v v]) - (((x) * (40)) + ((40) * (round ((scrollx) / (40)))))))))\n            replace item (8) of [v v] with ((item (8) of [v v]) + < (costume [name v]) contains [^]?>)\n            replace item (1) of [v v] with ((3) * (<(costume [name v]) = [right]> - <(costume [name v]) = [left]>))\n            if < (costume [name v]) contains [finish]?> then\n                replace item (11) of [v v] with [1]\n            end\n        end\n    end\n    if < (costume [name v]) contains [solid block]?> then\n        set [brightness v] effect to ((-100) * (([abs v] of (((item (10) of [v v]) / (item (10) of [v v])) - <(costume [name v]) = [solid block]>) ) * < (costume [name v]) contains [solid block]?>))\n    else\n        light\n    end\nend\n\nwhen I receive [play v]\ndelete all of [v v]\nrepeat (16)\n    add [0] to [v v]\nend\nreplace item (15) of [v v] with [empty]\nreplace item (3) of [v v] with [1]\ndelete all of [turbowarp link v]\nblock range [100]\nswitch costume to (start position* v)\nset rotation style [don't rotate v]\nset [# v] to [-1]\ncreate clone of (_myself_ v)\nwait (0) seconds\ncreate ((11) * (14)) clones\npoint in direction (90)\ngo to [front v] layer\nset size to (100) %\nset [# v] to [0]\nclear graphic effects\nwait (0) seconds\nshow\nforever\n    go to [front v] layer\n    change [scrollx v] by (((item (4) of [v v]) - (scrollx)) / (5))\n    change [scrolly v] by (((item (5) of [v v]) - (scrolly)) / (5))\n    replace item (4) of [v v] with ((item (4) of [v v]) + (item (1) of [v v]))\n    replace item (5) of [v v] with ((item (5) of [v v]) + (item (2) of [v v]))\n    if <(item (3) of [v v]) = [1]> then\n        if <(item (6) of [v v]) = [1]> then\n            search block\n        end\n        if <<(length of [your level v]) = [1]> and <<not <key (space v) pressed?>> and <<mouse down?> and <([y position v] of [names v]) < [-190]>>>> then\n            if <[2] = (item # of (letter ((round (((mouse x) + (scrollx)) / (40))) + ((100) * (round (((mouse y) + (scrolly)) / (40))))) of (item (1) of [your level v])) in [order v])> then\n                replace item (7) of [v v] with [0]\n            end\n            wait (0) seconds\n            Replace ((round (((mouse x) + (scrollx)) / (40))) + ((100) * (round (((mouse y) + (scrolly)) / (40))))) of 1 of block info w/ (item (costume [number v]) of [order v])\n            if <<(costume [name v]) = [start position*]> or <(item (2) of [order v]) = (item ((round (((mouse x) + (scrollx)) / (40))) + ((100) * (round (((mouse y) + (scrolly)) / (40))))) of [your level v])>> then\n                if <not <<(item (7) of [v v]) = [0]> or <(item (7) of [v v]) = ((round (((mouse x) + (scrollx)) / (40))) + ((100) * (round (((mouse y) + (scrolly)) / (40)))))>>> then\n                    Replace (item (7) of [v v]) of 1 of block info w/ (item (1) of [order v])\n                end\n                replace item (7) of [v v] with ((round (((mouse x) + (scrollx)) / (40))) + ((100) * (round (((mouse y) + (scrolly)) / (40)))))\n                wait until <not <mouse down?>>\n            end\n        end\n        go to x: (((round (((mouse x) + (scrollx)) / (40))) * (40)) - (scrollx)) y: (((round (((mouse y) + (scrolly)) / (40))) * (40)) - (scrolly))\n        set [ghost v] effect to ((30) + (((([y position v] of [names v]) + (196)) / (100)) * ((-2) * (y position))))\n        if <<key (w v) pressed?> and <(length of [your level v]) = [1]>> then\n            start sound [Clock Ticking v]\n            switch costume to (eraser* v)\n            wait until <not <key (w v) pressed?>>\n        end\n        if <<(item (3) of [v v]) = [1]> and <not <(item (11) of [v v]) = [0]>>> then\n            switch costume to (item (11) of [v v])\n            replace item (11) of [v v] with [0]\n        end\n        if <not <(costume [name v]) = [eraser*]>> then\n            point in direction (costume [number v])\n        end\n        if <<<key (a v) pressed?> or <key (d v) pressed?>> and <(length of [your level v]) = [1]>> then\n            start sound [Clock Ticking v]\n            if <(costume [name v]) = [eraser*]> then\n                switch costume to (direction)\n            else\n                switch costume to ((costume [number v]) + (<key (d v) pressed?> - <key (a v) pressed?>))\n                switch costume to ((costume [number v]) + ((<key (d v) pressed?> - <key (a v) pressed?>) * <(costume [name v]) = [eraser*]>))\n            end\n            wait until <not <<key (a v) pressed?> or <key (d v) pressed?>>>\n        end\n    end\nend\n\ndefine block range (#)\ndelete all of [your level v]\nadd [] to [your level v]\nrepeat ((#) * (#))\n    replace item (1) of [your level v] with (join (item (1) of [your level v]) (item (1) of [order v]))\nend\nset [scrollx v] to ((#) * (20))\nset [scrolly v] to ((#) * (20))\nreplace item (4) of [v v] with (scrollx)\nreplace item (5) of [v v] with (scrolly)\n\nwhen I receive [play v]\nforever\n    if <<<key (any v) pressed?> and <(length of [your level v]) = [1]>> and <(item (3) of [v v]) = [1]>> then\n        replace item (4) of [v v] with ((item (4) of [v v]) + ((40) * (<key (right arrow v) pressed?> - <key (left arrow v) pressed?>)))\n        replace item (5) of [v v] with ((item (5) of [v v]) + ((40) * (<key (up arrow v) pressed?> - <key (down arrow v) pressed?>)))\n        wait until <not <key (any v) pressed?>>\n    else\n        replace item (10) of [v v] with (<(item (10) of [v v]) > [0]> * ((item (10) of [v v]) - (1)))\n        wait <(item (3) of [v v]) = [0]> seconds\n    end\nend\n\ndefine search block\nadd [] to [your level v]\nask [Block Search:] and wait\nset [x v] to []\nset [y v] to []\nhide\nif <not <<(answer) = []> or <(answer) = [ ]>>> then\n    switch costume to (start position* v)\n    repeat until <(costume [number v]) = [1]>\n        if <(costume [name v]) = (answer)> then\n            set [y v] to (costume [name v])\n        end\n        if < (costume [name v]) contains (answer)?> then\n            set [x v] to (costume [name v])\n        end\n        next costume\n    end\n    if <<(y) = (answer)> or < (x) contains (answer)?>> then\n        if < (x) contains (answer)?> then\n            switch costume to (x)\n        end\n        if <(y) = (answer)> then\n            switch costume to (y)\n        end\n    else\n        start sound [E Elec Bass v]\n        switch costume to (direction)\n    end\nend\nrepeat until <(length of [your level v]) = [1]>\n    delete (2) of [your level v]\nend\nreplace item (6) of [v v] with [0]\nshow\n\ndefine light\nif <not <(item (9) of [v v]) = [0]>> then\n    if << (item (1) of [your level v]) contains (item (16) of [order v])?> or < (item (1) of [your level v]) contains (item (17) of [order v])?>> then\n        if <not <(item (1) of [light v]) = (item (1) of [your level v])>> then\n            set [_# v] to [0]\n            delete all of [list v]\n            repeat (length of (item (1) of [your level v]))\n                change [_# v] by (1)\n                if < (join (item (16) of [order v]) (item (17) of [order v])) contains (letter (_#) of (item (1) of [your level v]))?> then\n                    add (_#) to [list v]\n                end\n            end\n            replace item (1) of [light v] with (item (1) of [your level v])\n        end\n    else\n        delete all of [list v]\n    end\nend\nif <not <(_#) = (((x) + (round ((scrollx) / (40)))) + ((100) * ((y) + (round ((scrolly) / (40))))))>> then\n    set [_# v] to [0]\n    repeat (length of [list v])\n        change [_# v] by (1)\n        if <([sqrt v] of (((((x) + (round ((scrollx) / (40)))) - ((item (_#) of [list v]) - ((100) * ([floor v] of (((item (_#) of [list v]) - (1)) / (100)) )))) * (((x) + (round ((scrollx) / (40)))) - ((item (_#) of [list v]) - ((100) * ([floor v] of (((item (_#) of [list v]) - (1)) / (100)) ))))) + ((((y) + (round ((scrolly) / (40)))) - ([floor v] of (((item (_#) of [list v]) - (1)) / (100)) )) * (((y) + (round ((scrolly) / (40)))) - ([floor v] of (((item (_#) of [list v]) - (1)) / (100)) )))) ) < ([sqrt v] of (((((x) + (round ((scrollx) / (40)))) - ((item (# in list) of [list v]) - ((100) * ([floor v] of (((item (# in list) of [list v]) - (1)) / (100)) )))) * (((x) + (round ((scrollx) / (40)))) - ((item (# in list) of [list v]) - ((100) * ([floor v] of (((item (# in list) of [list v]) - (1)) / (100)) ))))) + ((((y) + (round ((scrolly) / (40)))) - ([floor v] of (((item (# in list) of [list v]) - (1)) / (100)) )) * (((y) + (round ((scrolly) / (40)))) - ([floor v] of (((item (# in list) of [list v]) - (1)) / (100)) )))) )> then\n            set [# in list v] to (_#)\n        end\n    end\n    set [_# v] to (((x) + (round ((scrollx) / (40)))) + ((100) * ((y) + (round ((scrolly) / (40))))))\nend\nset [brightness v] effect to (item (9) of [v v])\nif << (item (1) of [your level v]) contains (item (16) of [order v])?> or < (item (1) of [your level v]) contains (item (17) of [order v])?>> then\n    if <(item (9) of [v v]) < ((-20) * ([sqrt v] of (((((x) + (round ((scrollx) / (40)))) - ((item (# in list) of [list v]) - ((100) * ([floor v] of (((item (# in list) of [list v]) - (1)) / (100)) )))) * (((x) + (round ((scrollx) / (40)))) - ((item (# in list) of [list v]) - ((100) * ([floor v] of (((item (# in list) of [list v]) - (1)) / (100)) ))))) + ((((y) + (round ((scrolly) / (40)))) - ([floor v] of (((item (# in list) of [list v]) - (1)) / (100)) )) * (((y) + (round ((scrolly) / (40)))) - ([floor v] of (((item (# in list) of [list v]) - (1)) / (100)) )))) ))> then\n        set [brightness v] effect to ((-20) * ([sqrt v] of (((((x) + (round ((scrollx) / (40)))) - ((item (# in list) of [list v]) - ((100) * ([floor v] of (((item (# in list) of [list v]) - (1)) / (100)) )))) * (((x) + (round ((scrollx) / (40)))) - ((item (# in list) of [list v]) - ((100) * ([floor v] of (((item (# in list) of [list v]) - (1)) / (100)) ))))) + ((((y) + (round ((scrolly) / (40)))) - ([floor v] of (((item (# in list) of [list v]) - (1)) / (100)) )) * (((y) + (round ((scrolly) / (40)))) - ([floor v] of (((item (# in list) of [list v]) - (1)) / (100)) )))) ))\n    end\n    if <<<((-1) * (distance to [guy v])) > (item (9) of [v v])> and <(item (3) of [v v]) = [0]>> and <((-1) * (distance to [guy v])) > ((-20) * ([sqrt v] of (((((x) + (round ((scrollx) / (40)))) - ((item (# in list) of [list v]) - ((100) * ([floor v] of (((item (# in list) of [list v]) - (1)) / (100)) )))) * (((x) + (round ((scrollx) / (40)))) - ((item (# in list) of [list v]) - ((100) * ([floor v] of (((item (# in list) of [list v]) - (1)) / (100)) ))))) + ((((y) + (round ((scrolly) / (40)))) - ([floor v] of (((item (# in list) of [list v]) - (1)) / (100)) )) * (((y) + (round ((scrolly) / (40)))) - ([floor v] of (((item (# in list) of [list v]) - (1)) / (100)) )))) ))>> then\n        set [brightness v] effect to ((-1) * (distance to [guy v]))\n    end\nelse\n    if <<((-1) * (distance to [guy v])) > (item (9) of [v v])> and <(item (3) of [v v]) = [0]>> then\n        set [brightness v] effect to ((-1) * (distance to [guy v]))\n    end\nend\n\nwhen I receive [play v]\nreplace item (12) of [v v] with [1]\ndelete all of [undo v]\nwait until <(item (14) of [v v]) = [0]>\nwait (.2) seconds\nsave to "undo"\nforever\n    if <<[1] = (item (3) of [v v])> and <(length of [your level v]) = [1]>> then\n        if <<not <key (space v) pressed?>> and <<mouse down?> and <([y position v] of [names v]) < [-190]>>> then\n            if <not <(item (12) of [v v]) = [1]>> then\n                new undo\n            end\n            wait until <not <mouse down?>>\n            save to "undo"\n        end\n        if <key (z v) pressed?> then\n            replace item (12) of [v v] with ((item (12) of [v v]) + (<<not <key (x v) pressed?>> and <(item (12) of [v v]) < (length of [undo v])>> - <<key (x v) pressed?> and <(item (12) of [v v]) > [1]>>))\n            load to "undo"\n            wait until <not <key (z v) pressed?>>\n        end\n    end\n    if <(length of [your level v]) > [1]> then\n        set [x v] to (item (1) of [your level v])\n        wait until <(length of [your level v]) = [1]>\n        if <<not <(x) = (item (1) of [your level v])>> or <(answer) = [reset]>> then\n            replace item (12) of [v v] with [1]\n            delete all of [undo v]\n            save to "undo"\n        end\n    end\nend\n\ndefine save to "undo"\nset [# v] to [1]\nset [# in list v] to (direction)\ninsert [] at (1) of [undo v] \nrepeat until <(#) > (length of (item (1) of [your level v]))>\n    if <(join (letter (#) of (item (1) of [your level v])) (join (letter (#) of (item (1) of [your level v])) (letter (#) of (item (1) of [your level v])))) = (join (letter (#) of (item (1) of [your level v])) (join (letter ((#) + (1)) of (item (1) of [your level v])) (letter ((#) + (2)) of (item (1) of [your level v]))))> then\n        replace item (1) of [undo v] with (join (item (1) of [undo v]) (join (letter (#) of (item (1) of [your level v])) [&]))\n        delete all of [list v]\n        point in direction (0)\n        repeat (length of [order v])\n            if <<(direction) = [0]> and <not <((#) + (1)) > (length of (item (1) of [your level v]))>>> then\n                add (letter (#) of (item (1) of [your level v])) to [list v]\n                point in direction <not <(letter (#) of (item (1) of [your level v])) = (letter ((#) + (1)) of (item (1) of [your level v]))>>\n                change [# v] by (1)\n            end\n        end\n        repeat ((length of [list v]) - (1))\n            replace item (1) of [list v] with (join (item (1) of [list v]) (item (2) of [list v]))\n            delete (2) of [list v]\n        end\n        replace item (1) of [undo v] with (join (item (1) of [undo v]) (item (length of (item (1) of [list v])) of [order v]))\n    else\n        replace item (1) of [undo v] with (join (item (1) of [undo v]) (letter (#) of (item (1) of [your level v])))\n        change [# v] by (1)\n    end\nend\nreplace item (1) of [undo v] with (join (item (1) of [undo v]) [&&])\npoint in direction (# in list)\nif <(item (1) of [undo v]) = (item (2) of [undo v])> then\n    delete (1) of [undo v]\nend\n\ndefine load to "undo"\nreplace item (1) of [your level v] with []\nset [# v] to [1]\nrepeat until <(join (letter ((#) + (1)) of (item (item (12) of [v v]) of [undo v])) (letter ((#) + (2)) of (item (item (12) of [v v]) of [undo v]))) = (join [&] [&])>\n    if <(letter ((#) + (1)) of (item (item (12) of [v v]) of [undo v])) = [&]> then\n        repeat (item # of (letter ((#) + (2)) of (item (item (12) of [v v]) of [undo v])) in [order v])\n            replace item (1) of [your level v] with (join (item (1) of [your level v]) (letter (#) of (item (item (12) of [v v]) of [undo v])))\n        end\n        change [# v] by (3)\n    else\n        replace item (1) of [your level v] with (join (item (1) of [your level v]) (letter (#) of (item (item (12) of [v v]) of [undo v])))\n        change [# v] by (1)\n    end\nend\nreplace item (1) of [your level v] with (join (item (1) of [your level v]) (letter (#) of (item (item (12) of [v v]) of [undo v])))\n\nwhen flag clicked\nhide\n\ndefine new undo\nsave to "undo"\nset [x v] to [2]\nrepeat until <<(item (1) of [undo v]) = (item (x) of [undo v])> or <(x) > (length of [undo v])>>\n    change [x v] by (1)\nend\nchange [x v] by (-1)\ndelete (1) of [undo v]\nif <not <(x) > (length of [undo v])>> then\n    set [y v] to (length of [undo v])\n    repeat ((x) - (1))\n        delete (1) of [undo v]\n    end\nend\nreplace item (12) of [v v] with [1]\n\nwhen I start as a clone\nforever\n    if <<<[0] = (item (3) of [v v])> and <(item (8) of [v v]) = [0]>> and <<(costume [name v]) = [checkpoint*]> and <touching (guy v)?>>> then\n        Replace (((x) + (round ((scrollx) / (40)))) + ((100) * ((y) + (round ((scrolly) / (40)))))) of 1 of block info w/ (item (82) of [order v])\n        add (((x) + (round ((scrollx) / (40)))) + ((100) * ((y) + (round ((scrolly) / (40)))))) to [turbowarp link v]\n        replace item (15) of [v v] with ((40) * ((x) + (round ((scrollx) / (40)))))\n        replace item (16) of [v v] with ((40) * ((y) + (round ((scrolly) / (40)))))\n    end\nend\n\n@names\n\ndefine word display\nset [# v] to [0]\nrepeat (length of ([costume name v] of [blocks v]))\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nchange [# v] by (1)\nshow\nclear graphic effects\nset size to (7) %\nset [y v] to [0]\nset [x v] to (#)\npoint in direction (90)\nset [time v] to (timer)\nset [costume name of blocks v] to ([costume name v] of [blocks v])\nrepeat until <<([y position v] of [names v]) > [-190]> or <<not <(costume name of blocks) = ([costume name v] of [blocks v])>> or <((timer) - (time)) > [2]>>>\n    go to x: ((((y) / (35)) * ((14) * (((x) + (-.5)) - (((length of (costume name of blocks)) - << (costume name of blocks) contains [^]?> or < (costume name of blocks) contains [*]?>>) / (2))))) + ([x position v] of [blocks v])) y: ((y) + ([y position v] of [blocks v]))\n    set [ghost v] effect to ((100) - ((100) * ((y) / (35))))\n    change [y v] by (((35) - (y)) / (5))\n    go to [front v] layer\n    if <not < [ *^] contains (letter (x) of ([costume name v] of [blocks v]))?>> then\n        switch costume to (letter (x) of ([costume name v] of [blocks v]))\n    else\n        hide\n    end\nend\nrepeat (10)\n    go to x: ((((y) / (35)) * ((14) * (((x) + (-.5)) - (((length of (costume name of blocks)) - << (costume name of blocks) contains [^]?> or < (costume name of blocks) contains [*]?>>) / (2))))) + ([x position v] of [blocks v])) y: ((y) + ([y position v] of [blocks v]))\n    change [y v] by (((35) - (y)) / (5))\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen I receive [play v]\nhide\nset y to (-1e9)\nerase all\nwait (.2) seconds\npoint in direction (1)\nshow list [your level v]\nrepeat until <(y position) < [-190]>\n    clone script\nend\nforever\n    if <<mouse down?> and < (Your Level) contains [triple]?>> then\n        replace item (1) of [your level v] with (item (1) of [list v])\n        repeat (10)\n            delete (2) of [your level v]\n        end\n        show list [your level v]\n    end\n    if <<(length of [your level v]) = [1]> and <<(item (3) of [v v]) = [1]> and <(item (6) of [v v]) = [0]>>> then\n        if <<not <(direction) = ([costume # v] of [blocks v])>> and <(y position) < [-190]>> then\n            word display\n            point in direction ([costume # v] of [blocks v])\n        end\n    end\n    if <<(mouse y) < [-150]> and <(length of [your level v]) = [1]>> then\n        repeat until <<(y position) < [-190]> and <(mouse y) > [-80]>>\n            clone script\n        end\n        erase all\n    end\nend\n\ndefine make 5 faclones\nrepeat (5)\n    add [0] to [faclones v]\n    add [0] to [faclones v]\n    add [0] to [faclones v]\n    add [0] to [faclones v]\nend\n\ndefine clone script\nerase all\nset [time v] to [1]\nrepeat ((length of [faclones v]) / (4))\n    switch costume to ((((time) / (3)) - (5)) + ((3) * <<(time) = [7]> and <(item (3) of [v v]) = [0]>>))\n    go to x: ((((y position) + (220)) / (100)) * ((30) * ((time) - (7)))) y: ((y position) + ((((-120) - ((100) * <(mouse y) > [-80]>)) - (y position)) / (20)))\n    replace item (time) of [faclones v] with ((((item ((time) + (1)) of [faclones v]) + (item (time) of [faclones v])) + (y position)) + (113))\n    replace item ((time) + (1)) of [faclones v] with ((item ((time) + (1)) of [faclones v]) + ((((100) - (item (time) of [faclones v])) / (5)) - ((item ((time) + (1)) of [faclones v]) / (3))))\n    replace item ((time) + (2)) of [faclones v] with ((item ((time) + (2)) of [faclones v]) + ((((100) + ((10) * <touching (mouse-pointer v)?>)) - (item ((time) + (2)) of [faclones v])) / (5)))\n    set size to ((((y position) + (220)) / (100)) * (item ((time) + (2)) of [faclones v])) %\n    if <(length of [your level v]) = [1]> then\n        point in direction (item (time) of [faclones v])\n    end\n    if <<[1] = (length of [your level v])> and <<<mouse down?> and <(costume name of blocks) = [0]>> and <(item ((time) + (2)) of [faclones v]) > [101]>>> then\n        if <((round ((mouse x) / (95))) + (3)) = [3]> then\n            repeat (length of [turbowarp link v])\n                Replace (item (1) of [turbowarp link v]) of 1 of block info w/ (item (83) of [order v])\n                delete (1) of [turbowarp link v]\n            end\n            replace item (3) of [v v] with (() + <(item (3) of [v v]) = [0]>)\n            replace item (15) of [v v] with [empty]\n        end\n        if <(item (3) of [v v]) = [1]> then\n            if <((round ((mouse x) / (95))) + (3)) = [1]> then\n                save\n            end\n            if <((round ((mouse x) / (95))) + (3)) = [2]> then\n                load\n            end\n            if <((round ((mouse x) / (95))) + (3)) = [4]> then\n                replace item (6) of [v v] with [1]\n            end\n            if <((round ((mouse x) / (95))) + (3)) = [5]> then\n                replace item (13) of [v v] with [1]\n            end\n        end\n    end\n    set [color v] effect to ((time) * (4))\n    change [time v] by (3)\n    stamp\nend\nset [costume name of blocks v] to (() + <mouse down?>)\n\ndefine save\nif <not < (item (1) of [your level v]) contains (item (2) of [order v])?>> then\n    create clone of (guy v)\nelse\n    set [# v] to [1]\n    add [] to [your level v]\n    set rotation style [don't rotate v]\n    if <(length of [your level v]) > [2]> then\n        delete (2) of [your level v]\n    end\n    repeat until <(#) > (length of (item (1) of [your level v]))>\n        if <(join (letter (#) of (item (1) of [your level v])) (join (letter (#) of (item (1) of [your level v])) (join (letter (#) of (item (1) of [your level v])) (letter (#) of (item (1) of [your level v]))))) = (join (letter (#) of (item (1) of [your level v])) (join (letter ((#) + (1)) of (item (1) of [your level v])) (join (letter ((#) + (2)) of (item (1) of [your level v])) (letter ((#) + (3)) of (item (1) of [your level v])))))> then\n            replace item (length of [your level v]) of [your level v] with (join (item (length of [your level v]) of [your level v]) (join (letter (#) of (item (1) of [your level v])) [&]))\n            delete all of [list v]\n            point in direction (0)\n            repeat (length of [order v])\n                if <<(direction) = [0]> and <not <((#) + (1)) > (length of (item (1) of [your level v]))>>> then\n                    add (letter (#) of (item (1) of [your level v])) to [list v]\n                    point in direction <not <(letter (#) of (item (1) of [your level v])) = (letter ((#) + (1)) of (item (1) of [your level v]))>>\n                    change [# v] by (1)\n                end\n            end\n            repeat ((length of [list v]) - (1))\n                replace item (1) of [list v] with (join (item (1) of [list v]) (item (2) of [list v]))\n                delete (2) of [list v]\n            end\n            replace item (length of [your level v]) of [your level v] with (join (item (length of [your level v]) of [your level v]) (item (length of (item (1) of [list v])) of [order v]))\n        else\n            replace item (length of [your level v]) of [your level v] with (join (item (length of [your level v]) of [your level v]) (letter (#) of (item (1) of [your level v])))\n            change [# v] by (1)\n        end\n    end\n    delete all of [list v]\n    add (item (1) of [your level v]) to [list v]\n    replace item (length of [your level v]) of [your level v] with (join (item (length of [your level v]) of [your level v]) (join [&&] (join (item ([abs v] of ((item (9) of [v v]) + (1)) ) of [order v]) (item (item (14) of [v v]) of [order v]))))\n    insert [Triple click the code below and press command c to copy] at (2) of [your level v] \n    add [click below the list to return] to [your level v]\n    set rotation style [all around v]\n    hide list [your level v]\n    point in direction (90)\nend\n\ndefine load\nshow list [your level v]\nadd [] to [your level v]\nask [enter your code by pressing "command + v" \(reset building area by typing in "reset"\)] and wait\nif <not < (answer) contains [&&]?>> then\n    if <(answer) = [reset]> then\n        block range [100]\n    else\n        say [Couldn't load] for (1) seconds\n        start sound [E Elec Bass v]\n    end\nelse\n    replace item (1) of [your level v] with []\n    set [# v] to [1]\n    repeat until <(join (letter ((#) + (1)) of (answer)) (letter ((#) + (2)) of (answer))) = (join [&] [&])>\n        if <(letter ((#) + (1)) of (answer)) = [&]> then\n            repeat (item # of (letter ((#) + (2)) of (answer)) in [order v])\n                replace item (1) of [your level v] with (join (item (1) of [your level v]) (letter (#) of (answer)))\n            end\n            change [# v] by (3)\n        else\n            replace item (1) of [your level v] with (join (item (1) of [your level v]) (letter (#) of (answer)))\n            change [# v] by (1)\n        end\n    end\n    if <(length of (item (1) of [your level v])) > [9998]> then\n        replace item (1) of [your level v] with (join (item (1) of [your level v]) (letter (#) of (answer)))\n        change [# v] by (3)\n        replace item (9) of [v v] with ((-1) * ((item # of (letter (#) of (answer)) in [order v]) - (1)))\n        replace item (14) of [v v] with (item # of (letter ((#) + (1)) of (answer)) in [order v])\n        find start\n    else\n        say [Couldn't load] for (1) seconds\n        start sound [E Elec Bass v]\n        block range [100]\n    end\nend\nrepeat until <(length of [your level v]) = [1]>\n    delete (2) of [your level v]\nend\n\ndefine find start\nset [# v] to [0]\nrepeat (length of (item (1) of [your level v]))\n    change [# v] by <not <(letter (#) of (item (1) of [your level v])) = (item (2) of [order v])>>\nend\nif <(item (15) of [v v]) = [empty]> then\n    replace item (4) of [v v] with ((40) * ((#) - ((100) * ([floor v] of (((#) - (1)) / (100)) ))))\n    replace item (5) of [v v] with ((40) * ([floor v] of (((#) - (1)) / (100)) ))\nelse\n    replace item (4) of [v v] with (item (15) of [v v])\n    replace item (5) of [v v] with (item (16) of [v v])\nend\nreplace item (1) of [v v] with [0]\nreplace item (2) of [v v] with [0]\nreplace item (7) of [v v] with (#)\n\nwhen flag clicked\nhide\n\ndefine block range (#)\ndelete all of [your level v]\nadd [] to [your level v]\nrepeat ((#) * (#))\n    replace item (1) of [your level v] with (join (item (1) of [your level v]) (item (1) of [order v]))\nend\nset [scrollx v] to ((#) * (20))\nset [scrolly v] to ((#) * (20))\nreplace item (4) of [v v] with (scrollx)\nreplace item (5) of [v v] with (scrolly)\n\ngo to x: (([x position v] of [blocks v]) + ((14) * ())) y: (0)\n\ndefine Replace (x) of 1 of block info w/ (#)\ndelete all of [list v]\nrepeat (length of (item (1) of [your level v]))\n    add (letter ((length of [list v]) + (1)) of (item (1) of [your level v])) to [list v]\nend\nreplace item (x) of [list v] with (#)\nrepeat (length of [list v])\n    replace item (1) of [list v] with (join (item (1) of [list v]) (item (2) of [list v]))\n    delete (2) of [list v]\nend\nreplace item (1) of [your level v] with (item (1) of [list v])\n\n@guy\n\ndefine find start\nset [# v] to [0]\nreplace item (1) of [v v] with [0]\nreplace item (2) of [v v] with [0]\nrepeat (length of (item (1) of [your level v]))\n    change [# v] by <not <(letter (#) of (item (1) of [your level v])) = (item (2) of [order v])>>\nend\nif <(item (15) of [v v]) = [empty]> then\n    replace item (4) of [v v] with ((40) * ((#) - ((100) * ([floor v] of (((#) - (1)) / (100)) ))))\n    replace item (5) of [v v] with ((40) * ([floor v] of (((#) - (1)) / (100)) ))\nelse\n    replace item (4) of [v v] with (item (15) of [v v])\n    replace item (5) of [v v] with (item (16) of [v v])\nend\nreplace item (7) of [v v] with (#)\n\nwhen I receive [play v]\nhide\nwait (.2) seconds\nset size to (0) %\nswitch costume to (guy v)\nset [timer v] to (timer)\nforever\n    go to [front v] layer\n    if <(item (14) of [v v]) = [0]> then\n        replace item (14) of [v v] with [1]\n    end\n    if <(item (3) of [v v]) = [0]> then\n        if <not < (item (1) of [your level v]) contains (item (2) of [order v])?>> then\n            replace item (3) of [v v] with [1]\n            create clone of (_myself_ v)\n        else\n            show\n            find start\n            clear graphic effects\n            set size to (100) %\n            switch costume to (guy v)\n            replace item (8) of [v v] with [0]\n            replace item (11) of [v v] with [0]\n            repeat until <(item (3) of [v v]) = [1]>\n                next costume\n                go [backward v] (5) layers\n                replace item (1) of [v v] with (((.8) * (item (1) of [v v])) + ((2) * (<<key (d v) pressed?> or <key (right arrow v) pressed?>> - <<key (a v) pressed?> or <key (left arrow v) pressed?>>)))\n                replace item (2) of [v v] with ((item (2) of [v v]) - (1))\n                go to x: ((item (4) of [v v]) - (scrollx)) y: ((item (5) of [v v]) - (scrolly))\n                if <<(item (8) of [v v]) > [0]> or <(y position) < [-240]>> then\n                    replace item (2) of [v v] with [10]\n                    replace item (8) of [v v] with [1]\n                    replace item (10) of [v v] with [0]\n                    repeat until <(y position) < [-240]>\n                        turn right ((15) * (<(item (1) of [v v]) = [0]> + ((item (1) of [v v]) / ([abs v] of (item (1) of [v v]) )))) degrees\n                        go to x: ((item (4) of [v v]) - (scrollx)) y: ((item (5) of [v v]) - (scrolly))\n                        replace item (2) of [v v] with ((item (2) of [v v]) - (2))\n                    end\n                    replace item (8) of [v v] with [0]\n                    point in direction (90)\n                    find start\n                end\n            end\n            replace item (10) of [v v] with [0]\n            replace item (11) of [v v] with [0]\n            set size to (0) %\n            find start\n            hide\n        end\n    else\n        replace item (9) of [v v] with (<(item (9) of [v v]) < [1e-9]> * ((item (9) of [v v]) + ((5) * (<[1] = (length of [your level v])> * (<key (v v) pressed?> - <key (c v) pressed?>)))))\n        if <(item (9) of [v v]) > [0]> then\n            replace item (9) of [v v] with [0]\n        end\n        if <(item (9) of [v v]) < [-100]> then\n            replace item (9) of [v v] with [-100]\n        end\n        change [bounce v] by ((((100) - (size)) / (10)) - ((bounce) / (2)))\n        replace item (1) of [v v] with [0]\n        replace item (2) of [v v] with [0]\n        change [color v] effect by (1)\n        switch costume to (bright* v)\n        change size by (bounce)\n        go to x: (-185) y: (140)\n        show\n    end\nend\n\nwhen I start as a clone\nswitch costume to (warning* v)\nset [timer v] to (timer)\ngo to x: (0) y: (0)\nclear graphic effects\nset size to (0) %\nshow\nrepeat until <<((timer) - (timer)) > [3]> and <(size) < [10]>>\n    change [bounce v] by (((((100) * <((timer) - (timer)) < [2]>) - (size)) / (3)) - ((bounce) / (2)))\n    set [ghost v] effect to ((100) - (size))\n    change size by (bounce)\n    go to [front v] layer\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\ndefine next costume\nchange size by (bounce)\nswitch costume to (item (14) of [v v])\nchange [bounce v] by (((((100) + ((10) * (<touching (mouse-pointer v)?> - ((2) * <<mouse down?> and <touching (mouse-pointer v)?>>)))) - (size)) / (2)) - ((bounce) / (2)))\nif <<<mouse down?> and <touching (mouse-pointer v)?>> and <((timer) - (timer)) > [.2]>> then\n    set [timer v] to (timer)\n    next costume\n    repeat until <not < (costume [name v]) contains [*]?>>\n        next costume\n    end\n    replace item (14) of [v v] with (costume [number v])\nend\n\n@Menu\n\nwhen I start as a clone\nshow\ngo to [front v] layer\nif <([size v] of [menu v]) > [50]> then\n    change [# v] by (2)\n    go to x: ((#) * (1e9)) y: (0)\n    switch costume to ((((#) + (1)) / (2)) + (2))\n    forever\n        go to x: ((x position) + (((0) - (x position)) / (3))) y: (0)\n        point in direction ([direction v] of [menu v])\n        set size to ([size v] of [menu v]) %\n        if <(size) < [10]> then\n            create clone of (_myself_ v)\n            create clone of (_myself_ v)\n            create clone of (_myself_ v)\n            create clone of (_myself_ v)\n            create clone of (_myself_ v)\n            create clone of (_myself_ v)\n            create clone of (_myself_ v)\n            create clone of (_myself_ v)\n            create clone of (_myself_ v)\n            create clone of (_myself_ v)\n            create clone of (_myself_ v)\n            create clone of (_myself_ v)\n            create clone of (_myself_ v)\n            create clone of (_myself_ v)\n            create clone of (_myself_ v)\n            create clone of (_myself_ v)\n            delete this clone\n        end\n    end\nelse\n    set [bounce v] to (pick random (5) to (20))\n    point in direction (pick random (-10) to (10))\n    set size to (pick random (70) to (100)) %\n    switch costume to (confetti v)\n    forever\n        go to x: ((x position) + (direction)) y: ((y position) + (bounce))\n        change [color v] effect by (bounce)\n        change [bounce v] by (-1)\n        change size by (((direction) + (11)) / (5))\n        if <(y position) < [-210]> then\n            delete this clone\n        end\n    end\nend\n\nwhen I receive [play v]\nhide\n\nwhen I receive [menu v]\nshow\nreset timer\nset size to (0) %\ngo to x: (0) y: (0)\nswitch costume to (square v)\nset rotation style [all around v]\nrepeat until <(timer) > [1]>\n    change [bounce v] by ((((100) - (size)) / (5)) - ((bounce) / (2)))\n    point in direction ((size) - (10))\n    change size by (bounce)\nend\nset [# v] to [-3]\nrepeat (2)\n    create clone of (_myself_ v)\n    wait (.5) seconds\nend\nset [bounce v] to [10]\nreset timer\nrepeat until <(size) < [5]>\n    point in direction ((size) - (10))\n    change [bounce v] by (-1)\n    change size by (bounce)\nend\nhide\nreplace item (13) of [v v] with [1]\n\nwhen flag clicked\nhide\n\nwhen I receive [play v]\nhide\ngo to x: (0) y: (0)\nswitch costume to (info page v)\nforever\n    if <(item (13) of [v v]) = [1]> then\n        add [] to [your level v]\n        wait until <not <mouse down?>>\n        show\n        set size to (0) %\n        repeat until <mouse down?>\n            go to [front v] layer\n            point in direction ((size) - (10))\n            change size by (((100) - (size)) / (5))\n            set [ghost v] effect to ((100) - (size))\n        end\n        repeat until <(size) < [10]>\n            go to [front v] layer\n            point in direction ((size) - (10))\n            change size by (((0) - (size)) / (2))\n            set [ghost v] effect to ((100) - (size))\n        end\n        hide\n        delete (2) of [your level v]\n        replace item (13) of [v v] with [0]\n    end\nend\n\nwhen I receive [menu v]\nforever\n    play sound [Sparkle v] until done\n    play sound [Hang Out v] until done\nend\n\n@bubbles\n\nwhen I start as a clone\nif <not <(costume [name v]) = [you win]>> then\n    show\n    set size to (0) %\n    set [y v] to ((100) * ((5) - (#)))\n    switch costume to (#)\n    repeat until <mouse down?>\n        change [x v] by (((((100) + ((10) * <touching (mouse-pointer v)?>)) - (size)) / (5)) - ((x) / (3)))\n        go to x: (0) y: ((y) * ((size) / (100)))\n        point in direction ((size) - (10))\n        change [color v] effect by (.5)\n        change size by (x)\n    end\n    set [x v] to [0]\n    repeat until <(size) < [5]>\n        go to x: (0) y: ((y) * ((size) / (100)))\n        point in direction ((size) - (10))\n        change [x v] by (-1.5)\n        change size by (x)\n    end\n    broadcast (play v)\n    delete this clone\nelse\n    if <<(item (11) of [v v]) = [0]> and <<not <(pick random (1) to (10)) = [1]>> or <(item (3) of [v v]) = [1]>>> then\n        delete this clone\n    end\n    point in direction (pick random (1) to (5))\n    set [x v] to ((item (4) of [v v]) + (pick random (-20) to (20)))\n    set [y v] to ((item (5) of [v v]) + (pick random (-20) to (20)))\n    switch costume to ((1) + <(item (11) of [v v]) = [0]>)\n    set rotation style [don't rotate v]\n    go [backward v] (10) layers\n    show\n    go to x: (((5) * ([sin v] of (((y) / (25)) * ((180) * ((3) - ((size) / (20))))) )) + ((x) - (scrollx))) y: ((y) - (scrolly))\n    if <(costume [name v]) = [bubble]> then\n        set [timer v] to (timer)\n        set size to ((direction) * (10)) %\n        repeat until <<not <(item (18) of [order v]) = (letter ((round ((x) / (40))) + ((100) * (round ((y) / (40))))) of (item (1) of [your level v]))>> or <((timer) - (timer)) > ((direction) * (1))>>\n            go to x: (((5) * ([sin v] of (((y) / (25)) * ((180) * ((3) - ((size) / (20))))) )) + ((x) - (scrollx))) y: ((y) - (scrolly))\n            change [x v] by (((3) - (direction)) / (3))\n            go [backward v] (5) layers\n            change [y v] by (1)\n        end\n        switch costume to (pop v)\n        wait (.01) seconds\n        delete this clone\n    else\n        turn right (2) degrees\n        set size to ((direction) * (10)) %\n        set [timer v] to (pick random (5) to (15))\n        repeat (30)\n            go to x: ((x) - (scrollx)) y: ((y) - (scrolly))\n            change [x v] by ((3) * ((5) - (direction)))\n            change [ghost v] effect by ((100) / (30))\n            change [color v] effect by (5)\n            change [timer v] by (-1)\n            change [y v] by (timer)\n        end\n        delete this clone\n    end\nend\n\nwhen I receive [play v]\nswitch costume to (you win v)\nhide\nforever\n    if <<(item (11) of [v v]) = [1]> and <(item (3) of [v v]) = [0]>> then\n        show\n        set size to (0) %\n        set [x v] to [0]\n        set [timer v] to (timer)\n        switch costume to (you win v)\n        set rotation style [all around v]\n        repeat until <((timer) - (timer)) > [3]>\n            change [x v] by ((((100) - (size)) / (2)) - ((x) / (2)))\n            point in direction ((190) - (size))\n            change [color v] effect by (5)\n            create clone of (_myself_ v)\n            change size by (x)\n            go to [front v] layer\n        end\n        repeat until <(size) < [6]>\n            change [x v] by ((((0) - (size)) / (2)) - ((x) / (2)))\n            point in direction ((5) * ((190) - (size)))\n            change [color v] effect by (5)\n            change size by (x)\n        end\n        repeat (length of [turbowarp link v])\n            Replace (item (1) of [turbowarp link v]) of 1 of block info w/ (item (83) of [order v])\n            delete (1) of [turbowarp link v]\n        end\n        replace item (15) of [v v] with [empty]\n        replace item (11) of [v v] with [0]\n        find start\n        hide\n        wait (1) seconds\n    end\nend\n\ndefine find start\nset [# v] to [0]\nrepeat (length of (item (1) of [your level v]))\n    change [# v] by <not <(letter (#) of (item (1) of [your level v])) = (item (2) of [order v])>>\nend\nreplace item (4) of [v v] with ((40) * ((#) - ((100) * ([floor v] of (((#) - (1)) / (100)) ))))\nreplace item (5) of [v v] with ((40) * ([floor v] of (((#) - (1)) / (100)) ))\nreplace item (1) of [v v] with [0]\nreplace item (2) of [v v] with [0]\n\nwhen flag clicked\nif <is compiled?> then\n    hide\nelse\n    hide\n    switch costume to (thumbnail2 v)\n    go to [front v] layer\n    set size to (100) %\n    go to x: (0) y: (0)\n    point in direction (90)\n    switch costume to (thumbnail v)\n    forever\n        reset timer\n    end\nend\n\nwhen I receive [menu v]\nreset timer\nwait until <<(timer) > [1]> and <([size v] of [menu v]) < [5]>>\nswitch costume to (confetti v)\nset [# v] to [4]\nrepeat (2)\n    change [# v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen [timer v] > (0)\nif <not <is compiled?>> then\n    show list [turbowarp link v]\n    show\nend\n\ndefine Replace (x) of 1 of block info w/ (#)\ndelete all of [list v]\nrepeat (length of (item (1) of [your level v]))\n    add (letter ((length of [list v]) + (1)) of (item (1) of [your level v])) to [list v]\nend\nreplace item (x) of [list v] with (#)\nrepeat (length of [list v])\n    replace item (1) of [list v] with (join (item (1) of [list v]) (item (2) of [list v]))\n    delete (2) of [list v]\nend\nreplace item (1) of [your level v] with (item (1) of [list v])\n\n