platformer Mario!
@Stage\n\nwhen flag clicked\nforever\n    switch backdrop to (Current Theme)\nend\n\n@Empty\n\n@Player\n\nwhen I receive [start v]\nforever\n    set [die v] to []\n    Reset\n    repeat until <not <(Die) = []>>\n        broadcast (Collision v)\n        tick\n    end\n    Die\nend\n\ndefine Die\nset [ghost v] effect to (0)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nwait (0.3) seconds\nset [die v] to []\n\nwhen flag clicked\nset [game mode v] to [Make]\nGreen Flag: Reset\nbroadcast (Reset v)\nset [current cos v] to [1]\n\ndefine tick\nshow\ngo to x: (0) y: (0)\nswitch costume to (hitbox v)\nset size to ((Tile Size) * (2)) %\ngo to [front v] layer\ngo [backward v] (36) layers\nif <(Game Mode) = [Play]> then\n    Play\nelse\n    Make [7]\nend\n\ndefine yv (yv)\nchange [jump v] by (2)\nif <not <[collision v] contains [6]?>> then\n    if <not <[collision v] contains [10]?>> then\n        change [player_y v] by (yv)\n    else\n        set [jump v] to [0]\n        set [xv v] to ((xv) * (0.97))\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<key (down arrow v) pressed?> or <key (s v) pressed?>>> then\n            change [player_y v] by ((yv) / (3))\n        else\n            change [player_y v] by ((yv) / (4))\n        end\n    end\nelse\n    set [jump v] to [0]\n    set [xv v] to ((xv) * (0.95))\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        change [player_y v] by ((yv) / (2))\n    end\n    if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n        change [player_y v] by ((yv) / (2))\n    end\nend\nPosition\nrepeat until <not <[collision v] contains [1]?>>\n    if <(yv) > [0]> then\n        change [player_y v] by (-1)\n    else\n        change [player_y v] by (1)\n        set [yv v] to [0]\n        set [jump v] to [0]\n    end\n    set [yv v] to [0]\n    Position\nend\n\ndefine xv (xv)\nchange [player_x v] by (xv)\nPosition\nif <[collision v] contains [1]?> then\n    repeat until <not <[collision v] contains [1]?>>\n        if <(xv) > [0]> then\n            change [player_x v] by (-1)\n        else\n            change [player_x v] by (1)\n        end\n        Position\n    end\n    if <(walljump) = [1]> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n                if <(xv) > [0]> then\n                    set [xv v] to (((-7) / (30)) * (Tile Size))\n                else\n                    set [xv v] to (((7) / (30)) * (Tile Size))\n                end\n                set [yv v] to (((15) / (30)) * (Tile Size))\n            end\n        else\n            set [xv v] to [0]\n        end\n    end\nend\nPosition\n\nset [jump v] to [0]\n\nset [jump v] to [0]\n\ndefine Position\nset [player_y v] to (round (Player_Y))\nset [player_x v] to (round (Player_X))\nCollision\ngo to x: ((Player_X) - (Camera X)) y: ((Player_Y) - (Camera Y))\nif <not <((Player_Y) - (Camera Y)) = (y position)>> then\n    hide\nelse\n    show\nend\n\ndefine Reset\ngo to x: (0) y: (0)\nset [current cos v] to [1]\nif <(Game Mode) = [Make]> then\n    set [win v] to [0]\nend\nset [player_x v] to ((CheckX) * (Tile Size))\nset [player_y v] to ((CheckY) * (Tile Size))\nset [camera x v] to (Player_X)\nset [camera y v] to (Player_Y)\nset [xv v] to [0]\nset [yv v] to [0]\nset [die v] to []\nset [ghost v] effect to (0)\n\ndefine Collision\ndelete all of [collision v]\nset [collision # v] to [1]\nrepeat (length of [x v])\n    add [0] to [collision v]\n    if <(item (Collision #) of [cos v]) = [3]> then\n        if <<((item (Collision #) of [y v]) * (Tile Size)) < ((Player_Y) + (((Tile Size) / (4)) * (3)))> and <((item (Collision #) of [y v]) * (Tile Size)) > ((Player_Y) - (((Tile Size) / (4)) * (3)))>> then\n            if <<((item (Collision #) of [x v]) * (Tile Size)) < ((Player_X) + (((Tile Size) / (4)) * (3)))> and <((item (Collision #) of [x v]) * (Tile Size)) > ((Player_X) - (((Tile Size) / (4)) * (3)))>> then\n                replace item (Collision #) of [collision v] with (item (Collision #) of [cos v])\n            end\n        end\n    else\n        if <(item (Collision #) of [cos v]) = [15]> then\n            if <<((item (Collision #) of [y v]) * (Tile Size)) < ((Player_Y) + (Tile Size))> and <([abs v] of ((item (Collision #) of [y v]) * (Tile Size)) ) > ((Player_Y) - (Tile Size))>> then\n                if <<((item (Collision #) of [x v]) * (Tile Size)) < ((Player_X) + (Tile Size))> and <((item (Collision #) of [x v]) * (Tile Size)) > ((Player_X) - (Tile Size))>> then\n                    if <(item (Collision #) of [coins v]) = [0]> then\n                        replace item (Collision #) of [collision v] with (item (Collision #) of [cos v])\n                    end\n                end\n            end\n        else\n            if <<((item (Collision #) of [y v]) * (Tile Size)) < ((Player_Y) + (((Tile Size) / (35)) * (34)))> and <((item (Collision #) of [y v]) * (Tile Size)) > ((Player_Y) - (((Tile Size) / (35)) * (35)))>> then\n                if <<((item (Collision #) of [x v]) * (Tile Size)) < ((Player_X) + (((Tile Size) / (25)) * (23)))> and <((item (Collision #) of [x v]) * (Tile Size)) > ((Player_X) - (((Tile Size) / (25)) * (23)))>> then\n                    replace item (Collision #) of [collision v] with (item (Collision #) of [cos v])\n                end\n            end\n        end\n    end\n    change [collision # v] by (1)\nend\n\ndefine Play\nset [player_y v] to (round (Player_Y))\nif <(Win) = [0]> then\n    if <[10] > ([abs v] of (xv) )> then\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            set [cos v] to [1]\n            change [xv v] by (((2) / (30)) * (Tile Size))\n        else\n            if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n                set [cos v] to [2]\n                change [xv v] by (((-2) / (30)) * (Tile Size))\n            else\n                set [cos v] to [3]\n            end\n        end\n    end\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        Position\n        if <(jump) < [5]> then\n            change [jump v] by (3)\n            set [yv v] to (((21) / (30)) * (Tile Size))\n        end\n    end\nend\nset [yv v] to ((yv) * (0.99))\nset [xv v] to ((xv) * (0.8))\nif <(yv) > [-13]> then\n    change [yv v] by ((((2) / (30)) * (Tile Size)) * (-1))\nend\nyv (yv)\nif <([abs v] of (xv) ) > [0]> then\n    xv (xv)\nend\nif <(Player_Y) < [-400]> then\n    hide\nend\nif <<<[collision v] contains [3]?> or <[collision v] contains [12]?>> or <(Player_Y) < [-500]>> then\n    set [die v] to [Die]\nend\nif <<[collision v] contains [4]?> or <[collision v] contains [5]?>> then\n    set [yv v] to (((25) / (30)) * (Tile Size))\nend\nchange [camera x v] by (round (((Player_X) - (Camera X)) / (((8) * (30)) / (Tile Size))))\nif <(Player_Y) > [-200]> then\n    change [camera y v] by (round (((Player_Y) - (Camera Y)) / (((8) * (30)) / (Tile Size))))\nend\nPosition\nswitch costume to (Cos)\nCollision\n\ndefine Make (speed)\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [xv v] by (speed)\nelse\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [xv v] by ((speed) * (-1))\n    end\nend\nif <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n    set [yv v] to ((speed) + (3))\nelse\n    if <<<key (down arrow v) pressed?> or <key (s v) pressed?>> and <(Player_Y) > [-50]>> then\n        set [yv v] to (((speed) + (3)) * (-1))\n    end\nend\nset [yv v] to ((yv) * (0.6))\nset [xv v] to ((xv) * (0.5))\nchange [player_x v] by (xv)\nchange [player_y v] by (yv)\nset [camera x v] to (Player_X)\nset [camera y v] to (Player_Y)\nswitch costume to (3 v)\ngo to x: ((0) - (Camera X)) y: ((Tile Size) - (Camera Y))\n\nwhen I receive [play game v]\nGreen Flag: Reset\nReset\n\nwhen I receive [start v]\nforever\n    go to [front v] layer\n    go [backward v] (50) layers\n    broadcast (Game Loop v)\nend\n\ndefine Green Flag: Reset\nset [checkx v] to [0]\nset [checky v] to [0]\nset [has won? v] to [0]\n\nset [win v] to [0]\nset [has won? v] to [0]\n\nwhen I receive [play game v]\n\n@Blocks\n\nwhen flag clicked\nforever\n    if <mouse down?> then\n        if <(Game Mode) = [Make]> then\n            if <(Signtype) = [0]> then\n                Add block\n            end\n        end\n    end\nend\n\nwhen flag clicked\ndelete all of [blocks v]\ndelete all of [x v]\ndelete all of [y v]\ndelete all of [cos v]\ndelete all of [previous v]\n\ndefine Costumes (cos) (t) (txt)\nclear graphic effects\nif <(cos) = [Empty]> then\n    switch costume to (empty v)\nend\nif <(cos) = [M]> then\n    switch costume to (e v)\n    switch costume to (Current Cos)\n    set [ghost v] effect to (50)\n    if <(Current Cos) = [1]> then\n        switch costume to (join (t) [M])\n    end\nelse\n    if <(cos) < [3]> then\n        if <[blocks v] contains (join (BlockX) (join [_] ((BlockY) + (1))))?> then\n            if <<(item (item # of (join (BlockX) (join [_] ((BlockY) + (1)))) in [blocks v]) of [cos v]) = [1]> or <(item (item # of (join (BlockX) (join [_] ((BlockY) + (1)))) in [blocks v]) of [cos v]) = [10]>> then\n                if <(item (item # of (join (BlockX) (join [_] ((BlockY) + (1)))) in [blocks v]) of [cos v]) = [10]> then\n                    switch costume to (join (t) [M])\n                else\n                    switch costume to (join [2] (t))\n                end\n            else\n                switch costume to (join [1] (t))\n            end\n        else\n            switch costume to (join [1] (t))\n        end\n    else\n        if <(cos) < [4]> then\n            switch costume to (3 v)\n        else\n            if <(cos) < [6]> then\n                if <[blocks v] contains (join (BlockX) (join [_] ((BlockY) + (1))))?> then\n                    if <(item (item # of (join (BlockX) (join [_] ((BlockY) + (1)))) in [blocks v]) of [cos v]) = [4]> then\n                        switch costume to (5 v)\n                    else\n                        switch costume to (4 v)\n                    end\n                else\n                    switch costume to (4 v)\n                end\n            else\n                if <(cos) < [10]> then\n                    switch costume to (6 v)\n                else\n                    if <(cos) < [11]> then\n                        if <[blocks v] contains (join (BlockX) (join [_] ((BlockY) + (1))))?> then\n                            if <<(item (item # of (join (BlockX) (join [_] ((BlockY) + (1)))) in [blocks v]) of [cos v]) = [10]> or <(item (item # of (join (BlockX) (join [_] ((BlockY) + (1)))) in [blocks v]) of [cos v]) = [1]>> then\n                                switch costume to (11 v)\n                            else\n                                switch costume to (10 v)\n                            end\n                        else\n                            switch costume to (10 v)\n                        end\n                    else\n                        if <(cos) < [14]> then\n                            if <[blocks v] contains (join (BlockX) (join [_] ((BlockY) + (1))))?> then\n                                if <<(item (item # of (join (BlockX) (join [_] ((BlockY) + (1)))) in [blocks v]) of [cos v]) = [12]> or <(item (item # of (join (BlockX) (join [_] ((BlockY) + (1)))) in [blocks v]) of [cos v]) = [1]>> then\n                                    switch costume to (13 v)\n                                else\n                                    switch costume to (12 v)\n                                end\n                            else\n                                switch costume to (12 v)\n                            end\n                        else\n                            if <(cos) < [15]> then\n                                switch costume to (14 v)\n                            else\n                                if <(cos) < [16]> then\n                                    switch costume to (15 v)\n                                else\n                                    if <(cos) < [17]> then\n                                        switch costume to (16 v)\n                                        go to [back v] layer\n                                        if <<[collision v] contains [16]?> and <not <<(item (item # of [16] in [collision v]) of [x v]) = [0]> and <(item (item # of [16] in [collision v]) of [y v]) = [1]>>>> then\n                                            set [checkx v] to (item (item # of [16] in [collision v]) of [x v])\n                                            set [checky v] to (item (item # of [16] in [collision v]) of [y v])\n                                        end\n                                    else\n                                        if <(cos) < [18]> then\n                                            go to [back v] layer\n                                            switch costume to (17 v)\n                                            if <[collision v] contains [17]?> then\n                                                set [checkx v] to (item (item # of [17] in [collision v]) of [x v])\n                                                set [checky v] to (item (item # of [17] in [collision v]) of [y v])\n                                                if <(Has won?) = [0]> then\n                                                    broadcast (Win v)\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine erase\nif <not <<(join (round (((mouse x) + (Camera X)) / (Tile Size))) (join [_] (round (((mouse y) + (Camera Y)) / (Tile Size))))) = [0_0]> or <(join (round (((mouse x) + (Camera X)) / (Tile Size))) (join [_] (round (((mouse y) + (Camera Y)) / (Tile Size))))) = (join [0] [1])>>> then\n    if <[blocks v] contains (join (round (((mouse x) + (Camera X)) / (Tile Size))) (join [_] (round (((mouse y) + (Camera Y)) / (Tile Size)))))?> then\n        delete (item # of (join (round (((mouse x) + (Camera X)) / (Tile Size))) (join [_] (round (((mouse y) + (Camera Y)) / (Tile Size))))) in [blocks v]) of [x v]\n        delete (item # of (join (round (((mouse x) + (Camera X)) / (Tile Size))) (join [_] (round (((mouse y) + (Camera Y)) / (Tile Size))))) in [blocks v]) of [y v]\n        delete (item # of (join (round (((mouse x) + (Camera X)) / (Tile Size))) (join [_] (round (((mouse y) + (Camera Y)) / (Tile Size))))) in [blocks v]) of [cos v]\n        delete (item # of (join (round (((mouse x) + (Camera X)) / (Tile Size))) (join [_] (round (((mouse y) + (Camera Y)) / (Tile Size))))) in [blocks v]) of [signtxt v]\n        delete (item # of (join (round (((mouse x) + (Camera X)) / (Tile Size))) (join [_] (round (((mouse y) + (Camera Y)) / (Tile Size))))) in [blocks v]) of [coins v]\n        delete (item # of (join (round (((mouse x) + (Camera X)) / (Tile Size))) (join [_] (round (((mouse y) + (Camera Y)) / (Tile Size))))) in [blocks v]) of [blocks v]\n        Save\n    end\nend\n\nwhen I receive [signtxt v]\nset [signtype v] to [1]\nhide\nask [Enter text for sign.] and wait\nif <<(answer) = []> or << (answer) contains [}]?> or < (answer) contains [{]?>>> then\n    delete (length of [blocks v]) of [x v]\n    delete (length of [blocks v]) of [y v]\n    delete (length of [blocks v]) of [cos v]\n    delete (length of [blocks v]) of [coins v]\n    delete (length of [blocks v]) of [blocks v]\nelse\n    add (answer) to [signtxt v]\nend\nset [signtype v] to [0]\n\ndefine Add block\nif <<<<[-150] < (mouse y)> and <(mouse y) < [140]>> and <<(theme out/in) = [0]> and <(setting) = [1]>>> and <not <<(Camera Y) < [-100]> and <(((round (((mouse y) + (Camera Y)) / (Tile Size))) * (Tile Size)) - (Camera Y)) < [-100]>>>> then\n    if <(timer) > [0.5]> then\n        if <not <(Current Cos) = [E]>> then\n            if <not <[blocks v] contains (join (round (((mouse x) + (Camera X)) / (Tile Size))) (join [_] (round (((mouse y) + (Camera Y)) / (Tile Size)))))?>> then\n                if <not <(Current Cos) = [17]>> then\n                    if <not <(Current Cos) = [15]>> then\n                        if <not <(Current Cos) = [14]>> then\n                            add (join (round (((mouse x) + (Camera X)) / (Tile Size))) (join [_] (round (((mouse y) + (Camera Y)) / (Tile Size))))) to [blocks v]\n                            add (round (((mouse x) + (Camera X)) / (Tile Size))) to [x v]\n                            add (round (((mouse y) + (Camera Y)) / (Tile Size))) to [y v]\n                            add (Current Cos) to [cos v]\n                            add [0] to [signtxt v]\n                            add [] to [coins v]\n                        else\n                            add (join (round (((mouse x) + (Camera X)) / (Tile Size))) (join [_] (round (((mouse y) + (Camera Y)) / (Tile Size))))) to [blocks v]\n                            add (round (((mouse x) + (Camera X)) / (Tile Size))) to [x v]\n                            add (round (((mouse y) + (Camera Y)) / (Tile Size))) to [y v]\n                            add (Current Cos) to [cos v]\n                            add [] to [coins v]\n                            broadcast (signtxt v)\n                        end\n                    else\n                        add (join (round (((mouse x) + (Camera X)) / (Tile Size))) (join [_] (round (((mouse y) + (Camera Y)) / (Tile Size))))) to [blocks v]\n                        add (round (((mouse x) + (Camera X)) / (Tile Size))) to [x v]\n                        add (round (((mouse y) + (Camera Y)) / (Tile Size))) to [y v]\n                        add (Current Cos) to [cos v]\n                        add [0] to [signtxt v]\n                        add [0] to [coins v]\n                    end\n                else\n                    if <not <[cos v] contains [17]?>> then\n                        add (join (round (((mouse x) + (Camera X)) / (Tile Size))) (join [_] (round (((mouse y) + (Camera Y)) / (Tile Size))))) to [blocks v]\n                        add (round (((mouse x) + (Camera X)) / (Tile Size))) to [x v]\n                        add (round (((mouse y) + (Camera Y)) / (Tile Size))) to [y v]\n                        add (Current Cos) to [cos v]\n                        add [0] to [signtxt v]\n                        add [] to [coins v]\n                    end\n                end\n                Block history\n                Save\n            end\n        else\n            erase\n        end\n    end\nend\n\ndefine Rename sign (x) (y)\nset [signtype v] to [1]\nhide\nask [Rename sign to:] and wait\nif <<(answer) = []> or << (answer) contains [\]]?> or < (answer) contains [\[]?>>> then\nset [signtype v] to [0]\n\nwhen I receive [rename sign v]\nRename sign (round (((mouse x) + (Camera X)) / (Tile Size))) (round (((mouse y) + (Camera Y)) / (Tile Size)))\n\ndefine Coins\nset [coin # v] to [0]\nrepeat (length of [coins v])\n    change [coin # v] by (1)\n    if <(item (Coin #) of [coins v]) = [1]> then\n        replace item (Coin #) of [coins v] with [0]\n    end\nend\n\ndefine Costumes\nif <key (1 v) pressed?> then\n    set [current cos v] to [1]\nelse\n    if <key (2 v) pressed?> then\n        set [current cos v] to [3]\n    else\n        if <key (3 v) pressed?> then\n            set [current cos v] to [10]\n        else\n            if <key (4 v) pressed?> then\n                set [current cos v] to [12]\n            else\n                if <key (5 v) pressed?> then\n                    set [current cos v] to [4]\n                else\n                    if <key (6 v) pressed?> then\n                        set [current cos v] to [14]\n                    else\n                        if <key (7 v) pressed?> then\n                            set [current cos v] to [6]\n                        else\n                            if <key (8 v) pressed?> then\n                                set [current cos v] to [15]\n                            else\n                                if <key (9 v) pressed?> then\n                                    set [current cos v] to [16]\n                                else\n                                    if <key (0 v) pressed?> then\n                                        set [current cos v] to [17]\n                                    else\n                                        if <key (space v) pressed?> then\n                                            set [current cos v] to [E]\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [game loop v]\nCostumes\n\ndefine Save\nset [savecode# v] to [0]\nset [save v] to (join (join (walljump) (Current Theme)) (join (Tile Size) [}]))\nrepeat (length of [blocks v])\n    change [savecode# v] by (1)\n    if <(item (Savecode#) of [cos v]) = [14]> then\n        set [save v] to (join (SAVE) (join (join (join (join (item (Savecode#) of [x v]) [}]) (join (item (Savecode#) of [y v]) [}])) (join (join [t] (item (Savecode#) of [signtxt v])) [}])) [{]))\n    else\n        set [save v] to (join (SAVE) (join (join (join (join (item (Savecode#) of [x v]) [}]) (join (item (Savecode#) of [y v]) [}])) (join (item (Savecode#) of [cos v]) [}])) [{]))\n    end\nend\nset [save v] to (join (SAVE) [}])\nif <not <[previous v] contains (SAVE)?>> then\n    insert (SAVE) at ((length of [previous v]) + (1)) of [previous v] \nend\n\ndefine Load (savecode)\nif <(length of (savecode)) < [16]> then\n    Invalid code\n    stop [this script v]\nend\ndelete all of [blocks v]\ndelete all of [x v]\ndelete all of [y v]\ndelete all of [cos v]\ndelete all of [coins v]\ndelete all of [signtxt v]\nset [walljump v] to (letter (2) of (savecode))\nset [current theme v] to (letter (3) of (savecode))\nset [savecode# v] to [4]\nset [tile size v] to []\nrepeat until <(letter (Savecode#) of (savecode)) = [}]>\n    set [tile size v] to (join (Tile Size) (letter (Savecode#) of (savecode)))\n    change [savecode# v] by (1)\nend\nrepeat until <(Savecode#) > (length of (savecode))>\n    set [loadtype v] to [1]\n    set [current_load v] to []\n    repeat until <<(letter (Savecode#) of (savecode)) = [{]> or <(Savecode#) > (length of (savecode))>>\n        set [current_load v] to []\n        repeat until <(letter (Savecode#) of (savecode)) = [}]>\n            if <<not <[letters used v] contains (letter (Savecode#) of (savecode))?>> and <(LoadType) < [3]>> then\n                Invalid code\n                stop [this script v]\n            end\n            set [current_load v] to (join (CURRENT_LOAD) (letter (Savecode#) of (savecode)))\n            change [savecode# v] by (1)\n            if <(Savecode#) > (length of (savecode))> then\n                Invalid code\n                stop [this script v]\n            end\n        end\n        if <(LoadType) = [1]> then\n            add (CURRENT_LOAD) to [x v]\n        else\n            if <(LoadType) = [2]> then\n                add (CURRENT_LOAD) to [y v]\n            else\n                if <(LoadType) = [3]> then\n                    if <(letter (1) of (CURRENT_LOAD)) = [t]> then\n                        add [14] to [cos v]\n                        set [textload# v] to [2]\n                        set [textload v] to []\n                        repeat (length of (CURRENT_LOAD))\n                            set [textload v] to (join (textload) (letter (textload#) of (CURRENT_LOAD)))\n                            change [textload# v] by (1)\n                        end\n                        add (textload) to [signtxt v]\n                        add [] to [coins v]\n                        add (join (join (item (length of [x v]) of [x v]) [_]) (item (length of [x v]) of [y v])) to [blocks v]\n                        if <(length of [x v]) > (length of [y v])> then\n                            Invalid code\n                            stop [this script v]\n                        end\n                    else\n                        add (CURRENT_LOAD) to [cos v]\n                        add [0] to [signtxt v]\n                        if <(CURRENT_LOAD) = [15]> then\n                            add [0] to [coins v]\n                        else\n                            add [] to [coins v]\n                        end\n                        add (join (join (item (length of [x v]) of [x v]) [_]) (item (length of [x v]) of [y v])) to [blocks v]\n                    end\n                end\n            end\n        end\n        change [loadtype v] by (1)\n        change [savecode# v] by (1)\n    end\n    change [savecode# v] by (1)\nend\nset [savecode# v] to [0]\ndelete (length of [x v]) of [x v]\nif <not <(length of [x v]) = (length of [y v])>> then\n    Invalid code\n    stop [this script v]\nend\nif <(letter (1) of (savecode)) = [1]> then\n    broadcast (Code imported! v)\nend\nreplace item (1) of [blocks v] with [0_-1000]\nreplace item (1) of [cos v] with [M]\n\nwhen flag clicked\nshow list [how to export v]\n\nwhen I receive [save v]\nSave\ndelete all of [how to export v]\nhide list [how to export v]\nadd [Triple-click on the code to select the whole code. Press Ctrl+C to copy the code.] to [how to export v]\nadd (SAVE) to [how to export v]\nadd [] to [how to export v]\nadd [You can share your code with others here:] to [how to export v]\nadd [https://scratch.mit.edu/discuss/topic/478905/] to [how to export v]\nadd [] to [how to export v]\nadd [Please don't post your code in the comments, many codes are too long!] to [how to export v]\nadd [] to [how to export v]\n\nwhen I receive [load v]\nLoad (join [1] (SAVE))\n\nwhen I receive [enter save v]\nEnter save\n\ndefine Enter save\nhide\nask [Enter savecode:] and wait\nbroadcast (Light thing v)\nwait (0.3) seconds\nif <(timer) < [0.5]> then\n    set [game mode v] to [play]\n    broadcast (Start v)\n    Setup\nend\nset [save v] to (answer)\nwait (0.3) seconds\nLoad (join [1] (SAVE))\nstop [this script v]\n\nwhen I receive [history v]\nLoad (join [0] (item (history#) of [previous v]))\n\ndefine Block history\nset [history# v] to ((length of [previous v]) + (1))\n\ndefine Invalid code\nif <(timer) < [0.5]> then\n    Setup\n    broadcast (Invalid code! v)\nelse\n    Load (join [0] (item (history#) of [previous v]))\n    broadcast (Invalid code! v)\nend\n\ndefine Clone(stamp)\nbroadcast (Pos player v)\nerase all\nset [letter # v] to [1]\nrepeat (length of [blocks v])\n    go to [back v] layer\n    if <not <(item (Letter #) of [cos v]) = [M]>> then\n        if <([abs v] of (((item (Letter #) of [x v]) * (Tile Size)) - (Camera X)) ) < [300]> then\n            if <([abs v] of (((item (Letter #) of [y v]) * (Tile Size)) - (Camera Y)) ) < [300]> then\n                if <not <(item (Letter #) of [cos v]) = [15]>> then\n                    Go (item (Letter #) of [x v]) (item (Letter #) of [y v])\n                    Costumes (item (Letter #) of [cos v]) (Current Theme) (item (Letter #) of [signtxt v])\n                    stamp\n                else\n                    if <(item (Letter #) of [coins v]) = [0]> then\n                        go to x: (((item (Letter #) of [x v]) * (Tile Size)) - (Camera X)) y: (((item (Letter #) of [y v]) * (Tile Size)) - (Camera Y))\n                        Go (item (Letter #) of [x v]) (item (Letter #) of [y v])\n                        Costumes (item (Letter #) of [cos v]) (Current Theme) (item (Letter #) of [signtxt v])\n                        stamp\n                    end\n                end\n            end\n        end\n    else\n        if <not <(Current Cos) = [E]>> then\n            if <not <<[blocks v] contains (join (round (((mouse x) + (Camera X)) / (Tile Size))) (join [_] (round (((mouse y) + (Camera Y)) / (Tile Size)))))?> or <not <(Game Mode) = [Make]>>>> then\n                Go (round (((mouse x) + (Camera X)) / (Tile Size))) (round (((mouse y) + (Camera Y)) / (Tile Size)))\n                Costumes [M] (Current Theme) (item (Letter #) of [signtxt v])\n                stamp\n            end\n        end\n    end\n    change [letter # v] by (1)\nend\nif <(Current Cos) = [E]> then\n    broadcast (Ereaser v)\nend\n\nwhen I start as a clone\nshow\n\ndefine Coin\nif <(Game Mode) = [Play]> then\n    repeat (length of [collision v])\n        if <[collision v] contains [15]?> then\n            replace item (item # of [15] in [collision v]) of [coins v] with [1]\n        end\n    end\nelse\n    Coins\nend\n\nwhen flag clicked\nforever\n    Coin\nend\n\ndefine Setup\nset [game mode v] to [Make]\nswitch costume to (empty v)\nhide\ngo to x: (0) y: (0)\ndelete all of [blocks v]\ndelete all of [x v]\ndelete all of [y v]\ndelete all of [cos v]\ndelete all of [collision v]\ndelete all of [signtxt v]\ndelete all of [coins v]\nset [history# v] to [1]\nset [current theme v] to [G]\nset [tile size v] to [30]\nset size to ((Tile Size) * (2)) %\nset [blockx v] to [-100000]\nset [blocky v] to [-100000]\nset [signtype v] to [0]\nadd [0_-1000] to [blocks v]\nadd [0] to [x v]\nadd [-1000] to [y v]\nadd [M] to [cos v]\nadd [0] to [signtxt v]\nadd [] to [coins v]\nadd [0_0] to [blocks v]\nadd [0] to [x v]\nadd [0] to [y v]\nadd [1] to [cos v]\nadd [0] to [signtxt v]\nadd [] to [coins v]\nadd [0_1] to [blocks v]\nadd [0] to [x v]\nadd [1] to [y v]\nadd [16] to [cos v]\nadd [0] to [signtxt v]\nadd [] to [coins v]\nSave\n\nwhen flag clicked\nSetup\n\nwhen I receive [reset blocks v]\nSetup\n\nwhen I receive [create new level v]\nSetup\n\ndefine Go (x) (y)\nswitch costume to (empty v)\nset size to (5000) %\ngo to x: (((x) * (Tile Size)) - (Camera X)) y: (((y) * (Tile Size)) - (Camera Y))\nset size to ((Tile Size) * (2)) %\nset [blockx v] to (x)\nset [blocky v] to (y)\n\nwhen I receive [game loop v]\nClone(stamp)\n\nswitch costume to (empty v)\n\nswitch costume to (empty v)\n\nwhen I receive [theme v]\nSave\n\n@Interface\n\nwhen flag clicked\nswitch costume to (invalid v)\ncreate clone of (_myself_ v)\nswitch costume to (out v)\nshow\nset size to (100) %\nforever\n    go to x: (0) y: (0)\n    go to [back v] layer\n    switch costume to (comment: secret message v)\nend\n\ngo [backward v] (100) layers\n\nwhen I start as a clone\ngo to x: (0) y: (170)\n\nwhen I receive [invalid code! v]\nbroadcast (Light thing v)\nwait (0.8) seconds\nif <<(costume [name v]) = [invalid]> or <(costume [name v]) = [succes]>> then\n    show\n    switch costume to (invalid v)\n    glide (1) secs to x: (0) y: (115)\n    wait (1) seconds\n    glide (1) secs to x: (0) y: (170)\nend\n\nwhen I receive [code imported! v]\nbroadcast (Light thing v)\nwait (0.8) seconds\nif <<(costume [name v]) = [invalid]> or <(costume [name v]) = [succes]>> then\n    show\n    switch costume to (succes v)\n    glide (1) secs to x: (0) y: (115)\n    wait (1) seconds\n    glide (1) secs to x: (0) y: (170)\nend\n\nwhen I receive [game loop v]\nif <(costume [name v]) = [Out]> then\n    set size to (100) %\n    if <(Game Mode) = [Make]> then\n        show\n    else\n        hide\n    end\nelse\n    go to [back v] layer\n    if <(Game Mode) = [Make]> then\n        show\n    else\n        hide\n    end\nend\n\nset size to (100) %\n\nif <(timer) > [0.2]> then\n\n@Win\n\nwhen flag clicked\nset [win v] to [0]\nclear graphic effects\nhide\nswitch costume to (bg v)\nset [ghost v] effect to (30)\nset [ghost effect v] to [30]\ngo to x: (0) y: (0)\ncreate clone of (_myself_ v)\nswitch costume to (other v)\nset [ghost v] effect to (0)\nset [ghost effect v] to [0]\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [win v]\nset [win v] to [1]\nset [has won? v] to [1]\nset size to (0) %\n\nwait until \n\nwhen I receive [game loop v]\nif <(Win) = [1]> then\n    if <<mouse down?> and <not <touching (mouse-pointer v)?>>> then\n        set [win v] to [0]\n    end\n    if <(Game Mode) = [Play]> then\n        show\n    else\n        hide\n    end\n    set size to (100) %\n    if <(costume [name v]) = [other]> then\n        show\n        if <(Ghost effect) > [0]> then\n            change [ghost v] effect by (-10)\n            change [ghost effect v] by (-10)\n        end\n    else\n        if <(Ghost effect) > [30]> then\n            change [ghost v] effect by (-10)\n            change [ghost effect v] by (-10)\n        end\n    end\nelse\n    if <not <(Ghost effect) > [99]>> then\n        change [ghost v] effect by (10)\n        change [ghost effect v] by (10)\n    else\n        hide\n    end\nend\n\n@BlockPicker\n\ndefine Clone\nswitch costume to (costume1 v)\nset size to (50) %\nclear graphic effects\nset [blockpickery v] to [-163]\ngo to x: (-268) y: (BlockPickerY)\ncreate clone of (_myself_ v)\nnext costume\ngo to x: (-240) y: (BlockPickerY)\nrepeat (11)\n    create clone of (_myself_ v)\n    next costume\n    change x by (28)\nend\nswitch costume to (e v)\n\nwhen flag clicked\nClone\nforever\n    go to [front v] layer\n    go [backward v] (7) layers\nend\n\nwhen I receive [game loop v]\nset y to (BlockPickerY)\nif <(Game Mode) = [Make]> then\n    if <(costume [name v]) = [bottom]> then\n        go to x: (0) y: (BlockPickerY)\n        set size to (100) %\n        clear graphic effects\n        if <touching (mouse-pointer v)?> then\n            repeat until <(BlockPickerY) > [-163]>\n                change [blockpickery v] by (3)\n            end\n        else\n            repeat until <[-190] > (BlockPickerY)>\n                change [blockpickery v] by (-3)\n            end\n        end\n    end\n    if <<(costume [name v]) = [17]> and <[cos v] contains [17]?>> then\n        hide\n    else\n        show\n    end\n    if <(costume [name v]) = [E]> then\n        if <<(costume [name v]) = [E]> and <[cos v] contains [17]?>> then\n            go to x: (40) y: (BlockPickerY)\n        else\n            go to x: (70) y: (BlockPickerY)\n        end\n    end\n    if <(letter (1) of (costume [name v])) = [5]> then\n        switch costume to (join [51] (Current Theme))\n    end\n    if <<(Current Cos) = (costume [name v])> or <<(letter (1) of (costume [name v])) = [5]> and <(Current Cos) = [1]>>> then\n        set [ghost v] effect to (10)\n    else\n        if <not <(costume [name v]) = [bottom]>> then\n            if <touching (mouse-pointer v)?> then\n                if <<(costume [name v]) = [17]> and <[cos v] contains [17]?>> then\n                    hide\n                else\n                    set [ghost v] effect to (20)\n                    if <mouse down?> then\n                        set [current cos v] to (costume [name v])\n                        if <(letter (1) of (costume [name v])) = [5]> then\n                            set [current cos v] to [1]\n                        end\n                    end\n                end\n            else\n                set [ghost v] effect to (50)\n            end\n        end\n    end\nelse\n    hide\nend\n\nwhen I start as a clone\nset size to (48) %\n\nwhen flag clicked\nset size to (50) %\n\nset [blockpickery v] to [-163]\n\nset [blockpickery v] to [-200]\n\ngo to [back v] layer\n\n@UI\n\nwhen flag clicked\nClone\nforever\n    if <(Game Mode) = [Make]> then\n        go to [front v] layer\n        go [backward v] (6) layers\n    end\nend\n\ndefine Clone\ngo to x: (-180) y: (160)\nshow\nswitch costume to (costume3 v)\nset size to (50) %\nclear graphic effects\npoint in direction (90)\nrepeat (20)\n    create clone of (_myself_ v)\n    next costume\n    set [cloneid v] to (costume [name v])\n    change x by (90)\nend\ncreate clone of (_myself_ v)\nswitch costume to (0 v)\nset [cloneid v] to [0]\nset [setting v] to [1]\nset [theme out/in v] to [0]\nset [walljump v] to [0]\n\nwhen I receive [start v]\nif << (cloneid) contains [slider]?> and <(letter (length of (cloneid)) of (cloneid)) = [e]>> then\n    go to x: ((((Tile Size) + (15)) * (2.2)) + (58)) y: (BlockPickerY)\nend\nif < (cloneid) contains [setting_button]?> then\n    set x to (350)\nend\nforever\n    if <(Game Mode) = [Make]> then\n        show\n        if <(cloneid) = [edit]> then\n            hide\n        end\n        if <(cloneid) = [theme]> then\n            go to x: (-180) y: (160)\n        end\n        if < (cloneid) contains [setting_button]?> then\n            if <(letter (length of (cloneid)) of (cloneid)) = [1]> then\n                Go\n                set y to (80)\n            else\n                if <(letter (length of (cloneid)) of (cloneid)) = [2]> then\n                    Go\n                    set y to (0)\n                else\n                    if <(letter (length of (cloneid)) of (cloneid)) = [3]> then\n                        Go\n                        set y to (-80)\n                    else\n                        Go\n                        set y to (0)\n                    end\n                end\n            end\n        end\n        if < (cloneid) contains [slider]?> then\n            set y to (BlockPickerY)\n            if <(letter (length of (cloneid)) of (cloneid)) = [e]> then\n                if <(x position) < [135]> then\n                    go to x: (150) y: (BlockPickerY)\n                else\n                    if <(x position) > [240]> then\n                        go to x: (255) y: (BlockPickerY)\n                    end\n                end\n                if <<mouse down?> and <touching (mouse-pointer v)?>> then\n                    repeat until <not <mouse down?>>\n                        Slider\n                    end\n                end\n            else\n                go to x: (160) y: (BlockPickerY)\n            end\n        end\n        if <(cloneid) = [setting]> then\n            go to x: (215) y: (160)\n        end\n        if <(cloneid) = [forward]> then\n            go to x: (177) y: (160)\n        end\n        if <(cloneid) = [back]> then\n            go to x: (140) y: (160)\n        end\n        if < (cloneid) contains [Theme1]?> then\n            set x to (-180)\n            if <not <(letter (1) of (cloneid)) = [T]>> then\n                if <(theme out/in) = [0]> then\n                    hide\n                else\n                    if <(theme out/in) = [1]> then\n                        if <touching (mouse-pointer v)?> then\n                            if <mouse down?> then\n                                wait until <not <mouse down?>>\n                                if <touching (mouse-pointer v)?> then\n                                    set [current theme v] to (letter (1) of (cloneid))\n                                    set [theme out/in v] to [0]\n                                    change [history# v] by (1)\n                                    broadcast (Theme v)\n                                end\n                            end\n                            set [brightness v] effect to (-5)\n                        else\n                            set [brightness v] effect to (0)\n                        end\n                        show\n                    else\n                        hide\n                    end\n                    set y to (134)\n                end\n            else\n                if <(theme out/in) = [0]> then\n                    if <(y position) < [250]> then\n                        change y by (5)\n                    end\n                else\n                    if <[135] < (y position)> then\n                        change y by (-5)\n                        set [theme out/in v] to [2]\n                    else\n                        set [theme out/in v] to [1]\n                    end\n                end\n            end\n        end\n        if <touching (mouse-pointer v)?> then\n            if <not <<< (cloneid) contains [Theme1]?> or <(cloneid) = [setting_button]>> or < (cloneid) contains [slider]?>>> then\n                set size to ((size) + (((58) - (size)) / (8))) %\n            end\n        else\n            if <(timer) > [1]> then\n                set size to ((size) + (((50) - (size)) / (6))) %\n            end\n        end\n        if <mouse down?> then\n            if <touching (mouse-pointer v)?> then\n                if <(cloneid) = [play]> then\n                    wait until <not <mouse down?>>\n                    if <touching (mouse-pointer v)?> then\n                        broadcast (Light thing v)\n                        wait (0.5) seconds\n                        set [game mode v] to [Play]\n                        broadcast (PLay game v)\n                    end\n                end\n            end\n        end\n    else\n        if < (cloneid) contains [setting_button]?> then\n            Go\n        end\n        set [setting v] to [1]\n        hide\n        if <(cloneid) = [edit]> then\n            go to x: (-195) y: (155)\n            show\n            go to [back v] layer\n            if <touching (mouse-pointer v)?> then\n                if <mouse down?> then\n                    if <touching (mouse-pointer v)?> then\n                        wait until <not <mouse down?>>\n                        broadcast (Light thing v)\n                        wait (0.25) seconds\n                        set [game mode v] to [Make]\n                        wait (0.25) seconds\n                        broadcast (PLay game v)\n                    end\n                end\n                set size to ((size) + (((63) - (size)) / (8))) %\n            else\n                set size to ((size) + (((50) - (size)) / (6))) %\n            end\n            reset timer\n        end\n    end\nend\n\ndefine Theme (out/in)\nif <(out/in) = [0]> then\n    set [theme out/in v] to [2]\nelse\n    set [theme out/in v] to [0]\nend\n\nwhen I start as a clone\nforever\n    if <(Game Mode) = [Make]> then\n        if <(cloneid) = [theme]> then\n            if <(timer) > [0.2]> then\n                if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                    wait until <not <mouse down?>>\n                    if <touching (mouse-pointer v)?> then\n                        Theme (theme out/in)\n                    end\n                end\n            else\n                set [theme out/in v] to [0]\n            end\n        end\n    end\nend\n\ndefine walljump (wall)\nif <(wall) = [0]> then\n    set [walljump v] to [1]\nelse\n    set [walljump v] to [0]\nend\n\nwhen I start as a clone\nforever\n    if <(Game Mode) = [Make]> then\n        if < (cloneid) contains [Walljump]?> then\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                wait until <not <mouse down?>>\n                if <touching (mouse-pointer v)?> then\n                    walljump (walljump)\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nset size to (50) %\n\nwhen I start as a clone\nforever\n    if <(Game Mode) = [Make]> then\n        if < (cloneid) contains [export]?> then\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                wait until <not <mouse down?>>\n                if <touching (mouse-pointer v)?> then\n                    broadcast (Save v)\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(Game Mode) = [Make]> then\n        if < (cloneid) contains [import]?> then\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                wait until <not <mouse down?>>\n                if <touching (mouse-pointer v)?> then\n                    broadcast (enter save v) and wait\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [save v]\nif < (cloneid) contains [export]?> then\n    hide\n    ask [Confirm that you copied the whole code here:] and wait\n    if <(answer) = (SAVE)> then\n        show list [how to export v]\n    else\n        repeat until <(answer) = (SAVE)>\n            hide\n            ask [The whole code wasn't copied! Try again!] and wait\n        end\n        show list [how to export v]\n    end\n    show\nend\n\nwhen I start as a clone\nforever\n    if <(Game Mode) = [Make]> then\n        if <(cloneid) = [back]> then\n            if <(history#) > [1]> then\n                set [ghost v] effect to (0)\n                if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                    wait until <not <mouse down?>>\n                    if <touching (mouse-pointer v)?> then\n                        change [history# v] by (-1)\n                        broadcast (History v)\n                    end\n                end\n            else\n                set [ghost v] effect to (50)\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(cloneid) = [forward]> then\n        if <(Game Mode) = [Make]> then\n            if <(length of [previous v]) > (history#)> then\n                set [ghost v] effect to (0)\n                if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                    wait until <not <mouse down?>>\n                    if <touching (mouse-pointer v)?> then\n                        change [history# v] by (1)\n                        broadcast (History v)\n                    end\n                end\n            else\n                set [ghost v] effect to (50)\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(Game Mode) = [Make]> then\n        if <(cloneid) = [setting]> then\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                wait until <not <mouse down?>>\n                if <touching (mouse-pointer v)?> then\n                    if <(setting) = [0]> then\n                        set [setting v] to [1]\n                    else\n                        set [setting v] to [0]\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Go\nif <(cloneid) = [setting_button]> then\n    if <(setting) = [1]> then\n        if <[350] > (x position)> then\n            change x by (9)\n        else\n            hide\n        end\n    else\n        if <(x position) > [150]> then\n            change x by (-9)\n        end\n        show\n    end\nelse\n    if <(setting) = [1]> then\n        if <[350] > (x position)> then\n            change x by (9)\n        else\n            hide\n        end\n    else\n        if <(x position) > [150]> then\n            change x by (-9)\n        end\n        show\n    end\nend\nif <(setting) = [0]> then\n    if <(letter (length of (cloneid)) of (cloneid)) = [3]> then\n        if <(walljump) = [0]> then\n            switch costume to (setting_button3 v)\n        else\n            switch costume to (setting_button43 v)\n        end\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            wait until <not <mouse down?>>\n            if <(walljump) = [0]> then\n                set [walljump v] to [1]\n            else\n                set [walljump v] to [0]\n            end\n        end\n    end\n    if <(letter (length of (cloneid)) of (cloneid)) = [2]> then\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            wait until <not <mouse down?>>\n            broadcast (Light thing v)\n            wait (0.5) seconds\n            broadcast (Reset Blocks v)\n            broadcast (Start v)\n        end\n    end\n    if <(letter (length of (cloneid)) of (cloneid)) = [1]> then\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            wait until <not <mouse down?>>\n            broadcast (Light thing v)\n            wait (0.5) seconds\n            broadcast (Home v)\n        end\n    end\nend\n\nwhen I receive [start v]\nset [setting v] to [1]\nreset timer\n\ndefine Slider\nif <(mouse x) < [135]> then\n    go to x: (150) y: (BlockPickerY)\nelse\n    if <(mouse x) > [240]> then\n        go to x: (255) y: (BlockPickerY)\n    else\n        go to x: ((mouse x) + (20)) y: (BlockPickerY)\n    end\n    set [tile size v] to ((round (((x position) - (90)) / (2))) - (11))\n    reset timer\nend\ngo to x: ((((Tile Size) + (15)) * (2.2)) + (58)) y: (BlockPickerY)\n\n@Txt\n\ndefine Sign\ngo to [back v] layer\nset [ghost v] effect to (100)\nshow\nset size to (Tile Size) %\nif <[collision v] contains [14]?> then\n    go to x: (((item (item # of [14] in [collision v]) of [x v]) * (Tile Size)) - (Camera X)) y: (((item (item # of [14] in [collision v]) of [y v]) * (Tile Size)) - (Camera Y))\n    say (item (item # of [14] in [collision v]) of [signtxt v])\nelse\n    say []\nend\n\nwhen I receive [game loop v]\nset [ghost v] effect to (100)\nif <(Game Mode) = [Play]> then\n    Sign\nelse\n    Editor\nend\n\ndefine Editor\nset [ghost v] effect to (100)\nif <<[blocks v] contains (join (round (((mouse x) + (Camera X)) / (Tile Size))) (join [_] (round (((mouse y) + (Camera Y)) / (Tile Size)))))?> and <(item (item # of (join (round (((mouse x) + (Camera X)) / (Tile Size))) (join [_] (round (((mouse y) + (Camera Y)) / (Tile Size))))) in [blocks v]) of [cos v]) = [14]>> then\n    if <(Signtype) = [0]> then\n        go to x: (((item (item # of (join (round (((mouse x) + (Camera X)) / (Tile Size))) (join [_] (round (((mouse y) + (Camera Y)) / (Tile Size))))) in [blocks v]) of [x v]) * (Tile Size)) - (Camera X)) y: (((item (item # of (join (round (((mouse x) + (Camera X)) / (Tile Size))) (join [_] (round (((mouse y) + (Camera Y)) / (Tile Size))))) in [blocks v]) of [y v]) * (Tile Size)) - (Camera Y))\n        say (join (item (item # of (join (round (((mouse x) + (Camera X)) / (Tile Size))) (join [_] (round (((mouse y) + (Camera Y)) / (Tile Size))))) in [blocks v]) of [signtxt v]) [ \("e" to edit\)])\n        if <key (e v) pressed?> then\n            broadcast (Rename sign v)\n        end\n    end\nelse\n    say []\nend\n\n@Sprite1\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\n\nwhen I receive [light thing v]\nswitch costume to (costume1 v)\ngo to [front v] layer\nrepeat (10)\n    change [ghost v] effect by (-10)\n    switch costume to (costume1 v)\nend\nrepeat (15)\n    switch costume to (costume1 v)\nend\nrepeat (10)\n    change [ghost v] effect by (10)\n    switch costume to (costume1 v)\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    go [forward v] (10) layers\n    switch costume to (costume3 v)\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    go [forward v] (100) layers\nend\n\n@Sprite2\n\nwhen I receive [ereaser v]\nif <(Game Mode) = [Make]> then\n    set size to ((Tile Size) * (2)) %\n    show\n    go to x: (mouse x) y: (mouse y)\n    set [ghost v] effect to (50)\n    go to [back v] layer\nend\n\nwhen flag clicked\nforever\n    hide\nend\n\n@Stat\n\nwhen flag clicked\nSetup\n\nwhen flag clicked\nset [home v] to [1]\nbroadcast (Green Flag v)\n\ndefine Setup\nshow\ngo to x: (0) y: (0)\nswitch costume to (costume3 v)\nrepeat (3)\n    create clone of (_myself_ v)\n    next costume\nend\n\nwhen I receive [start v]\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    go [backward v] (2) layers\nend\n\nwhen I receive [start v]\nwait (1) seconds\ndelete this clone\n\nwhen I receive [home v]\nstop [other scripts in sprite v]\nset [home v] to [0]\nbroadcast (Green Flag v)\nSetup\n\nwhen I receive [green flag v]\nforever\n    reset timer\n    if <(costume [number v]) = [4]> then\n        go to x: (-108) y: (-20)\n        if <touching (mouse-pointer v)?> then\n            set size to ((size) + (((115) - (size)) / (6))) %\n            set [ghost v] effect to (3)\n            if <mouse down?> then\n                wait until <not <mouse down?>>\n                broadcast (Light thing v)\n                wait (0.5) seconds\n                broadcast (Create new level v)\n                broadcast (Start v)\n            end\n        else\n            set size to ((size) + (((99) - (size)) / (3))) %\n            set [ghost v] effect to (0)\n        end\n    else\n        go to x: (-110) y: (90)\n        if <(costume [number v]) = [3]> then\n            if <touching (mouse-pointer v)?> then\n                set size to ((size) + (((110) - (size)) / (6))) %\n                set [ghost v] effect to (3)\n            else\n                set size to ((size) + (((99) - (size)) / (3))) %\n                set [ghost v] effect to (0)\n            end\n        else\n            if <(costume [number v]) = [5]> then\n                go to x: (-108) y: (-97)\n                if <touching (mouse-pointer v)?> then\n                    set size to ((size) + (((115) - (size)) / (6))) %\n                    set [ghost v] effect to (3)\n                    if <mouse down?> then\n                        wait until <not <mouse down?>>\n                        broadcast (enter save v) and wait\n                    end\n                else\n                    set size to ((size) + (((99) - (size)) / (3))) %\n                    set [ghost v] effect to (0)\n                end\n            else\n                go to x: (0) y: (0)\n                set size to (100) %\n            end\n        end\n    end\nend\n\nwhen I receive [code imported! v]\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\n