LEGO ✦ scrolling platformer creator

Instructions:         ✦LEGO✦\n  Scrolling platformer creator by @TimMcCool\n\nThis scrolling platformer creator allows creating your own platformer levels!\nIt includes: 10 block types, 4 themes, import/export, undo/redo, walljump and much more.\n\nHow to use this:\n➜ Arrow Keys / WASD / Joystick to move in the editor\n➜ Keys (0-9, E) to select a block\n➜ Click to place a block\n➜ Once you're finished, set an end flag to mark the end of your level\n➜ Click "Export" to save your level\n➜ "m" key to go to the start block\n\nThe following blocks can be selected:\n(1) Ground\n(2) Lava (kills you)\n(3) Water (you can swim in it)\n(4) Up Spring\n(5) Down Spring\n(6) Saw (kills you)\n(7) Collectable / Coin\n(8) Sign (you can put text on it)\n(9) Checkpoint flag\n(10) End flag (can only be placed once)\n\nPlease love and fave if you like it. Follow me for more :)\nFound a bug? Report it in comments!\n\n* 4535 blocks *

@Stage\n\nwhen flag clicked\ndelete all of [history v]\nbroadcast (home v)\nset [theme v] to [d]\nforever\n    switch backdrop to (theme)\nend\n\nwhen flag clicked\nforever\n    play sound [Happy Fun Candy Time  v] until done\n    play sound [561695_Happy v] until done\n    play sound [Ride \(8 Bit Remix Cover Version\) \[Tribute to Twenty One Pilots\] - 8 Bit Universe2 v] until done\nend\n\nwhen flag clicked\nforever\n    change [@@tick v] by (0.03)\nend\n\nset [theme v] to [r]\n\nset [win v] to [1]\nrepeat (100)\n    change [win v] by (1)\n    if <not <(length of (item # of (item (win) of [unicodes v]) in [unicodes v])) = (win)>> then\n        stop [all v]\n    end\nend\n\nwhen flag clicked\nset volume to (50) %\n\n@b l a n k\n\n@Transitions\n\nwhen flag clicked\nhide\n\nwhen I receive [trans1 v]\nshow\nclear graphic effects\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [trans2 v]\nshow\nclear graphic effects\nset [ghost v] effect to (0)\nwait (0) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\n    go to [front v] layer\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\nwhen I receive [home v]\ngo to [front v] layer\nshow\ngo to x: (0) y: (0)\nerase all\nswitch costume to (costume2 v)\nset [mode v] to [intro]\nset [brightness v] effect to (0)\nwait (0.35) seconds\nset [mode v] to [homescreen]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen [timer v] > (0)\nhide\n\n@Hitbox\n\ndefine Physics\ngo to [back v] layer\ncollision\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<(joystick active?) = [1]> and <<[165] > (joystick dir)> and <(joystick dir) > [15]>>>> then\n    change [sx v] by (speed)\n    if <[8] < (sx)> then\n        set [sx v] to [8]\n    end\nelse\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<(joystick active?) = [1]> and <<[-15] > (joystick dir)> and <(joystick dir) > [-165]>>>> then\n        change [sx v] by ((speed) * (-1))\n        if <(sx) < [-8]> then\n            set [sx v] to [-8]\n        end\n    end\nend\nif <(sy) < [-9]> then\n    set [sy v] to [-9]\nend\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<(joystick active?) = [1]> and <[67.5] > ([abs v] of (joystick dir) )>>> then\n    if <not <[collision_ v] contains [4]?>> then\n        if <(in air) < [4]> then\n            set [sy v] to (jump height)\n        end\n    end\nend\nif <[collision_ v] contains [4]?> then\n    if <(in_water) = [0]> then\n        set [in_water v] to [1]\n        broadcast (water v)\n    end\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<(joystick active?) = [1]> and <[67.5] > ([abs v] of (joystick dir) )>>> then\n        set [sy v] to [3]\n    else\n        change [sy v] by (-1)\n    end\nelse\n    change [sy v] by (-1)\n    set [in_water v] to [0]\nend\nset [sx v] to ((sx) * (0.7))\nif <[collision_ v] contains [7]?> then\n    set [sy v] to [-14]\nend\ny (sy)\nx (sx)\nchange [scroll x v] by (round (((x) - (SCROLL X)) / (10)))\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (3)))\nset [scroll x v] to (round (SCROLL X))\nif <(SCROLL Y) < [-100]> then\n    set [scroll y v] to [-100]\nend\ngoto\nset [die v] to [0]\nif <<<[collision_ v] contains [2]?> or <[collision_ v] contains [5]?>> or <[collision_ v] contains [12]?>> then\n    set [die v] to [1]\nend\nif <[collision_ v] contains [3]?> then\n    set [sy v] to [14]\nend\nif <[collision_ v] contains [6]?> then\n    if <not <[collected_coins v] contains (item # of [6] in [collision_ v])?>> then\n        add (item # of [6] in [collision_ v]) to [collected_coins v]\n        start sound [coin v]\n    end\nend\nif <(y) < [-300]> then\n    set [die v] to [1]\nend\nif <[collision_ v] contains [10]?> then\n    change [x v] by (sx)\n    change [y v] by (sy)\n    set [win v] to [1]\n    set [die v] to [0]\n    broadcast (win v)\nend\ncollision\nif <[collision_ v] contains [9]?> then\n    if <not <(checkpoint) = (item # of [9] in [collision_ v])>> then\n        set [checkpoint v] to (item # of [9] in [collision_ v])\n        start sound [Collect v]\n        broadcast (activate checkpoint v)\n    end\nend\nsay []\nif <[collision_ v] contains [8]?> then\n    set [sign_item v] to (item # of [8] in [collision_ v])\n    create clone of (_myself_ v)\nend\n\ndefine y (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\ngoto\nrepeat until <not <<<[collision_ v] contains [21]?> or <[collision_ v] contains [11]?>> or <[collision_ v] contains [1]?>>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    goto\n    set [sy v] to [0]\nend\n\ndefine x (sx)\nchange [x v] by (sx)\ngoto\nif <<<[collision_ v] contains [21]?> or <[collision_ v] contains [11]?>> or <[collision_ v] contains [1]?>> then\n    repeat (10)\n        change [y v] by (1)\n        goto\n        if <not <<<[collision_ v] contains [21]?> or <[collision_ v] contains [11]?>> or <[collision_ v] contains [1]?>>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-10)\n    repeat until <not <<<[collision_ v] contains [21]?> or <[collision_ v] contains [11]?>> or <[collision_ v] contains [1]?>>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        goto\n        set [sx v] to [0]\n    end\n    set [x v] to (x)\n    if <(walljump) = [1]> then\n        if  then\n            if <([abs v] of (sx) ) = (sx)> then\n                set [sx v] to [-10]\n            else\n                set [sx v] to [10]\n            end\n            set [sy v] to [10]\n        end\n    end\nend\n\ndefine goto\nset [ghost v] effect to (0)\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\ncollision\n\ndefine Die\nstart sound [crashed oof v]\nset [win v] to [1]\nif <(y position) < [-100]> then\n    set [sy v] to [0]\n    set [win v] to [0]\nelse\n    set [sy v] to [10]\n    set [sx v] to [-3]\n    repeat (25)\n        change [ghost v] effect by (5)\n        turn right (5) degrees\n        change x by (sx)\n        change y by (sy)\n        change [sy v] by (-1.3)\n    end\n    point in direction (90)\n    set [win v] to [0]\nend\n\ndefine Import level\nset [checkpoint v] to [2]\nset [shrinked? v] to [0]\ndelete all of [mode v]\ndelete all of [x v]\ndelete all of [y v]\ndelete all of [sign v]\nadd platfom [0] [-100] [1]\nadd platfom [0] [-75] [9]\nif <not <(input) = []>> then\n    set [debugging v] to [True]\n    set [paused v] to [0]\n    if < (input) contains [}]?> then\n        Savecode Decoder [1]\n    else\n        Savecode Decoder [2]\n    end\nelse\n    set [walljump v] to [0]\n    set [speed v] to [2.1]\n    set [jump height v] to [8]\nend\n\nwhen I receive [edit v]\nset [pos_in_histr v] to [0]\ndelete all of [history v]\nset [mode v] to [editor]\nImport level\nset [ghost v] effect to (100)\nset [change v] to [0]\nset [win v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [blockselected v] to [1]\nset [. v] to [0]\nforever\n    change [direction of the saw v] by (1)\n    set size to (50) %\n    if <(mode) = [editor]> then\n        set [checkpoint v] to [2]\n        if <<(blockselected) = [8]> or <(blockselected) = [1000]>> then\n            broadcast (update v) and wait\n        else\n            broadcast (update v)\n        end\n        if <<(paused) = [0]> and <(debugging) = [False]>> then\n            broadcast (ui v)\n            if <(e?true) > [0]> then\n                if <key (e v) pressed?> then\n                    ask [Enter the text for the sign - Please follow community guidlines] and wait\n                    if <not <(answer) = []>> then\n                        replace item (e?true) of [sign v] with (answer)\n                        set [change v] to [1]\n                    end\n                end\n            end\n            hide\n            set [sx v] to [0]\n            set [sy v] to [0]\n            set [x v] to [0]\n            set [y v] to [-75]\n            set [win v] to [0]\n            if <<(.) = [1]> and <not <mouse down?>>> then\n                Histr\n                set [. v] to [0]\n            end\n            if <(change) = [1]> then\n                set [change v] to [0]\n                set [. v] to [1]\n            end\n        end\n    else\n        show\n        if <(die) = [0]> then\n            if <(win) = [0]> then\n                if <<(paused) = [0]> and <(debugging) = [False]>> then\n                    broadcast (update v)\n                    set [die v] to [0]\n                    Physics\n                    set x to (round (x position))\n                    broadcast (ui v)\n                end\n            else\n                start sound [win v]\n                repeat until <not <(mode) = [playing]>>\n                    change x by (((x position) - ((item (item # of [10] in [mode v]) of [x v]) - (SCROLL X))) / (-5))\n                    change y by (((y position) - (((item (item # of [10] in [mode v]) of [y v]) - (3)) - (SCROLL Y))) / (-5))\n                    go to [back v] layer\n                end\n            end\n        else\n            Die\n            set [die v] to [0]\n            set [sy v] to [0]\n            set [sx v] to [0]\n            if <(checkpoint) = [0]> then\n                set [checkpoint v] to [2]\n            end\n            set [x v] to (item (checkpoint) of [x v])\n            set [y v] to ((item (checkpoint) of [y v]) + (0))\n            set [scroll y v] to (y)\n            set [scroll x v] to (x)\n        end\n    end\nend\n\nbroadcast (update v)\n\ndefine Editormovemnet\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<(joystick active?) = [1]> and <<[165] > (joystick dir)> and <(joystick dir) > [15]>>>> then\n    change [scroll x v] by (6.25)\nend\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<(joystick active?) = [1]> and <<[-15] > (joystick dir)> and <(joystick dir) > [-165]>>>> then\n    change [scroll x v] by (-6.25)\nend\nif <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<(joystick active?) = [1]> and <([abs v] of (joystick dir) ) > [112.5]>>> then\n    if <(SCROLL Y) > [-100]> then\n        change [scroll y v] by (-6.25)\n    end\nend\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<(joystick active?) = [1]> and <[67.5] > ([abs v] of (joystick dir) )>>> then\n    change [scroll y v] by (6.25)\nend\nif <key (1 v) pressed?> then\n    set [blockselected v] to [1]\nend\nif <key (2 v) pressed?> then\n    set [blockselected v] to [2]\nend\nif <key (3 v) pressed?> then\n    set [blockselected v] to [4]\nend\nif <key (4 v) pressed?> then\n    set [blockselected v] to [3]\nend\nif <key (5 v) pressed?> then\n    set [blockselected v] to [7]\nend\nif <key (6 v) pressed?> then\n    set [blockselected v] to [5]\nend\nif <key (7 v) pressed?> then\n    set [blockselected v] to [6]\nend\nif <key (8 v) pressed?> then\n    set [blockselected v] to [8]\nend\nif <key (9 v) pressed?> then\n    set [blockselected v] to [9]\nend\nif <key (0 v) pressed?> then\n    set [blockselected v] to [10]\nend\nif <key (e v) pressed?> then\n    set [blockselected v] to [1000]\nend\nif <key (m v) pressed?> then\n    set [scroll y v] to [0]\n    set [scroll x v] to [0]\nend\n\nwhen I receive [loadcode v]\nImport level\nHistr\n\ndefine Savecode Decoder (mode)\nif <(mode) = [2]> then\n    set [debugging v] to [True]\n    broadcast (decode level v)\nend\nif <(mode) = [1]> then\n    set [jump height v] to [8]\n    set [speed v] to [2.1]\n    set [author v] to [?]\n    set [status v] to [0]\n    set [zeile v] to [1]\n    set [zwische v] to []\n    delete all of [ouoot v]\n    add [] to [ouoot v]\n    if <not <(input) = []>> then\n        if <not <[history v] contains (input)?>> then\n            set [scroll x v] to [0]\n            set [scroll y v] to [0]\n        end\n        repeat (length of (input))\n            change [status v] by (1)\n            if <not <<(letter (status) of (input)) = [ß]> or <(letter (status) of (input)) = [}]>>> then\n                set [zwische v] to (join (zwische) (letter (status) of (input)))\n            else\n                if <not < (zwische) contains [\(]?>> then\n                    replace item (length of [ouoot v]) of [ouoot v] with (join (item (length of [ouoot v]) of [ouoot v]) (item (zwische) of [z\(old_decoder\) characterst v]))\n                else\n                    replace item (length of [ouoot v]) of [ouoot v] with (join (item (length of [ouoot v]) of [ouoot v]) (zwische))\n                end\n                set [zwische v] to []\n                if <(letter (status) of (input)) = [}]> then\n                    add [] to [ouoot v]\n                end\n            end\n        end\n    end\n    set [status v] to [0]\n    repeat (((length of [ouoot v]) - (2)) / (4))\n        change [status v] by (1)\n        add ((item (status) of [ouoot v]) * (25)) to [x v]\n    end\n    repeat (((length of [ouoot v]) - (2)) / (4))\n        change [status v] by (1)\n        add ((item (status) of [ouoot v]) * (25)) to [y v]\n    end\n    repeat (((length of [ouoot v]) - (2)) / (4))\n        change [status v] by (1)\n        add (item (status) of [ouoot v]) to [mode v]\n    end\n    repeat (((length of [ouoot v]) - (2)) / (4))\n        change [status v] by (1)\n        add (item (status) of [ouoot v]) to [sign v]\n    end\n    delete (length of [ouoot v]) of [ouoot v]\n    if <<(item (length of [ouoot v]) of [ouoot v]) = [d]> or <(item (length of [ouoot v]) of [ouoot v]) = [g]>> then\n        set [theme v] to (item (length of [ouoot v]) of [ouoot v])\n        delete (length of [ouoot v]) of [ouoot v]\n        if <(item (length of [ouoot v]) of [ouoot v]) = [yes]> then\n            set [walljump v] to [1]\n        else\n            set [walljump v] to [0]\n        end\n        delete (length of [ouoot v]) of [ouoot v]\n        set [checkpoint v] to [2]\n        broadcast (hard-cscheck v) and wait\n    else\n        broadcast (error v)\n        set [input v] to []\n        Import level\n    end\nend\n\ndefine collision\nset [o v] to [0]\nrepeat (length of [iterate_items v])\n    change [o v] by (1)\n    set [i v] to (item (o) of [iterate_items v])\n    replace item (i) of [collision_ v] with [0]\n    if <((item (i) of [x v]) - ((21) + ((1) / (2)))) < (x)> then\n        if <not <((item (i) of [x v]) - ((-21) + ((1) / (2)))) < (x)>> then\n            if <((item (i) of [y v]) - ((22) + ((1) / (2)))) < (y)> then\n                if <not <((item (i) of [y v]) - ((-22) + ((1) / (2)))) < (y)>> then\n                    if <not <[collected_coins v] contains (i)?>> then\n                        replace item (i) of [collision_ v] with ([floor v] of (item (i) of [mode v]) )\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [reset v]\nset [input v] to []\nImport level\n\nwhen I start as a clone\nset size to (80) %\nswitch costume to (sign v)\nshow\nset [ghost v] effect to (100)\ngo to x: ((item (sign_item) of [x v]) - (SCROLL X)) y: ((item (sign_item) of [y v]) - (SCROLL Y))\nsay (item (sign_item) of [sign v])\n\nwhen I receive [n v]\nif <(pos_in_histr) < (length of [history v])> then\n    change [pos_in_histr v] by (1)\n    set [input v] to (item (pos_in_histr) of [history v])\n    Import level\nend\n\nwhen flag clicked\nhide\nset [paused v] to [0]\n\nwhen I receive [edit v]\nforever\n    if <not <<(mode) = [editor]> or <(mode) = [playing]>>> then\n        wait (0.1) seconds\n        stop [other scripts in sprite v]\n        hide\n        stop [this script v]\n    end\nend\n\nwhen I receive [edit v]\nforever\n    if <not <<(mode) = [editor]> or <(mode) = [playing]>>> then\n        delete this clone\n    end\nend\n\nwhen I receive [restart v]\nset [checkpoint v] to [2]\nset [x v] to [0]\nset [y v] to [-100]\nset [scroll x v] to [0]\nset [scroll y v] to [-100]\ndelete all of [collected_coins v]\n\nwhen I receive [update v]\ndelete this clone\n\ndefine Histr\nbroadcast (getdta v) and wait\nchange [pos_in_histr v] by (1)\ninsert (output) at (pos_in_histr) of [history v] \n\nwhen I receive [edit v]\nforever\n    go to [back v] layer\n    change [cooldown v] by (-2.7)\n    if <(mode) = [playing]> then\n        if <<(paused) = [0]> and <(debugging) = [False]>> then\n            change [last v] by (-1)\n            if <(pick random (1) to (60)) = [1]> then\n                if <(last) < [0]> then\n                    set [last v] to [5]\n                    switch costume to (7 v)\n                    repeat (5)\n                        next costume\n                    end\n                    repeat (1)\n                        switch costume to (10 v)\n                    end\n                    repeat (1)\n                        switch costume to (8 v)\n                    end\n                    repeat (1)\n                        switch costume to (11 v)\n                    end\n                    repeat (1)\n                        switch costume to (7 v)\n                    end\n                end\n            else\n                if <<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<(joystick active?) = [1]> and <<[165] > (joystick dir)> and <(joystick dir) > [15]>>>> and <<<key (up arrow v) pressed?> or <key (d v) pressed?>> or <<(joystick active?) = [1]> and <[67.5] > ([abs v] of (joystick dir) )>>>> then\n                    switch costume to (5 v)\n                else\n                    if <<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<(joystick active?) = [1]> and <<[-15] > (joystick dir)> and <(joystick dir) > [-165]>>>> and <<<key (up arrow v) pressed?> or <key (d v) pressed?>> or <<(joystick active?) = [1]> and <[67.5] > ([abs v] of (joystick dir) )>>>> then\n                        switch costume to (6 v)\n                    else\n                        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<(joystick active?) = [1]> and <<[-15] > (joystick dir)> and <(joystick dir) > [-165]>>>> then\n                            switch costume to (2 v)\n                        else\n                            if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<(joystick active?) = [1]> and <<[165] > (joystick dir)> and <(joystick dir) > [15]>>>> then\n                                switch costume to (3 v)\n                            else\n                                if <<<key (up arrow v) pressed?> or <key (e v) pressed?>> or <<(joystick active?) = [1]> and <[67.5] > ([abs v] of (joystick dir) )>>> then\n                                    switch costume to (4 v)\n                                else\n                                    switch costume to (1 v)\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine add platfom (xpos) (ypos) (id)\nset [o v] to [1]\nrepeat until <<<(item (o) of [x v]) = (xpos)> and <(item (o) of [y v]) = (ypos)>> or <(o) > (length of [mode v])>>\n    change [o v] by (1)\nend\nif <(o) > (length of [mode v])> then\n    add (xpos) to [x v]\n    add (ypos) to [y v]\n    add (id) to [mode v]\n    add [0] to [sign v]\nend\n\nwhen I receive [p v]\nif <[1] < (pos_in_histr)> then\n    change [pos_in_histr v] by (-1)\n    set [input v] to (item (pos_in_histr) of [history v])\n    Import level\nend\n\nwhen flag clicked\nset volume to (50) %\n\nwhen flag clicked\nforever\n    if <(mode) = [editor]> then\n        Editormovemnet\n    end\nend\n\nwhen [timer v] > (0)\nhide\n\n@ParticlesWin\n\nwhen I start as a clone\nshow\neff (pick random (-10) to (10))\n\ndefine eff (x)\nset [-1 v] to [1]\nset [color v] effect to (0)\nset [ghost v] effect to (20)\nforever\n    go to [front v] layer\n    change x by ((x) * (-1))\n    change y by (y)\n    change [y v] by (-2)\n    if <touching (_edge_ v)?> then\n        if <(-1) = [1]> then\n            set [-1 v] to [-1]\n        else\n            set [-1 v] to [1]\n        end\n    end\n    if <(y position) < [-170]> then\n        delete this clone\n    end\nend\n\nwhen flag clicked\nset size to (80) %\ngo to x: (0) y: (-180)\nhide\n\nwhen I receive [win v]\nset [y v] to [30]\nswitch costume to (costume1 v)\ngo to x: (pick random (-200) to (200)) y: (-180)\nrepeat (10)\n    create clone of (_myself_ v)\nend\nwait (0.2) seconds\ngo to x: (pick random (-200) to (200)) y: (-180)\nrepeat (10)\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nset volume to (50) %\n\nwhen [timer v] > (0)\nhide\n\n@Blocks\n\nwhen flag clicked\nhide\n\ndefine Stamp (theme)\nset size to (102) %\nsay []\nhide\nset [i v] to [0]\nset [zähler v] to [0]\nset [z2 v] to [0]\nrepeat (length of [mode v])\n    clear graphic effects\n    change [i v] by (1)\n    add [0] to [collision_ v]\n    if <([abs v] of (([x v] of [hitbox v]) - (item (i) of [x v])) ) < [50]> then\n        if <([abs v] of (([y v] of [hitbox v]) - (item (i) of [y v])) ) < [50]> then\n            add (i) to [iterate_items v]\n        end\n    end\n    if <not <<(item (i) of [mode v]) = [1]> or <<(item (i) of [mode v]) = [11]> or <(item (i) of [mode v]) = [21]>>>> then\n        if <<([abs v] of ((item (i) of [x v]) - (SCROLL X)) ) < [255]> and <([abs v] of ((item (i) of [y v]) - (SCROLL Y)) ) < [160]>> then\n            change [zähler v] by (1)\n            change [z2 v] by (0)\n            set size to (10000) %\n            go to x: ((item (i) of [x v]) - (SCROLL X)) y: ((item (i) of [y v]) - (SCROLL Y))\n            switch costume to (join [_] (round (item (i) of [mode v])))\n            Cc (theme)\n            if <(letter (1) of (item (i) of [cs v])) = [0]> then\n                if <(item (i) of [mode v]) = [3]> then\n                    switch costume to (spring_top v)\n                else\n                    if <(item (i) of [mode v]) = [2]> then\n                        switch costume to (join [lava ani ] ((round ((@@tick) / (0.1))) mod (4)))\n                    else\n                        if <(item (i) of [mode v]) = [4]> then\n                            switch costume to (join [water ani ] ((round ((@@tick) / (0.1))) mod (4)))\n                        end\n                    end\n                end\n            end\n            if <<(item (i) of [x v]) = [0]> and <(item (i) of [y v]) = [-100]>> then\n                switch costume to (begin v)\n                set [brightness v] effect to (10)\n            end\n            if <(item (i) of [mode v]) = [6]> then\n                change y by (([sin v] of (((@@tick) + ((item (i) of [x v]) * (3))) * (100)) ) * (2.5))\n                change y by (5)\n                if <[collected_coins v] contains (i)?> then\n                    set [ghost v] effect to (100)\n                end\n            end\n            if <(item (i) of [mode v]) = [7]> then\n                if <not <(letter (3) of (item (i) of [cs v])) = [1]>> then\n                    switch costume to (down_spring_top v)\n                end\n            end\n            if <(item (i) of [mode v]) = [3]> then\n            point in direction (90)\n            if <(item (i) of [mode v]) = [5]> then\n                point in direction (direction of the saw)\n            end\n            if <(item (i) of [mode v]) = [9]> then\n                if <(checkpoint) = (i)> then\n                    change y by ((+*checkpoint_bounce) / (10))\n                    set [brightness v] effect to (30)\n                end\n            end\n            set size to (102) %\n            stamp\n        end\n    end\n    point in direction (90)\n    change [i v] by (0)\n    if <<(item (i) of [mode v]) = [1]> or <<(item (i) of [mode v]) = [11]> or <(item (i) of [mode v]) = [21]>>> then\n        if <<([abs v] of ((item (i) of [x v]) - (SCROLL X)) ) < [255]> and <([abs v] of ((item (i) of [y v]) - (SCROLL Y)) ) < [160]>> then\n            change [zähler v] by (1)\n            clear graphic effects\n            set size to (100000) %\n            switch costume to (blank_ground_block v)\n            go to x: ((item (i) of [x v]) - (SCROLL X)) y: ((item (i) of [y v]) - (SCROLL Y))\n            set size to (102) %\n            Cc (theme)\n            point in direction (90)\n            if <<(item (i) of [x v]) = [0]> and <(item (i) of [y v]) = [-100]>> then\n                switch costume to (begin v)\n                set [brightness v] effect to (10)\n            end\n            stamp\n            if <(letter (1) of (item (i) of [cs v])) = [0]> then\n                if <(theme) = [g]> then\n                    switch costume to (join [grassland_overlay_] (item (i) of [mode v]))\n                end\n                if <(theme) = [d]> then\n                    switch costume to (join [desert_overlay_] (item (i) of [mode v]))\n                end\n                if <(theme) = [s]> then\n                    switch costume to (join [winter_overlay_] (item (i) of [mode v]))\n                end\n                if <(theme) = [r]> then\n                    switch costume to (join [rf_overlay_] (item (i) of [mode v]))\n                end\n                set size to (102) %\n                stamp\n            end\n        end\n    end\nend\nset size to (100000000) %\nswitch costume to (begin v)\ngo to x: ((item (1) of [x v]) - (SCROLL X)) y: ((item (1) of [y v]) - (SCROLL Y))\nset size to (102) %\nclear graphic effects\nstamp\njoystick\nif <touching (mouse-pointer v)?> then\n    stop [this script v]\nend\nset size to (100000000) %\nswitch costume to (begin v)\nset size to (102) %\nif <(joystick active?) = [0]> then\n    if <(mode) = [editor]> then\n        if <(paused) = [0]> then\n            if <(blockselected) < [1000]> then\n                go to (mouse-pointer v)\n                show\n                if <not <touching (shrink v)?>> then\n                    if <((mouse y) mod (25)) > ((12.5) - ((SCROLL Y) mod (25)))> then\n                        set y to (((([floor v] of (((mouse y) + (25)) / (25)) ) * (25)) + (0)) - ((SCROLL Y) mod (25)))\n                    else\n                        set y to (((([floor v] of ((mouse y) / (25)) ) * (25)) + (0)) - ((SCROLL Y) mod (25)))\n                    end\n                    if <((mouse x) mod (25)) > ((12.5) - ((SCROLL X) mod (25)))> then\n                        set x to (((([floor v] of (((mouse x) + (25)) / (25)) ) * (25)) + (0)) - ((SCROLL X) mod (25)))\n                    else\n                        set x to (((([floor v] of ((mouse x) / (25)) ) * (25)) + (0)) - ((SCROLL X) mod (25)))\n                    end\n                    if <not <<(blockselected) = [10]> and <[mode v] contains [10]?>>> then\n                        set [a v] to [1]\n                        repeat until <<<(item (a) of [x v]) = ((SCROLL X) + (x position))> and <(item (a) of [y v]) = ((y position) + (SCROLL Y))>> or <(a) > (length of [mode v])>>\n                            change [a v] by (1)\n                        end\n                        show\n                        clear graphic effects\n                        set [ghost v] effect to (70)\n                        switch costume to (join [_] (blockselected))\n                    else\n                        set [blockselected v] to [1]\n                    end\n                    if <not <<(item (a) of [x v]) = ((SCROLL X) + (x position))> and <(item (a) of [y v]) = ((y position) + (SCROLL Y))>>> then\n                        point in direction (90)\n                        if <(blockselected) = [5]> then\n                            point in direction (direction of the saw)\n                        end\n                        if <mouse down?> then\n                            if <not <touching (shrink v)?>> then\n                                if <(blockselected) = [8]> then\n                                    delete all of [zw.data v]\n                                    add ((SCROLL X) + (x position)) to [zw.data v]\n                                    add ((y position) + (SCROLL Y)) to [zw.data v]\n                                    set [ghost v] effect to (0)\n                                    stamp\n                                    hide\n                                    ask [Enter the text for the sign - Please follow community guidlines] and wait\n                                    set [say v] to (answer)\n                                    add platfom (item (1) of [zw.data v]) (item (2) of [zw.data v]) [8]\n                                    show\n                                else\n                                    if <(blockselected) = [1]> then\n                                        if <(pick random (1) to (7)) = [1]> then\n                                            add platfom ((SCROLL X) + (x position)) ((y position) + (SCROLL Y)) ((blockselected) + (20))\n                                        else\n                                            if <(pick random (1) to (2)) = [1]> then\n                                                add platfom ((SCROLL X) + (x position)) ((y position) + (SCROLL Y)) ((blockselected) + (10))\n                                            else\n                                                add platfom ((SCROLL X) + (x position)) ((y position) + (SCROLL Y)) (blockselected)\n                                            end\n                                        end\n                                    else\n                                        add platfom ((SCROLL X) + (x position)) ((y position) + (SCROLL Y)) (blockselected)\n                                    end\n                                end\n                            end\n                        end\n                        if <not <touching (shrink v)?>> then\n                            stamp\n                        end\n                    else\n                        hide\n                    end\n                end\n            else\n                go to (mouse-pointer v)\n                show\n                if <not <touching (shrink v)?>> then\n                    switch costume to (rubber v)\n                    if <mouse down?> then\n                        if <not <touching (shrink v)?>> then\n                            set [ghost v] effect to (20)\n                            set [rtr v] to [0]\n                            repeat (length of [mode v])\n                                change [rtr v] by (1)\n                                if <<[-10] < ((mouse x) - (((SCROLL X) * (-1)) + (item (rtr) of [x v])))> and <((mouse x) - (((SCROLL X) * (-1)) + (item (rtr) of [x v]))) < [10]>> then\n                                    if <<[-10] < ((mouse y) - (((SCROLL Y) * (-1)) + (item (rtr) of [y v])))> and <((mouse y) - (((SCROLL Y) * (-1)) + (item (rtr) of [y v]))) < [10]>> then\n                                        remove platform (item (rtr) of [x v]) (item (rtr) of [y v])\n                                    end\n                                end\n                            end\n                        end\n                    else\n                        set [ghost v] effect to (60)\n                    end\n                    show\n                    stamp\n                end\n            end\n        end\n    end\n    hide\n    if <(mode) = [editor]> then\n        if <[mode v] contains [8]?> then\n            show\n            switch costume to (sign v)\n            go to (mouse-pointer v)\n            set [rtr v] to [0]\n            set [e?true v] to [0]\n            repeat (length of [mode v])\n                change [rtr v] by (1)\n                if <(item (rtr) of [mode v]) = [8]> then\n                    if <<[-10] < ((mouse x) - (((SCROLL X) * (-1)) + (item (rtr) of [x v])))> and <((mouse x) - (((SCROLL X) * (-1)) + (item (rtr) of [x v]))) < [10]>> then\n                        if <<[-10] < ((mouse y) - (((SCROLL Y) * (-1)) + (item (rtr) of [y v])))> and <((mouse y) - (((SCROLL Y) * (-1)) + (item (rtr) of [y v]))) < [10]>> then\n                            set [e?true v] to (rtr)\n                            set size to (80) %\n                            go to x: ((item (rtr) of [x v]) - (SCROLL X)) y: ((item (rtr) of [y v]) - (SCROLL Y))\n                            say (join (item (rtr) of [sign v]) [ \[press e to edit\]])\n                            stop [this script v]\n                        end\n                    end\n                end\n            end\n        end\n        show\n        set [ghost v] effect to (100)\n    end\nend\nif <(item (i) of [mode v]) = [3]> then\n    set [brightness v] effect to (0)\nend\n\nwhen I receive [update v]\nerase all\ndelete all of [iterate_items v]\ndelete all of [collision_ v]\nStamp (theme)\n\ndefine Cc (theme)\nif <not <(item (i) of [cs v]) = [0]>> then\n    if <(item (i) of [mode v]) = [1]> then\n        switch costume to (join [_1_] (letter (2) of (item (i) of [cs v])))\n    end\n    if <(item (i) of [mode v]) = [2]> then\n        switch costume to (join [_2_] (letter (2) of (item (i) of [cs v])))\n    end\n    if <(item (i) of [mode v]) = [4]> then\n        switch costume to (join [_4_] (letter (2) of (item (i) of [cs v])))\n    end\n    if <(item (i) of [mode v]) = [11]> then\n        switch costume to (join [_1_] (letter (2) of (item (i) of [cs v])))\n    end\n    if <(item (i) of [mode v]) = [21]> then\n        switch costume to (join [_1_] (letter (2) of (item (i) of [cs v])))\n    end\n    if <(item (i) of [mode v]) = [12]> then\n        switch costume to (2w v)\n    end\nend\nset [shrinked? v] to [0]\n\ndefine BlockPos Check Elem (element)\nreplace item (element) of [cs v] with [04]\nset [i v] to (element)\nset [@block_below v] to [0]\nset [e v] to [0]\nrepeat (length of [mode v])\n    change [e v] by (1)\n    if <not <(item (e) of [mode v]) = [6]>> then\n        if <(item (e) of [y v]) = ((item (i) of [y v]) + (25))> then\n            if <(item (e) of [x v]) = (item (i) of [x v])> then\n                replace item (i) of [cs v] with (join [1] (join (letter (2) of (item (i) of [cs v])) (letter (3) of (item (i) of [cs v]))))\n                replace item (e) of [cs v] with (join (letter (1) of (item (e) of [cs v])) (join [1] [1]))\n            end\n        end\n    end\n    if <not <(item (i) of [mode v]) = [6]>> then\n        if <(item (e) of [y v]) = ((item (i) of [y v]) + (-25))> then\n            if <(item (e) of [x v]) = (item (i) of [x v])> then\n                set [@block_below v] to [1]\n                replace item (i) of [cs v] with (join (letter (1) of (item (i) of [cs v])) (join [1] [1]))\n                replace item (e) of [cs v] with (join [1] (join (letter (2) of (item (e) of [cs v])) (letter (3) of (item (e) of [cs v]))))\n            end\n        end\n        if <(item (e) of [y v]) = (item (i) of [y v])> then\n            if <(item (e) of [x v]) = ((item (i) of [x v]) + (25))> then\n                if <(letter (2) of (item (e) of [cs v])) = [4]> then\n                    replace item (e) of [cs v] with (join (letter (1) of (item (e) of [cs v])) (join [3] (letter (3) of (item (e) of [cs v]))))\n                else\n                    replace item (e) of [cs v] with (join (letter (1) of (item (e) of [cs v])) (join [1] (letter (3) of (item (e) of [cs v]))))\n                end\n                if <(letter (2) of (item (i) of [cs v])) = [4]> then\n                    replace item (i) of [cs v] with (join (letter (1) of (item (i) of [cs v])) (join [2] (letter (3) of (item (i) of [cs v]))))\n                else\n                    replace item (i) of [cs v] with (join (letter (1) of (item (i) of [cs v])) (join [1] (letter (3) of (item (i) of [cs v]))))\n                end\n            end\n            if <(item (e) of [x v]) = ((item (i) of [x v]) + (-25))> then\n                if <(letter (2) of (item (e) of [cs v])) = [4]> then\n                    replace item (e) of [cs v] with (join (letter (1) of (item (e) of [cs v])) (join [2] (letter (3) of (item (e) of [cs v]))))\n                else\n                    replace item (e) of [cs v] with (join (letter (1) of (item (e) of [cs v])) (join [1] (letter (3) of (item (e) of [cs v]))))\n                end\n                if <(letter (2) of (item (i) of [cs v])) = [4]> then\n                    replace item (i) of [cs v] with (join (letter (1) of (item (i) of [cs v])) (join [3] (letter (3) of (item (i) of [cs v]))))\n                else\n                    replace item (i) of [cs v] with (join (letter (1) of (item (i) of [cs v])) (join [1] (letter (3) of (item (i) of [cs v]))))\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [debug v]\nset [debugging v] to [True]\nset [debugging v] to [False]\n\ndefine remove platform (x) (y)\ndelete all of [poscheck: items to check v]\nset [o v] to [2]\nset [i v] to []\nrepeat until <(o) > (length of [mode v])>\n    change [o v] by (1)\n    if <<(item (o) of [x v]) = (x)> and <(item (o) of [y v]) = (y)>> then\n        set [i v] to (o)\n    end\n    if <<([abs v] of ((item (o) of [x v]) - (x)) ) < [30]> and <([abs v] of ((item (o) of [y v]) - (y)) ) < [30]>> then\n        add (o) to [poscheck: items to check v]\n    end\n    if <<<(item (o) of [x v]) = ((x) + (25))> or <(item (o) of [x v]) = ((x) + (-25))>> and <(item (o) of [y v]) = (y)>> then\n        add (o) to [poscheck: items to check v]\n    end\nend\ndelete (i) of [x v]\ndelete (i) of [y v]\ndelete (i) of [sign v]\ndelete (i) of [mode v]\ndelete (i) of [cs v]\nset [change v] to [1]\nset [aa v] to [0]\nrepeat (length of [poscheck: items to check v])\n    change [aa v] by (1)\n    BlockPos Check Elem (item (aa) of [poscheck: items to check v])\nend\n\nwhen I receive [hard-cscheck v]\nset [debugging v] to [True]\nBlockPos Check All\nset [debugging v] to [False]\n\ndefine BlockPos Check All\ndelete all of [cs v]\nset [a v] to [0]\nrepeat (length of [mode v])\n    change [a v] by (1)\n    add [10] to [cs v]\n    if <<is compiled?> or <(a) < [500]>> then\n        BlockPos Check Elem (a)\n    end\nend\n\nwhen I receive [cscheck v]\nset [debugging v] to [True]\nif <<is compiled?> or <(length of [mode v]) < [200]>> then\n    BlockPos Check All\nend\nset [debugging v] to [False]\n\ndefine joystick\ngo to x: (200) y: (-105)\nset rotation style [all around v]\npoint in direction (90)\nclear graphic effects\nswitch costume to (joystick v)\nset [ghost v] effect to (55)\nset size to (19) %\nshow\nstamp\nclear graphic effects\nset [joystick dir v] to []\nif <mouse down?> then\n    if <(joystick active?) = [1]> then\n        point towards (mouse-pointer v)\n        set [joystick dir v] to (round (direction))\n        if <(distance to [mouse-pointer v]) > [20]> then\n            move (20) steps\n        else\n            move (distance to [mouse-pointer v]) steps\n        end\n    else\n        if <touching (mouse-pointer v)?> then\n            set [joystick active? v] to [1]\n            point towards (mouse-pointer v)\n            set [joystick dir v] to (round (direction))\n            if <(distance to [mouse-pointer v]) > [20]> then\n                move (20) steps\n            else\n                move (distance to [mouse-pointer v]) steps\n            end\n        end\n    end\nelse\n    go to x: (200) y: (-105)\n    set [joystick active? v] to [0]\nend\npoint in direction (90)\nset size to (9.5) %\nset [ghost v] effect to (30)\nstamp\nhide\nclear graphic effects\nset rotation style [left-right v]\n\ndefine add platfom (xpos) (ypos) (id)\nif <not <(say) = []>> then\n    set [o v] to [1]\n    repeat until <<<(item (o) of [x v]) = (xpos)> and <(item (o) of [y v]) = (ypos)>> or <(o) > (length of [mode v])>>\n        change [o v] by (1)\n    end\n    add (xpos) to [x v]\n    add (ypos) to [y v]\n    add (id) to [mode v]\n    add (say) to [sign v]\n    add [0] to [cs v]\n    if <is compiled?> then\n        BlockPos Check Elem (o)\n    else\n        BlockPos Check Elem (o)\n    end\n    set [change v] to [1]\nend\nset [say v] to [0]\n\nwhen flag clicked\nset volume to (50) %\n\nwhen [timer v] > (0)\nhide\n\n@Shrink\n\nwhen I start as a clone\nforever\n    wait until <<(\side-bar opened) = [1]> and <<(mode) = [editor]> or <(mode) = [playing]>>>\n    start sound [High Whoosh v]\n    set [ghost v] effect to (100)\n    go to x: (90) y: (0)\n    switch costume to (costume2 v)\n    show\n    go to [back v] layer\n    go [forward v] (30) layers\n    repeat (9)\n        change [ghost v] effect by (-10)\n        go to [back v] layer\n        xb\n    end\n    repeat until <<not <(\side-bar opened) = [1]>> or <not <<(mode) = [editor]> or <(mode) = [playing]>>>>\n        go to [back v] layer\n        xb\n    end\n    start sound [Low Whoosh v]\n    repeat (10)\n        change x by (((x position) - (90)) / (-3))\n        change [ghost v] effect by (10)\n        set [\side-bar-x v] to (x position)\n        broadcast (side-bar v)\n    end\n    hide\n    delete this clone\nend\n\ndefine xb\nset [velocity.1 v] to (((velocity.1) * (0.65)) + (((x position) - (-5)) * (-0.2)))\nchange x by ([floor v] of (velocity.1) )\nset [\side-bar-x v] to (x position)\nbroadcast (side-bar v)\n\nwhen flag clicked\nforever\n    wait until <<not <(\side-bar opened) = [1]>> or <not <<(mode) = [editor]> or <(mode) = [playing]>>>>\n    set [\side-bar-x v] to [1000]\n    wait until <not <<not <(\side-bar opened) = [1]>> or <not <<(mode) = [editor]> or <(mode) = [playing]>>>>>\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nforever\n    if <<(mode) = [editor]> or <(mode) = [playing]>> then\n        show\n        go to [back v] layer\n        switch costume to (mode)\n        go [forward v] (2) layers\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nset volume to (50) %\n\nwhen [timer v] > (0)\nhide\n\n@x\n\ndefine new counter @ (x) (y)\nset [x v] to (x)\nset [y v] to (y)\nset [yc v] to [6]\ncreate clone of (_myself_ v)\nrepeat (14)\n    change [yc v] by (1)\n    set [x v] to ((x) + (((yc) - (6)) * (9)))\n    set [y v] to (y)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nif <(yc) > [5]> then\n    switch costume to (0 v)\n    forever\n        if <<<(mode) = [playing]> or <(mode) = [editor]>> and <(\side-bar opened) = [1]>> then\n            show\n            set [brightness v] effect to (20)\n            set [ghost v] effect to (35)\n            show\n            switch costume to (0 v)\n            switch costume to (letter ((yc) - ((15) + ((0) - (length of (join [y ] (round (SCROLL Y))))))) of (join [y ] (round (SCROLL Y))))\n            go to x: ((x) - (0)) y: (y)\n            set size to (30) %\n            go to [front v] layer\n        else\n            hide\n        end\n    end\nend\n\nwhen flag clicked\nhide\nnew counter @ [140] [-124]\n\nwhen I receive [side-bar v]\nchange x by (6)\nchange x by (\side-bar-x)\n\nwhen [timer v] > (0)\nhide\n\n@y\n\ndefine new counter @ (x) (y)\nset [x v] to (x)\nset [y v] to (y)\nset [yc v] to [6]\ncreate clone of (_myself_ v)\nrepeat (14)\n    change [yc v] by (1)\n    set [x v] to ((x) + (((yc) - (6)) * (9)))\n    set [y v] to (y)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nif <(yc) > [5]> then\n    switch costume to (0 v)\n    forever\n        if <<<(mode) = [playing]> or <(mode) = [editor]>> and <(\side-bar opened) = [1]>> then\n            show\n            set [brightness v] effect to (20)\n            set [ghost v] effect to (35)\n            show\n            switch costume to (0 v)\n            switch costume to (letter ((yc) - ((15) + ((0) - (length of (join [x ] (round (SCROLL X))))))) of (join [x ] (round (SCROLL X))))\n            go to x: ((x) - (0)) y: (y)\n            set size to (30) %\n            go to [front v] layer\n        else\n            hide\n        end\n    end\nend\n\nwhen flag clicked\nhide\nnew counter @ [140] [-100]\n\nwhen I receive [side-bar v]\nchange x by (6)\nchange x by (\side-bar-x)\n\nwhen [timer v] > (0)\nhide\n\n@Editor&Play UI\n\nwhen flag clicked\nhide\nforever\n    set [vel2 v] to [0]\n    point in direction (90)\n    wait until <(mode) = [editor]>\n    set volume to (100) %\n    set [clone-id v] to [1]\n    create clone of (_myself_ v)\n    point in direction (90)\n    set [clone-id v] to [2]\n    create clone of (_myself_ v)\n    set [clone-id v] to [3]\n    create clone of (_myself_ v)\n    set [clone-id v] to [4]\n    create clone of (_myself_ v)\n    set [clone-id v] to [6]\n    create clone of (_myself_ v)\n    set [clone-id v] to [7]\n    create clone of (_myself_ v)\n    set [clone-id v] to [8]\n    create clone of (_myself_ v)\n    wait until <not <(mode) = [editor]>>\nend\n\nwhen I start as a clone\nset size to (100) %\nif <(mode) = [editor]> then\n    set [ghost v] effect to (100)\n    show\n    if <(clone-id) = [1]> then\n        go to x: (218) y: (157)\n        switch costume to (... v)\n        set size to (100) %\n    end\n    if <(clone-id) = [2]> then\n        go to x: (150) y: (157)\n        set size to (100) %\n        switch costume to (save v)\n    end\n    if <(clone-id) = [3]> then\n        set size to (100) %\n        go to x: (75) y: (157)\n        switch costume to (load v)\n        show\n    end\n    if <(clone-id) = [4]> then\n        go to x: (-25) y: (157)\n        switch costume to (play v)\n        set size to (100) %\n    end\n    if <(clone-id) = [5]> then\n    if <(clone-id) = [6]> then\n        go to x: (170) y: (90)\n        set size to (100) %\n        switch costume to (information v)\n    end\n    if <(clone-id) = [7]> then\n        set size to (100) %\n        go to x: (170) y: (25)\n        switch costume to (theme v)\n    end\n    if <(clone-id) = [8]> then\n        set size to (100) %\n        go to x: (170) y: (-40)\n        switch costume to (settings v)\n    end\n    set [ghost v] effect to (100)\n    if <(clone-id) < [6]> then\n        if <(clone-id) < [5]> then\n            set y to (187)\n            if <(mode) = [editor]> then\n                repeat (10)\n                    change [ghost v] effect by (-8)\n                    if <(clone-id) < [5]> then\n                        change y by (((y position) - (157)) / (-5))\n                    end\n                    sb\n                end\n            end\n            repeat until <not <(mode) = [editor]>>\n                if <(clone-id) < [5]> then\n                    change y by (((y position) - (157)) / (-5))\n                end\n                if <(clone-id) = [2]> then\n                    show\n                    if <(length of [mode v]) = [1]> then\n                        hide\n                    end\n                end\n                sb\n                click\n            end\n            repeat (4)\n                change y by ((3) * ((-1) + (<([abs v] of (y position) ) = (y position)> * (2))))\n                change [ghost v] effect by (25)\n            end\n            delete this clone\n        end\n        set [ghost v] effect to (100)\n    else\n        forever\n            set [ghost v] effect to (100)\n            repeat until <<(mode) = [editor]> and <(\side-bar opened) = [1]>>\n                if <not <(mode) = [editor]>> then\n                    delete this clone\n                end\n            end\n            if <<(mode) = [editor]> and <(\side-bar opened) = [1]>> then\n                repeat until <not <<(mode) = [editor]> and <(\side-bar opened) = [1]>>>\n                    set x to (199)\n                    change [ghost v] effect by (-8)\n                    if <(theme) = [r]> then\n                        set [color v] effect to (150)\n                    end\n                    if <(theme) = [d]> then\n                        set [color v] effect to (150)\n                    end\n                    if <(theme) = [g]> then\n                        set [color v] effect to (0)\n                    end\n                    if <(theme) = [s]> then\n                        set [color v] effect to (62)\n                    end\n                    if <(clone-id) = [2]> then\n                        show\n                        if <(length of [mode v]) = [1]> then\n                            hide\n                        end\n                    end\n                    sb\n                    click\n                end\n                if <not <(mode) = [editor]>> then\n                    show\n                    delete this clone\n                end\n            end\n        end\n    end\nend\nif <(mode) = [playing]> then\n    set [ghost v] effect to (100)\n    show\n    if <(clone-id) = [101]> then\n        go to x: (160) y: (187)\n        switch costume to (editor v)\n    end\n    if <(clone-id) = [102]> then\n        go to x: (218) y: (187)\n        switch costume to (... v)\n        set size to (100) %\n    end\n    if <(clone-id) = [103]> then\n        go to x: (-120) y: (187)\n        switch costume to (pause v)\n        set size to (100) %\n    end\n    if <(clone-id) = [104]> then\n        go to x: (-30) y: (187)\n        switch costume to (reset v)\n        set size to (100) %\n    end\nend\nrepeat (10)\n    change y by (((y position) - (157)) / (-5))\n    change [ghost v] effect by (-8)\nend\nrepeat until <not <(mode) = [playing]>>\n    if <(clone-id) = [103]> then\n        if <(paused) = [1]> then\n            switch costume to (resume v)\n        else\n            switch costume to (pause v)\n        end\n    end\n    change y by (((y position) - (157)) / (-5))\n    sb\n    click\nend\ndelete this clone\n\nwhen flag clicked\nshow list [save your level v]\n\ndefine sb\nif <(joystick active?) = [0]> then\n    if <<(clone-id) = [1]> or <(clone-id) = [102]>> then\n        change size by (((size) - ((100) + (<touching (mouse-pointer v)?> * (15)))) / (-4))\n        rb\n    else\n        change size by (((size) - ((100) + (<touching (mouse-pointer v)?> * (15)))) / (-4))\n    end\nend\n\ndefine rb\nset [vel2 v] to (((vel2) * (0.75)) + ((((90) + (<(\side-bar opened) = [1]> * (-90))) - (direction)) * (0.18)))\nturn right (round (vel2)) degrees\n\ndefine click\nchange [ghost v] effect by (-22)\nchange [ghost v] effect by (14)\nif <(joystick active?) = [0]> then\n    if <touching (mouse-pointer v)?> then\n        set [ghost v] effect to (50)\n    end\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        set [ghost v] effect to (75)\n        repeat until <not <<mouse down?> and <touching (mouse-pointer v)?>>>\n            if <<<[5] < (clone-id)> and <(clone-id) < [9]>> and <(\side-bar opened) = [0]>> then\n                set x to (199)\n            end\n        end\n        if <touching (mouse-pointer v)?> then\n            if <(clone-id) = [1]> then\n                change [\side-bar opened v] by (-1)\n                set [\side-bar opened v] to ([abs v] of (\side-bar opened) )\n                broadcast (side-bar v)\n            end\n            if <(clone-id) = [2]> then\n                broadcast (getdta v) and wait\n                hide\n                delete all of [save your level v]\n                add [Triple click on the code below and then copy \(Ctrl+C\) and past \(Ctrl+V\) it to] to [save your level v]\n                add [your computer to save the level you made:] to [save your level v]\n                add [] to [save your level v]\n                add (output) to [save your level v]\n                hide list [save your level v]\n                ask [Enter the code here to confirm that you have all of it!] and wait\n                repeat until <(answer) = (item (4) of [save your level v])>\n                    ask [You didn't copy the whole code Remember to TRIPLE click on the code and then press Ctrl key + c key to copy  it and Ctrl key + V key to past it. If you need help, ask in comments.] and wait\n                end\n                show list [save your level v]\n                show\n            end\n            if <(clone-id) = [3]> then\n                hide\n                ask [Enter your level code] and wait\n                show\n                set [input v] to (answer)\n                broadcast (loadcode v)\n            end\n            if <(clone-id) = [4]> then\n                set [mode v] to [playing]\n                delete all of [collected_coins v]\n                set [checkpoint v] to [2]\n                broadcast (debug v) and wait\n                hide\n                set [scroll y v] to [0]\n                set [scroll x v] to [1]\n                set [win v] to [0]\n            end\n            if <(clone-id) = [6]> then\n                hide\n                broadcast (settings v) and wait\n                show\n            end\n            if <(clone-id) = [7]> then\n                hide\n                broadcast (change_theme v) and wait\n                show\n            end\n            if <(clone-id) = [8]> then\n                hide\n                ask [enter x position] and wait\n                set [scroll x v] to (answer)\n                ask [enter y position] and wait\n                set [scroll y v] to (answer)\n                show\n            end\n            if <(clone-id) = [101]> then\n                set [paused v] to [0]\n                set [mode v] to [editor]\n                set [scroll x v] to [0]\n                set [scroll y v] to [0]\n                delete all of [collected_coins v]\n            end\n            if <(clone-id) = [102]> then\n                change [\side-bar opened v] by (-1)\n                set [\side-bar opened v] to ([abs v] of (\side-bar opened) )\n                broadcast (side-bar v)\n            end\n            if <(clone-id) = [103]> then\n                if <(paused) = [1]> then\n                    set [paused v] to [0]\n                else\n                    set [paused v] to [1]\n                end\n                broadcast (pause v)\n            end\n            if <(clone-id) = [104]> then\n                broadcast (restart v)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    wait until <(mode) = [playing]>\n    set [paused v] to [0]\n    wait (0.1) seconds\n    set [clone-id v] to [101]\n    create clone of (_myself_ v)\n    set [clone-id v] to [102]\n    create clone of (_myself_ v)\n    set [clone-id v] to [103]\n    create clone of (_myself_ v)\n    set [clone-id v] to [104]\n    create clone of (_myself_ v)\n    wait until <not <(mode) = [playing]>>\nend\n\nwhen I receive [side-bar v]\nif <<[5] < (clone-id)> and <(clone-id) < [9]>> then\n    change x by (6)\n    change x by (\side-bar-x)\nend\n\nwhen I start as a clone\nforever\n    wait until <touching (mouse-pointer v)?>\n    if <not <<<[5] < (clone-id)> and <(clone-id) < [9]>> and <(\side-bar opened) = [0]>>> then\n        start sound [Touch v]\n    end\n    wait until <not <touching (mouse-pointer v)?>>\nend\n\nwhen flag clicked\nset volume to (50) %\n\nwhen [timer v] > (0)\nhide\n\n@Undo&Redo&Home UI\n\nwhen flag clicked\nhide\nforever\n    set [vel2 v] to [0]\n    point in direction (90)\n    wait until <(mode) = [editor]>\n    set [clone-id v] to [1]\n    create clone of (_myself_ v)\n    point in direction (90)\n    set [clone-id v] to [2]\n    create clone of (_myself_ v)\n    wait until <not <(mode) = [editor]>>\nend\n\nwhen I start as a clone\nset size to (100) %\nif <<(mode) = [editor]> or <(clone-id) = [3]>> then\n    set [ghost v] effect to (100)\n    show\n    if <(clone-id) = [1]> then\n        go to x: (-170) y: (187)\n        switch costume to (go to ...2 v)\n        set size to (100) %\n    end\n    if <(clone-id) = [2]> then\n        go to x: (-135) y: (187)\n        set size to (100) %\n        switch costume to (go to ... v)\n    end\n    if <(clone-id) = [3]> then\n        go to x: (-205) y: (187)\n        set size to (100) %\n        switch costume to (home v)\n    end\nend\nforever\n    repeat until <not <<(mode) = [editor]> or <(clone-id) = [3]>>>\n        change [ghost v] effect by (-8)\n        if <(theme) = [r]> then\n            set [color v] effect to (150)\n        end\n        if <(theme) = [d]> then\n            set [color v] effect to (150)\n        end\n        if <(theme) = [g]> then\n            set [color v] effect to (0)\n        end\n        if <(theme) = [s]> then\n            set [color v] effect to (62)\n        end\n        sb\n        set [button_active v] to [1]\n        if <(clone-id) = [1]> then\n            if <(pos_in_histr) = [1]> then\n                set [ghost v] effect to (90)\n                set [button_active v] to [0]\n            end\n        end\n        if <(clone-id) = [2]> then\n            if <(pos_in_histr) = (length of [history v])> then\n                set [ghost v] effect to (90)\n                set [button_active v] to [0]\n            end\n        end\n        if <(clone-id) = [3]> then\n        change y by (((y position) - (157)) / (-5))\n        if <(button_active) = [1]> then\n            if <(joystick active?) = [0]> then\n                if <touching (mouse-pointer v)?> then\n                    set [ghost v] effect to (50)\n                end\n                if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                    set [ghost v] effect to (75)\n                    wait until <not <mouse down?>>\n                    set size to (0) %\n                    set [ghost v] effect to (100)\n                    set [blockselected v] to [1]\n                    if <(clone-id) = [1]> then\n                        broadcast (p v)\n                    end\n                    if <(clone-id) = [2]> then\n                        broadcast (n v)\n                    end\n                    if <(clone-id) = [3]> then\n                        if <<(mode) = [editor]> or <(mode) = [playing]>> then\n                            broadcast (leave v)\n                        else\n                            broadcast (trans1 v) and wait\n                            set [theme v] to [d]\n                            broadcast (home v)\n                            wait (0.25) seconds\n                            broadcast (trans2 v)\n                            delete this clone\n                        end\n                    end\n                end\n            end\n        end\n    end\n    delete this clone\nend\n\ndefine sb\nset [vel2 v] to (((vel2) * (0.75)) + ((((100) + (<touching (mouse-pointer v)?> * (30))) - (size)) * (0.18)))\nchange size by (vel2)\n\nwhen flag clicked\nhide\nwait (1) seconds\nforever\n    wait until <(mode) = [homescreen]>\n    wait until <not <(mode) = [homescreen]>>\n    set [clone-id v] to [3]\n    create clone of (_myself_ v)\nend\n\nwhen I receive [home v]\ndelete this clone\n\nwhen I start as a clone\nforever\n    wait until <touching (mouse-pointer v)?>\n    start sound [Touch v]\n    wait until <not <touching (mouse-pointer v)?>>\nend\n\nwhen flag clicked\nset volume to (50) %\n\nwhen [timer v] > (0)\nhide\n\nif <(joystick active?) = [0]> then\nend\n\n@Banner\n\nwhen flag clicked\nhide\n\nwhen I receive [edit v]\nhide\n\nwhen I receive [home v]\nshow\ngo to x: (0) y: (-250)\nwait (0.1) seconds\nrepeat (40)\n    change y by ((y position) / (-5))\n    erase all\nend\n\nwhen flag clicked\nswitch costume to (banner1 v)\nwait (1) seconds\nforever\n    repeat (4)\n        next costume\n    end\n    repeat (1)\n        switch costume to (banner4 v)\n    end\n    repeat (1)\n        switch costume to (banner3 v)\n    end\n    repeat (1)\n        switch costume to (banner2 v)\n    end\n    repeat (1)\n        switch costume to (banner1 v)\n    end\n    wait (pick random (2) to (3)) seconds\nend\n\nwhen [timer v] > (0)\nhide\n\n@Homescreen UI\n\nwhen I start as a clone\nset size to (100) %\nif <(mode) = [homescreen]> then\n    set [ghost v] effect to (100)\n    show\n    if <(clone-id) = [1]> then\n        go to x: (0) y: (-200)\n        switch costume to (1 v)\n        set size to (100) %\n    end\n    if <(clone-id) = [2]> then\n        go to x: (0) y: (-200)\n        switch costume to (2 v)\n        set size to (100) %\n    end\n    if <(clone-id) = [3]> then\n        switch costume to (2 v)\n        set size to (100) %\n        go to x: (0) y: (-200)\n    end\nend\nforever\n    repeat (10)\n        if <(mode) = [homescreen]> then\n            change [ghost v] effect by (-7)\n            go to [front v] layer\n            change y by (((y position) - ((-100) - (((clone-id) - (1)) * (50)))) / (-5))\n        end\n    end\n    repeat until <not <(mode) = [homescreen]>>\n        change y by (((y position) - ((-100) - (((clone-id) - (1)) * (50)))) / (-5))\n        go to [front v] layer\n        go [backward v] (2) layers\n        sb\n        set [brightness v] effect to (<touching (mouse-pointer v)?> * (20))\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            set [brightness v] effect to (45)\n            wait until <not <mouse down?>>\n            start sound [Click v]\n            if <(clone-id) = [1]> then\n                set [input v] to []\n                broadcast (trans1 v) and wait\n                set [theme v] to [g]\n                broadcast (change_theme v)\n                start editor\n            end\n            if <(clone-id) = [2]> then\n                stamp\n                hide\n                ask [Enter your level code] and wait\n                set [input v] to (answer)\n                broadcast (trans1 v) and wait\n                set [theme v] to [g]\n                start editor\n            end\n        end\n    end\n    delete this clone\nend\n\ndefine sb\nchange size by (((size) - ((100) + (<touching (mouse-pointer v)?> * (10)))) / (-4))\n\ndefine start editor\nset [mode v] to [editor]\nbroadcast (edit v)\nbroadcast (loadcode v)\nbroadcast (trans2 v)\n\nwhen I receive [home v]\nhide\nset [vel2 v] to [0]\npoint in direction (90)\nset [\side-bar opened v] to [0]\nwait until <(mode) = [homescreen]>\nset [clone-id v] to [1]\ncreate clone of (_myself_ v)\npoint in direction (90)\nset [clone-id v] to [2]\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nhide\n\nwhen I receive [trans2 v]\ndelete this clone\n\nwhen I start as a clone\nforever\n    wait until <touching (mouse-pointer v)?>\n    start sound [Tap Conga v]\n    wait until <not <touching (mouse-pointer v)?>>\nend\n\nwhen flag clicked\nset volume to (50) %\n\nwhen [timer v] > (0)\nhide\n\n@Win UI\n\nwhen flag clicked\nhide\n\nwhen I receive [win v]\nwait (0.2) seconds\ngo to [front v] layer\ncreate clone of (_myself_ v)\nswitch costume to (costume1 v)\nshow\nset [ghost v] effect to (100)\ngo to x: (0) y: (-120)\nrepeat (15)\n    change y by ((y position) / (-3))\n    change [ghost v] effect by (-6)\nend\nwait until <(mode) = [editor]>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I start as a clone\ngo to [front v] layer\nswitch costume to (costume2 v)\nshow\nset [ghost v] effect to (100)\ngo to x: (0) y: (120)\nrepeat (15)\n    change y by ((y position) / (-3))\n    change [ghost v] effect by (-5)\nend\nwait until <(mode) = [editor]>\nrepeat (10)\n    change [ghost v] effect by (10)\n    change size by (-4)\nend\ndelete this clone\n\nwhen I start as a clone\nwait (0.16) seconds\nrepeat (3)\n    change size by (4)\nend\nrepeat (3)\n    change size by (-4)\nend\n\nwhen [timer v] > (0)\nhide\n\n@Selected block UI\n\nwhen flag clicked\nforever\n    repeat (3)\n        change [ghost v] effect by (-25)\n        change y by (((y position) - (-173)) / (-3))\n        go to [back v] layer\n    end\n    hide\n    wait until <(mode) = [editor]>\n    go to x: (-140) y: (-173)\n    set [m v] to (blockselected)\n    show\n    switch costume to (ground v)\n    set [ghost v] effect to (100)\n    repeat (3)\n        change [ghost v] effect by (-25)\n        change y by (((y position) - (-133)) / (-3))\n        go to [back v] layer\n    end\n    set [ghost v] effect to (25)\n    repeat (9)\n        change y by (((y position) - (-133)) / (-3))\n        go to [back v] layer\n    end\n    repeat until <not <(mode) = [editor]>>\n        show\n        if <not <(m) = (blockselected)>> then\n            cost\n        end\n    end\nend\n\ndefine cost\nset [m v] to (blockselected)\nrepeat (4)\n    change [ghost v] effect by (25)\n    change y by (1)\nend\nif <(blockselected) = [1000]> then\n    switch costume to (eraser v)\nelse\n    switch costume to (blockselected)\nend\ngo to x: (-140) y: (-173)\nrepeat (3)\n    change [ghost v] effect by (-25)\n    change y by (((y position) - (-133)) / (-3))\n    go to [back v] layer\nend\nset [ghost v] effect to (25)\nrepeat (9)\n    change y by (((y position) - (-133)) / (-3))\n    go to [back v] layer\nend\n\nwhen flag clicked\nset volume to (50) %\n\nwhen [timer v] > (0)\nhide\n\n@Bouncing icon\n\nwhen flag clicked\nhide\n\nwhen [timer v] > (0)\nswitch backdrop to (d v)\nwait (0.15) seconds\nshow\nset size to (100) %\nset [ghost v] effect to (100)\ngo to x: (203) y: (-144)\nchange y by (-100)\nforever\n    go to [front v] layer\n    change [ghost v] effect by (-10)\n    set [bounce_3_vel v] to (((bounce_3_vel) * (0.6)) + (((y position) - (-144)) * (-0.2)))\n    change y by (bounce_3_vel)\nend\n\nwhen [timer v] > (0)\nforever\n    wait until <touching (mouse-pointer v)?>\n    start sound [Boing v]\n    set y to (-200)\n    set [ghost v] effect to (100)\n    wait (0.1) seconds\n    wait until <not <touching (mouse-pointer v)?>>\nend\n\nwhen flag clicked\nset volume to (50) %\n\n@Thumbnail\n\nwhen flag clicked\nhide\nforever\n    reset timer\n    set [ghost v] effect to (100)\nend\n\nwhen [timer v] > (0)\nerase all\nwait (0.15) seconds\nshow\nset size to (200) %\nset [ghost v] effect to (100)\nrepeat (100)\n    go to [front v] layer\n    go [backward v] (1) layers\n    change size by (((size) - (100)) / (-3))\n    change [ghost v] effect by (-10)\n    change size by (((size) - (100)) / (-8))\nend\n\nchange [ghost v] effect by (-10)\n\n@Sprite1\n\nwhen flag clicked\nset [debugging v] to [False]\nforever\n    if <(debugging) = [False]> then\n        hide\n    else\n        show\n        set [ghost v] effect to (5)\n        go to [front v] layer\n    end\nend\n\nwhen I receive [activate checkpoint v]\nset [+*checkpoint_bounce v] to [0]\nset [yvel v] to [20]\nrepeat (19)\n    change [yvel v] by (-2)\n    change [+*checkpoint_bounce v] by (yvel)\nend\n\nwhen [timer v] > (0)\nhide\n\n@useless particle effect\n\nwhen flag clicked\nset [last_water v] to [0]\ngo to x: (0) y: (-30000)\nhide\n\nwhen I start as a clone\nset [y v] to (pick random (20) to (30))\nshow\neff (pick random (-3) to (3))\n\ndefine eff (x)\nset [-1 v] to [1]\nset [color v] effect to (0)\nset [ghost v] effect to (pick random (40) to (80))\nset [brightness v] effect to (0)\nset size to (pick random (40) to (90)) %\nforever\n    go to [front v] layer\n    change x by ((x) * (-1))\n    change y by (y)\n    change [y v] by (-2)\n    if <touching (_edge_ v)?> then\n        if <(-1) = [1]> then\n            set [-1 v] to [-1]\n        else\n            set [-1 v] to [1]\n        end\n    end\n    if <(y position) < [-170]> then\n        delete this clone\n    end\nend\n\nwhen I receive [water v]\nif <((last_water) + (3)) < (@@tick)> then\n    set [last_water v] to (@@tick)\n    start sound [Splash v]\n    go to x: ([x position v] of [hitbox v]) y: (-3000)\n    create clone of (_myself_ v)\n    go to x: ([x position v] of [hitbox v]) y: (-3000)\n    create clone of (_myself_ v)\n    go to x: ([x position v] of [hitbox v]) y: (-3000)\n    create clone of (_myself_ v)\n    go to x: ([x position v] of [hitbox v]) y: (-3000)\n    create clone of (_myself_ v)\n    go to x: ([x position v] of [hitbox v]) y: (-3000)\n    create clone of (_myself_ v)\nend\nset [last_water v] to (@@tick)\n\nwhen flag clicked\nset volume to (50) %\n\nwhen [timer v] > (0)\nhide\n\n@effect_snowflake\n\nwhen I start as a clone\nset size to (40) %\nshow\nset [ghost v] effect to (60)\nforever\n    turn right (10) degrees\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\ngo to [back v] layer\ngo to x: (pick random (-200) to (200)) y: (180)\nrepeat (10)\n    change y by (-3)\nend\nrepeat until <touching (_edge_ v)?>\n    change y by (-3)\nend\nrepeat (10)\n    change [ghost v] effect by (6)\nend\ndelete this clone\n\nwhen flag clicked\nswitch costume to (snow v)\nforever\n    if <<<(mode) = [playing]> or <(mode) = [editor]>> and <(theme) = [s]>> then\n        create clone of (_myself_ v)\n        wait (0.5) seconds\n    end\nend\n\nwhen I start as a clone\nforever\n    if <not <(theme) = [s]>> then\n        delete this clone\n    end\nend\n\nwhen [timer v] > (0)\nhide\n\n@Sprite2\n\nwhen flag clicked\nhide\n\nwhen I receive [pause v]\nif <(paused) = [1]> then\n    switch costume to (costume1 v)\nelse\n    switch costume to (costume2 v)\nend\nani\n\ndefine ani\nshow\nset size to (0) %\nset [ghost v] effect to (100)\nrepeat (8)\n    change [ghost v] effect by (-15)\n    change size by (((size) - (150)) / (-6))\nend\nrepeat (8)\n    change [ghost v] effect by (15)\n    change size by (((size) - (150)) / (-6))\nend\nhide\n\nwhen I receive [restart v]\nswitch costume to (costume3 v)\nani\n\nwhen [timer v] > (0)\nhide\n\n@Sprite3\n\nwhen I receive [change_theme v]\nif <(open) = [0]> then\n    stop [other scripts in sprite v]\n    set [paused v] to [1]\n    set [\side-bar opened v] to [0]\n    set [open v] to [1]\n    set [clone-id v] to [1]\n    create clone of (_myself_ v)\n    set [clone-id v] to [2]\n    create clone of (_myself_ v)\n    set [clone-id v] to [3]\n    create clone of (_myself_ v)\n    set [clone-id v] to [4]\n    create clone of (_myself_ v)\n    set [clone-id v] to [okay]\n    create clone of (_myself_ v)\n    set [clone-id v] to []\n    go to [back v] layer\n    switch costume to (costume1 v)\n    effect 1\n    forever\n        if <<mouse down?> and <not <touching (mouse-pointer v)?>>> then\n            broadcast (change_theme close v) and wait\n            set [open v] to [0]\n            stop [this script v]\n        end\n        if <(open) = [0]> then\n            stop [this script v]\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <not <(mode) = [editor]>> then\n        set [open v] to [0]\n        delete this clone\n    end\nend\n\nwhen I receive [change_theme close v]\nrepeat (10)\n    change size by (((size) - (70)) / (-4.5))\n    change [ghost v] effect by (15)\nend\nhide\ndelete this clone\n\ndefine effect 1\nshow\nset [ghost v] effect to (100)\nset [brightness v] effect to (5)\nset size to (20) %\nrepeat (20)\n    change [ghost v] effect by (-10)\n    sb\nend\nset [ghost v] effect to (0)\n\nwhen I start as a clone\nswitch costume to (clone-id)\neffect 1\n\nwhen I start as a clone\nforever\n    if <(clone-id) = [okay]> then\n        if <(open) = [1]> then\n            clear graphic effects\n            if <touching (mouse-pointer v)?> then\n                set [brightness v] effect to (16)\n                if <mouse down?> then\n                    set [brightness v] effect to (30)\n                    wait until <not <mouse down?>>\n                    broadcast (change_theme close v)\n                    stop [this script v]\n                end\n            end\n        end\n    else\n        if <(letter (clone-id) of [gdsr]) = (theme)> then\n            set [brightness v] effect to (5)\n        else\n            set [brightness v] effect to (30)\n            if <touching (mouse-pointer v)?> then\n                set [brightness v] effect to (17)\n                if <mouse down?> then\n                    set [brightness v] effect to (10)\n                    set [theme v] to (letter (clone-id) of [gdsr])\n                    set [change v] to [1]\n                    if <(theme) = [g]> then\n                        change [☁ stats: grassland theme users v] by (1)\n                    end\n                    if <(theme) = [d]> then\n                        change [☁ stats: desert theme users v] by (1)\n                    end\n                    if <(theme) = [s]> then\n                        change [☁ stats: snow theme users v] by (1)\n                    end\n                    if <(theme) = [r]> then\n                        change [☁ stats: lava theme users v] by (1)\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset [open v] to [0]\n\nwhen I receive [trans1 v]\nset [open v] to [0]\n\nwhen I receive [change_theme close v]\nwait (0.1) seconds\nset [paused v] to [0]\n\ndefine sb\nset [vel2 v] to (((vel2) * (0.65)) + ((((100) + ()) - (size)) * (0.15)))\nchange size by (vel2)\n\nwhen I receive [change_theme close v]\nset [open v] to [0]\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\nswitch costume to (pick random (1) to (1))\nnext costume\nrepeat until <(costume [number v]) = [1]>\n    wait (0.1) seconds\n    next costume\nend\nhide\n\nwhen [timer v] > (0)\nhide\n\n@Sprite4\n\ndefine sb\nset [vel2 v] to (((vel2) * (0.65)) + ((((100) + ()) - (size)) * (0.15)))\nchange size by (vel2)\n\nwhen I receive [settings v]\nif <(open) = [0]> then\n    stop [other scripts in sprite v]\n    set [paused v] to [1]\n    set [\side-bar opened v] to [0]\n    set [open v] to [1]\n    set [clone-id v] to [okay]\n    show variable [jump height v]\n    show variable [speed v]\n    create clone of (_myself_ v)\n    set [clone-id v] to [reset]\n    create clone of (_myself_ v)\n    set [clone-id v] to []\n    go to [back v] layer\n    switch costume to (costume1 v)\n    effect 1\n    forever\n        if <<mouse down?> and <not <touching (mouse-pointer v)?>>> then\n            broadcast (change_theme close v) and wait\n            set [open v] to [0]\n            stop [this script v]\n        end\n        if <(open) = [0]> then\n            stop [this script v]\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <not <(mode) = [editor]>> then\n        set [open v] to [0]\n        delete this clone\n    end\nend\n\nwhen I receive [change_theme close v]\nhide variable [speed v]\nhide variable [jump height v]\nrepeat (10)\n    change size by (((size) - (70)) / (-4.5))\n    change [ghost v] effect by (15)\nend\nhide\nset [open v] to [0]\ndelete this clone\n\ndefine effect 1\nshow\nset [ghost v] effect to (100)\nset [brightness v] effect to (5)\nset size to (20) %\nrepeat (20)\n    change [ghost v] effect by (-10)\n    sb\nend\nset [ghost v] effect to (0)\n\nwhen I start as a clone\nswitch costume to (clone-id)\neffect 1\n\nwhen I start as a clone\nforever\n    if <(clone-id) = [okay]> then\n        if <(open) = [1]> then\n            clear graphic effects\n            if <touching (mouse-pointer v)?> then\n                set [brightness v] effect to (16)\n                if <mouse down?> then\n                    set [brightness v] effect to (30)\n                    wait until <not <mouse down?>>\n                    broadcast (change_theme close v)\n                    stop [this script v]\n                end\n            end\n        end\n    else\n        if <(clone-id) = [reset]> then\n            if <(open) = [1]> then\n                clear graphic effects\n                if <touching (mouse-pointer v)?> then\n                    set [brightness v] effect to (10)\n                    if <mouse down?> then\n                        set [brightness v] effect to (20)\n                        set [speed v] to [2.1]\n                        set [jump height v] to [8]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset [open v] to [0]\n\nwhen I receive [trans1 v]\nset [open v] to [0]\n\nwhen I receive [change_theme close v]\nwait (0.1) seconds\nset [paused v] to [0]\n\nwhen I receive [change_theme close v]\nset [open v] to [0]\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\nswitch costume to (pick random (1) to (1))\nnext costume\nrepeat until <(costume [number v]) = [1]>\n    wait (0.1) seconds\n    next costume\nend\nhide\n\nwhen [timer v] > (0)\nhide\n\n@Leave\n\ndefine sb\nset [vel2 v] to (((vel2) * (0.65)) + ((((100) + ()) - (size)) * (0.15)))\nchange size by (vel2)\n\nwhen I receive [leave v]\nif <(open) = [0]> then\n    stop [other scripts in sprite v]\n    set [paused v] to [1]\n    set [\side-bar opened v] to [0]\n    set [open v] to [1]\n    set [clone-id v] to [yes]\n    create clone of (_myself_ v)\n    set [clone-id v] to [no]\n    create clone of (_myself_ v)\n    set [clone-id v] to []\n    go to [back v] layer\n    switch costume to (costume1 v)\n    effect 1\n    forever\n        if <<mouse down?> and <not <touching (mouse-pointer v)?>>> then\n            broadcast (change_theme close v) and wait\n            set [open v] to [0]\n            stop [this script v]\n        end\n        if <(open) = [0]> then\n            stop [this script v]\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <not <<(mode) = [editor]> or <(mode) = [playing]>>> then\n        hide\n        stop [other scripts in sprite v]\n    end\nend\n\nwhen I receive [change_theme close v]\nrepeat (10)\n    change size by (((size) - (70)) / (-4.5))\n    change [ghost v] effect by (15)\nend\nhide\ndelete this clone\n\ndefine effect 1\nshow\nset [ghost v] effect to (100)\nset [brightness v] effect to (5)\nset size to (20) %\nrepeat (20)\n    change [ghost v] effect by (-10)\n    sb\nend\nset [ghost v] effect to (0)\n\nwhen I start as a clone\nswitch costume to (clone-id)\neffect 1\n\nwhen I start as a clone\nforever\n    if <(clone-id) = [no]> then\n        if <(open) = [1]> then\n            clear graphic effects\n            if <touching (mouse-pointer v)?> then\n                set [brightness v] effect to (16)\n                if <mouse down?> then\n                    set [brightness v] effect to (30)\n                    wait until <not <mouse down?>>\n                    broadcast (change_theme close v)\n                    stop [this script v]\n                end\n            end\n        end\n    else\n        if <(clone-id) = [yes]> then\n            if <(open) = [1]> then\n                clear graphic effects\n                if <touching (mouse-pointer v)?> then\n                    set [brightness v] effect to (10)\n                    if <mouse down?> then\n                        set [brightness v] effect to (20)\n                        broadcast (trans1 v) and wait\n                        set [theme v] to [d]\n                        broadcast (home v)\n                        wait (0.25) seconds\n                        broadcast (trans2 v)\n                        stop [this script v]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset [open v] to [0]\n\nwhen I receive [trans1 v]\nset [open v] to [0]\n\nwhen I receive [change_theme close v]\nwait (0.1) seconds\nset [paused v] to [0]\n\nwhen I receive [home v]\nhide\ndelete this clone\n\nwhen I receive [change_theme close v]\nset [open v] to [0]\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\nswitch costume to (pick random (1) to (1))\nnext costume\nrepeat until <(costume [number v]) = [1]>\n    wait (0.1) seconds\n    next costume\nend\nhide\n\nwhen [timer v] > (0)\nhide\n\n@walljump?\n\ndefine Off\nswitch costume to (costume1 v)\nrepeat (5)\n    change [brightness v] effect by (2)\n    next costume\nend\n\ndefine On\nswitch costume to (costume3 v)\nrepeat (1)\n    switch costume to (4 v)\n    change [brightness v] effect by (2)\nend\nrepeat (1)\n    switch costume to (3 v)\n    change [brightness v] effect by (2)\nend\nrepeat (1)\n    switch costume to (2 v)\n    change [brightness v] effect by (2)\nend\nrepeat (1)\n    switch costume to (1 v)\n    change [brightness v] effect by (2)\nend\nrepeat (1)\n    change [brightness v] effect by (2)\n    switch costume to (costume1 v)\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\nforever\n    hide\n    wait until <(mode) = [editor]>\n    wait (0) seconds\n    set [ghost v] effect to (100)\n    if <(walljump) = [0]> then\n        switch costume to (costume1 v)\n    else\n        switch costume to (costume3 v)\n    end\n    go to x: (200) y: (-194)\n    show\n    go to [front v] layer\n    if <(mode) = [editor]> then\n        repeat (10)\n            change [ghost v] effect by (-9)\n            change y by (((y position) - (-164)) / (-2))\n        end\n    end\n    repeat until <not <(mode) = [editor]>>\n        if <(walljump) = [0]> then\n            switch costume to (costume1 v)\n        else\n            switch costume to (costume3 v)\n        end\n        set [brightness v] effect to (0)\n        if <(joystick active?) = [0]> then\n            if <touching (mouse-pointer v)?> then\n                set [brightness v] effect to (-10)\n            end\n            if <<mouse down?> and <touching (mouse-pointer v)?>> then\n                set [brightness v] effect to (-20)\n                wait until <not <mouse down?>>\n                if <(answer) = (s)> then\n                    start sound [Select v]\n                    if <(walljump) = [0]> then\n                        set [walljump v] to [1]\n                        Off\n                    else\n                        set [walljump v] to [0]\n                        On\n                    end\n                end\n            end\n            set [s v] to (answer)\n        end\n    end\nend\n\nset [change v] to [1]\n\nwhen flag clicked\nset volume to (50) %\n\nwhen [timer v] > (0)\nhide\n\n@Blockl"\n\nwhen flag clicked\nClone\n\ndefine Clone\nset size to (90) %\nshow\nset [clone id v] to [0]\nswitch costume to (1 v)\ngo to x: (-220) y: (-170)\nrepeat (2)\n    change [clone id v] by (1)\n    create clone of (_myself_ v)\n    change x by (28)\nend\nchange [clone id v] by (1)\nchange [clone id v] by (1)\ncreate clone of (_myself_ v)\nchange x by (56)\nrepeat (2)\n    change x by (28)\n    change [clone id v] by (1)\n    create clone of (_myself_ v)\nend\nchange [clone id v] by (1)\nrepeat (3)\n    change x by (28)\n    change [clone id v] by (1)\n    create clone of (_myself_ v)\nend\ngo to x: (-220) y: (-170)\nchange x by ((28) * (3))\nset [clone id v] to [3]\ncreate clone of (_myself_ v)\nchange x by (28)\nset [clone id v] to [7]\ncreate clone of (_myself_ v)\nset [clone id v] to [1000]\nset x to (80)\ncreate clone of (_myself_ v)\nhide\n\nwhen I start as a clone\nforever\n    hide\n    wait until <(mode) = [editor]>\n    set [ghost v] effect to (100)\n    show\n    if <<(mode) = [editor]> and <not <<[mode v] contains [10]?> and <(clone id) = [10]>>>> then\n        repeat until <not <(mode) = [editor]>>\n            change y by (((y position) - (-164)) / (-2))\n            show\n            point in direction (90)\n            switch costume to (clone id)\n            set [ghost v] effect to (70)\n            if <touching (mouse-pointer v)?> then\n                if <(joystick active?) = [0]> then\n                    set [ghost v] effect to (58)\n                end\n            end\n            if <(clone id) = (blockselected)> then\n                set [ghost v] effect to (10)\n                change size by (((size) - (100)) / (-4.5))\n            else\n                change size by (((size) - (86)) / (-4.5))\n            end\n            if <(clone id) = [5]> then\n                point in direction (direction of the saw)\n            end\n            if <<mouse down?> and <touching (mouse-pointer v)?>> then\n                if <(joystick active?) = [0]> then\n                    wait until <not <mouse down?>>\n                    set [blockselected v] to (clone id)\n                end\n            end\n            if <(clone id) = [10]> then\n                if <[mode v] contains [10]?> then\n                    hide\n                end\n            end\n        end\n    end\nend\n\nwhen [timer v] > (0)\nhide\n\n@coins\n\ndefine new counter @ (x) (y)\nset [x v] to (x)\nset [y v] to (y)\nset [yc v] to [6]\ncreate clone of (_myself_ v)\nrepeat (4)\n    change [yc v] by (1)\n    set [x v] to ((x) + (((yc) - (6)) * (9)))\n    set [y v] to (y)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nif <(yc) > [5]> then\n    switch costume to (0 v)\n    forever\n        if <(mode) = [playing]> then\n            show\n            set [brightness v] effect to (20)\n            set [ghost v] effect to (35)\n            show\n            switch costume to (0 v)\n            switch costume to (letter ((yc) - ((10) + ((0) - (length of (length of [collected_coins v]))))) of (length of [collected_coins v]))\n            go to x: ((x) - (0)) y: (y)\n            set size to (30) %\n            go to [front v] layer\n        else\n            hide\n        end\n    end\nend\n\nwhen flag clicked\nhide\nnew counter @ [-200] [-165]\n\nwhen [timer v] > (0)\nhide\n\n@Leave2\n\ndefine sb\nset [vel2 v] to (((vel2) * (0.65)) + ((((100) + ()) - (size)) * (0.15)))\nchange size by (vel2)\n\nwhen I receive [error v]\nif <(open) = [0]> then\n    stop [other scripts in sprite v]\n    set [paused v] to [1]\n    set [\side-bar opened v] to [0]\n    set [open v] to [1]\n    set [clone-id v] to [okay]\n    create clone of (_myself_ v)\n    set [clone-id v] to []\n    go to [back v] layer\n    switch costume to (costume1 v)\n    effect 1\n    forever\n        if <<mouse down?> and <not <touching (mouse-pointer v)?>>> then\n            broadcast (change_theme close v) and wait\n            set [open v] to [0]\n            stop [this script v]\n        end\n        if <(open) = [0]> then\n            stop [this script v]\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <not <<(mode) = [editor]> or <(mode) = [playing]>>> then\n        hide\n        stop [other scripts in sprite v]\n    end\nend\n\nwhen I receive [change_theme close v]\nrepeat (10)\n    change size by (((size) - (70)) / (-4.5))\n    change [ghost v] effect by (15)\nend\nhide\ndelete this clone\n\ndefine effect 1\nshow\nset [ghost v] effect to (100)\nset [brightness v] effect to (5)\nset size to (20) %\nrepeat (20)\n    change [ghost v] effect by (-10)\n    sb\nend\nset [ghost v] effect to (0)\n\nwhen I start as a clone\nswitch costume to (clone-id)\neffect 1\n\nwhen I start as a clone\nforever\n    if <(clone-id) = [okay]> then\n        if <(open) = [1]> then\n            clear graphic effects\n            if <touching (mouse-pointer v)?> then\n                set [brightness v] effect to (16)\n                if <mouse down?> then\n                    set [brightness v] effect to (30)\n                    wait until <not <mouse down?>>\n                    broadcast (change_theme close v)\n                    stop [this script v]\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset [open v] to [0]\n\nwhen I receive [trans1 v]\nset [open v] to [0]\n\nwhen I receive [change_theme close v]\nwait (0.1) seconds\nset [paused v] to [0]\n\nwhen I receive [home v]\nhide\ndelete this clone\n\nwhen I receive [change_theme close v]\nset [open v] to [0]\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\nswitch costume to (pick random (1) to (1))\nnext costume\nrepeat until <(costume [number v]) = [1]>\n    wait (0.1) seconds\n    next costume\nend\nhide\n\nwhen [timer v] > (0)\nhide\n\n@Encoder / Decoder\n\ndefine Encode_ (input)\nset [i v] to [0]\nrepeat (length of (input))\n    change [i v] by (1)\n    if <not <<(letter (i) of (input)) = [\(]> or <(letter (i) of (input)) = [\)]>>> then\n        switch costume to (join [=] (letter (i) of (input)))\n        set [output v] to (join (output) (item (costume [number v]) of [unicodes v]))\n    end\nend\n\nwhen I receive [getdta v]\nset [author v] to [Kaiwentheking]\nEncode level\n\ndefine Encode level\nset [output v] to []\nEncode Blocks\nEncode_ (theme)\nset [output v] to (join (output) (item (92) of [unicodes v]))\nEncode_ (walljump)\nset [output v] to (join (output) (item (92) of [unicodes v]))\nEncode_ (jump height)\nset [output v] to (join (output) (item (92) of [unicodes v]))\nEncode_ (speed)\nset [output v] to (join (output) (item (92) of [unicodes v]))\nEncode_ (author)\nset [output v] to (join (output) (item (92) of [unicodes v]))\nset [raw_code v] to (output)\n\ndefine Encode Blocks\nset [o v] to [2]\nrepeat ((length of [x v]) - (2))\n    change [o v] by (1)\n    Encode_ ((item (o) of [x v]) / (25))\n    set [output v] to (join (output) (item (87) of [unicodes v]))\n    Encode_ ((item (o) of [y v]) / (25))\n    set [output v] to (join (output) (item (88) of [unicodes v]))\n    Encode_ (item (o) of [mode v])\n    set [output v] to (join (output) (item (89) of [unicodes v]))\n    Encode_ (item (o) of [cs v])\n    set [output v] to (join (output) (item (91) of [unicodes v]))\n    if <not <(item (o) of [sign v]) = [0]>> then\n        Encode_ (item (o) of [sign v])\n        set [output v] to (join (output) (item (90) of [unicodes v]))\n    end\nend\n\nwhen I receive [decode level v]\nset [debugging v] to [True]\nDecode level\nset [debugging v] to [False]\n\ndefine Decode level\nset [theme v] to []\nset [walljump v] to []\nset [jump height v] to []\nset [speed v] to []\nset [author v] to []\nset [u v] to [0]\nset [betw.output v] to []\nrepeat (length of (input))\n    change [u v] by (<not < (input) contains [÷]?>> + (1))\n    if < (input) contains [÷]?> then\n        switch costume to (item # of (letter (u) of (input)) in [unicodes v])\n    else\n        switch costume to (join (letter ((u) - (1)) of (input)) (letter (u) of (input)))\n    end\n    if < (costume [name v]) contains [=]?> then\n        set [betw.output v] to (join (betw.output) (letter (2) of (costume [name v])))\n    else\n        if <(costume [name v]) = [x_row]> then\n            add ((betw.output) * (25)) to [x v]\n            add [] to [y v]\n            add [] to [mode v]\n            add [] to [cs v]\n            add [0] to [sign v]\n        end\n        if <(costume [name v]) = [y_row]> then\n            replace item (length of [y v]) of [y v] with ((betw.output) * (25))\n        end\n        if <(costume [name v]) = [mode_row]> then\n            replace item (length of [mode v]) of [mode v] with (betw.output)\n        end\n        if <(costume [name v]) = [sign_row]> then\n            replace item (length of [sign v]) of [sign v] with (betw.output)\n        end\n        if <(costume [name v]) = [cs]> then\n            replace item (length of [sign v]) of [cs v] with (betw.output)\n        end\n        if <(costume [name v]) = [settings]> then\n            if <(theme) = []> then\n                set [theme v] to (betw.output)\n            else\n                if <(walljump) = []> then\n                    set [walljump v] to (betw.output)\n                else\n                    if <(jump height) = []> then\n                        set [jump height v] to (betw.output)\n                    else\n                        if <(speed) = []> then\n                            set [speed v] to (betw.output)\n                        else\n                            if <(author) = []> then\n                                set [author v] to (betw.output)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        set [betw.output v] to []\n    end\nend\nset [debugging v] to [False]\nset [checkpoint v] to [2]\nif <<[y v] contains []?> or <<[mode v] contains []?> or <<(theme) = []> or <<(walljump) = []> or <<(jump height) = []> or <<(speed) = []> or <<(speed) = []> or <(author) = []>>>>>>>> then\n    broadcast (error v)\nend\n\nwhen I receive [error v]\nset [debugging v] to [False]\n\nwhen I receive [error v]\nset [speed v] to [2.1]\nset [jump height v] to [8]\nset [theme v] to [g]\n\n