Ways 2.0 ✦ scrolling platformer #games #all

Instructions:                                   ◆ WAYS ◆\n       ◆ Scrolling Platformer! ◆\n\n> Thank you @StratfordJames for a lot of this.\n\nThis scrolling platformer includes: Multiple Ways to get to the end, mobile controls.\n        ✦✦✦ INSTRUCTIONS ✦✦✦\nPlay the game using arrow keys and get to the end\n\n         ✦✦✦ News ✦✦✦\n(8/5/20) Top remixed!!\n(8/4/20) 1st on TRENDING!!\n(8/3/20) TOP LOVED after 12 hours!! ❤️❤️\n(8/3/20) Project shared :)\n         ✦✦✦ Credits ✦✦✦\n@STARTFORDJAMES\n\n#games #all #square #art #platformer #trending #games #IAMibrahim #IAMibrahim #games #games #games

@Stage\n\nwhen flag clicked\nforever\n    if <(pause) = [0]> then\n        switch backdrop to (join [c] (theme))\n    end\nend\n\n@blank\n\n@blocks\n\nwhen flag clicked\nset [timer v] to [0]\nset [pause v] to [0]\nset [history_current v] to [1]\nhide\nset rotation style [left-right v]\nshow list [export v]\ndelete all of [history v]\ndelete all of [x v]\ndelete all of [y v]\ndelete all of [type v]\ndelete all of [c v]\ndelete all of [sign_text v]\nadd [] to [sign_text v]\nadd [0] to [x v]\nadd [-30] to [y v]\nadd [g] to [type v]\nadd [1] to [c v]\nadd [0] to [x v]\nadd [0] to [y v]\nadd [c] to [type v]\nadd [1] to [c v]\nadd [] to [sign_text v]\nset [ask_wait v] to [0]\nset [current block v] to [g]\nset [theme v] to [0]\nBlock costume @ [1]\nexport\nadd (export_code) to [history v]\nset [history_current v] to (length of [history v])\n\nwhen I receive [tick v]\ntick\nstop [this script v]\n\ndefine tick\nif <(pause) = [0]> then\n    erase all\n    if <<(MODE) = [edit]> and <mouse down?>> then\n        if <(current block) = [e]> then\n            remove block xy ((round (((mouse x) + (SCROLL X)) / (30))) * (30)) ((round (((mouse y) + (SCROLL Y)) / (30))) * (30))\n        else\n            add block xy ((round (((mouse x) + (SCROLL X)) / (30))) * (30)) ((round (((mouse y) + (SCROLL Y)) / (30))) * (30))\n        end\n    end\n    BLOCKS\n    mouse\nend\nchange [timer v] by (0.3)\n\ndefine BLOCKS\nclear graphic effects\nset size to (100) %\nset [counter1 v] to [0]\nrepeat (length of [x v])\n    change [counter1 v] by (1)\n    if <<([abs v] of ((item (counter1) of [x v]) - (SCROLL X)) ) < [255]> and <([abs v] of ((item (counter1) of [y v]) - (SCROLL Y)) ) < [195]>> then\n        switch costume to (blank v)\n        go to x: ((item (counter1) of [x v]) - (SCROLL X)) y: ((item (counter1) of [y v]) - (SCROLL Y))\n        set costume @ (item (counter1) of [type v]) (item (counter1) of [c v])\n        stamp\n    end\nend\n\ndefine add block xy (x) (y)\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\nshow\nif <<<<<<<<<(ASK_WAIT) = [1]> or <touching (main-menu v)?>> or <<[type v] contains [f]?> and <(current block) = [f]>>> or <touching (mobile_ui v)?>> or <touching (current block v)?>> or <touching (mask v)?>> or <touching (menu v)?>> or <touching (mask_preview v)?>> or <touching (ui v)?>> then\n    hide\n    stop [this script v]\nend\nhide\nset [counter3 v] to [0]\nrepeat (length of [x v])\n    change [counter3 v] by (1)\n    if <<(item (counter3) of [x v]) = (x)> and <(item (counter3) of [y v]) = (y)>> then\n        stop [this script v]\n    end\nend\nif <(current block) = [n]> then\n    add [] to [sign_text v]\n    add (x) to [x v]\n    add (y) to [y v]\n    add (current block) to [type v]\n    add [1] to [c v]\n    Block costume @ (length of [x v])\n    set [sign_length v] to (length of [x v])\n    set [ask_wait v] to [1]\n    broadcast (sign v)\nelse\n    add [] to [sign_text v]\n    add (x) to [x v]\n    add (y) to [y v]\n    add (current block) to [type v]\n    add [1] to [c v]\n    Block costume @ (length of [x v])\n    export\n    add (export_code) to [history v]\n    set [history_current v] to (length of [history v])\nend\n\ndefine Block costume @ (val)\nif <(item (val) of [type v]) = [p]> then\n    set [counter4 v] to [0]\n    repeat (length of [x v])\n        change [counter4 v] by (1)\n        if <<<(item (counter4) of [x v]) = (item (val) of [x v])> and <(item (counter4) of [y v]) = ((item (val) of [y v]) + (-30))>> and <(item (counter4) of [type v]) = [p]>> then\n            replace item (val) of [c v] with [0]\n        end\n    end\n    set [counter4 v] to [0]\n    repeat (length of [x v])\n        change [counter4 v] by (1)\n        if <<<(item (counter4) of [x v]) = (item (val) of [x v])> and <(item (counter4) of [y v]) = ((item (val) of [y v]) - (-30))>> and <(item (counter4) of [type v]) = [p]>> then\n            replace item (counter4) of [c v] with [0]\n        end\n    end\nelse\n    if <(item (val) of [type v]) = [b]> then\n        set [counter4 v] to [0]\n        repeat (length of [x v])\n            change [counter4 v] by (1)\n            if <<<(item (counter4) of [x v]) = (item (val) of [x v])> and <(item (counter4) of [y v]) = ((item (val) of [y v]) + (30))>> and <(item (counter4) of [type v]) = [b]>> then\n                replace item (val) of [c v] with [0]\n            end\n        end\n        set [counter4 v] to [0]\n        repeat (length of [x v])\n            change [counter4 v] by (1)\n            if <<<(item (counter4) of [x v]) = (item (val) of [x v])> and <(item (counter4) of [y v]) = ((item (val) of [y v]) - (30))>> and <(item (counter4) of [type v]) = [b]>> then\n                replace item (counter4) of [c v] with [0]\n            end\n        end\n    else\n        set [counter4 v] to [0]\n        repeat (length of [x v])\n            change [counter4 v] by (1)\n            if <<<(item (counter4) of [x v]) = (item (val) of [x v])> and <(item (counter4) of [y v]) = ((item (val) of [y v]) + (30))>> and <not < [ersfcpbn] contains (item (counter4) of [type v])?>>> then\n                replace item (val) of [c v] with [0]\n            end\n        end\n        set [counter4 v] to [0]\n        repeat (length of [x v])\n            change [counter4 v] by (1)\n            if <<<(item (counter4) of [x v]) = (item (val) of [x v])> and <(item (counter4) of [y v]) = ((item (val) of [y v]) - (30))>> and <<not < [ersfcn] contains (item (val) of [type v])?>> and <not < [pb] contains (item (counter4) of [type v])?>>>> then\n                replace item (counter4) of [c v] with [0]\n            end\n        end\n    end\nend\n\ndefine set costume @ (val) (val2)\nif <(val) = [g]> then\n    switch costume to (join (val) (((theme) * (2)) + (val2)))\nelse\n    if <<(val) = [l]> or <(val) = [w]>> then\n        switch costume to (join (val) ((val2) + <(join ((round ((timer) * (6))) mod (2)) (val2)) = [1]>))\n    else\n        if <(val) = [s]> then\n            switch costume to (s1 v)\n        else\n            if <(val) = [f]> then\n                if <<(counter1) = (checkpoint#)> and <not <(MODE) = [edit]>>> then\n                    switch costume to (f0 v)\n                else\n                    switch costume to (f1 v)\n                end\n            else\n                if <(val) = [b]> then\n                    switch costume to (join [b] (val2))\n                else\n                    if <(val) = [p]> then\n                        switch costume to (join [p] (val2))\n                    else\n                        if <(val) = [n]> then\n                            switch costume to (n1 v)\n                        else\n                            if <(val) = [c]> then\n                                if <<(counter1) = (checkpoint#)> and <not <(MODE) = [edit]>>> then\n                                    switch costume to (c0 v)\n                                else\n                                    switch costume to (c1 v)\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine mouse\nif <<(MODE) = [edit]> and <(ASK_WAIT) = [0]>> then\n    if <(current block) = [e]> then\n        switch costume to (e v)\n        go to (mouse-pointer v)\n        set [ghost v] effect to (30)\n        stamp\n    else\n        go to x: (((round (((mouse x) + (SCROLL X)) / (30))) * (30)) - (SCROLL X)) y: (((round (((mouse y) + (SCROLL Y)) / (30))) * (30)) - (SCROLL Y))\n        set size to (99) %\n        if <(current block) = [g]> then\n            switch costume to (join [g] ((theme) * (2)))\n        else\n            if <<(current block) = [l]> or <(current block) = [w]>> then\n                switch costume to (join (current block) [0])\n            else\n                if <(current block) = [s]> then\n                    switch costume to (s1 v)\n                else\n                    if <(current block) = [f]> then\n                        switch costume to (f1 v)\n                        if <[type v] contains [f]?> then\n                            stop [this script v]\n                        end\n                    else\n                        if <(current block) = [c]> then\n                            switch costume to (c1 v)\n                        else\n                            if <(current block) = [b]> then\n                                switch costume to (b1 v)\n                            else\n                                if <(current block) = [p]> then\n                                    switch costume to (p1 v)\n                                else\n                                    if <(current block) = [n]> then\n                                        switch costume to (n1 v)\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        set [counter5 v] to [0]\n        repeat (length of [x v])\n            change [counter5 v] by (1)\n            if <<(item (counter5) of [x v]) = ((round (((mouse x) + (SCROLL X)) / (30))) * (30))> and <(item (counter5) of [y v]) = ((round (((mouse y) + (SCROLL Y)) / (30))) * (30))>> then\n                stop [this script v]\n            end\n        end\n        set [ghost v] effect to (50)\n        stamp\n    end\nend\n\ndefine remove block xy (x) (y)\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\nshow\nif <<<<<<<<touching (mobile_ui v)?> or <(ASK_WAIT) = [1]>> or <touching (current block v)?>> or <touching (mask v)?>> or <touching (menu v)?>> or <touching (mask_preview v)?>> or <touching (ui v)?>> or <<[0] = (x)> and <<[0] = (y)> or <[-30] = (y)>>>> then\n    hide\n    stop [this script v]\nend\nhide\nset [counter0 v] to [1]\nrepeat until <<(counter0) > (length of [x v])> or <<(item (counter0) of [x v]) = (x)> and <(item (counter0) of [y v]) = (y)>>>\n    change [counter0 v] by (1)\nend\nset [erased_ground? v] to [0]\nif <<(item (counter0) of [x v]) = (x)> and <(item (counter0) of [y v]) = (y)>> then\n    set [erased_ground? v] to [1]\n    set [deleted_type v] to (item (counter0) of [type v])\n    delete (counter0) of [x v]\n    delete (counter0) of [y v]\n    delete (counter0) of [type v]\n    delete (counter0) of [c v]\n    delete (counter0) of [sign_text v]\nend\nset [counter0 v] to [1]\nif <(deleted_type) = [p]> then\n    repeat until <<(counter0) > (length of [x v])> or <<(item (counter0) of [x v]) = (x)> and <(item (counter0) of [y v]) = ((y) + (30))>>>\n        change [counter0 v] by (1)\n    end\nelse\n    repeat until <<(counter0) > (length of [x v])> or <<(item (counter0) of [x v]) = (x)> and <((item (counter0) of [y v]) + (30)) = (y)>>>\n        change [counter0 v] by (1)\n    end\nend\nreplace item (counter0) of [c v] with [1]\nif <(erased_ground?) = [1]> then\n    export\n    add (export_code) to [history v]\n    set [history_current v] to (length of [history v])\nend\n\ndefine export\nset [c2 v] to [0]\nset [export_code v] to (join (join (theme) (walljump)) [{])\nrepeat (length of [x v])\n    change [c2 v] by (1)\n    set [export_code v] to (join (export_code) ((item (c2) of [x v]) / (30)))\n    set [export_code v] to (join (export_code) [}])\nend\nset [export_code v] to (join (export_code) [{])\nset [c2 v] to [0]\nrepeat (length of [x v])\n    change [c2 v] by (1)\n    set [export_code v] to (join (export_code) ((item (c2) of [y v]) / (30)))\n    set [export_code v] to (join (export_code) [}])\nend\nset [export_code v] to (join (export_code) [{])\nset [c2 v] to [0]\nrepeat (length of [x v])\n    change [c2 v] by (1)\n    set [export_code v] to (join (export_code) (item (c2) of [type v]))\n    set [export_code v] to (join (export_code) [}])\nend\nset [export_code v] to (join (export_code) [{])\nset [c2 v] to [0]\nrepeat (length of [x v])\n    change [c2 v] by (1)\n    set [export_code v] to (join (export_code) (item (c2) of [c v]))\n    set [export_code v] to (join (export_code) [}])\nend\nset [export_code v] to (join (export_code) [{])\nset [c2 v] to [0]\nrepeat (length of [x v])\n    change [c2 v] by (1)\n    set [export_code v] to (join (export_code) (item (c2) of [sign_text v]))\n    set [export_code v] to (join (export_code) [}])\nend\nset [export_code v] to (join (export_code) [{])\n\ndefine import (i)\nset [c2 v] to [4]\ndelete all of [x v]\nrepeat until <(letter (c2) of (i)) = [{]>\n    set [c3 v] to []\n    repeat until <(letter (c2) of (i)) = [}]>\n        set [c3 v] to (join (c3) (letter (c2) of (i)))\n        change [c2 v] by (1)\n        if <(c2) > (length of (i))> then\n            set [import v] to [invalid]\n            stop [this script v]\n        end\n    end\n    add ((c3) * (30)) to [x v]\n    change [c2 v] by (1)\nend\nchange [c2 v] by (1)\ndelete all of [y v]\nrepeat until <(letter (c2) of (i)) = [{]>\n    set [c3 v] to []\n    repeat until <(letter (c2) of (i)) = [}]>\n        set [c3 v] to (join (c3) (letter (c2) of (i)))\n        change [c2 v] by (1)\n        if <(c2) > (length of (i))> then\n            set [import v] to [invalid]\n            stop [this script v]\n        end\n    end\n    add ((c3) * (30)) to [y v]\n    change [c2 v] by (1)\nend\nchange [c2 v] by (1)\ndelete all of [type v]\nrepeat until <(letter (c2) of (i)) = [{]>\n    set [c3 v] to (letter (c2) of (i))\n    add (c3) to [type v]\n    change [c2 v] by (2)\n    if <(c2) > (length of (i))> then\n        set [import v] to [invalid]\n        stop [this script v]\n    end\nend\nchange [c2 v] by (1)\ndelete all of [c v]\nrepeat until <(letter (c2) of (i)) = [{]>\n    set [c3 v] to (letter (c2) of (i))\n    add (c3) to [c v]\n    change [c2 v] by (2)\n    if <(c2) > (length of (i))> then\n        set [import v] to [invalid]\n        stop [this script v]\n    end\nend\nchange [c2 v] by (1)\ndelete all of [sign_text v]\nrepeat until <(letter (c2) of (i)) = [{]>\n    set [c3 v] to []\n    repeat until <(letter (c2) of (i)) = [}]>\n        set [c3 v] to (join (c3) (letter (c2) of (i)))\n        change [c2 v] by (1)\n        if <(c2) > (length of (i))> then\n            set [import v] to [invalid]\n            stop [this script v]\n        end\n    end\n    add (c3) to [sign_text v]\n    change [c2 v] by (1)\nend\nif <not <(length of [x v]) = (length of [y v])>> then\n    set [import v] to [invalid]\n    stop [this script v]\nend\n\nwhen I receive [redo v]\nif <<(history_current) < (length of [history v])> and <(ASK_WAIT) = [0]>> then\n    change [history_current v] by (1)\n    import (item (history_current) of [history v])\nend\n\nwhen I receive [undo v]\nif <<(history_current) > [1]> and <(ASK_WAIT) = [0]>> then\n    change [history_current v] by (-1)\n    import (item (history_current) of [history v])\nend\n\nwhen I receive [export v]\nexport\ndelete all of [export v]\nadd [Triple-click on the code below and copy \(ctrl+c\) it to save your level:] to [export v]\nadd (export_code) to [export v]\nadd [] to [export v]\nif <(length of (export_code)) < [501]> then\n    add [Next, paste \(ctrl+v\) it in the comments!] to [export v]\nelse\n    add [Your code is too long to fit in one comment. Share your level here:] to [export v]\n    add [https://scratch.mit.edu/discuss/topic/428128/] to [export v]\n    add [] to [export v]\n    add [Your code is separated below so you can fit in multiple comments:] to [export v]\n    separate\n    if <(length of [export v]) > [9]> then\n        repeat (4)\n            add [] to [export v]\n        end\n    end\nend\nhide list [export v]\nask [Paste your code here to confirm that you copied the whole thing:] and wait\nif <<not <(answer) = (item (2) of [export v])>> or <not <(answer) = (join (item (2) of [export v]) [ 3])>>> then\n    repeat until <<(answer) = (join (item (2) of [export v]) [ 3])> or <(answer) = (item (2) of [export v])>>\n        ask [You didn’t copy the entire code! Remember to triple click on the code, and copy it. Try again:] and wait\n    end\nend\nshow list [export v]\n\nwhen I receive [import v]\nset [pause v] to [1]\nset [import v] to (item (1) of [gamecode v])\nimport (import)\nif <(import) = [invalid]> then\n    set [pause v] to [0]\n    import (item (length of [history v]) of [history v])\n    broadcast (invalid v)\nelse\n    broadcast (preview v)\n    set [theme v] to (letter (1) of (import))\n    set [walljump v] to (letter (2) of (import))\n    add (import) to [history v]\n    set [history_current v] to (length of [history v])\n    wait until <(MODE) = [preview]>\n    set [pause v] to [0]\nend\n\nwhen I receive [delete all v]\nif <(length of [x v]) > [2]> then\n    delete all of [c v]\n    delete all of [x v]\n    delete all of [y v]\n    delete all of [type v]\n    add [0] to [x v]\n    add [-30] to [y v]\n    add [g] to [type v]\n    add [1] to [c v]\n    add [0] to [x v]\n    add [0] to [y v]\n    add [c] to [type v]\n    add [1] to [c v]\n    export\n    add (export_code) to [history v]\n    set [history_current v] to (length of [history v])\nend\n\ndefine separate\nset [i2 v] to [0]\nrepeat until <(i2) > (length of (export_code))>\n    set [i3 v] to []\n    repeat (500)\n        change [i2 v] by (1)\n        if <(i2) > (length of (export_code))> then\n            add (i3) to [export v]\n            stop [this script v]\n        end\n        set [i3 v] to (join (i3) (letter (i2) of (export_code)))\n    end\n    add (i3) to [export v]\nend\n\nwhen I receive [go to v]\nask [enter X position:] and wait\nif <not <(answer) = []>> then\n    set [scroll x v] to (round (answer))\nend\nask [enter Y position:] and wait\nif <not <(answer) = []>> then\n    set [scroll y v] to (round (answer))\nend\n\nwhen I receive [sign v]\nask [Enter the text for the sign. \(follow Community Guidelines please\)] and wait\nif <<(answer) = []> or << (answer) contains [{]?> or < (answer) contains [}]?>>> then\n    delete (sign_length) of [sign_text v]\n    delete (sign_length) of [x v]\n    delete (sign_length) of [y v]\n    delete (sign_length) of [type v]\n    delete (sign_length) of [c v]\nelse\n    replace item (sign_length) of [sign_text v] with (answer)\n    export\n    add (export_code) to [history v]\n    set [history_current v] to (length of [history v])\nend\nset [ask_wait v] to [0]\n\nwhen I receive [rename v]\nask [What do you want to rename the sign to?] and wait\nif <<not <(answer) = []>> and <<not < (answer) contains [{]?>> and <not < (answer) contains [}]?>>>> then\n    replace item (sign#) of [sign_text v] with (answer)\n    export\n    add (export_code) to [history v]\n    set [history_current v] to (length of [history v])\nend\nset [ask_wait v] to [0]\n\n@player\n\ndefine tick-play\ngo to [back v] layer\nif <<<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > ((x position) + (20))>>> and <(click) = [0]>> then\n    if <(play-pause) = [0]> then\n        if <[collisions v] contains [w]?> then\n            change [xv v] by (0.7)\n        else\n            change [xv v] by (1.2)\n        end\n    end\nelse\n    if <<<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < ((x position) - (20))>>> and <(click) = [0]>> then\n        if <(play-pause) = [0]> then\n            if <[collisions v] contains [w]?> then\n                change [xv v] by (-0.7)\n            else\n                change [xv v] by (-1.2)\n            end\n        end\n    else\n    end\nend\nif <[collisions v] contains [w]?> then\n    if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > ((y position) + (10))>>> then\n        if <(play-pause) = [0]> then\n            set [yv v] to [5.5]\n        end\n    end\n    change [yv v] by (-1)\n    set [yv v] to ((YV) * (0.76))\nelse\n    if <<<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > ((y position) + (20))>>> and <(click) = [0]>> then\n        if <(in air) < [4]> then\n            if <(play-pause) = [0]> then\n                set [yv v] to [9]\n            end\n        end\n    end\n    change [yv v] by (-0.82)\nend\nset [xv v] to ((XV) * (0.73))\nif <(YV) < [-13]> then\n    set [yv v] to [-13]\nend\nchange x by (round ((XV) * (1.4)))\nchange y by (round (YV))\nchange [scroll x v] by (round (((Offset X) - (SCROLL X)) / (7)))\nchange [scroll y v] by ((round (((Offset Y) - (SCROLL Y)) / (5))) + (2))\nif <(SCROLL Y) < [-88]> then\n    set [scroll y v] to [-88]\nend\nposition\nif <<<[collisions v] contains [s]?> or <[collisions v] contains [l]?>> or <(Offset Y) < [-430]>> then\n    reset\nend\nif <[collisions v] contains [b]?> then\n    set [yv v] to [14]\nelse\n    if <[collisions v] contains [p]?> then\n        set [yv v] to [-9]\n    end\nend\nif <[collisions v] contains [c]?> then\n    set [checkpoint# v] to (item # of [c] in [collisions v])\nelse\n    if <[collisions v] contains [f]?> then\n        set [checkpoint# v] to (item # of [f] in [collisions v])\n    end\nend\ncollision test\n\ndefine change y by (sy)\nchange [offset y v] by (sy)\nchange [in air v] by (1)\nif <<[collisions v] contains [p]?> and <(sy) > [0]>> then\n    change [offset y v] by ((0) - (sy))\nend\nposition\nrepeat until <not <[collisions v] contains [g]?>>\n    if <(sy) > [0]> then\n        change [offset y v] by (-1)\n    else\n        change [offset y v] by (1)\n        set [in air v] to [0]\n    end\n    position\n    set [yv v] to [0]\nend\n\ndefine change x by (sx)\nchange [offset x v] by (sx)\nposition\nif <[collisions v] contains [g]?> then\n    repeat (10)\n        change [offset y v] by (0.5)\n        position\n        if <not <[collisions v] contains [g]?>> then\n            stop [this script v]\n        end\n    end\n    change [offset y v] by (-5)\n    repeat until <not <[collisions v] contains [g]?>>\n        if <(sx) < [0]> then\n            change [offset x v] by (1)\n        else\n            change [offset x v] by (-1)\n        end\n        position\n        set [xv v] to [0]\n    end\n    if <(walljump) = [1]> then\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > ((y position) + (10))>>> then\n            if <(play-pause) = [0]> then\n                if <[collisions v] contains [w]?> then\n            end\n        end\n    end\nend\n\ndefine position\ngo to x: ((Offset X) - (SCROLL X)) y: ((Offset Y) - (SCROLL Y))\ncollision test\n\ndefine collision test\ndelete all of [collisions v]\nset [c1 v] to [0]\nrepeat (length of [type v])\n    add [0] to [collisions v]\n    change [c1 v] by (1)\n    if <(item (c1) of [type v]) = [s]> then\n        if <<<not <((item (c1) of [x v]) - (-17.5)) < (Offset X)>> and <((item (c1) of [y v]) - (23.5)) < (Offset Y)>> and <<not <((item (c1) of [y v]) - (-9.5)) < (Offset Y)>> and <((item (c1) of [x v]) - (17.5)) < (Offset X)>>> then\n            replace item (c1) of [collisions v] with (item (c1) of [type v])\n        end\n    else\n        if <<<not <((item (c1) of [x v]) - (-24.5)) < (Offset X)>> and <((item (c1) of [y v]) - (23.5)) < (Offset Y)>> and <<not <((item (c1) of [y v]) - (-23.5)) < (Offset Y)>> and <((item (c1) of [x v]) - (24.5)) < (Offset X)>>> then\n            replace item (c1) of [collisions v] with (item (c1) of [type v])\n        end\n    end\nend\n\ndefine Tick-edit\ngo to [back v] layer\nclear graphic effects\nswitch costume to (3a v)\nposition\nchange [scroll x v] by ((<<<(mobile_click??????) = [2]> or <key (right arrow v) pressed?>> or <key (d v) pressed?>> - <<<(mobile_click??????) = [4]> or <key (left arrow v) pressed?>> or <key (a v) pressed?>>) * (4))\nchange [scroll y v] by ((<<<(mobile_click??????) = [1]> or <key (up arrow v) pressed?>> or <key (w v) pressed?>> - <<<(mobile_click??????) = [3]> or <key (down arrow v) pressed?>> or <key (s v) pressed?>>) * (4))\nif <(SCROLL Y) < [-88]> then\n    set [scroll y v] to [-88]\nend\nset [play-pause v] to [0]\nset [win? v] to [0]\n\nwhen I receive [tick v]\nif <(MODE) = [edit]> then\n    Tick-edit\nelse\n    if <(MODE) = [preview]> then\n        go to [back v] layer\n        set [scroll x v] to [0]\n        set [scroll y v] to [35]\n        set [offset x v] to [0]\n        set [offset y v] to [-5]\n        set [yv v] to [0]\n        set [xv v] to [0]\n        set [in air v] to [0]\n        set [play-pause v] to [0]\n        set [win? v] to [0]\n        position\n    else\n        if <(MODE) = [play]> then\n            repeat (1)\n                tick-play\n                Set Costume\n            end\n        end\n    end\nend\n\nwhen I receive [start! v]\nforever\n    broadcast (Tick v)\nend\n\ndefine reset\nset [play-pause v] to [0]\nset [yv v] to [0]\nset [xv v] to [0]\nset [in air v] to [0]\nif <(MODE) = [play]> then\n    set [scroll x v] to (item (checkpoint#) of [x v])\n    set [scroll y v] to (item (checkpoint#) of [y v])\n    set [offset x v] to (item (checkpoint#) of [x v])\n    set [offset y v] to (item (checkpoint#) of [y v])\nelse\n    set [scroll x v] to [0]\n    set [scroll y v] to [30]\n    set [offset x v] to [0]\n    set [offset y v] to [-5]\nend\n\nwhen flag clicked\nset [win? v] to [0]\nreset\nset size to (60) %\npoint in direction (90)\nshow\nswitch costume to (3a v)\nbroadcast (start! v)\n\ndefine Set Costume\nif <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > [20]>>>> then\n    switch costume to (2a v)\n    if <<<mouse down?> and <(mouse y) > ((y position) + (20))>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        switch costume to (4a v)\n    end\nelse\n    if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(mouse x) < [-20]>>>> then\n        switch costume to (1a v)\n        if <<<(mouse y) > ((y position) + (20))> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n            switch costume to (5a v)\n        end\n    else\n        switch costume to (3a v)\n        if <<<(mouse y) > ((y position) + (20))> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n            switch costume to (6a v)\n        end\n    end\nend\n\nwhen I receive [mode v]\nreset\n\nwhen flag clicked\nforever\n    if <<<[collisions v] contains [f]?> and <(MODE) = [play]>> and <(win?) = [0]>> then\n        set [win? v] to [1]\n        broadcast (win v)\n        set [play-pause v] to [1]\n    end\nend\n\n@mask\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nforever\n    go to [back v] layer\nend\n\nwhen I receive [tick v]\nif <(MODE) = [edit]> then\n    show\nelse\n    hide\nend\n\n@select\n\nwhen flag clicked\nhide\nset [@id v] to [0]\nrepeat (9)\n    change [@id v] by (1)\n    create clone of (_myself_ v)\nend\nset [@id v] to [e]\ncreate clone of (_myself_ v)\nset [@id v] to [null]\n\nwhen I receive [tick v]\nif <<(MODE) = [edit]> and <not <(@ID) = [null]>>> then\n    show\n    if <(@ID) = [1]> then\n        switch costume to (join [g] (((theme) * (2)) + (1)))\n        go to x: (-215) y: (-165)\n    else\n        if <(@ID) = [2]> then\n            switch costume to (join [l] ((round ((timer) * (6))) mod (2)))\n            go to x: (-179) y: (-165)\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                set [current block v] to [l]\n            end\n        else\n            if <(@ID) = [3]> then\n                switch costume to (join [w] (([floor v] of ((timer) * (6)) ) mod (2)))\n                go to x: (-143) y: (-165)\n                if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                    set [current block v] to [l]\n                end\n            else\n                if <(@ID) = [4]> then\n                    switch costume to (s1 v)\n                    go to x: (-108) y: (-165)\n                else\n                    if <(@ID) = [e]> then\n                        switch costume to (eraser v)\n                        go to x: (72) y: (-165)\n                    else\n                        if <(@ID) = [5]> then\n                            switch costume to (c1 v)\n                            go to x: (14) y: (-165)\n                        else\n                            if <(@ID) = [6]> then\n                                go to x: (42) y: (-165)\n                                if <[type v] contains [f]?> then\n                                    switch costume to (f2 v)\n                                else\n                                    switch costume to (f1 v)\n                                end\n                            else\n                                if <(@ID) = [7]> then\n                                    switch costume to (b1 v)\n                                    go to x: (-77) y: (-165)\n                                else\n                                    if <(@ID) = [8]> then\n                                        switch costume to (p1 v)\n                                        go to x: (-47) y: (-165)\n                                    else\n                                        if <(@ID) = [9]> then\n                                            switch costume to (n1 v)\n                                            go to x: (-16) y: (-165)\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        set [current block v] to (letter (1) of (costume [name v]))\n    end\n    if <(current block) = (letter (1) of (costume [name v]))> then\n        set [ghost v] effect to (0)\n    else\n        if <touching (mouse-pointer v)?> then\n            set [ghost v] effect to (32.5)\n        else\n            set [ghost v] effect to (65)\n        end\n    end\nelse\n    hide\nend\n\nwhen I start as a clone\nset size to (88) %\ngo to [front v] layer\n\n@UI\n\nwhen flag clicked\nset [ui_menu1 v] to [0]\nset [walljump v] to [0]\ngo to x: (0) y: (0)\nset [@id v] to [1]\ncreate clone of (_myself_ v)\nset [@id v] to [2]\ncreate clone of (_myself_ v)\nset [@id v] to [c]\ncreate clone of (_myself_ v)\nset [@id v] to [0]\nforever\n    if <(MODE) = [edit]> then\n        show\n        switch costume to (join [walljump] (walljump))\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (-4)\n            if <mouse down?> then\n                set [walljump v] to ((1) - (walljump))\n                switch costume to (join [walljump] (walljump))\n                wait until <not <<mouse down?> and <touching (mouse-pointer v)?>>>\n            end\n        else\n            set [brightness v] effect to (0)\n        end\n    end\nend\n\nwhen I start as a clone\nshow\nset size to (100) %\nif <(@ID) = [1]> then\n    switch costume to (theme v)\n    go to x: (0) y: (0)\n    go to [front v] layer\n    forever\n        if <(MODE) = [edit]> then\n            if <touching (mouse-pointer v)?> then\n                set [brightness v] effect to (-4)\n                if <<mouse down?> and <<(y pos_menu) > [-0.6]> or <(y pos_menu) < [-59.4]>>> then\n                    set [ui_menu1 v] to ((1) - (UI_menu1))\n                    wait until <not <<mouse down?> and <touching (mouse-pointer v)?>>>\n                end\n            else\n                set [brightness v] effect to (0)\n            end\n        else\n            set [ui_menu1 v] to [0]\n        end\n    end\nelse\n    if <(@ID) = [c]> then\n        switch costume to (cover v)\n    else\n        if <(@ID) = [2]> then\n            switch costume to (menu0000 v)\n            set [y pos_menu v] to [-60]\n            go to [back v] layer\n            forever\n                if <(MODE) = [edit]> then\n                    if <(UI_menu1) = [1]> then\n                        change [y pos_menu v] by (((20) - (y pos_menu)) / (5))\n                    else\n                        change [y pos_menu v] by (((-60) - (y pos_menu)) / (5))\n                    end\n                    if <(y pos_menu) > [-0.5]> then\n                        switch costume to (h0 v)\n                        if <touching (mouse-pointer v)?> then\n                            switch costume to (menu1000 v)\n                            if <mouse down?> then\n                                set [theme v] to [0]\n                            end\n                        else\n                            switch costume to (h1 v)\n                            if <touching (mouse-pointer v)?> then\n                                switch costume to (menu0100 v)\n                                if <mouse down?> then\n                                    set [theme v] to [1]\n                                end\n                            else\n                                switch costume to (h2 v)\n                                if <touching (mouse-pointer v)?> then\n                                    switch costume to (menu0010 v)\n                                    if <mouse down?> then\n                                        set [theme v] to [2]\n                                    end\n                                else\n                                    switch costume to (h3 v)\n                                    if <touching (mouse-pointer v)?> then\n                                        switch costume to (menu0001 v)\n                                        if <mouse down?> then\n                                            set [theme v] to [3]\n                                        end\n                                    else\n                                        switch costume to (menu0000 v)\n                                    end\n                                end\n                            end\n                        end\n                    else\n                        switch costume to (menu0000 v)\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [tick v]\nif <(MODE) = [edit]> then\n    show\n    if <(@ID) = [2]> then\n        go to x: (0) y: (y pos_menu)\n    end\nelse\n    hide\nend\n\n@buttons\n\nwhen flag clicked\nbroadcast (import v)\nset [@id v] to [1]\ncreate clone of (_myself_ v)\nset [@id v] to [3]\ncreate clone of (_myself_ v)\nset [@id v] to [m]\ncreate clone of (_myself_ v)\nset [@id v] to [u]\ncreate clone of (_myself_ v)\nset [@id v] to [r]\ncreate clone of (_myself_ v)\nset [@id v] to [2]\nshow\ngo to x: (0) y: (0)\nforever\n    switch costume to (export v)\n    if <(MODE) = [edit]> then\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            broadcast (export v) and wait\n            wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n        end\n    end\nend\n\nwhen I start as a clone\nshow\nset size to (100) %\ngo to [front v] layer\nif <(@ID) = [3]> then\n    forever\n        if <(MODE) = [play]> then\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                set [click v] to [1]\n                broadcast (edit v) and wait\n            else\n                set [click v] to [0]\n            end\n        else\n            if <(MODE) = [edit]> then\n                if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                    broadcast (play v) and wait\n                end\n            end\n        end\n    end\nelse\n    if <(@ID) = [1]> then\n        switch costume to (import v)\n        forever\n            if <(MODE) = [edit]> then\n                if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                    broadcast (import v) and wait\n                    wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n                end\n            end\n        end\n    else\n        if <(@ID) = [m]> then\n            switch costume to (menu v)\n            forever\n                if <(MODE) = [edit]> then\n                    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                        if <(round ([x vel v] of [menu v])) = [0]> then\n                            set [ui_menu2 v] to ((1) - (UI_menu2))\n                            wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n                        end\n                    end\n                else\n                    set [ui_menu2 v] to [0]\n                end\n            end\n        else\n            if <(@ID) = [u]> then\n                switch costume to (undo v)\n                forever\n                    if <(MODE) = [edit]> then\n                        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                            broadcast (undo v) and wait\n                            wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n                        end\n                    end\n                end\n            else\n                if <(@ID) = [r]> then\n                    switch costume to (redo v)\n                    forever\n                        if <(MODE) = [edit]> then\n                            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                                broadcast (redo v) and wait\n                                wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [tick v]\nif <(@ID) = [3]> then\n    if <(MODE) = [play]> then\n        show\n        switch costume to (return v)\n    else\n        if <(MODE) = [edit]> then\n            show\n            switch costume to (play v)\n        else\n            hide\n        end\n    end\nelse\n    if <(MODE) = [edit]> then\n        show\n    else\n        hide\n    end\nend\nif <touching (mouse-pointer v)?> then\n    set [brightness v] effect to (4)\nelse\n    set [brightness v] effect to (0)\nend\nif <(@ID) = [u]> then\n    if <(history_current) > [1]> then\n        switch costume to (undo v)\n    else\n        switch costume to (undo2 v)\n        set [brightness v] effect to (0)\n    end\nelse\n    if <(@ID) = [r]> then\n        if <(history_current) < (length of [history v])> then\n            switch costume to (redo v)\n        else\n            switch costume to (redo2 v)\n            set [brightness v] effect to (0)\n        end\n    end\nend\n\n@fade\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [tick v]\ngo to [front v] layer\n\nwhen I receive [play v]\nshow\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nset [mode v] to [play]\nwait (0.3) seconds\nbroadcast (mode v)\nwait (0.1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [edit v]\nshow\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nset [mode v] to [edit]\nwait (0.3) seconds\nbroadcast (mode v)\nwait (0.1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [preview v]\nshow\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nset [mode v] to [preview]\nwait (0.7) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\n@menu\n\nwhen flag clicked\nset [ui_menu2 v] to [0]\nset [mobile? v] to [0]\ngo to x: (-100) y: (0)\nshow\nswitch costume to (menu v)\nset [@id v] to [0]\ncreate clone of (_myself_ v)\nset [@id v] to [1]\ncreate clone of (_myself_ v)\nset [@id v] to [2]\ncreate clone of (_myself_ v)\nset [@id v] to [99]\nforever\n    go to [back v] layer\nend\n\nwhen I receive [tick v]\nif <(UI_menu2) = [1]> then\n    set [x vel v] to ((((30) - (x position)) / (9)) + ((x vel) * (0.74)))\nelse\n    set [x vel v] to (((-100) - (x position)) / (5))\nend\nchange x by (x vel)\nif <(MODE) = [edit]> then\n    show\nelse\n    hide\nend\nif <touching (mouse-pointer v)?> then\n    set [brightness v] effect to (4)\nelse\n    set [brightness v] effect to (0)\nend\n\nwhen I start as a clone\ngo to [back v] layer\nif <(@id) = [0]> then\n    switch costume to (del v)\n    forever\n        if <<<mouse down?> and <touching (mouse-pointer v)?>> and <(MODE) = [edit]>> then\n            broadcast (delete all v) and wait\n            wait until <not <<mouse down?> and <touching (mouse-pointer v)?>>>\n        end\n    end\nelse\n    if <(@id) = [1]> then\n        switch costume to (mobile0 v)\n        forever\n            switch costume to (join [mobile] (mobile?))\n            if <<(MODE) = [edit]> and <<mouse down?> and <touching (mouse-pointer v)?>>> then\n                set [mobile? v] to ((1) - (mobile?))\n                switch costume to (join [mobile] (mobile?))\n                wait until <not <<mouse down?> and <touching (mouse-pointer v)?>>>\n            end\n        end\n    else\n        if <(@id) = [2]> then\n            switch costume to (gotoxy v)\n            forever\n                if <<(MODE) = [edit]> and <<mouse down?> and <touching (mouse-pointer v)?>>> then\n                    broadcast (go to v) and wait\n                    wait until <not <<mouse down?> and <touching (mouse-pointer v)?>>>\n                end\n            end\n        end\n    end\nend\n\n@mask_preview\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\n    wait (0) seconds\nend\n\nwhen I receive [tick v]\nif <(MODE) = [preview]> then\n    set y to (-17)\n    change [ghost v] effect by (-10)\n    set size to (100) %\nelse\n    change y by (((-6) - (y position)) / (4))\n    switch costume to (sizer v)\n    if <(MODE) = [play]> then\n        change size by (((230) - (size)) / (12))\n        if <(size) > [216]> then\n            change [ghost v] effect by (20)\n        end\n    else\n        change size by (((175) - (size)) / (11))\n        if <(size) > [173]> then\n            change [ghost v] effect by (10)\n        end\n    end\n    switch costume to (mask preview v)\nend\n\n@UI_preview\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nswitch costume to (edit v)\nset [ghost v] effect to (100)\ncreate clone of (_myself_ v)\nforever\n    if <(MODE) = [preview]> then\n        if <<mouse down?> and <touching (mouse-pointer v)?>> then\n            set [mode v] to [edit]\n        end\n    end\nend\n\nwhen I start as a clone\nswitch costume to (play v)\nforever\n    if <(MODE) = [preview]> then\n        if <<mouse down?> and <touching (mouse-pointer v)?>> then\n            set [mode v] to [play]\n        end\n    end\nend\n\nwhen I receive [tick v]\ngo to [front v] layer\ngo [backward v] (1) layers\nif <(MODE) = [preview]> then\n    set y to (0)\n    change [ghost v] effect by (-10)\nelse\n    change y by (((y position) - (80)) / (12))\n    if <(y position) < [-80]> then\n        set [ghost v] effect to (100)\n    end\nend\nif <not <(MODE) = [play]>> then\n    set [previous menu v] to (MODE)\nend\nif <touching (mouse-pointer v)?> then\n    set [brightness v] effect to (4)\nelse\n    set [brightness v] effect to (0)\nend\n\n@MOBILE_UI\n\nwhen flag clicked\ngo to x: (176) y: (91)\nshow\nset [ghost v] effect to (100)\nforever\n    if <<(mobile?) = [1]> and <(MODE) = [edit]>> then\n        show\n        set [size_velocity v] to (((size_velocity) * (0.77)) + (((100) - (size)) / (6)))\n        change size by (size_velocity)\n        change [ghost v] effect by (-10)\n        switch costume to (hitbox1 v)\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            set [mobile_click?????? v] to [1]\n            switch costume to (main1 v)\n        else\n            switch costume to (hitbox2 v)\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                set [mobile_click?????? v] to [2]\n                switch costume to (main2 v)\n            else\n                switch costume to (hitbox3 v)\n                if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                    set [mobile_click?????? v] to [3]\n                    switch costume to (main3 v)\n                else\n                    switch costume to (hitbox4 v)\n                    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                        set [mobile_click?????? v] to [4]\n                        switch costume to (main4 v)\n                    else\n                        set [mobile_click?????? v] to [0]\n                        switch costume to (main0 v)\n                    end\n                end\n            end\n        end\n    else\n        change [ghost v] effect by (10)\n        change size by (((0) - (size)) / (6))\n        if <(size) < [10]> then\n            hide\n        end\n    end\nend\n\n@invalid\n\nwhen I receive [tick v]\ngo to [back v] layer\n\nwhen flag clicked\ngo to x: (0) y: (50)\nhide\n\nwhen I receive [invalid v]\nshow\nrepeat until <(y position) < [12]>\n    change y by (((11) - (y position)) / (6))\nend\nwait (2.5) seconds\nrepeat until <(y position) > [49.5]>\n    change y by (((y position) - (8)) / (5))\nend\nhide\n\n@current block\n\nwhen I receive [tick v]\ngo to [back v] layer\nif <(MODE) = [edit]> then\n    show\nelse\n    hide\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nswitch costume to (g1 v)\nforever\n    switch costume to (join (current block) [1])\n    repeat until <not <(letter (1) of (costume [name v])) = (current block)>>\n        set [y v v] to (((y v) * (0.78)) + (((0) - (y position)) / (9)))\n        change y by (y v)\n    end\n    repeat (6)\n        change [ghost v] effect by (25)\n    end\n    set y to (-50)\n    clear graphic effects\nend\n\n@sign_text\n\nwhen flag clicked\nshow\n\nwhen I receive [tick v]\nset [ghost v] effect to (100)\nif <(MODE) = [edit]> then\n    mouse\nelse\n    if <(MODE) = [play]> then\n        if <[collisions v] contains [n]?> then\n            go to x: ((item (item # of [n] in [collisions v]) of [x v]) - (SCROLL X)) y: ((item (item # of [n] in [collisions v]) of [y v]) - (SCROLL Y))\n            say (item (item # of [n] in [collisions v]) of [sign_text v])\n        else\n            say []\n        end\n    else\n        say []\n    end\nend\n\ndefine mouse\nset [c2 v] to [0]\nrepeat until <<(c2) > (length of [x v])> or <<((round (((mouse x) + (SCROLL X)) / (30))) * (30)) = (item (c2) of [x v])> and <((round (((mouse y) + (SCROLL Y)) / (30))) * (30)) = (item (c2) of [y v])>>>\n    change [c2 v] by (1)\nend\nif <(item (c2) of [sign_text v]) = []> then\n    say []\nelse\n    go to x: ((item (c2) of [x v]) - (SCROLL X)) y: ((item (c2) of [y v]) - (SCROLL Y))\n    say (join (item (c2) of [sign_text v]) [ \(press "e" to edit\)])\n    if <<key (e v) pressed?> and <(ASK_WAIT) = [0]>> then\n        set [ask_wait v] to [1]\n        set [sign# v] to (c2)\n        broadcast (rename v)\n    end\nend\nif <key (1 v) pressed?> then\n    set [current block v] to [g]\nelse\n    if <key (2 v) pressed?> then\n        set [current block v] to [l]\n    else\n        if <key (3 v) pressed?> then\n            set [current block v] to [w]\n        else\n            if <key (4 v) pressed?> then\n                set [current block v] to [s]\n            else\n                if <key (5 v) pressed?> then\n                    set [current block v] to [b]\n                else\n                    if <key (6 v) pressed?> then\n                        set [current block v] to [p]\n                    else\n                        if <key (7 v) pressed?> then\n                            set [current block v] to [n]\n                        else\n                            if <key (8 v) pressed?> then\n                                set [current block v] to [c]\n                            else\n                                if <key (9 v) pressed?> then\n                                    set [current block v] to [f]\n                                else\n                                    if <key (0 v) pressed?> then\n                                        set [current block v] to [e]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nif <key (r v) pressed?> then\n    set [scroll x v] to [0]\n    set [scroll y v] to [30]\nend\nstop [this script v]\n\n@win\n\nwhen flag clicked\ngo to [front v] layer\nhide\n\nwhen I receive [win v]\ngo to x: (0) y: (120)\nset [ghost v] effect to (100)\nwait (0.2) seconds\nshow\nrepeat until <([abs v] of ((((-1) - (y position)) / (9)) + ((yvel) * (0.8))) ) < [0.03]>\n    set [yvel v] to ((((-1) - (y position)) / (10)) + ((yvel) * (0.84)))\n    change y by (yvel)\n    change [ghost v] effect by (-15)\nend\nwait until <<touching (mouse-pointer v)?> and <mouse down?>>\nset [play-pause v] to [0]\nrepeat until <(y position) < [-150]>\n    change y by (((y position) - (6)) / (3))\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [edit v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@thumbnail\n\nwhen flag clicked\nif <(username) = [stratfordjames]> then\n    show variable [☁ %c_data v]\nelse\n    hide variable [☁ %c_data v]\nend\nhide\ngo to x: (0) y: (0)\nforever\n    reset timer\nend\n\nwhen [timer v] > (0.1)\nshow\ngo to [front v] layer\nswitch costume to (costume1 v)\nset size to (150) %\nswitch costume to (costume2 v)\nset [ghost v] effect to (100)\nrepeat until <(size) < [100.3]>\n    switch costume to (costume1 v)\n    change size by (((100) - (size)) / (8))\n    switch costume to (costume2 v)\n    change [ghost v] effect by (-15)\nend\nset size to (100) %\n\nwhen flag clicked\nwait (0.1) seconds\nchange [☁ %c_data v] by (1)\n\n@main-menu\n\nwhen flag clicked\nset size to (100) %\nset [mode v] to [0]\nset [id v] to [0]\ncreate clone of (_myself_ v)\nset [id v] to [1]\ncreate clone of (_myself_ v)\nshow\nset [id v] to [99]\ngo to x: (0) y: (0)\nforever\n    go to [front v] layer\nend\n\nwhen I start as a clone\nset [@wait v] to [0]\nset size to (0) %\ngo to x: (0) y: (100)\nif <(id) = [0]> then\n    switch costume to (new v)\n    forever\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            broadcast (hide v)\n            set [mode v] to [edit]\n            stop [this script v]\n        end\n    end\nelse\n    if <[1] = (id)> then\n        switch costume to (load v)\n        forever\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                broadcast (import v) and wait\n                if <(import) = [invalid]> then\n                    set [mode v] to [edit]\n                else\n                    set [mode v] to [preview]\n                end\n                broadcast (hide v)\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen I receive [tick v]\nif <(id) < [5]> then\n    go to [front v] layer\n    go [backward v] (1) layers\n    change y by (((0) - (y position)) / (5))\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (13)\n        change size by (((110) - (size)) / (8))\n    else\n        set [brightness v] effect to (0)\n        change size by (((100) - (size)) / (8))\n    end\nend\n\nwhen I start as a clone\nset [ghost v] effect to (100)\nshow\nwait (0.1) seconds\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [hide v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\ndelete this clone\n\nwhen flag clicked\nswitch costume to (main1 v)\nwait (0.3) seconds\nforever\n    switch costume to (main1 v)\n    wait (0) seconds\n    repeat (5)\n        next costume\n        wait (0) seconds\n    end\n    switch costume to (main1 v)\n    wait (pick random (2) to (5)) seconds\nend\n\n