UnLock|| A platformer 
@Stage\n\nwhen I receive [start v]\ndelete all of [bg stats v]\nadd [0] to [bg stats v]\nadd [0] to [bg stats v]\nstop [other scripts in sprite v]\nforever\n    delete (3) of [bg stats v]\n    set [brightness v] effect to (item (2) of [bg stats v])\n    set [color v] effect to (item (1) of [bg stats v])\n    if <<key (space v) pressed?> or <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<(jump) > [0]> and <(touch) = [0]>>>>> then\n        change [jump key v] by (12)\n    else\n        set [jump key v] to [0]\n    end\nend\n\nif <(((right button) + (left button)) / (2)) = [0]> then\nelse\n    set [jump key v] to [0]\nend\n\nwhen I receive [stop!!! v]\nstop [other scripts in sprite v]\nset [brightness v] effect to (item (2) of [bg stats v])\nset [color v] effect to (item (1) of [bg stats v])\n\nwhen I receive [restart v]\nstop all sounds\n\nwhen I receive [menu v]\nclear graphic effects\nswitch backdrop to (thing v)\ndelete all of [bg stats v]\nadd [0] to [bg stats v]\nadd [0] to [bg stats v]\nreplace item (1) of [bg stats v] with (pick random (0) to (200))\nforever\n    set [color v] effect to (item (1) of [bg stats v])\n    replace item (1) of [bg stats v] with ((item (1) of [bg stats v]) + (0.2))\nend\n\nwhen I receive [menu v]\nset [editor v] to [0]\nstop all sounds\n\nwhen I receive [restart v]\ndelete all of [bg stats v]\nadd [0] to [bg stats v]\nadd [0] to [bg stats v]\n\n@Blank\n\nbroadcast (End Animation v)\n\n@Blank2\n\n@Pause Menu\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nset [touch v] to [0]\nset [pause v] to [0]\nswitch costume to (pause button v)\nshow\ngo to x: (210) y: (150)\nforever\n    go to [front v] layer\n    if <(PAUSE) = [1]> then\n        hide\n    else\n        go to [front v] layer\n        if <touching (mouse-pointer v)?> then\n            set [touch v] to [1]\n            set [placeable v] to [0]\n            set [brightness v] effect to (20)\n            if <mouse down?> then\n                wait until <not <mouse down?>>\n                set [pause v] to [1]\n                broadcast (Create Pause Menu v)\n            end\n        else\n            set [touch v] to [0]\n            set [brightness v] effect to (0)\n        end\n        show\n    end\nend\n\nwhen I receive [create pause menu v]\nswitch costume to (bg v)\ncreate clone of (_myself_ v)\nswitch costume to (back to main menu v)\ncreate clone of (_myself_ v)\nswitch costume to (play button v)\ncreate clone of (_myself_ v)\nswitch costume to (replay v)\ncreate clone of (_myself_ v)\nswitch costume to (pause button v)\n\nwhen I start as a clone\nif <(costume [number v]) = [2]> then\n    forever\n        go [forward v] (100) layers\n        go to x: (0) y: (-45)\n        if <touching (mouse-pointer v)?> then\n            set size to ((size) + (((140) - (size)) / (4))) %\n            if <mouse down?> then\n                repeat until <not <mouse down?>>\n                    go [forward v] (100) layers\n                end\n                if <touching (mouse-pointer v)?> then\n                    set [pause v] to [0]\n                end\n            end\n        else\n            set size to ((size) + (((130) - (size)) / (4))) %\n        end\n    end\nelse\n    if <(costume [number v]) = [3]> then\n        forever\n            go [forward v] (100) layers\n            go to x: (100) y: (-45)\n            if <touching (mouse-pointer v)?> then\n                set size to ((size) + (((150) - (size)) / (4))) %\n                if <mouse down?> then\n                    repeat until <not <mouse down?>>\n                        go [forward v] (100) layers\n                    end\n                    if <touching (mouse-pointer v)?> then\n                        broadcast (Menu v)\n                    end\n                end\n            else\n                set size to ((size) + (((140) - (size)) / (4))) %\n            end\n        end\n    else\n        if <(costume [number v]) = [4]> then\n            go [forward v] (9999) layers\n            forever\n                go [forward v] (999) layers\n                go to x: (0) y: (0)\n            end\n        else\n            if <(costume [number v]) = [5]> then\n                forever\n                    if <(EDITOR) = [1]> then\n                        delete this clone\n                    end\n                    go [forward v] (100) layers\n                    go to x: (-100) y: (-45)\n                    if <touching (mouse-pointer v)?> then\n                        set size to ((size) + (((150) - (size)) / (4))) %\n                        if <mouse down?> then\n                            repeat until <not <mouse down?>>\n                                go [forward v] (100) layers\n                            end\n                            if <touching (mouse-pointer v)?> then\n                                set [pause v] to [0]\n                                broadcast (Restart v)\n                            end\n                        end\n                    else\n                        set size to ((size) + (((140) - (size)) / (4))) %\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    show\n    if <(PAUSE) = [0]> then\n        delete this clone\n    end\nend\n\nwhen I receive [start v]\nforever\n    switch costume to (pause button v)\nend\n\nwhen I receive [menu v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [stop!!! v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@monitor\n\nwhen [timer v] > (timer)\nbroadcast (STOP!!! v)\nforever\n    set [timer v] to (timer)\nend\n\nwhen I receive [splash v]\nhide\n\nwhen I receive [start v]\nset [go v] to [1]\nset [vol v] to [100]\nforever\n    play sound [casualgamemusic09 v] until done\nend\n\nwhen I receive [start v]\nforever\n    if <(PAUSE) > [0]> then\n        repeat until <(PAUSE) < [1]>\n            set volume to (0) %\n            set [pitch v] effect to ((-1) / (0))\n        end\n    end\n    set volume to (vol) %\n    set [pitch v] effect to (0)\nend\n\nwhen I receive [start v]\nset [vol v] to [100]\nforever\n    if <(EDITOR) = [1]> then\n        stop all sounds\n        set [vol v] to [0]\n    end\n    if <<(mouse x) > [100]> and <<(mouse y) < [-140]> and <(EDITOR) = [0]>>> then\n        show variable [no-clip v]\n    else\n        hide variable [no-clip v]\n    end\nend\n\nwhen I receive [stop!!! v]\nforever\n    set [64-bit integer limit v] to [9223372036854775807]\nend\n\nwhen flag clicked\nset [checkpoint v] to [100_100_1_1]\nforever\n    set [64-bit integer limit v] to [9223372036854775807]\nend\n\nwhen I receive [menu v]\nset [vol v] to [0]\nforever\n    set [timer v] to (timer)\nend\n\nwhen I receive [stop music v]\nrepeat (50)\n    change [vol v] by (-2)\nend\n\nwhen I receive [restart v]\nset [vol v] to [100]\n\nwhen I receive [level - start game loop v]\nstop all sounds\nset [vol v] to [100]\n\nwhen [n v] key pressed\nchange [no-clip v] by (1)\nset [no-clip v] to ((No-Clip) mod (2))\n\nwhen I receive [start v]\nforever\n    wait until <([abs v] of (PUSH Y) ) > [0]>\n    repeat (10)\n        set [camera y v] to ((180) - (PUSH Y))\n    end\n    wait until <([abs v] of (PUSH Y) ) = [0]>\nend\n\nwhen I receive [green flag v]\nforever\n    set [timer v] to (timer)\n    set [64-bit integer limit v] to [9223372036854775807]\nend\n\nwhen I receive [start v]\nset [checkpoint v] to [100_100_1_1]\n\n@partical\n\nwhen I start as a clone\ngo to [back v] layer\nswitch costume to (costume1 v)\nset rotation style [don't rotate v]\nset [x v] to ([x v] of [player v])\nset [y v] to ([y v] of [player v])\nif < [31] contains (MODE)?> then\n    change [x v] by ((-10) * (([speed x v] of [player v]) / ([abs v] of ([speed x v] of [player v]) )))\n    change [y v] by ((-16) * (GRAV DIR))\n    set size to (pick random (40) to (60)) %\n    set [xv v] to (([speed x v] of [player v]) * (pick random (-0.175) to (-0.3)))\n    set [yv v] to ((pick random (0.0) to (2.7)) * (GRAV DIR))\n    show\n    if <([abs v] of (Xv) ) > [1]> then\n        repeat (pick random (9) to (11))\n            change size by (-1)\n            change [ghost v] effect by (8)\n            change [x v] by (Xv)\n            change [y v] by (yv)\n        end\n    end\nelse\n    if <<(MODE) = [2]> or <(([speed y v] of [player v]) * (GRAV DIR)) > [0]>> then\n        change [x v] by ((-12) * (([direction v] of [player v]) / ([abs v] of ([direction v] of [player v]) )))\n        change [y v] by ((-16) * (GRAV DIR))\n        set size to (pick random (30) to (50)) %\n        if <(MODE) = [4]> then\n            set rotation style [all around v]\n            point towards (player v)\n            set [color v] effect to (pick random (-10) to (10))\n            switch costume to (costume2 v)\n            set size to (pick random (60) to (80)) %\n            change [x v] by ((2) * (([direction v] of [player v]) / ([abs v] of ([direction v] of [player v]) )))\n        end\n        set [xv v] to ((pick random (1.5) to (-1.5)) + ((-2) * (([direction v] of [player v]) / ([abs v] of ([direction v] of [player v]) ))))\n        set [yv v] to ((pick random (-4.0) to (-12.0)) * (GRAV DIR))\n        show\n        if <<(JUMP KEY) > [0]> or <([abs v] of (KEY WALK) ) > [0]>> then\n            repeat (pick random (4) to (6))\n                if <(MODE) = [4]> then\n                    change size by (-3)\n                end\n                change [ghost v] effect by (10)\n                change [x v] by (Xv)\n                change [y v] by (yv)\n            end\n        end\n    end\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nforever\n    go to x: ((X) - (CAMERA X)) y: ((Y) - (CAMERA Y))\nend\n\nwhen I receive [stop!!! v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [splash v]\nhide\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@editor\n\ndefine generate level\ndelete all of [_tile grid v]\nadd wall column\nrepeat ((GRID WIDTH) - (2))\n    add boxed column\nend\nadd wall column\n\ndefine add wall column\nrepeat (GRID HEIGHT)\n    add [4|90] to [_tile grid v]\nend\n\ndefine add boxed column\nadd [5|90] to [_tile grid v]\nrepeat ((GRID HEIGHT) - (2))\n    add [2|90] to [_tile grid v]\nend\nadd [6|90] to [_tile grid v]\n\nwhen I receive [generate level v]\nset [brush typ v] to [4]\nset [level # v] to (level)\ndelete all of [_tile grid v]\nbroadcast (LEVEL - LOAD v) and wait\nif <(length of [_tile grid v]) = [0]> then\n    set [grid width v] to [20]\n    set [grid height v] to [30]\n    generate level\nend\n\nwhen I receive [move player v]\nif <(EDITOR) < [1]> then\n    stop [this script v]\nend\nget tile index at x ((mouse x) + (CAMERA X)) y ((mouse y) + (CAMERA Y))\nget tile type\nget tile dir\nif <not <mouse down?>> then\n    set [brush v] to [0]\n    stop [this script v]\nend\nif <(brush) = [0]> then\n    if <(((right button) + (left button)) / (2)) = [0]> then\n        if <<(tiledir) = (BRUSH DIR)> and <(tiletype) = (BRUSH TYP)>> then\n            set [brush v] to [2|90]\n        else\n            if <(BRUSH TYP) = [29]> then\n                set [brush v] to [29|90]\n            else\n                if <(BRUSH TYP) = [32]> then\n                    set [brush v] to (join (join (BRUSH TYP) (join [|] [-1])) (join [|] [90]))\n                else\n                    set [brush v] to (join (BRUSH TYP) (join [|] (BRUSH DIR)))\n                end\n            end\n        end\n    end\nend\nif <(PLACEABLE) = [1]> then\n    if <<[_tile grid v] contains [29|90]?> and <(BRUSH TYP) = [29]>> then\n        replace item (item # of [29|90] in [_tile grid v]) of [_tile grid v] with [2|90]\n    end\n    replace item (tile index) of [_tile grid v] with (brush)\nend\n\ndefine get tile type\nset [idx v] to [1]\nread (tiledata)\nset [tiletype v] to (val)\n\nwhen [p v] key pressed\nset [brush typ v] to (tiletype)\n\nwhen [l v] key pressed\nif <(EDITOR) < [1]> then\n    stop [this script v]\nend\nask (join [Enter level # \(Current :] (join (LEVEL #) [\)])) and wait\nif <(round (answer)) < [1]> then\n    stop [this script v]\nend\nbroadcast (LEVEL - STOP v) and wait\nbroadcast (LEVEL - SAVE v) and wait\nset [level # v] to (round (answer))\nbroadcast (LEVEL - LOAD v) and wait\nbroadcast (LEVEL - Start game loop v) and wait\n\nwhen I receive [lose v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [start v]\nset [brush dir v] to [90]\nshow\n\nwhen I receive [stop!!! v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen [timer v] > (0)\nhide\n\nwhen I receive [splash v]\nhide\n\nwhen I receive [reset level v]\nif <(EDITOR) < [1]> then\n    stop [this script v]\nend\nask [Are you sure?] and wait\nif <not < (answer) contains [Y]?>> then\n    stop [this script v]\nend\nbroadcast (LEVEL - STOP v) and wait\nask (join [Enter level width \(Current :] (join (GRID WIDTH) [\)])) and wait\nif <not <(answer) = []>> then\n    set [grid width v] to (answer)\nend\nask (join [Enter level height \(Current :] (join (GRID HEIGHT) [\)])) and wait\nif <not <(answer) = []>> then\n    set [grid height v] to (answer)\nend\ngenerate level\nbroadcast (LEVEL - Done loading v) and wait\nbroadcast (LEVEL - Start game loop v)\n\nwhen [e v] key pressed\nchange [brush dir v] by (90)\nif <(BRUSH DIR) > [90]> then\n    set [brush dir v] to [-180]\nend\n\nwhen [q v] key pressed\nchange [brush dir v] by (-90)\nif <(BRUSH DIR) < [-90]> then\n    set [brush dir v] to [180]\nend\n\ndefine get tile dir\nset [idx v] to [1]\nread (tiledata)\nread (tiledata)\nset [tiledir v] to (val)\n\ndefine get tile index at x (x) y (y)\nset [tile grid x v] to ([floor v] of ((x) / (32)) )\nset [tile grid y v] to ([floor v] of ((y) / (32)) )\nset [tile index v] to (((1) + (tile grid y)) + ((tile grid x) * (GRID HEIGHT)))\nset [tiledata v] to (item (tile index) of [_tile grid v])\n\ndefine read (value)\nset [c v] to (letter (idx) of (value))\nset [val v] to []\nrepeat until <<(c) = [|]> or <(c) = []>>\n    set [c v] to (letter (idx) of (value))\n    if <<(c) = [|]> or <(c) = []>> then\n        change [idx v] by (1)\n        stop [this script v]\n    end\n    set [val v] to (join (val) (c))\n    change [idx v] by (1)\nend\n\n@player\n\ndefine move camera\nif <(x) < [47]> then\n    set [solid v] to [10]\n    set [x v] to [47]\nend\nif <(y) < [47]> then\n    set [solid v] to [10]\n    set [y v] to [47]\n    set [falling v] to [0]\nend\nif <(EDITOR) = [0]> then\n    change [camera y v] by (((y) - (CAMERA Y)) / (5))\n    change [camera x v] by (((x) - (CAMERA X)) / (5))\nend\nif <(CAMERA X) < [240]> then\n    set [camera x v] to [240]\nend\nif <(CAMERA Y) < ((180) - (PUSH Y))> then\n    set [camera y v] to ((180) - (PUSH Y))\nend\nif <(CAMERA X) > (((32) * (GRID WIDTH)) - (240))> then\n    set [camera x v] to (((32) * (GRID WIDTH)) - (240))\nend\nif <(CAMERA Y) > (((32) * (GRID HEIGHT)) - (180))> then\n    set [camera y v] to (((32) * (GRID HEIGHT)) - (180))\nend\n\ndefine reset player\nset [spike v] to [0-0]\ndelete all of [cam pos v]\nadd [240] to [cam pos v]\nadd [180] to [cam pos v]\nReset Costume\npoint in direction (90)\nset [negativetiny v] to [-0.00000000001]\nReset stats\npaint sprite\nset [width v] to [15.7]\nset [height v] to [15.7]\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [falling v] to [9999]\nmove camera\n\ndefine game loop\nset [last mode v] to (MODE)\nforever\n    broadcast (position tiles v)\n    broadcast (move player v)\n    if <(PAUSE) > [0]> then\n        repeat until <(PAUSE) < [1]>\n            if <not <(MODE) = (last mode)>> then\n                set [last mode v] to (MODE)\n                set [speed y v] to [0]\n            end\n        end\n    end\n    if <not <(MODE) = (last mode)>> then\n        set [last mode v] to (MODE)\n        set [speed y v] to [0]\n    end\nend\n\nwhen I receive [move player v]\nif <(DASH ORB) = []> then\n    go [forward v] (1) layers\nend\nif <<([abs v] of ((item (1) of [end pos v]) - (x)) ) < [150]> and <([abs v] of ((item (2) of [end pos v]) - (y)) ) < [150]>> then\n    if <(EDITOR) = [0]> then\n        broadcast (End Animation v)\n        stop [this script v]\n    end\nend\nif <(No-Clip) = [1]> then\n    set [spike v] to [0-0]\nend\nif <(SHAKE) = [0]> then\n    replace item (1) of [cam pos v] with (CAMERA X)\n    replace item (2) of [cam pos v] with (CAMERA Y)\nend\nif <([abs v] of (speed x) ) > [4]> then\n    set [stretch v] to [0]\n    if < [31] contains (MODE)?> then\n        turn right (((speed x) * (1.55)) * (GRAV DIR)) degrees\n    end\nend\nif <(EDITOR) > [0]> then\n    handle - Ἀπόλλων mode\nelse\n    handle keys - left right\n    handle keys - jump\n    move sprite x\n    move sprite y\n    if <(letter (1) of (SPIKE)) = [1]> then\n        if <(No-Clip) = [0]> then\n            set [spike v] to [0-1]\n            broadcast (game over v)\n        end\n    end\nend\nmove camera\npaint sprite\n\ndefine get tile at x: (x) y: (y)\nset [tile grid x v] to ([floor v] of ((x) / (32)) )\nset [tile grid y v] to ([floor v] of ((y) / (32)) )\nset [tile index v] to (((1) + (tile grid y)) + ((tile grid x) * (GRID HEIGHT)))\nset [tile v] to (item (tile index) of [_tile grid v])\n\ndefine fix collision in direction dx: (dx) dy: (dy)\nset rotation style [left-right v]\nset [fix dx v] to (dx)\nset [fix dy v] to (dy)\nset [solid v] to []\nset [height v] to [15]\nset [width v] to [15]\nfix collision at point x: ((x) - (width)) y: ((y) - (height))\nfix collision at point x: ((x) - (width)) y: (y)\nfix collision at point x: ((x) - (width)) y: ((y) + (height))\nfix collision at point x: ((x) + ((width) + (negativeTINY))) y: ((y) - (height))\nfix collision at point x: ((x) + ((width) + (negativeTINY))) y: (y)\nfix collision at point x: ((x) + ((width) + (negativeTINY))) y: ((y) + ((height) + (negativeTINY)))\nset [height v] to [0]\nset [width v] to [0]\nget tile at x: (x) y: (y)\nset [i v] to [1]\nread (tile)\nif <<<<(val2) > [8]> and <(val2) < [15]>> or <<<<(x) < [0]> or <(y) < [0]>> or <((x) - (width)) > ((GRID WIDTH) * (32))>> or <((y) - (height)) > ((GRID HEIGHT) * (32))>>> and <(No-Clip) = [0]>> then\n    set [spike v] to [1-1]\nend\nif << [31] contains (MODE)?> or <(DASH ORB) > []>> then\n    set rotation style [all around v]\nend\n\nif <(No-Clip) = [0]> then\nelse\n    set [solid v] to [0]\nend\n\ndefine fix collision at point x: (x) y: (y)\nget tile at x: (x) y: (y)\nset [i v] to [1]\nread (tile)\nif <<<(val2) > [2]> and <(val2) < [7]>> or <(val2) = [8]>> then\n    if <(No-Clip) = [0]> then\n        set [solid v] to [10]\n    end\n    if <(solid) > [0]> then\n        set [mod x v] to ((x) mod (32))\n        set [mod y v] to ((y) mod (32))\n    else\n        set [mod x v] to [0]\n        set [mod y v] to [32]\n    end\n    if <(fix dy) < [0]> then\n        round direction\n        if <(GRAV DIR) = [1]> then\n            set [falling v] to [0]\n        end\n        change [y v] by ((32) - (mod y))\n    end\n    if <(fix dx) < [0]> then\n        round direction\n        change [x v] by ((32) - (mod x))\n    end\n    if <(fix dy) > [0]> then\n        round direction\n        if <(GRAV DIR) = [-1]> then\n            set [falling v] to [0]\n        end\n        change [y v] by ((negativeTINY) - (mod y))\n    end\n    if <(fix dx) > [0]> then\n        round direction\n        change [x v] by ((negativeTINY) - (mod x))\n    end\nend\nif <<(MODE) = [2]> or <(solid) > []>> then\n    create clone of (partical v)\nend\n\ndefine handle keys - left right\nif < [42] contains (MODE)?> then\n    if <([abs v] of (KEY WALK) ) > [0]> then\n        point in direction (KEY WALK)\n    end\nend\nset [player action v] to [walk]\nif <(DASH ORB) = []> then\n    set [key walk v] to ([x axis v] of [controls v])\n    if <(KEY WALK) = [0]> then\n        if <<(MODE) = [2]> or <(falling) < [2]>> then\n            if <(speed x) > [3]> then\n                change [speed x v] by (-3)\n            else\n                if <(speed x) < [-3]> then\n                    change [speed x v] by (3)\n                else\n                    set [speed x v] to [0]\n                    set [player frame v] to [0]\n                end\n            end\n        end\n    else\n        if <((KEY WALK) * (speed x)) < [10]> then\n            if <((KEY WALK) * (speed x)) < [0]> then\n                set [speed x v] to ((KEY WALK) * (10.386))\n            else\n                set [speed x v] to ((KEY WALK) * (10.386))\n            end\n        end\n    end\n    set [temp v] to ([abs v] of ((speed x) / (13)) )\n    if <(temp) < [0.2]> then\n        set [temp v] to [0.2]\n    end\n    change [player frame v] by (temp)\nelse\n    set rotation style [all around v]\n    if <([abs v] of ((speed x) / ([abs v] of (speed x) )) ) > [0]> then\n        turn right (((7.5) * (GRAV DIR)) * ((speed x) / ([abs v] of (speed x) ))) degrees\n    else\n        turn right ((7.5) * (GRAV DIR)) degrees\n    end\n    set [stretch v] to [0]\nend\n\ndefine handle keys - jump\nif <(DASH ORB) > []> then\n    if <(JUMP KEY) > [0]> then\n        set [speed x v] to (([sin v] of (DASH ORB) ) * (10))\n        set [speed y v] to (([cos v] of (DASH ORB) ) * (10))\n    else\n        set [dash orb v] to []\n    end\nend\nif <(ORB/PAD) = [YLP]> then\n    set [orb/pad v] to []\n    set [speed y v] to ((38) * (GRAV DIR))\nend\nif <(ORB/PAD) = [YLR]> then\n    set [orb/pad v] to []\n    if <<(JUMP KEY) > [0]> and <(JUMP KEY) < [100]>> then\n        change [jump key v] by (100)\n        set [speed y v] to ((28) * (GRAV DIR))\n    end\nend\nif < [31] contains (MODE)?> then\n    switch costume to (editor v)\n    set size to (100) %\n    if <(DASH ORB) = []> then\n        change [speed y v] by ((-4.3) * (GRAV DIR))\n    end\nelse\n    if < [4] contains (MODE)?> then\n        set size to (125) %\n        if <(DASH ORB) = []> then\n            change [speed y v] by ((-3) * (GRAV DIR))\n        end\n    else\n        set size to (100) %\n        if <(DASH ORB) = []> then\n            change [speed y v] by ((-0.5) * (GRAV DIR))\n        end\n    end\nend\nif <((speed y) * (GRAV DIR)) < [-22]> then\n    if <(DASH ORB) = []> then\n        set [speed y v] to ((-22) * (GRAV DIR))\n    end\nend\nif <(MODE) = [1]> then\n    if <(JUMP KEY) > [0]> then\n        if <(falling) < [2]> then\n            if <(DASH ORB) = []> then\n                change [falling v] by (2)\n                set [speed y v] to ((24) * (GRAV DIR))\n            end\n        end\n    end\nelse\n    if <(MODE) = [4]> then\n        if <<<<key (up arrow v) pressed?> or <key (space v) pressed?>> or <mouse down?>> or <key (w v) pressed?>> then\n            if <(DASH ORB) = []> then\n                if <<(falling) < [2]> or <(jumping) > [0]>> then\n                    change [jumping v] by (1)\n                    if <(jumping) < [11]> then\n                        set [speed y v] to ((13) * (GRAV DIR))\n                    end\n                end\n            end\n        else\n            set [jumping v] to [0]\n        end\n    else\n        if <(MODE) = [2]> then\n            if <(DASH ORB) = []> then\n                if <(JUMP KEY) > [0]> then\n                    change [speed y v] by ((2) * (GRAV DIR))\n                end\n                if <((speed y) * (GRAV DIR)) > [10]> then\n                    set [speed y v] to ((10) * (GRAV DIR))\n                end\n            end\n        else\n            if <<(JUMP KEY) = [12]> and <(falling) < [2]>> then\n                if <(DASH ORB) = []> then\n                    set [grav dir v] to (() - (GRAV DIR))\n                    change [falling v] by (2)\n                    change [jump key v] by (1)\n                end\n            end\n        end\n    end\nend\n\ndefine move sprite x\nchange [x v] by (speed x)\nfix collision in direction dx: (speed x) dy: [0]\nif <(solid) > [0]> then\n    set [speed x v] to [0]\nend\n\ndefine move sprite y\nchange [y v] by (speed y)\nchange [falling v] by (1)\nfix collision in direction dx: [0] dy: (speed y)\nif <(solid) > [0]> then\n    if <((speed y) * (GRAV DIR)) < [0]> then\n        set [falling v] to [0]\n    else\n        set [jumping v] to [999]\n    end\n    set [speed y v] to [0]\nend\n\ndefine paint sprite\nif <(EDITOR) = [1]> then\n    set [ghost v] effect to (100)\n    switch costume to (editor v)\nelse\n    Reset Costume\n    set [ghost v] effect to (0)\nend\nset [fisheye v] effect to (stretch)\nchange [stretch v] by (((0) - (stretch)) / (3))\nswitch costume to (big v)\nif <(EDITOR) = [0]> then\n    go to x: ((x) - (CAMERA X)) y: ((y) - (CAMERA Y))\nelse\n    go to x: (0) y: (0)\nend\nReset Costume\nif <(falling) > [1]> then\n    if <<((speed y) * (GRAV DIR)) > [0]> and <<([abs v] of (speed x) ) < [2]> or <(MODE) = [4]>>> then\n        if <(MODE) = [4]> then\n            if <(GRAV DIR) = [1]> then\n                if <([abs v] of (speed x) ) > [5]> then\n                    switch costume to (robot7 v)\n                else\n                    switch costume to (robot19 v)\n                end\n            else\n                if <([abs v] of (speed x) ) > [5]> then\n                    switch costume to (robot17 v)\n                else\n                    switch costume to (robot20 v)\n                end\n            end\n        end\n        if <(JUMP KEY) > [0]> then\n            if <(MODE) = [1]> then\n                if <(DASH ORB) = []> then\n                    set [stretch v] to [-25]\n                    point in direction (90)\n                end\n            end\n        end\n    else\n        if <(MODE) = [4]> then\n            if <(GRAV DIR) = [1]> then\n                if <([abs v] of (speed x) ) > [5]> then\n                    switch costume to (robot8 v)\n                else\n                    switch costume to (robot9 v)\n                end\n            else\n                if <([abs v] of (speed x) ) > [5]> then\n                    switch costume to (robot18 v)\n                else\n                    switch costume to (robot16 v)\n                end\n            end\n        end\n    end\nend\n\ndefine round direction\nif <<(MODE) = [1]> and <(DASH ORB) = []>> then\n    point in direction ((round ((direction) / (90))) * (90))\nend\n\ndefine handle - Ἀπόλλων mode\nset [spike v] to [0-0]\nset [stretch v] to [0]\npoint in direction (90)\nchange [camera x v] by ((16) * ([x axis v] of [controls v]))\nchange [camera y v] by ((16) * ([y axis v] of [controls v]))\n\nwhen I receive [level - stop v]\nstop [other scripts in sprite v]\n\nwhen I receive [level - start game loop v]\nreset player\npoint in direction (90)\nReset Costume\nshow\ngame loop\n\nwhen I receive [start v]\nbroadcast (generate level v) and wait\nbroadcast (clone level tiles v) and wait\nset [no-clip v] to [0]\nstop [other scripts in sprite v]\nreset player\nshow\nReset Costume\nbroadcast (LEVEL - Start game loop v)\n\nwhen I receive [lose v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [game over v]\npaint sprite\nset [spike v] to [0-1]\nadd (x position) to [explode v]\nadd (y position) to [explode v]\nadd [0] to [explode v]\nstop [other scripts in sprite v]\nreset player\nReset Costume\nhide\nset [vol v] to [0]\nwait (1) seconds\nbroadcast (LEVEL - Start game loop v)\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [falling v] to [99999]\npaint sprite\nset [spike v] to [0-0]\n\nwhen I receive [stop!!! v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [menu v]\nstop [other scripts in sprite v]\nset [mode v] to [1]\nset [camera x v] to [0]\nset [grav dir v] to [1]\nset [camera y v] to [0]\nhide\nforever\n    set [y v] to (item (2) of [animate pos v])\n    set [x v] to (item (1) of [animate pos v])\n    set [speed x v] to [-10]\nend\n\nwhen I receive [splash v]\nhide\n\nwhen I receive [restart v]\nReset stats\nset [checkpoint v] to [100_100_1_1]\nset [no-clip v] to [0]\nReset Costume\nbroadcast (LEVEL - Start game loop v)\n\ndefine Reset Costume\nif <(MODE) = [4]> then\n    create clone of (partical v)\n    create clone of (partical v)\n    create clone of (partical v)\n    if <(player frame) > [0.2]> then\n        if <(GRAV DIR) = [1]> then\n            switch costume to ((([floor v] of (player frame) ) mod (6)) + (71))\n        else\n            switch costume to ((([floor v] of (player frame) ) mod (6)) + (81))\n        end\n    else\n        if <(GRAV DIR) = [1]> then\n            switch costume to (robot9 v)\n        else\n            switch costume to (robot16 v)\n        end\n    end\nelse\n    switch costume to (join (join (SELECTED ICON) (MODE)) (GRAV DIR))\nend\n\ndefine Shake (dx) (dy)\nset [shake v] to [0]\nif <((dx) + (dy)) > [0]> then\n    set [shake v] to [1]\nend\nset [camera x v] to ((item (1) of [cam pos v]) + (pick random () to (dx)))\nset [camera y v] to ((item (2) of [cam pos v]) + (pick random () to (dy)))\n\nwhen I receive [level complete! v]\nstop [other scripts in sprite v]\nforever\n    go to x: ((x) - (CAMERA X)) y: ((y) - (CAMERA Y))\nend\n\nwhen I receive [end animation v]\nset [stretch v] to [0]\nset [player frame v] to [0]\npaint sprite\nstop [other scripts in sprite v]\nset [speed x v] to [0]\nset [speed y v] to [0]\nrepeat until <([abs v] of ((item (2) of [end pos v]) - (y)) ) < [10]>\n    change [camera x v] by (((item (1) of [end pos v]) - (CAMERA X)) / (10))\n    change [camera y v] by (((item (2) of [end pos v]) - (CAMERA Y)) / (10))\n    if <(CAMERA Y) < [180]> then\n        set [camera y v] to [180]\n    end\n    broadcast (position tiles v)\n    turn right ((speed y) * (((item (1) of [end pos v]) - (x)) / ([abs v] of ((item (1) of [end pos v]) - (x)) ))) degrees\n    change [y v] by (((item (2) of [end pos v]) - (y)) / (10))\n    change [speed x v] by ((0.1) * (((item (1) of [end pos v]) - (x)) / ([abs v] of ((item (1) of [end pos v]) - (x)) )))\n    change [x v] by (speed x)\n    paint sprite\n    set rotation style [all around v]\n    change [speed y v] by ((1) * (((item (2) of [end pos v]) - (y)) / ([abs v] of ((item (2) of [end pos v]) - (y)) )))\nend\nrepeat until <([abs v] of (speed x) ) > ([abs v] of ((item (1) of [end pos v]) - (x)) )>\n    change [camera x v] by (((item (1) of [end pos v]) - (CAMERA X)) / (10))\n    change [camera y v] by (((item (2) of [end pos v]) - (CAMERA Y)) / (10))\n    if <(CAMERA Y) < [180]> then\n        set [camera y v] to [180]\n    end\n    broadcast (position tiles v)\n    turn right ((15) * (((item (1) of [end pos v]) - (x)) / ([abs v] of ((item (1) of [end pos v]) - (x)) ))) degrees\n    change [speed x v] by (((item (1) of [end pos v]) - (x)) / ([abs v] of ((item (1) of [end pos v]) - (x)) ))\n    change [x v] by (speed x)\n    paint sprite\n    set rotation style [all around v]\nend\nreplace item (1) of [cam pos v] with (CAMERA X)\nreplace item (2) of [cam pos v] with (CAMERA Y)\nhide\nbroadcast (Level Complete! v)\n\ndefine read value (value)\nset [c v] to (letter (idx) of (value))\nset [val v] to []\nrepeat until <<(c) = [_]> or <(c) = []>>\n    set [c v] to (letter (idx) of (value))\n    if <<(c) = [_]> or <(c) = []>> then\n        change [idx v] by (1)\n        stop [this script v]\n    end\n    set [val v] to (join (val) (c))\n    change [idx v] by (1)\nend\n\ndefine make skip smoke\n\ndefine Reset stats\nset [idx v] to [1]\nread value (CHECKPOINT)\nset [x v] to (val)\nset [camera x v] to (val)\nread value (CHECKPOINT)\nset [y v] to (val)\nset [camera y v] to (val)\nread value (CHECKPOINT)\nset [mode v] to (val)\nread value (CHECKPOINT)\nset [grav dir v] to (val)\n\ndefine read (value)\nset [c2 v] to (letter (i) of (value))\nset [val2 v] to []\nrepeat until <<(c2) = [|]> or <(c2) = []>>\n    set [c2 v] to (letter (i) of (value))\n    if <<(c2) = [|]> or <(c2) = []>> then\n        change [i v] by (1)\n        stop [this script v]\n    end\n    set [val2 v] to (join (val2) (c2))\n    change [i v] by (1)\nend\n\n@Tiles\n\ndefine setup\nshow\nset [tile index v] to [1]\nset [tile x v] to [16]\nrepeat (CLONE COUNT X)\n    set [tile y v] to [16]\n    repeat (CLONE COUNT Y)\n        create clone of (_myself_ v)\n        change [tile y v] by (32)\n        if <(item (tile index) of [_tile grid v]) = [53]> then\n            replace item (tile index) of [_tile grid v] with [52]\n        end\n        change [tile index v] by (1)\n    end\n    change [tile x v] by (32)\n    change [tile index v] by ((GRID HEIGHT) - (CLONE COUNT Y))\nend\nhide\nset [tile index v] to []\n\nwhen I receive [position tiles v]\nif <(tile index) = []> then\n    editor brush\nelse\n    if <([abs v] of ((tile x) - (CAMERA X)) ) > ((CLONE COUNT X) * (16))> then\n        if <(tile x) < (CAMERA X)> then\n            loop tile x (CLONE COUNT X)\n        else\n            loop tile x ((0) - (CLONE COUNT X))\n        end\n    end\n    if <([abs v] of ((tile y) - (CAMERA Y)) ) > ((CLONE COUNT Y) * (16))> then\n        if <(tile y) < (CAMERA Y)> then\n            loop tile y (CLONE COUNT Y)\n        else\n            loop tile y ((0) - (CLONE COUNT Y))\n        end\n        show\n    end\n    set [idx v] to [1]\n    read (item (tile index) of [_tile grid v])\n    set [tile v] to (val)\n    read (item (tile index) of [_tile grid v])\n    if <(tile) = [32]> then\n        set [col v] to (val)\n        set [dir v] to [90]\n    else\n        set [dir v] to (val)\n    end\nend\nswitch costume to (big v)\nif <<<(tile) = [30]> or <(tile) = [31]>> and <(tile index) > [0]>> then\n    if <(GRAV DIR) > [0]> then\n        go to x: ((tile x) - (CAMERA X)) y: ((([sin v] of ((timer) * (350)) ) * (6)) + ((tile y) - (CAMERA Y)))\n    else\n        go to x: ((tile x) - (CAMERA X)) y: ((([cos v] of ((timer) * (350)) ) * (6)) + ((tile y) - (CAMERA Y)))\n    end\nelse\n    go to x: ((tile x) - (CAMERA X)) y: ((tile y) - (CAMERA Y))\nend\nif <(tile) < [2]> then\n    set [tile v] to [2]\nend\nif <(tile) = [29]> then\n    if <(tile index) > []> then\n        replace item (1) of [end pos v] with (tile x)\n        replace item (2) of [end pos v] with (tile y)\n        if <(EDITOR) = [0]> then\n            set [ghost v] effect to (100)\n        else\n            set [ghost v] effect to (0)\n        end\n    else\n        set [ghost v] effect to (0)\n    end\nelse\n    set [ghost v] effect to (0)\nend\nif <<(tile) = [2]> or <<(tile) = [32]> and <(EDITOR) = [0]>>> then\n    if <(tile index) > []> then\n        set [ghost v] effect to (100)\n    end\nend\nif <(tile index) = []> then\n    set [ghost v] effect to (60)\nend\nif <<(tile) < [24]> or <<<(tile) > [26]> and <(tile) < [28]>> or <<(tile) = [27]> or <<(tile) = [28]> or <(tile) = [30]>>>>> then\n    switch costume to (tile)\n    if <(EDITOR) = [0]> then\n        if <(tile) = [30]> then\n            if < (costume [name v]) contains [_On]?> then\n                stop [this script v]\n            end\n            if <touching (player v)?> then\n                set [checkpoint v] to (join (tile x) (join [_] (join (tile y) (join [_] (join (MODE) (join [_] (GRAV DIR)))))))\n                replace item (tile index) of [_tile grid v] with [31|90]\n                add (tile x) to [misc animate v]\n                add (tile y) to [misc animate v]\n                add [6] to [misc animate v]\n            end\n        end\n    end\nelse\n    if <(tile index) > []> then\n        if <(tile) > [24]> then\n            switch costume to (tile)\n            if <(tile) = [25]> then\n                set size to ((([sin v] of ((timer) * (1000)) ) * (6)) + (100)) %\n            else\n                if <(tile) = [26]> then\n                    set size to ((([sin v] of ((timer) * (1000)) ) * (6)) + (100)) %\n                end\n            end\n            wait () seconds\n        else\n            switch costume to (((round ((timer) * (15))) mod (10)) + (36))\n            if <<< (costume [name v]) contains [Ring]?> or < (costume [name v]) contains [Pad]?>> or < (costume [name v]) contains [Trigg]?>> then\n                next costume\n                if <<< (costume [name v]) contains [Ring]?> or < (costume [name v]) contains [Pad]?>> or < (costume [name v]) contains [Trigg]?>> then\n                    next costume\n                    if <<< (costume [name v]) contains [Ring]?> or < (costume [name v]) contains [Pad]?>> or < (costume [name v]) contains [Trigg]?>> then\n                        next costume\n                    end\n                end\n            end\n        end\n    else\n        switch costume to (tile)\n    end\nend\nif << (costume [name v]) contains [Ring]?> and <(tile index) > [0]>> then\n    set size to ((([sin v] of ((timer) * (1000)) ) * (6)) + (100)) %\nelse\n    if < (costume [name v]) contains [Checkpoint]?> then\n        set size to (130) %\n    else\n        set size to (100) %\n    end\nend\nif < (costume [name v]) contains [Saw]?> then\n    Detect (costume [name v])\nend\nif <(PAUSE) = [1]> then\n    repeat until <(PAUSE) = [0]>\n        if <(tile index) = []> then\n            set [ghost v] effect to (60)\n        end\n    end\nend\n\ndefine loop tile x (tile skip)\nchange [tile x v] by ((tile skip) * (32))\nchange [tile index v] by ((tile skip) * (GRID HEIGHT))\n\ndefine loop tile y (tile skip)\nchange [tile y v] by ((tile skip) * (32))\nchange [tile index v] by (tile skip)\n\nwhen I receive [clone level tiles v]\ndelete all of [end pos v]\nadd ((GRID WIDTH) * (32)) to [end pos v]\nadd (((GRID HEIGHT) * (32)) / (2)) to [end pos v]\nset size to (100) %\nset [clone count x v] to [16]\nset [clone count y v] to [13]\nsetup\n\ndefine editor brush\nset [dir v] to (BRUSH DIR)\nset size to (100) %\nif <<(EDITOR) < [1]> or <<mouse down?> and <(PLACEABLE) = [1]>>> then\n    hide\n    stop [this script v]\nend\npoint in direction (BRUSH DIR)\nshow\nset [ghost v] effect to (60)\nif <(PLACEABLE) = [1]> then\n    set [ghost v] effect to (60)\nelse\n    set [ghost v] effect to (100)\nend\nset [idx v] to [1]\nread (BRUSH TYP)\nset [tile v] to (val)\nif <(tile) = [2]> then\n    set [tile x v] to ((mouse x) + (CAMERA X))\n    set [tile y v] to ((mouse y) + (CAMERA Y))\nelse\n    change [tile x v] by (((((32) * ([tile grid x v] of [editor v])) + (16)) - (tile x)) / (1.5))\n    change [tile y v] by (((((32) * ([tile grid y v] of [editor v])) + (16)) - (tile y)) / (1.5))\nend\n\nwhen I receive [level - done loading v]\nif <(tile index) > []> then\n    set [tile index v] to ((1) + ([floor v] of ((tile y) / (32)) ))\n    change [tile index v] by ((GRID HEIGHT) * ([floor v] of ((tile x) / (32)) ))\nend\n\nwhen I receive [lose v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [start v]\nshow\n\nwhen I start as a clone\nforever\n    if < (costume [name v]) contains [Saw]?> then\n        if <(tile index) > []> then\n            turn right (10) degrees\n        end\n    else\n        point in direction (dir)\n    end\nend\n\nwhen I receive [stop!!! v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [menu v]\nhide\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [splash v]\nhide\n\nwhen I start as a clone\nset [ghost v] effect to (0)\nset [ghost v] to [0]\n\nwhen I start as a clone\nforever\n    if <<(EDITOR) < [1]> and <(tile index) > []>> then\n        if <(No-Clip) = [0]> then\n            if < (costume [name v]) contains [Portal]?> then\n                set size to (75) %\n                if <touching (player v)?> then\n                    set size to (100) %\n                    if < (costume [name v]) contains [Ship]?> then\n                        set [mode v] to [2]\n                    else\n                        if < (costume [name v]) contains [Grav]?> then\n                            if <touching (player v)?> then\n                                if < (costume [name v]) contains [_Toggle]?> then\n                                    add (tile x) to [misc animate v]\n                                    add (tile y) to [misc animate v]\n                                    set [grav dir v] to (() - (GRAV DIR))\n                                    add [3] to [misc animate v]\n                                    wait until <not <touching (player v)?>>\n                                else\n                                    if < (costume [name v]) contains [-1]?> then\n                                        if <(GRAV DIR) = [1]> then\n                                            add (tile x) to [misc animate v]\n                                            add (tile y) to [misc animate v]\n                                            set [grav dir v] to [-1]\n                                            add [2] to [misc animate v]\n                                        end\n                                    else\n                                        if <(GRAV DIR) = [-1]> then\n                                            add (tile x) to [misc animate v]\n                                            add (tile y) to [misc animate v]\n                                            set [grav dir v] to [1]\n                                            add [1] to [misc animate v]\n                                        end\n                                    end\n                                    wait until <not <touching (player v)?>>\n                                end\n                            end\n                        else\n                            if < (costume [name v]) contains [Cube]?> then\n                                set [mode v] to [1]\n                            else\n                                if < (costume [name v]) contains [Robot]?> then\n                                    set [mode v] to [4]\n                                else\n                                    set [mode v] to [3]\n                                end\n                            end\n                        end\n                    end\n                end\n                set size to (100) %\n            else\n                if < (costume [name v]) contains [YellowJumpPad]?> then\n                    if <touching (player v)?> then\n                        add (tile x) to [misc animate v]\n                        add ((tile y) - (16)) to [misc animate v]\n                        set [orb/pad v] to [YLP]\n                        add [5] to [misc animate v]\n                        wait until <not <touching (player v)?>>\n                    end\n                else\n                    if < (costume [name v]) contains [YellowJumpPad]?> then\n                        if <touching (player v)?> then\n                            add (tile x) to [misc animate v]\n                            add ((tile y) - (16)) to [misc animate v]\n                            set [orb/pad v] to [YLP]\n                            add [5] to [misc animate v]\n                            wait until <not <touching (player v)?>>\n                        end\n                    else\n                        if < (costume [name v]) contains [YellowJumpRing]?> then\n                            if <touching (player v)?> then\n                                set [orb/pad v] to [YLR]\n                                if <<(JUMP KEY) > [0]> and <(JUMP KEY) < [100]>> then\n                                    add (tile x) to [misc animate v]\n                                    if < (costume [name v]) contains [Trigg]?> then\n                                        next costume\n                                    end\n                                    add (tile y) to [misc animate v]\n                                    add [4] to [misc animate v]\n                                    add (tile x) to [misc animate v]\n                                    add (tile y) to [misc animate v]\n                                    add [2] to [misc animate v]\n                                end\n                                wait until <not <touching (player v)?>>\n                            end\n                        else\n                            if < (costume [name v]) contains [Dash_Orb]?> then\n                                set size to ((([sin v] of ((timer) * (500)) ) * (10)) + (100)) %\n                                if <touching (player v)?> then\n                                    if <<(JUMP KEY) > [0]> and <(JUMP KEY) < [100]>> then\n                                        change [jump key v] by (100)\n                                        set [dash orb v] to (dir)\n                                        wait until <not <touching (player v)?>>\n                                    end\n                                    set size to ((([sin v] of ((timer) * (500)) ) * (10)) + (100)) %\n                                end\n                                set size to ((([sin v] of ((timer) * (500)) ) * (10)) + (100)) %\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Detect (cos)\nif < (costume [name v]) contains [Saw]?> then\n    set size to (80) %\nend\nswitch costume to (cos)\nif <touching (player v)?> then\n    if <(letter (3) of (SPIKE)) < [1]> then\n        set [spike v] to [1-1]\n    end\nend\nset size to (100) %\n\nwhen I receive [restart v]\ncycles\n\ndefine cycles\nreplace item (item # of [31|90] in [_tile grid v]) of [_tile grid v] with [30|90]\nreplace item (item # of [31|0] in [_tile grid v]) of [_tile grid v] with [30|0]\nreplace item (item # of [31|180] in [_tile grid v]) of [_tile grid v] with [30|180]\nreplace item (item # of [31|-90] in [_tile grid v]) of [_tile grid v] with [30|-90]\n\ndefine read (value)\nset [c v] to (letter (idx) of (value))\nset [val v] to []\nrepeat until <<(c) = [|]> or <(c) = []>>\n    set [c v] to (letter (idx) of (value))\n    if <<(c) = [|]> or <(c) = []>> then\n        change [idx v] by (1)\n        stop [this script v]\n    end\n    set [val v] to (join (val) (c))\n    change [idx v] by (1)\nend\n\nwhen I start as a clone\nforever\n    if <(tile index) > []> then\n        if <(tile) = [32]> then\n            if <<([abs v] of (([x v] of [player v]) - (tile x)) ) < [10]> and <(col) > [-1]>> then\n                repeat until <<([abs v] of ((col) - (item (1) of [bg stats v])) ) < [.01]> or <(col) = []>>\n                    replace item (1) of [bg stats v] with ((item (1) of [bg stats v]) + (((col) - (item (1) of [bg stats v])) / (10)))\n                end\n            end\n            if <(col) = [-1]> then\n                if <(EDITOR) = [1]> then\n                    ask [Enter color value \(0 - 200\)] and wait\n                    set [idx v] to [1]\n                    read (item (tile index) of [_tile grid v])\n                    replace item (tile index) of [_tile grid v] with (join (val) (join [|] (answer)))\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [level - start game loop v]\npoint in direction (dir)\n\nwhen I receive [start v]\npoint in direction (dir)\n\nwhen I start as a clone\npoint in direction (dir)\n\n@Controls\n\nwhen I start as a clone\ngo [forward v] (100) layers\nforever\n    if <(PAUSE) = [1]> then\n        wait until <(PAUSE) = [0]>\n    end\n    go to x: (-157) y: (140)\n    if <(EDITOR) = [0]> then\n        show\n        go to x: (-157) y: (140)\n        set size to (100) %\n    else\n        hide\n    end\n    if <(EDITOR) = [0]> then\n        if < (costume [name v]) contains [Left]?> then\n            if <touching (mouse-pointer v)?> then\n                set [brightness v] effect to (4)\n                if <mouse down?> then\n                    set [left button v] to [1]\n                else\n                    set [left button v] to [0]\n                end\n            else\n                set [brightness v] effect to (0)\n                set [left button v] to [0]\n            end\n            if <((right button) + (left button)) > [0]> then\n                switch costume to (left_on v)\n            else\n                switch costume to (left_off v)\n            end\n        else\n            if < (costume [name v]) contains [Right]?> then\n                if <touching (mouse-pointer v)?> then\n                    set [brightness v] effect to (4)\n                    if <mouse down?> then\n                        set [right button v] to [1]\n                    else\n                        set [right button v] to [0]\n                    end\n                else\n                    set [brightness v] effect to (0)\n                    set [right button v] to [0]\n                end\n                if <((right button) + (left button)) > [0]> then\n                    switch costume to (right_on v)\n                else\n                    switch costume to (right_off v)\n                end\n            else\n                if < (costume [name v]) contains [jump]?> then\n                    set [ghost v] effect to (100)\n                    go to x: (0) y: (0)\n                    if <touching (mouse-pointer v)?> then\n                        set [brightness v] effect to (4)\n                        if <mouse down?> then\n                            set [jump v] to [1]\n                        else\n                            set [jump v] to [0]\n                        end\n                    else\n                        set [brightness v] effect to (0)\n                        set [jump v] to [0]\n                    end\n                end\n            end\n        end\n    end\nend\n\nswitch costume to (right_off v)\n\nwhen I receive [start v]\nshow\n\nwhen I receive [start v]\nswitch costume to (right_off v)\ncreate clone of (_myself_ v)\nswitch costume to (left_off v)\ncreate clone of (_myself_ v)\nswitch costume to (jump v)\ncreate clone of (_myself_ v)\nswitch costume to (costume1 v)\nforever\n    set [x axis v] to (<<<key (d v) pressed?> or <key (right arrow v) pressed?>> or <(right button) = [1]>> - <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <(left button) = [1]>>)\n    set [y axis v] to (<<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <(up down \(mobile\)) > [0]>> - <<<key (s v) pressed?> or <key (down arrow v) pressed?>> or <(up down \(mobile\)) < [0]>>)\nend\n\nwhen I receive [stop!!! v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [splash v]\nhide\n\nwhen I receive [menu v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [lose v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nswitch costume to (right_off v)\n\n@BG\n\nwhen I receive [stop!!! v]\nshow\n\nwhen I receive [start v]\nstop [other scripts in sprite v]\nswitch costume to (tiny v)\nset size to (150) %\nswitch costume to (thing v)\ngo to [back v] layer\nshow\nforever\n    go to [back v] layer\n    set x to ((CAMERA X) * (-0.1))\n    set y to ((CAMERA Y) * (-0.05))\n    if <(x position) < [-270]> then\n        change x by (540)\n    end\n    if <(x position) > [270]> then\n        change x by (-540)\n    end\nend\n\nwhen I receive [menu v]\nstop [other scripts in sprite v]\ngo to x: (0) y: (0)\nshow\nforever\n    go to [back v] layer\n    go [forward v] (-999999) layers\n    change x by (-1)\n    if <(x position) < [-270]> then\n        change x by (540)\n    end\nend\n\nwhen I receive [splash v]\nshow\n\n@Level Store\n\ndefine write value (value) delimiter (delimiter)\nset [encoded v] to (join (encoded) (join (value) (delimiter)))\n\ndefine Save level (level #)\nset [encoded v] to []\nwrite value [1] delimiter [_]\nwrite value (GRID WIDTH) delimiter [_]\nwrite value (GRID HEIGHT) delimiter [_]\nset [tile index v] to [1]\nset [tile v] to (item (tile index) of [_tile grid v])\nset [length v] to [0]\nrepeat (GRID HEIGHT)\n    repeat (GRID WIDTH)\n        if <<(length) < [26]> and <(tile) = (item (tile index) of [_tile grid v])>> then\n            change [length v] by (1)\n        else\n            if <(tile) = [2]> then\n                if <not < (tile) contains [|]?>> then\n                    set [tile v] to []\n                end\n            end\n            write value (tile) delimiter (item (length) of [z - a v])\n            set [tile v] to (item (tile index) of [_tile grid v])\n            set [length v] to [1]\n        end\n        change [tile index v] by (GRID HEIGHT)\n    end\n    change [tile index v] by ((1) - ((GRID WIDTH) * (GRID HEIGHT)))\nend\nwrite value (tile) delimiter (item (length) of [z - a v])\nrepeat ((level #) - (length of [level store v]))\n    add [\[empty file\]] to [level store v]\nend\nreplace item (level #) of [level store v] with (encoded)\n\ndefine load level (level #)\nset [encoded v] to (item (level #) of [level store v])\nset [read idx v] to [1]\nread value\nif <not <(value) = [1]>> then\n    stop [this script v]\nend\ndelete all of [_tile grid v]\nread value\nset [grid width v] to (value)\nread value\nset [grid height v] to (value)\nrepeat ((GRID WIDTH) * (GRID HEIGHT))\n    add [] to [_tile grid v]\nend\nset [tile index v] to [1]\nrepeat until <(read idx) > (length of (encoded))>\n    read value\n    if <(value) = []> then\n        set [value v] to [2]\n    end\n    repeat (item # of (letter) in [z - a v])\n        replace item (tile index) of [_tile grid v] with (value)\n        change [tile index v] by (GRID HEIGHT)\n        if <(tile index) > ((GRID WIDTH) * (GRID HEIGHT))> then\n            change [tile index v] by ((1) - ((GRID WIDTH) * (GRID HEIGHT)))\n        end\n    end\nend\n\ndefine read letter\nset [letter v] to (letter (read idx) of (encoded))\nchange [read idx v] by (1)\n\ndefine read value\nset [value v] to []\nread letter\nrepeat until <<<(letter) > [9]> and <not <(letter) = [|]>>> or <(letter) = []>>\n    set [value v] to (join (value) (letter))\n    read letter\nend\n\nwhen I receive [level - save v]\nSave level (LEVEL #)\n\nwhen I receive [level - load v]\nload level (LEVEL #)\nbroadcast (LEVEL - Done loading v) and wait\n\nwhen I receive [lose v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [start v]\nshow\n\nwhen I receive [stop!!! v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen [timer v] > (0)\nhide\n\nwhen I receive [splash v]\nhide\n\n@Death Particle Effects\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nset rotation style [don't rotate v]\nset [speed v] to (pick random (10.0) to (13.0))\nswitch costume to (spew v)\npoint in direction (pick random (-180) to (180))\ngo to (player v)\nshow\nset size to (pick random (75) to (100)) %\nrepeat (pick random (10) to (13))\n    move (speed) steps\n    change [ghost v] effect by (8)\nend\ndelete this clone\n\nwhen I receive [stop!!! v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [splash v]\nhide\n\nwhen flag clicked\nhide\nforever\n    Check Boom\nend\n\ndefine Check Boom\nif <(length of [explode v]) > [0]> then\n    go to x: (item (1) of [explode v]) y: (item (2) of [explode v])\n    set [color v] effect to (item (3) of [explode v])\n    delete (1) of [explode v]\n    delete (1) of [explode v]\n    delete (1) of [explode v]\n    start sound [explode_11\[1\] v]\n    show\n    set [ghost v] effect to (0)\n    set size to (100) %\n    repeat (15)\n        switch costume to (boom!!! v)\n        go to [front v] layer\n        change [ghost v] effect by (7)\n        change size by (37.5)\n        create clone of (_myself_ v)\n        create clone of (_myself_ v)\n        create clone of (_myself_ v)\n        create clone of (_myself_ v)\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I receive [start v]\nhide\nforever\n    Check Boom\nend\n\nwhen I receive [stop!!! v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@Main Menu\n\ndefine bounce to size (siz) dampening (dampening) force (force)\nset [bounce v] to (((bounce) * (force)) + (((siz) - (size)) * (dampening)))\nchange size by (bounce)\nif <([abs v] of (bounce) ) < [2]> then\n    set [bounce v] to [0]\nend\n\nwhen I receive [start v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [menu v]\nhide variable [level # v]\nhide\nbroadcast (Setup menu v)\n\nwhen I receive [menu v]\ndelete this clone\n\ndefine move out\ncreate clone of (partical v)\nif < (costume [name v]) contains [cube]?> then\n    point in direction ((round ((direction) / (90))) * (90))\nend\nrepeat until <not <(y position) < [-83]>>\n    change y by (1)\nend\nset [sy v] to [0]\nif <(pick random (1) to (10)) = [2]> then\n    if <(x position) > [-190]> then\n        if < (costume [name v]) contains [cube]?> then\n            set [sy v] to [28]\n        end\n    end\nend\n\nwhen I receive [fade v]\nif <not <(costume [name v]) = [fade]>> then\n    stop [other scripts in sprite v]\n    delete this clone\nend\n\ndefine clone fade (cos)\nswitch costume to (fade v)\ncreate clone of (_myself_ v)\nswitch costume to (cos)\n\nwhen I receive [character select v]\ndelete this clone\n\nwhen I receive [setup menu v]\ndelete this clone\n\nwhen I receive [setup menu v]\ngo to [front v] layer\nswitch costume to (fixed ui v)\ncreate clone of (_myself_ v)\nswitch costume to (start v)\ncreate clone of (_myself_ v)\nswitch costume to (editor v)\ncreate clone of (_myself_ v)\nswitch costume to (scroll v)\ngo to x: (0) y: (0)\ncreate clone of (_myself_ v)\nchange x by (480)\ncreate clone of (_myself_ v)\nswitch costume to (icon2cube v)\ncreate clone of (_myself_ v)\nswitch costume to (exit v)\ncreate clone of (_myself_ v)\nswitch costume to (player select v)\ncreate clone of (_myself_ v)\nswitch costume to (more games v)\ncreate clone of (_myself_ v)\ngo to [back v] layer\nswitch costume to (glow v)\ncreate clone of (_myself_ v)\n\ndefine Moar Games (cos)\nswitch costume to (box thingy v)\ncreate clone of (_myself_ v)\nswitch costume to (cos)\n\nwhen I start as a clone\nshow\nforever\n    if <not <<(costume [name v]) = [back2]> or <(costume [name v]) = [box thingy]>>> then\n        if <(length of [other games i recommend: v]) = [0]> then\n            if <(costume [number v]) < [3]> then\n                go to x: (((costume [number v]) * (117)) - (117)) y: (0)\n                if <touching (mouse-pointer v)?> then\n                    bounce to size [110] dampening [0.8] force [0.7]\n                    if <mouse down?> then\n                        wait until <not <mouse down?>>\n                        if <touching (mouse-pointer v)?> then\n                            set [editor v] to ((costume [number v]) - (1))\n                            clone fade (costume [name v])\n                        end\n                    end\n                else\n                    bounce to size [100] dampening [0.8] force [0.7]\n                end\n            else\n                if <(costume [number v]) = [5]> then\n                    forever\n                        go [forward v] (2) layers\n                        set [color v] effect to (item (1) of [bg stats v])\n                        change x by (-10)\n                        if <(x position) < [-480]> then\n                            change x by (960)\n                        end\n                    end\n                else\n                    if < (costume [name v]) contains [Icon]?> then\n                        delete all of [animate pos v]\n                        add [] to [animate pos v]\n                        add [] to [animate pos v]\n                        show\n                        go to x: (-300) y: (-93)\n                        set [sy v] to [0]\n                        forever\n                            go to [front v] layer\n                            replace item (1) of [animate pos v] with (x position)\n                            replace item (2) of [animate pos v] with (y position)\n                            turn right (15) degrees\n                            change x by (10)\n                            if <(x position) > [250]> then\n                                show\n                                switch costume to (pick random (10) to (26))\n                                if <not <(username) = [TheRealGDColon]>> then\n                                    if <(costume [number v]) = [12]> then\n                                        switch costume to (pick random (13) to (27))\n                                    end\n                                    if <(costume [number v]) = [26]> then\n                                        switch costume to (pick random (13) to (25))\n                                    end\n                                end\n                                point in direction (90)\n                                set y to (-81)\n                                set [sy v] to [0]\n                                set [color v] effect to (pick random (-500) to (500))\n                                change x by (-520)\n                                wait (pick random (0.7) to (1.5)) seconds\n                            end\n                            change [sy v] by (-4.3)\n                            change y by (sy)\n                            if <(y position) < [-83]> then\n                                move out\n                            end\n                        end\n                    else\n                        if <(costume [number v]) = [6]> then\n                            change [count v] by (((0) - (count)) / (1.1))\n                            go to x: (-219) y: (160)\n                            if <touching (mouse-pointer v)?> then\n                                set size to ((size) + (((115) - (size)) / (4))) %\n                                if <mouse down?> then\n                                    wait until <not <mouse down?>>\n                                    if <touching (mouse-pointer v)?> then\n                                        change [count v] by (1)\n                                        if <(count) > [1]> then\n                                            stop [all v]\n                                        end\n                                    end\n                                end\n                            else\n                                set size to ((size) + (((100) - (size)) / (4))) %\n                            end\n                        else\n                            if <(costume [number v]) = [7]> then\n                                broadcast (fade v)\n                                stop [other scripts in sprite v]\n                                go to x: (0) y: (0)\n                                show\n                                set [ghost v] effect to (100)\n                                go to [front v] layer\n                                repeat (10)\n                                    change [ghost v] effect by (-10)\n                                end\n                                wait (1) seconds\n                                change [ghost v] effect by (10)\n                                if <(EDITOR) < [1]> then\n                                    broadcast (level select v)\n                                else\n                                    broadcast (Start v)\n                                end\n                                repeat (9)\n                                    change [ghost v] effect by (10)\n                                end\n                                delete this clone\n                            else\n                                if <(costume [number v]) = [8]> then\n                                    go to x: (-117) y: (0)\n                                    if <touching (mouse-pointer v)?> then\n                                        bounce to size [110] dampening [0.8] force [0.7]\n                                        if <mouse down?> then\n                                            wait until <not <mouse down?>>\n                                            if <touching (mouse-pointer v)?> then\n                                                broadcast (Character Select v)\n                                            end\n                                        end\n                                    else\n                                        bounce to size [100] dampening [0.8] force [0.7]\n                                    end\n                                else\n                                    if <(costume [number v]) = [9]> then\n                                        go to [front v] layer\n                                        go to x: (195) y: (-137)\n                                        if <touching (mouse-pointer v)?> then\n                                            set size to ((size) + (((120) - (size)) / (4))) %\n                                            if <mouse down?> then\n                                                wait until <not <mouse down?>>\n                                                if <touching (mouse-pointer v)?> then\n                                                    Moar Games (costume [name v])\n                                                end\n                                            end\n                                        else\n                                            set size to ((size) + (((100) - (size)) / (4))) %\n                                        end\n                                    else\n                                        if <(costume [name v]) = [glow]> then\n                                            go to x: (0) y: (0)\n                                            set [color v] effect to (item (1) of [bg stats v])\n                                        else\n                                            go to x: (0) y: (0)\n                                            forever\n                                                go [forward v] (99999) layers\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    else\n        if <(costume [name v]) = [back2]> then\n            forever\n                go to x: (-180) y: (100)\n                go to [front v] layer\n                if <touching (mouse-pointer v)?> then\n                    set size to ((size) + (((120) - (size)) / (4))) %\n                    if <mouse down?> then\n                        wait until <not <mouse down?>>\n                        broadcast (Stop More Games v)\n                    end\n                else\n                    set size to ((size) + (((100) - (size)) / (4))) %\n                end\n            end\n        else\n            switch costume to (back2 v)\n            create clone of (_myself_ v)\n            switch costume to (resize tiny v)\n            set size to (100) %\n            switch costume to (box thingy v)\n            switch costume to (box thingy v)\n            set [yv v] to [0]\n            go to x: (0) y: (400)\n            go to [front v] layer\n            forever\n                go to [front v] layer\n                change y by (Yv)\n                change [yv v] by (-4)\n                if <(y position) < [0]> then\n                    set [yv v] to ([abs v] of ((Yv) * (0.5)) )\n                    set y to (0)\n                end\n                delete all of [other games i recommend: v]\n                add [https://scratch.mit.edu/projects/558782668/] to [other games i recommend: v]\n                add [https://scratch.mit.edu/projects/628173520/] to [other games i recommend: v]\n                add [https://scratch.mit.edu/projects/860151753/] to [other games i recommend: v]\n                if <([abs v] of (Yv) ) < [1]> then\n                    change y by (Yv)\n                    set [yv v] to [0]\n                    set y to (0)\n                    hide list [other games i recommend: v]\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [stop more games v]\nif <<(costume [name v]) = [back2]> or <(costume [name v]) = [box thingy]>> then\n    show list [other games i recommend: v]\n    delete all of [other games i recommend: v]\n    delete this clone\nend\n\nwhen this sprite clicked\nif < (costume [name v]) contains [Icon]?> then\n    hide\n    add (x position) to [explode v]\n    add (y position) to [explode v]\n    add (pick random (0) to (200)) to [explode v]\n    repeat until <(x position) > [230]>\n        delete all of [animate pos v]\n    end\n    add [] to [animate pos v]\n    add [] to [animate pos v]\nend\n\nwhen I receive [stop!!! v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [menu v]\nforever\n    play sound [584131_Geometry-Dash-Menu-Theme v] until done\nend\n\nwhen I receive [green flag v]\nbroadcast (Menu v)\nshow list [other games i recommend: v]\ndelete all of [other games i recommend: v]\n\n@Character Select\n\nwhen flag clicked\nhide\n\nwhen I receive [character select v]\nSetup\n\ndefine Setup\ngo to x: (0) y: (0)\nset size to (100) %\ndelete all of [locked icons v]\nhide\nswitch costume to (bg v)\ncreate clone of (_myself_ v)\nswitch costume to (selected cube v)\ncreate clone of (_myself_ v)\nswitch costume to (icon1 v)\nset [mode typ v] to [1]\nset [typ v] to [1]\nset [row v] to [1]\nrepeat (11)\n    add [] to [locked icons v]\n    create clone of (_myself_ v)\n    next costume\nend\nswitch costume to (icon1 v)\nset [typ v] to [2]\ncreate clone of (_myself_ v)\nif <(username) = [TheRealGDColon]> then\n    replace item (3) of [locked icons v] with []\nelse\n    replace item (3) of [locked icons v] with []\nend\nif <(username) = [zZoinkk]> then\n    replace item (11) of [locked icons v] with []\nelse\n    replace item (11) of [locked icons v] with [/]\nend\nswitch costume to (selected lcon v)\ncreate clone of (_myself_ v)\nswitch costume to (back v)\ncreate clone of (_myself_ v)\nswitch costume to (border v)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\nif <(costume [number v]) < [3]> then\n    forever\n        go to x: (-172) y: (35)\n    end\nelse\n    if <(costume [number v]) > [7]> then\n        if <(typ) = [1]> then\n            go to x: ((((costume [number v]) - (8)) * (32)) + (-170)) y: ((row) * (-10))\n            forever\n                if <(x position) > [170]> then\n                    change y by (-32)\n                    set x to (() - (x position))\n                end\n                set size to (85) %\n                if <(item ((costume [number v]) - (7)) of [locked icons v]) = [/]> then\n                    switch costume to (locked v)\n                end\n                if <touching (mouse-pointer v)?> then\n                    if <mouse down?> then\n                        wait until <not <mouse down?>>\n                        if <not <(costume [number v]) = [6]>> then\n                            set [selected icon v] to (costume [name v])\n                        end\n                    end\n                end\n            end\n        else\n            set size to (175) %\n            go to x: (4) y: (93)\n            forever\n                switch costume to (SELECTED ICON)\n            end\n        end\n    else\n        if < (costume [name v]) contains [Selected]?> then\n            forever\n                read value (SELECTED ICON)\n                go to x: ((((val) - (1)) * (32)) + (-170)) y: (-10)\n            end\n        else\n            if <(costume [number v]) = [4]> then\n                forever\n                    go to x: (0) y: (0)\n                end\n            else\n                if <(costume [number v]) = [5]> then\n                    forever\n                        go to [front v] layer\n                        go to x: (-209) y: (151)\n                        if <touching (mouse-pointer v)?> then\n                            change size by (((115) - (size)) / (2))\n                            if <mouse down?> then\n                                wait until <not <mouse down?>>\n                                broadcast (Setup menu v)\n                            end\n                        else\n                            change size by (((100) - (size)) / (2))\n                        end\n                    end\n                else\n                    go to x: (0) y: (0)\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [menu v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [setup menu v]\ndelete this clone\n\nwhen I receive [splash v]\nhide\n\nwhen I receive [stop!!! v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\ndefine read value (value)\nset [idx v] to [1]\nset [c v] to []\nset [val v] to []\nrepeat (length of (value))\n    set [c v] to (letter (idx) of (value))\n    if < [0123456789] contains (c)?> then\n        set [val v] to (join (val) (c))\n    end\n    change [idx v] by (1)\nend\n\n@Toenail\n\nwhen flag clicked\nforever\n    go to x: (0) y: (9999)\n    set [ghost v] effect to (100)\n    go to [front v] layer\n    show\nend\n\nwhen [timer v] > ([timer v] of [monitor v])\nset [ghost v] effect to (0)\ngo to [front v] layer\nshow\nrepeat until <(y position) < [20]>\n    change y by (-10)\nend\ngo to x: (0) y: (0)\n\nwhen I receive [menu v]\nforever\n    switch costume to (vector thumbnail v)\n    go to x: (0) y: (9999)\n    set [ghost v] effect to (100)\n    go to [front v] layer\n    show\nend\n\n@Orb/Portal effects\n\nwhen I start as a clone\nshow\ngo to [front v] layer\nset [ghost v] effect to (0)\nif < (costume [name v]) contains [Ball]?> then\n    set size to (100) %\n    repeat (15)\n        change size by (-7)\n        change [ghost v] effect by (7)\n    end\n    delete this clone\nelse\n    if < (costume [name v]) contains [Ring]?> then\n        set size to (0) %\n        repeat (10)\n            go to [front v] layer\n            change size by (8)\n            change [ghost v] effect by (-1)\n        end\n        delete this clone\n    else\n        if < (costume [name v]) contains [ZAP]?> then\n            start sound [glass-broken-43626 v]\n            clear graphic effects\n            wait (0.05) seconds\n            repeat (5)\n                change [ghost v] effect by (20)\n            end\n        else\n            set size to (0) %\n            repeat (10)\n                change size by (10)\n                change [ghost v] effect by (7)\n            end\n            delete this clone\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    go to x: ((x) - (CAMERA X)) y: ((y) - (CAMERA Y))\nend\n\nwhen I receive [stop!!! v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [green flag v]\nhide\nforever\n    check list\nend\n\nwhen I receive [saving v]\nshow\ngo to x: (0) y: (155)\nforever\n    switch costume to ((((timer) * (3)) mod (3)) + (7))\nend\n\ndefine check list\nif <(length of [misc animate v]) > [0]> then\n    set [x v] to (item (1) of [misc animate v])\n    set [y v] to (item (2) of [misc animate v])\n    switch costume to (item (3) of [misc animate v])\n    delete (1) of [misc animate v]\n    delete (1) of [misc animate v]\n    delete (1) of [misc animate v]\n    create clone of (_myself_ v)\nend\n\nwhen I receive [done saving v]\nhide\nstop [other scripts in sprite v]\nforever\n    check list\nend\n\n@Mobile Editor\n\ndefine Setup\ngo to x: (0) y: (0)\nswitch costume to (tab v)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\nclear graphic effects\ngo to [front v] layer\nset size to (100) %\nif <(costume [number v]) = [1]> then\n    Setup tabs\n    forever\n        go [forward v] (1) layers\n    end\nelse\n    if << (costume [name v]) contains [_Tab]?> and <(costume [number v]) < [7]>> then\n        go [forward v] (1000) layers\n        forever\n            go [forward v] (1000) layers\n            go to x: ((((costume [number v]) - (3)) * (55)) + (-100)) y: (-92)\n            if <touching (mouse-pointer v)?> then\n                set [brightness v] effect to (15)\n                if <mouse down?> then\n                    repeat until <not <mouse down?>>\n                        go [forward v] (1000) layers\n                    end\n                    if <touching (mouse-pointer v)?> then\n                        set [selected tab v] to (costume [name v])\n                    end\n                end\n            else\n                set [brightness v] effect to (0)\n            end\n            if <(SELECTED TAB) = (costume [name v])> then\n                set [ghost v] effect to (0)\n                set [brightness v] effect to (0)\n            else\n                set [ghost v] effect to (30)\n                set [brightness v] effect to (20)\n            end\n        end\n    else\n        if <<(costume [number v]) > [6]> and < (costume [name v]) contains [_Tab]?>> then\n            forever\n                go to [front v] layer\n                set size to (60) %\n                if <not < (costume [name v]) contains (SELECTED TAB)?>> then\n                    hide\n                else\n                    show\n                end\n                if <touching (mouse-pointer v)?> then\n                    set [brightness v] effect to (15)\n                    set [ghost v] effect to (0)\n                    if <mouse down?> then\n                        repeat until <not <mouse down?>>\n                            go to [front v] layer\n                        end\n                        if <touching (mouse-pointer v)?> then\n                            if < (costume [name v]) contains (SELECTED TAB)?> then\n                                if <not <((costume [number v]) - (4)) = (BRUSH TYP)>> then\n                                    set [brush dir v] to [90]\n                                    set [brush typ v] to ((costume [number v]) - (4))\n                                end\n                            end\n                        end\n                    end\n                else\n                    if <((costume [number v]) - (4)) = (BRUSH TYP)> then\n                        set [ghost v] effect to (0)\n                        set [brightness v] effect to (15)\n                    else\n                        set [ghost v] effect to (30)\n                        set [brightness v] effect to (0)\n                    end\n                end\n            end\n        else\n            if <(costume [name v]) = [delete]> then\n                forever\n                    go to x: (-199) y: (-126)\n                    go to [front v] layer\n                    if <touching (mouse-pointer v)?> then\n                        change size by (((115) - (size)) / (4))\n                        if <mouse down?> then\n                            repeat until <not <mouse down?>>\n                                go to [front v] layer\n                            end\n                            if <touching (mouse-pointer v)?> then\n                                set [brush typ v] to [2]\n                            end\n                        end\n                    else\n                        change size by (((100) - (size)) / (4))\n                    end\n                end\n            else\n                if <(costume [name v]) = [save]> then\n                    forever\n                        set [my y v] to ((155) + (EDITOR Y))\n                        go to x: (-199) y: (155)\n                        go to [front v] layer\n                        if <touching (mouse-pointer v)?> then\n                            set [placeable v] to [0]\n                            change size by (((115) - (size)) / (4))\n                            if <mouse down?> then\n                                repeat until <not <mouse down?>>\n                                    go to [front v] layer\n                                    if <touching (mouse-pointer v)?> then\n                                        set [placeable v] to [0]\n                                    end\n                                end\n                                if <touching (mouse-pointer v)?> then\n                                    broadcast (saving v)\n                                    broadcast (LEVEL - SAVE v) and wait\n                                    broadcast (done saving v)\n                                end\n                            end\n                        else\n                            change size by (((100) - (size)) / (4))\n                        end\n                    end\n                else\n                    if <(costume [name v]) = [reset]> then\n                        forever\n                            go to x: (-199) y: (-155)\n                            go to [front v] layer\n                            if <touching (mouse-pointer v)?> then\n                                change size by (((115) - (size)) / (4))\n                                if <mouse down?> then\n                                    repeat until <not <mouse down?>>\n                                        go to [front v] layer\n                                        if <touching (mouse-pointer v)?> then\n                                            set [placeable v] to [0]\n                                        end\n                                    end\n                                    if <touching (mouse-pointer v)?> then\n                                        broadcast (Reset Level v) and wait\n                                    end\n                                end\n                            else\n                                change size by (((100) - (size)) / (4))\n                            end\n                        end\n                    else\n                        if < (costume [name v]) contains [ROTATE]?> then\n                            forever\n                                set [my y v] to ((155) + (EDITOR Y))\n                                go to [front v] layer\n                                set size to (160) %\n                                if <touching (mouse-pointer v)?> then\n                                    set [brightness v] effect to (10)\n                                    go to [front v] layer\n                                    if <touching (mouse-pointer v)?> then\n                                        set [placeable v] to [0]\n                                    end\n                                    if <mouse down?> then\n                                        repeat until <<not <mouse down?>> or < (costume [name v]) contains [5]?>>\n                                            go to [front v] layer\n                                            if <touching (mouse-pointer v)?> then\n                                                set [placeable v] to [0]\n                                            end\n                                        end\n                                        read value (costume [name v])\n                                        if <touching (mouse-pointer v)?> then\n                                            change [brush dir v] by (val)\n                                        end\n                                    end\n                                else\n                                    set [brightness v] effect to (-20)\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Setup tabs\nset [brush typ v] to [3]\nset [selected tab v] to [Blocks_Tab]\nswitch costume to (blocks_tab v)\ncreate clone of (_myself_ v)\nswitch costume to (danger_tab v)\ncreate clone of (_myself_ v)\nswitch costume to (portals_tab v)\ncreate clone of (_myself_ v)\nswitch costume to (decorations_tab v)\ncreate clone of (_myself_ v)\nswitch costume to (transporters_tab v)\ncreate clone of (_myself_ v)\nCreate Tab Buttons\nswitch costume to (tab v)\ngo to x: (0) y: (0)\n\ndefine Create Tab Buttons\ngo to x: (-129) y: (-126)\nswitch costume to (blocks_tab2 v)\nrepeat (6)\n    create clone of (_myself_ v)\n    next costume\n    if <(x position) > [135]> then\n        set x to (-129)\n        change y by (-34)\n    else\n        change x by (34)\n    end\nend\ngo to x: (-129) y: (-126)\nrepeat (8)\n    create clone of (_myself_ v)\n    next costume\n    if <(x position) > [135]> then\n        set x to (-129)\n        change y by (-34)\n    else\n        change x by (34)\n    end\nend\ngo to x: (-129) y: (-126)\nrepeat (7)\n    create clone of (_myself_ v)\n    next costume\n    if <(x position) > [135]> then\n        set x to (-129)\n        change y by (-34)\n    else\n        change x by (34)\n    end\nend\ngo to x: (-129) y: (-126)\nrepeat (3)\n    create clone of (_myself_ v)\n    next costume\n    if <(x position) > [135]> then\n        set x to (-129)\n        change y by (-34)\n    else\n        change x by (34)\n    end\nend\ngo to x: (-129) y: (-126)\nrepeat (7)\n    create clone of (_myself_ v)\n    next costume\n    if <(x position) > [135]> then\n        set x to (-129)\n        change y by (-34)\n    else\n        change x by (34)\n    end\nend\nswitch costume to (save v)\ncreate clone of (_myself_ v)\nswitch costume to (delete v)\ncreate clone of (_myself_ v)\nswitch costume to (reset v)\ncreate clone of (_myself_ v)\nswitch costume to (rotate-5 v)\ncreate clone of (_myself_ v)\nswitch costume to (rotate5 v)\ncreate clone of (_myself_ v)\nswitch costume to (rotate90 v)\ncreate clone of (_myself_ v)\nswitch costume to (rotate-90 v)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nforever\n    if <(EDITOR) = [0]> then\n        delete this clone\n    end\nend\n\nwhen I receive [stop!!! v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [green flag v]\nset [ghost v] effect to (100)\nshow\nforever\n    repeat until <(EDITOR) = [1]>\n        set [push y v] to [0]\n    end\n    wait (2) seconds\n    broadcast (EDITOR v)\n    Setup\n    wait until <(EDITOR) = [0]>\nend\n\nwhen I receive [green flag v]\nforever\n    go to [front v] layer\n    set size to (100) %\n    switch costume to (detector v)\n    set [ghost v] effect to (100)\n    if <<touching (mouse-pointer v)?> or <(mouse y) < [-179]>> then\n        set [placeable v] to [0]\n        if <(EDITOR Y) > [0]> then\n            change [editor y v] by (-10)\n        end\n    else\n        set [placeable v] to [1]\n        if <(EDITOR Y) < [70]> then\n            change [editor y v] by (10)\n        end\n    end\n    set y to ((0) - (EDITOR Y))\nend\n\nwhen I receive [editor v]\nset [push y v] to [32]\nset [camera y v] to ((180) - (PUSH Y))\n\nwhen I start as a clone\nset [my y v] to (y position)\nforever\n    pos y ((my y) - (EDITOR Y)) (costume [name v])\nend\n\ndefine pos y (y) (cos)\nswitch costume to (big v)\nset y to (y)\nswitch costume to (cos)\n\ndefine read value (value)\nset [idx v] to [1]\nset [c v] to []\nset [val v] to []\nrepeat (length of (value))\n    set [c v] to (letter (idx) of (value))\n    if < [0123456789-] contains (c)?> then\n        set [val v] to (join (val) (c))\n    end\n    change [idx v] by (1)\nend\n\n@mobile editor move\n\ndefine setup keys\ngo to x: (184) y: (-124)\nswitch costume to (up v)\ncreate clone of (_myself_ v)\ngo to x: (184) y: (-159)\nswitch costume to (down v)\ncreate clone of (_myself_ v)\ngo to x: (153) y: (-142)\nswitch costume to (left v)\ncreate clone of (_myself_ v)\ngo to x: (215) y: (-142)\nswitch costume to (right v)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nset [my y v] to (y position)\nchange x by (15)\nforever\n    if <(EDITOR) = [0]> then\n        delete this clone\n    end\n    set y to ((my y) - (EDITOR Y))\n    show\n    go to [front v] layer\n    go [forward v] (9999999999999999999999999999999) layers\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (0)\n        if <mouse down?> then\n            if <(costume [number v]) = [1]> then\n                set [right button v] to [1]\n                set [left button v] to [0]\n            else\n                if <(costume [number v]) = [2]> then\n                    set [left button v] to [1]\n                    set [right button v] to [0]\n                else\n                    if <(costume [number v]) = [3]> then\n                        set [up down \(mobile\) v] to [1]\n                    else\n                        set [up down \(mobile\) v] to [-1]\n                    end\n                end\n            end\n        else\n            set [up down \(mobile\) v] to [0]\n            set [left button v] to [0]\n            set [right button v] to [0]\n        end\n    else\n        set [brightness v] effect to (-50)\n    end\nend\n\nwhen I receive [stop!!! v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [green flag v]\nhide\nforever\n    if <(EDITOR) = [0]> then\n        set [up down \(mobile\) v] to [0]\n    end\nend\n\nwhen I receive [green flag v]\nhide\nforever\n    wait until <(EDITOR) = [1]>\n    wait (2) seconds\n    setup keys\n    wait until <(EDITOR) = [0]>\nend\n\n@End\n\nwhen flag clicked\nhide\n\nwhen I receive [level complete! v]\nbroadcast (stop music v)\nbroadcast (delete v) and wait\nset [siz v] to [70]\ngo to x: ((item (1) of [end pos v]) - (CAMERA X)) y: ((item (2) of [end pos v]) - (CAMERA Y))\nswitch costume to (boom v)\ncreate clone of (_myself_ v)\ngo to x: (0) y: (0)\nwait (0.1) seconds\nclear graphic effects\ndelete all of [dirs v]\nadd [-150] to [dirs v]\nadd [-125] to [dirs v]\nadd [-100] to [dirs v]\nadd [-75] to [dirs v]\nadd [-50] to [dirs v]\nadd [-25] to [dirs v]\nadd [0] to [dirs v]\nadd [25] to [dirs v]\nadd [50] to [dirs v]\nadd [75] to [dirs v]\nadd [100] to [dirs v]\nadd [125] to [dirs v]\nadd [150] to [dirs v]\nset [repeat length v] to [0]\nclear graphic effects\nstart sound [endStart_02\[1\] v]\nhide\nswitch costume to (ray v)\nreset timer\nrepeat (length of [dirs v])\n    set [rvalue v] to (pick random (1) to (length of [dirs v]))\n    point in direction ((pick random (-10) to (10)) + (item (rvalue) of [dirs v]))\n    delete (rvalue) of [dirs v]\n    create clone of (_myself_ v)\n    wait (0.1) seconds\nend\nset [siz v] to [70]\nswitch costume to (boom v)\ncreate clone of (_myself_ v)\nswitch costume to (level complete v)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nforever\n    go to [front v] layer\n    show\n    go [forward v] (99999999999) layers\n    if <<(costume [name v]) = [Menu]> or <(costume [name v]) = [Replay]>> then\n        go to [front v] layer\n        go [forward v] (500) layers\n        go to (end v)\n        if <(costume [name v]) = [Replay]> then\n            change x by (-95)\n        else\n            change x by (95)\n        end\n        change y by (-121)\n        if <([abs v] of () ) < [1]> then\n            if <touching (mouse-pointer v)?> then\n                if <mouse down?> then\n                    repeat until <not <mouse down?>>\n                        go to [front v] layer\n                        go [forward v] (500000) layers\n                    end\n                    repeat (3)\n                        change size by (5)\n                        go [forward v] (500000) layers\n                    end\n                    go [forward v] (500000) layers\n                    set size to (100) %\n                    if <(costume [name v]) = [Replay]> then\n                        broadcast (Restart v)\n                    else\n                        broadcast (Menu v)\n                    end\n                end\n            else\n                set size to (100) %\n            end\n        else\n            set size to (100) %\n        end\n    else\n        if <(costume [name v]) = [Ray]> then\n            switch costume to (teeny weeny small v)\n            show\n            set size to (pick random (85) to (100)) %\n            go to x: ((item (1) of [end pos v]) - (CAMERA X)) y: ((item (2) of [end pos v]) - (CAMERA Y))\n            set [ghost v] effect to (pick random (20) to (70))\n            switch costume to (ray v)\n            wait until <(length of [dirs v]) < [1]>\n            repeat (20)\n                change [ghost v] effect by (4)\n            end\n            delete this clone\n        else\n            if <(costume [name v]) = [level complete]> then\n                show\n                point in direction (90)\n                go to x: (0) y: (70)\n                set size to (0) %\n                repeat (5)\n                    go to [front v] layer\n                    change size by (17.5)\n                end\n                repeat (75)\n                    switch costume to (boom2 v)\n                    create clone of (_myself_ v)\n                    switch costume to (level complete v)\n                end\n                wait (0.1) seconds\n                broadcast (Box v)\n                switch costume to (boom2 v)\n                create clone of (_myself_ v)\n                switch costume to (level complete v)\n                delete this clone\n            else\n                if <(costume [name v]) = [boom]> then\n                    set size to (0) %\n                    show\n                    repeat ((siz) / (5))\n                        change [ghost v] effect by (7)\n                        change size by ((siz) * (5))\n                    end\n                    delete this clone\n                else\n                    if <(costume [name v]) = [boom2]> then\n                        go to (random position v)\n                        set size to (0) %\n                        clear graphic effects\n                        show\n                        repeat (pick random (10) to (15))\n                            switch costume to (dust v)\n                            create clone of (_myself_ v)\n                            switch costume to (boom2 v)\n                            change [ghost v] effect by (10)\n                            change size by (60)\n                        end\n                        delete this clone\n                    else\n                        if <(costume [name v]) = [dust]> then\n                            set rotation style [don't rotate v]\n                            set size to (pick random (70) to (110)) %\n                            point in direction (pick random (-180) to (180))\n                            clear graphic effects\n                            show\n                            repeat (pick random (7) to (10))\n                                move (7) steps\n                                change [ghost v] effect by (6)\n                            end\n                            delete this clone\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [box v]\nbroadcast (delete v) and wait\nset size to (100) %\npoint in direction (90)\nset [clone v] to [1]\nswitch costume to (replay v)\ncreate clone of (_myself_ v)\nswitch costume to (menu v)\ncreate clone of (_myself_ v)\nset [clone v] to [0]\nif <(clone) = [0]> then\n    switch costume to (box v)\n    show\n    go to x: (0) y: (321)\n    set [speed y v] to [-1]\n    go to [front v] layer\n    go [forward v] (420) layers\n    repeat until <([abs v] of (Speed y) ) < [.1]>\n        set [end v] to [1]\n        change [speed y v] by (-3)\n        change y by (Speed y)\n        if <(y position) < [0]> then\n            set y to (0)\n            set [speed y v] to ((Speed y) * (-0.58))\n        end\n    end\n    set [end v] to [1]\n    set y to (0)\n    set [speed y v] to [0]\nend\nstop [this script v]\n\nwhen I start as a clone\nforever\n    if <(costume [name v]) = [level complete]> then\n        go to [front v] layer\n    end\nend\n\nwhen I receive [delete v]\nhide\ndelete this clone\n\nwhen I receive [menu v]\nhide\nstop [other scripts in sprite v]\n\ndefine Shake (dx) (dy)\nset [shake v] to [0]\nif <((dx) + (dy)) > [0]> then\n    set [shake v] to [1]\nend\nset [camera x v] to ((item (1) of [cam pos v]) + (pick random () to (dx)))\nset [camera y v] to ((item (2) of [cam pos v]) + (pick random () to (dy)))\n\nwhen I receive [level complete! v]\nwait until <(length of [dirs v]) > [0]>\nrepeat until <(length of [dirs v]) < [1]>\n    Shake [10] [10]\n    broadcast (position tiles v)\nend\n\nwhen I receive [level - start game loop v]\nstop [other scripts in sprite v]\nbroadcast (delete v)\ndelete this clone\n\ngo to (end v)\n\nwhen I receive [stop!!! v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@blank2\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [reported v] to [No]\nforever\n    set [timer v] to (timer)\n    switch costume to (report v)\n    if <(mouse y) < [0]> then\n        set [report v] to <<touching (mouse-pointer v)?> and <not <<(username) = [Ppxixi]> or <(username) = [Iphone_ATT_TWC115]>>>>\n    end\n    switch costume to (blank v)\n    if <(Report) = [true]> then\n        if <mouse down?> then\n            repeat until <not <mouse down?>>\n                set [report v] to <<touching (mouse-pointer v)?> and <not <<(username) = [Ppxixi]> or <(username) = [Iphone_ATT_TWC115]>>>>\n            end\n            if <(Report) = [true]> then\n                create clone of (_myself_ v)\n            end\n        end\n    end\nend\n\nwhen [timer v] > (timer)\ngo to x: (0) y: (0)\nset [reported v] to [No]\nforever\n    set [timer v] to (timer)\n    switch costume to (report v)\n    if <(mouse y) < [0]> then\n        set [report v] to <<touching (mouse-pointer v)?> and <not <<(username) = [Ppxixi]> or <(username) = [Iphone_ATT_TWC115]>>>>\n    end\n    switch costume to (blank v)\n    if <(Report) = [true]> then\n        if <mouse down?> then\n            repeat until <not <mouse down?>>\n                set [report v] to <<touching (mouse-pointer v)?> and <not <<(username) = [Ppxixi]> or <(username) = [Iphone_ATT_TWC115]>>>>\n            end\n            if <(Report) = [true]> then\n                create clone of (_myself_ v)\n            end\n        end\n    end\nend\n\nwhen I start as a clone\ncreate clone of (_myself_ v)\ndelete this clone\n\n@pls\n\nwhen flag clicked\nstop [other scripts in sprite v]\nshow\nbroadcast (Green Flag v)\nforever\n    go [forward v] (10000) layers\n    if <<is turbowarp?> or <is compiled?>> then\n        set [ghost v] effect to (100)\n        hide\n    else\n        show\n        set [ghost v] effect to (0)\n        broadcast (STOP!!! v)\n    end\nend\n\nwhen [timer v] > ([timer v] of [monitor v])\nshow\nforever\n    go [forward v] (10000) layers\n    hide\nend\n\nwhen I receive [stop stopping v]\nstop [other scripts in sprite v]\nhide\nwait (.1) seconds\nbroadcast (Green Flag v) and wait\nforever\n    stop [other scripts in sprite v]\n    hide\nend\n\n@clicker\n\nwhen [timer v] > ([timer v] of [monitor v])\nstop [other scripts in sprite v]\nshow\nforever\n    go to [front v] layer\n    go [forward v] (999999999999999999999999999999999) layers\n    hide\nend\n\nwhen flag clicked\nstop [other scripts in sprite v]\nshow\nbroadcast (Green Flag v)\nforever\n    go to [front v] layer\n    go [forward v] (999999999999999999999999999999999) layers\n    if <<is turbowarp?> or <is compiled?>> then\n        hide\n        set [ghost v] effect to (100)\n    else\n        show\n        set [ghost v] effect to (0)\n    end\n    clicker\nend\n\ndefine clicker\nset [ghost v] effect to (50)\nif <touching (mouse-pointer v)?> then\n    set [ghost v] effect to (0)\n    if <mouse down?> then\n        repeat until <not <mouse down?>>\n            go to [front v] layer\n            go [forward v] (999999999999999999999999999999999999999999999) layers\n        end\n        if <touching (mouse-pointer v)?> then\n            broadcast (stop stopping v)\n        end\n    end\nend\n\nwhen I receive [stop stopping v]\nforever\n    stop [other scripts in sprite v]\n    hide\nend\n\n@level select\n\nwhen I receive [level select v]\nset [color v] effect to (0)\npoint in direction (90)\nsetup\npoint in direction (90)\nforever\n    change [col v] by (((((level) * (20)) + (100)) - (col)) / (4))\n    set [color v] effect to (col)\n    switch costume to (bg v)\nend\n\ndefine setup\nset [level v] to [1]\nset rotation style [all around v]\ngo to [front v] layer\nswitch costume to (play v)\ncreate clone of (_myself_ v)\nswitch costume to (level1 v)\ncreate clone of (_myself_ v)\nswitch costume to (level2 v)\ncreate clone of (_myself_ v)\nswitch costume to (level3 v)\ncreate clone of (_myself_ v)\nswitch costume to (level4 v)\ncreate clone of (_myself_ v)\nswitch costume to (level5 v)\ncreate clone of (_myself_ v)\nset rotation style [left-right v]\nswitch costume to (arrows v)\npoint in direction (90)\ngo to x: (210) y: (0)\ncreate clone of (_myself_ v)\npoint in direction (-90)\ngo to x: (-210) y: (0)\ncreate clone of (_myself_ v)\ngo to x: (0) y: (0)\nswitch costume to (border v)\ncreate clone of (_myself_ v)\ngo to [back v] layer\nshow\nswitch costume to (bg v)\n\nwhen I start as a clone\nif < (costume [name v]) contains [level]?> then\n    pos x (() - (((level) - ((costume [number v]) - (1))) * (480))) y [80] (costume [name v])\nend\nshow\nforever\n    if <(level) < [1]> then\n        set [level v] to [5]\n    end\n    if <(level) > [5]> then\n        set [level v] to [1]\n    end\n    if < (costume [name v]) contains [level]?> then\n        pos x ((x position) + (((() - (((level) - ((costume [number v]) - (1))) * (480))) - (x position)) / (4))) y [80] (costume [name v])\n    else\n        if < (costume [name v]) contains [play]?> then\n            go to x: (0) y: (0)\n            if <touching (mouse-pointer v)?> then\n                change size by (((110) - (size)) / (4))\n                if <mouse down?> then\n                    repeat until <not <mouse down?>>\n                        change size by (((110) - (size)) / (4))\n                    end\n                    if <touching (mouse-pointer v)?> then\n                        set [level # v] to (level)\n                        broadcast (Start v)\n                    end\n                end\n            else\n                change size by (((100) - (size)) / (4))\n            end\n        else\n            if < (costume [name v]) contains [arrows]?> then\n                if <touching (mouse-pointer v)?> then\n                    change size by (((110) - (size)) / (4))\n                    if <mouse down?> then\n                        repeat until <not <mouse down?>>\n                            change size by (((110) - (size)) / (4))\n                        end\n                        if <touching (mouse-pointer v)?> then\n                            change [level v] by (<(x position) > [0]> - <(x position) < [0]>)\n                        end\n                    end\n                else\n                    change size by (((100) - (size)) / (4))\n                end\n            else\n                if <(costume [name v]) = [border]> then\n                    go to [front v] layer\n                end\n            end\n        end\n    end\nend\n\ndefine pos x (x) y (y) (cos)\nswitch costume to (bg v)\ngo to x: (x) y: (y)\nswitch costume to (cos)\n\nwhen I receive [start v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen flag clicked\nhide\n\n@time\n\nwhen I start as a clone\ngo to [front v] layer\nshow\nforever\n    go to [front v] layer\n    if <(end) = [0]> then\n        change size by (((80) - (size)) / (3))\n    else\n        if <([y position v] of [end v]) = [0]> then\n            set size to (50) %\n        end\n    end\n    change costume to (join [n] (letter (index) of (time)))\n    if <(end) = [1]> then\n        set x to (((((index) - (0.5)) - ((length of (round (time))) / (2))) * ((size) / (3.8))) + (-40))\n        go to [front v] layer\n    else\n        set x to (((((index) - (0.5)) - ((length of (round (time))) / (2))) * ((size) / (3.8))) + (-10))\n    end\n    if <(end) = [1]> then\n        if <([y position v] of [end v]) = [0]> then\n            set y to (0)\n        end\n    else\n        set y to (160)\n    end\n    if <(EDITOR) = [1]> then\n        hide\n    else\n        show\n    end\nend\n\ndefine setup\nhide\nswitch costume to (clone machine v)\nset size to (100) %\nhide\ngo to x: (-80) y: (135)\nset [index v] to [1]\nrepeat (8)\n    create clone of (_myself_ v)\n    change x by ((size) / (10))\n    change [index v] by (1)\nend\n\ndefine change costume to (costume)\nif <not <(costume) = (costume [name v])>> then\n    switch costume to (costume)\n    set size to (90) %\nend\n\nwhen I receive [level - start game loop v]\nwait (.1) seconds\nreset timer\nsetup\n\nwhen I receive [menu v]\nset [end v] to [0]\ndelete this clone\n\nwhen I receive [stop!!! v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [level - start game loop v]\nset [end v] to [0]\nset [time v] to [0.00]\nreset timer\nrepeat until <<([abs v] of ([x axis v] of [controls v]) ) > [0]> or <<([abs v] of ([y axis v] of [controls v]) ) > [0]> or <(JUMP KEY) > [0]>>>\n    reset timer\nend\nforever\n    if <(letter (3) of (SPIKE)) = [0]> then\n        set [time v] to (timer)\n    end\n    if <(PAUSE) = [1]> then\n        repeat until <(PAUSE) = [0]>\n    end\nend\n\nwhen I receive [box v]\nif <(costume [name v]) = [clone machine]> then\n    wait (.5) seconds\n    show\n    switch costume to (ntime : v)\n    go to [front v] layer\n    set x to (20)\n    set y to (0)\n    set size to (50) %\n    repeat until <(end) = [0]>\n        go to [front v] layer\n    end\n    hide\nend\n\nwhen I receive [fade v]\nreset timer\nrepeat until <<([abs v] of ([x axis v] of [controls v]) ) > [0]> or <<([abs v] of ([y axis v] of [controls v]) ) > [0]> or <(JUMP KEY) > [0]>>>\n    reset timer\nend\n\nwhen I receive [level - start game loop v]\ndelete this clone\n\nwhen I receive [end animation v]\nif <(costume [name v]) = [clone machine]> then\n    stop [other scripts in sprite v]\nend\n\n@@ToadFanSchool\n\nwhen flag clicked\nswitch costume to (na gd v)\ngo to x: (8) y: (0)\nforever\n    if <key (left arrow v) pressed?> then\n        switch costume to ((costume [number v]) - (1))\n        wait until <not <key (left arrow v) pressed?>>\n    end\n    if <key (right arrow v) pressed?> then\n        next costume\n        wait until <not <key (right arrow v) pressed?>>\n    end\nend\n\n@dash\n\nwhen flag clicked\nforever\n    point in direction (DASH ORB)\n    go to (player v)\n    set [brightness v] effect to (100)\n    go to [front v] layer\n    set [ghost v] effect to (5)\n    if <(DASH ORB) > []> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [game over v]\nset [dash orb v] to []\n\nwhen I receive [green flag v]\nset [dash orb v] to []\n\nwhen I receive [menu v]\nset [dash orb v] to []\n\nwhen I receive [end animation v]\nset [dash orb v] to []\n\n