The Ultimate Game 2

Instructions: Controls:\n[ WASD ] or arrowkeys to move\n[ R ] - Restart level (i.e. if you get stuck)\n[ P ] - Toggle Pause\n[ M ] - Toggle Music ON/OFF\n\nThe Ultimate Game 2 is a challenging puzzle platformer with levels made entirely using the level editor in Ultimate Game Creator 7. There are 15 brand new levels, all meticulously designed by me, which are really going to put your skill to the test. Try to finish as fast as you can and with as few deaths as possible. Will you be #1 in the leaderboard?\n\nALL levels are possible!\n\nTips n' tricks to perform better:\n• Always think through the level before playing - it's worth it!\n• Feel free to use the pause feature and come back later. Your time in paused mode will automatically be subtracted from your total time.\n• By tapping instead of holding arrowkeys you should gain better control in tricky situations.\n• By holding up-arrow while being blocked by a roof and moving clear of the roof, you will jump instantly.\n• On levels including alternating laser spikes it's often worth to wait instead of taking a chance at getting past in time.\n• If you keep dying in the same place, try changing strategy instead of frantically retrying the same approach.

@Stage\n\nwhen flag clicked\nif <(☁ Connection?) = [1]> then\n    switch backdrop to (background v)\nelse\n    switch backdrop to (no cloud v)\n    wait until <not <key (space v) pressed?>>\n    wait until <key (space v) pressed?>\n    switch backdrop to (background v)\nend\nhide variable [mytime v]\nhide variable [mydeaths v]\nset [switch to game v] to [0]\nset [#character v] to [1]\nset [#n of characters v] to [12]\nset [music on/off v] to [ON]\nset [sfx on/off v] to [ON]\nset [skipped? v] to [0]\nset [pause v] to [0]\nset [play v] to [0]\nset [win v] to [0]\nbroadcast (Main Menu v)\nbroadcast (Music v)\n\nwhen I receive [music v]\nif <(Music ON/OFF) = [ON]> then\n    play sound [4ware - Deadmau5 v] until done\n    broadcast (Music v)\nelse\n    stop all sounds\nend\n\nwhen [m v] key pressed\nif <(Music ON/OFF) = [ON]> then\n    set [music on/off v] to [OFF]\nelse\n    set [music on/off v] to [ON]\nend\nbroadcast (Music v)\nwait until <not <key (m v) pressed?>>\n\nwhen [0 v] key pressed\nif <(username) = [Yllie]> then\n    if <<key (down arrow v) pressed?> and <key (up arrow v) pressed?>> then\n        ask [Level:] and wait\n        broadcast (Start Game v)\n        set [#level v] to (answer)\n        set [skipped? v] to [1]\n    end\nend\n\nwhen I receive [start game v]\nreset timer\nset [total pause time v] to [0]\nset [switch to game v] to [1]\nset [mydeaths v] to [0]\nwait (1) seconds\nbroadcast (Next Level v)\n\n@Main Menu\n\nwhen I receive [main menu v]\nclear graphic effects\nset size to (100) %\ngo to x: (0) y: (9)\nshow\n\nwhen I receive [start game v]\nrepeat (10)\n    change y by (1)\n    change size by (((140) - (size)) / (2))\n    change [ghost v] effect by (((200) - (size)) / (2))\nend\nhide\n\nwhen flag clicked\nhide\n\n@Start Button\n\nwhen I receive [main menu v]\nclear graphic effects\ngo to x: (-75) y: (-140)\nshow\nrepeat until \n    switch costume to (start button v)\n    if <<<touching (mouse-pointer v)?> and <not <mouse down?>>> and <not <<([costume # v] of [levels button v]) > [1]> or <([costume # v] of [leader board button v]) = [2]>>>> then\n        repeat until <not <touching (mouse-pointer v)?>>\n            change size by (((110) - (size)) / (2))\n            if <mouse down?> then\n                repeat (3)\n                    change size by (((90) - (size)) / (2))\n                end\n                wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n                if <touching (mouse-pointer v)?> then\n                    broadcast (Start Game v)\n                    set [#level v] to [1]\n                    set [switch to game v] to [1]\n                    repeat (10)\n                        change y by (-1)\n                        change size by (((140) - (size)) / (2))\n                        change [ghost v] effect by (((200) - (size)) / (2))\n                    end\n                    hide\n                    stop [this script v]\n                end\n            end\n        end\n    else\n        change size by (((100) - (size)) / (2))\n    end\nend\n\nwhen I receive [start game v]\nif <<not <(answer) = []>> or <<([costume # v] of [levels button v]) > [1]> or <([costume # v] of [leader board button v]) = [2]>>> then\n    hide\n    stop [other scripts in sprite v]\nend\nstop [this script v]\n\nwhen flag clicked\nhide\n\n@Levels Button\n\nwhen I receive [main menu v]\nclear graphic effects\ngo to x: (75) y: (-140)\nshow\nrepeat until \n    switch costume to (levels button v)\n    if <<<touching (mouse-pointer v)?> and <not <mouse down?>>> and <not <([costume # v] of [leader board button v]) = [2]>>> then\n        repeat until <not <touching (mouse-pointer v)?>>\n            change size by (((110) - (size)) / (2))\n            if <mouse down?> then\n                repeat (3)\n                    change size by (((90) - (size)) / (2))\n                end\n                wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n                if <touching (mouse-pointer v)?> then\n                    repeat (3)\n                        change y by (-1)\n                        change size by (((140) - (size)) / (2))\n                        change [ghost v] effect by (((200) - (size)) / (2))\n                    end\n                    hide\n                    switch costume to (select level v)\n                    go to x: (0) y: (0)\n                    go to [front v] layer\n                    show\n                    repeat (3)\n                        change size by (((100) - (size)) / (2))\n                        change [ghost v] effect by (((46) - (size)) / (2))\n                    end\n                    broadcast (Level Select v)\n                    wait until <<<mouse down?> and <<<(mouse x) > [210]> and <(mouse y) > [150]>> and <<(mouse x) < [235]> and <(mouse y) < [175]>>>> or >\n                    hide\n                    switch costume to (levels button v)\n                    clear graphic effects\n                    go to x: (75) y: (-140)\n                    show\n                end\n            end\n        end\n    else\n        change size by (((100) - (size)) / (2))\n    end\nend\n\nwhen I receive [start game v]\nstop [other scripts in sprite v]\nhide\n\nwhen flag clicked\nhide\n\n@How To\n\nwhen I receive [main menu v]\nset size to (100) %\nswitch costume to (click to change v)\nhide\ngo to x: (150) y: (0)\nset [ghost v] effect to (100)\nwait (0.5) seconds\nshow\nrepeat (15)\n    change [ghost v] effect by (-5)\nend\nwait until <(Switch to Game) = [1]>\nrepeat (5)\n    change [ghost v] effect by (20)\n    change size by (((140) - (size)) / (2))\n    change x by (1)\nend\nhide\n\nwhen flag clicked\nhide\n\n@Character\n\nwhen I receive [build level v]\ngo to x: (item (1) of [character spawn x/y v]) y: (item (2) of [character spawn x/y v])\nif <not <(direction) = (item (3) of [character spawn x/y v])>> then\n    point in direction ((90) * (item (3) of [character spawn x/y v]))\nend\n\ndefine None\nCheck Collision (15)\nif <(<Collision?>) = [1]> then\n    set [disable v] to [2]\n    set [restart v] to [1]\nend\nif <(disable) = [0]> then\n    Check Collision (3)\n    if <(<Collision?>) = [1]> then\n        if <(SFX ON/OFF) = [ON]> then\n            start sound [Spin v]\n        end\n        set [yv v] to ((yv) * (-0.5))\n        point in direction ((Gravity Dir.) * (90))\n        if <(Gravity Dir.) = [1]> then\n            set [gravity dir. v] to [-1]\n            repeat (5)\n                turn right (36) degrees\n            end\n        else\n            set [gravity dir. v] to [1]\n            repeat (5)\n                turn right (-36) degrees\n            end\n        end\n        point in direction ((Gravity Dir.) * (90))\n        set [disable v] to [0.5]\n        stop [this script v]\n    end\nend\nCheck Collision (4)\nif <(<Collision?>) = [1]> then\n    if <not <(join (join (((24) * (round (((x position) - (12)) / (24)))) + (12)) ((24) * (round ((y position) / (24))))) (Gravity Dir.)) = (join (item (1) of [checkpoint x/y v]) (join (item (2) of [checkpoint x/y v]) (item (3) of [checkpoint x/y v])))>> then\n        if <(SFX ON/OFF) = [ON]> then\n            start sound [Checkpoint v]\n        end\n        delete (all) of [checkpoint x/y v]\n        add (((24) * (round (((x position) - (12)) / (24)))) + (12)) to [checkpoint x/y v]\n        add ((24) * (round ((y position) / (24)))) to [checkpoint x/y v]\n        add (Gravity Dir.) to [checkpoint x/y v]\n    end\nend\nif <(length of [teleportals v]) > [2]> then\n    if <(disable) < [1]> then\n        Check Collision (5)\n        if <<(<Collision?>) = [1]> and <<[teleportals v] contains (((24) * (round (((x position) - (12)) / (24)))) + (12))?> and <[teleportals v] contains (((24) * (round (((y position) - (0)) / (24)))) + (0))?>>> then\n            set [disable v] to [1]\n            Find Teleportal at (((24) * (round ((((x position) + (xv)) - (12)) / (24)))) + (12)) ((24) * (round (((y position) + ((yv) * (Gravity Dir.))) / (24))))\n            if <not <(TeleCounter) = [0]>> then\n                set [xv v] to [0]\n                set [yv v] to [0]\n                glide (0.07) secs to x: (item (TeleCounter) of [teleportals v]) y: (item ((TeleCounter) + (1)) of [teleportals v])\n                if <(SFX ON/OFF) = [ON]> then\n                    start sound [Teleportal Sweep v]\n                end\n                repeat (8)\n                    change [ghost v] effect by (12.5)\n                    change size by (-6.25)\n                    turn right (6.25) degrees\n                end\n                if <((((TeleCounter) + (1)) / (2)) mod (2)) = [1]> then\n                    go to x: (item ((TeleCounter) + (2)) of [teleportals v]) y: (item ((TeleCounter) + (3)) of [teleportals v])\n                else\n                    go to x: (item ((TeleCounter) - (2)) of [teleportals v]) y: (item ((TeleCounter) - (1)) of [teleportals v])\n                end\n                if <(SFX ON/OFF) = [ON]> then\n                    start sound [Teleportal Sweep v]\n                end\n                repeat (8)\n                    change [ghost v] effect by (-12.5)\n                    change size by (6.25)\n                    turn right (-6.25) degrees\n                end\n                set [disable v] to [1]\n            end\n        end\n    end\nend\nCheck Collision (12)\nif <not <(<Collision?>) = [0]>> then\n    if <(<Collision?>) = [Blue]> then\n        if <<<(SFX ON/OFF) = [ON]> and <[costume v] contains [S]?>> and <not <[doors open/close v] contains (join (<Collision?>) [ Door \[OPEN\]])?>>> then\n            start sound [Unlock Door v]\n        end\n        replace item (1) of [doors open/close v] with [Blue Door \[OPEN\]]\n    end\n    if <(<Collision?>) = [Green]> then\n        if <<<(SFX ON/OFF) = [ON]> and <[costume v] contains [T]?>> and <not <[doors open/close v] contains (join (<Collision?>) [ Door \[OPEN\]])?>>> then\n            start sound [Unlock Door v]\n        end\n        replace item (2) of [doors open/close v] with [Green Door \[OPEN\]]\n    end\n    if <(<Collision?>) = [Red]> then\n        if <<<(SFX ON/OFF) = [ON]> and <[costume v] contains [U]?>> and <not <[doors open/close v] contains (join (<Collision?>) [ Door \[OPEN\]])?>>> then\n            start sound [Unlock Door v]\n        end\n        replace item (3) of [doors open/close v] with [Red Door \[OPEN\]]\n    end\n    if <(<Collision?>) = [Yellow]> then\n        if <<<(SFX ON/OFF) = [ON]> and <[costume v] contains [V]?>> and <not <[doors open/close v] contains (join (<Collision?>) [ Door \[OPEN\]])?>>> then\n            start sound [Unlock Door v]\n        end\n        replace item (4) of [doors open/close v] with [Yellow Door \[OPEN\]]\n    end\nend\nCheck Collision (2)\nif <<(disable) = [0]> and <(<Collision?>) > [0]>> then\n    if <(<Collision?>) = [1]> then\n        set [disable v] to [2]\n        set [restart v] to [1]\n    else\n        delete (all) of [checkpoint x/y v]\n        if <not <(Disable) = [3]>> then\n            broadcast (WIN! v)\n            set [restart v] to [1]\n        end\n        set [disable v] to [3]\n    end\nend\nif <<(item (3) of [level settings v]) = [1]> and <not <(yv) < [-3]>>> then\n    Check Collision (13)\n    if <(<Collision?>) = [1]> then\n        set [disable v] to [2]\n        set [restart v] to [1]\n    end\nend\nif <(disable) < [2]> then\n    Check Collision (6)\n    if <(<Collision?>) = [1]> then\n        if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n            set [yv v] to [-5]\n        else\n            set [yv v] to [5]\n        end\n    end\n    Check Collision (14)\n    if <(<Collision?>) = [1]> then\n        set [water? v] to [1]\n        if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n            change [yv v] by (-0.3)\n        end\n    else\n        set [water? v] to [0]\n    end\nend\nif <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n    if <(Ice?) = [1]> then\n        change [xv v] by (0.2)\n    else\n        change [xv v] by (1)\n    end\nend\nif <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n    if <(Ice?) = [1]> then\n        change [xv v] by (-0.2)\n    else\n        change [xv v] by (-1)\n    end\nend\nif <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n    change y by ((-2) * (Gravity Dir.))\n    Check Collision (7)\n    if <(<Collision?>) = [1]> then\n        set [ice? v] to [1]\n    else\n        set [ice? v] to [0]\n    end\n    Check Collision (8)\n    if <(<Collision?>) = [1]> then\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            change [xv v] by (-0.9)\n        else\n            change [xv v] by (-1.5)\n        end\n    end\n    Check Collision (9)\n    if <(<Collision?>) = [1]> then\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            change [xv v] by (0.9)\n        else\n            change [xv v] by (1.5)\n        end\n    end\n    if <(water?) = [1]> then\n        change [yv v] by (0.5)\n    else\n        Check Collision (10)\n        if <<(<Collision?>) = [1]> and <not <<(JumpHeight) = [6]> and <(Gravity) < [-2]>>>> then\n            Check Collision (11)\n            if <(<Collision?>) = [1]> then\n                set [yv v] to ((JumpHeight) + (8))\n                if <<<key (d v) pressed?> or <key (right arrow v) pressed?>> or <<key (a v) pressed?> or <key (left arrow v) pressed?>>> then\n                    broadcast (Somersault v)\n                end\n            else\n                set [yv v] to ((JumpHeight) + (((Gravity) + (1)) * (2)))\n            end\n        end\n    end\n    change y by ((2) * (Gravity Dir.))\nend\nTransform Character\n\ndefine None\nset [<collision?> v] to [0]\nif <not <(Disable) = [2]>> then\n    if <(block) = [1]> then\n        if <<<<<touching (basic block v)?> or <touching (_edge_ v)?>> or <<<touching (jump block v)?> or <touching (jump block2 v)?>> or <<touching (pulldown block v)?> or <touching (pulldown block2 v)?>>>> or <touching (ice block v)?>> or <<touching (cannon v)?> or <<<touching (right conveyor v)?> or <touching (left conveyor v)?>> or <<touching (moving block v)?> or <<touching (slope block v)?> or <<touching (blue door v)?> or <<touching (green door v)?> or <<touching (orange door v)?> or <<touching (yellow door v)?> or <<touching (laser spike block v)?> or <touching (one-way block v)?>>>>>>>>>>> then\n            if <touching (laser spike block v)?> then\n                if <touching color (#808080)?> then\n                    set [<collision?> v] to [1]\n                end\n            else\n                set [<collision?> v] to [1]\n            end\n        end\n    else\n        if <(block) = [2]> then\n            if <<<touching (red block v)?> or <touching (spike v)?>> or <<touching (cannon shot v)?> or <<<touching (enemy v)?> and <(item (3) of [level settings v]) = [0]>> or <touching (laser spike block v)?>>>> then\n                if <touching (laser spike block v)?> then\n                    if <<touching color (#ff0000)?> or <touching color (#ffc0c0)?>> then\n                        set [<collision?> v] to [1]\n                    end\n                else\n                    set [<collision?> v] to [1]\n                end\n            else\n                if <touching (finish block v)?> then\n                    set [<collision?> v] to [2]\n                end\n            end\n        else\n            if <(block) = [3]> then\n                if <touching (gravity switch v)?> then\n                    set [<collision?> v] to [1]\n                end\n            else\n                if <(block) = [4]> then\n                    if <touching (checkpoint v)?> then\n                        if <touching color (#d8c8a6)?> then\n                            set [<collision?> v] to [1]\n                        end\n                    end\n                else\n                    if <(block) = [5]> then\n                        if <touching (teleportal v)?> then\n                            set [<collision?> v] to [1]\n                        end\n                    else\n                        if <(block) = [6]> then\n                            if <touching (gravity block v)?> then\n                                set [<collision?> v] to [1]\n                            end\n                        else\n                            if <(block) = [7]> then\n                                if <touching (ice block v)?> then\n                                    set [<collision?> v] to [1]\n                                end\n                            else\n                                if <(block) = [8]> then\n                                    if <touching (left conveyor v)?> then\n                                        set [<collision?> v] to [1]\n                                    end\n                                else\n                                    if <(block) = [9]> then\n                                        if <touching (right conveyor v)?> then\n                                            set [<collision?> v] to [1]\n                                        end\n                                    else\n                                        if <(block) = [10]> then\n                                            if <<not <<<touching (pulldown block v)?> and <(Gravity Dir.) = [1]>> or <<touching (pulldown block2 v)?> and <(Gravity Dir.) = [-1]>>>> and <<<<<touching (basic block v)?> or <touching (_edge_ v)?>> or <<<touching (jump block v)?> or <touching (jump block2 v)?>> or <<touching (pulldown block v)?> or <touching (pulldown block2 v)?>>>> or <touching (ice block v)?>> or <<touching (cannon v)?> or <<<touching (right conveyor v)?> or <touching (left conveyor v)?>> or <<touching (moving block v)?> or <<touching (slope block v)?> or <<touching (blue door v)?> or <<touching (green door v)?> or <<touching (orange door v)?> or <<touching (yellow door v)?> or <<<touching (laser spike block v)?> and <not <<touching color (#ff0000)?> or <touching color (#ffc0c0)?>>>> or <touching (one-way block v)?>>>>>>>>>>>> then\n                                                set [<collision?> v] to [1]\n                                            end\n                                        else\n                                            if <(block) = [11]> then\n                                                if <<<touching (jump block v)?> and <(Gravity Dir.) = [1]>> or <<touching (jump block2 v)?> and <(Gravity Dir.) = [-1]>>> then\n                                                    set [<collision?> v] to [1]\n                                                end\n                                            else\n                                                if <(block) = [12]> then\n                                                    if <touching (blue button v)?> then\n                                                        set [<collision?> v] to [Blue]\n                                                    else\n                                                        if <touching (green button v)?> then\n                                                            set [<collision?> v] to [Green]\n                                                        else\n                                                            if <touching (orange button v)?> then\n                                                                set [<collision?> v] to [Red]\n                                                            else\n                                                                if <touching (yellow button v)?> then\n                                                                    set [<collision?> v] to [Yellow]\n                                                                end\n                                                            end\n                                                        end\n                                                    end\n                                                else\n                                                    if <(block) = [13]> then\n                                                        if <touching (enemy v)?> then\n                                                            if <touching color (#ff9999)?> then\n                                                                set [<collision?> v] to [1]\n                                                            end\n                                                        end\n                                                    else\n                                                        if <(block) = [14]> then\n                                                            if <touching (water block v)?> then\n                                                                set [<collision?> v] to [1]\n                                                            end\n                                                        else\n                                                            if <(block) = [15]> then\n                                                                if <touching (laser spike block v)?> then\n                                                                    if <<touching color (#ff0000)?> or <touching color (#ffc0c0)?>> then\n                                                                        set [<collision?> v] to [1]\n                                                                    end\n                                                                end\n                                                            else\n                                                            end\n                                                        end\n                                                    end\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [somersault v]\nwait (0) seconds\nset [loopcounter v] to [0]\nrepeat until <<<(xv) = [0]> or <(yv) = [0]>> or <<(LoopCounter) = [21]> or <(<Collision?>) = [1]>>>\n    wait until <(PAUSE) = [0]>\n    change [loopcounter v] by (1)\n    if <((xv) * (Gravity Dir.)) < [0]> then\n        turn left (17.1) degrees\n    else\n        turn left (-17.1) degrees\n    end\n    Check Collision (1)\nend\npoint in direction ((90) * (Gravity Dir.))\nCheck Collision (1)\nif <(<Collision?>) = [1]> then\n    repeat until <not <(<Collision?>) = [1]>>\n        wait until <(PAUSE) = [0]>\n        point in direction ((90) * (Gravity Dir.))\n        change y by (((yv) + (0.5)) * (-1.5))\n        change x by (((xv) + (0.5)) * (-1.5))\n        Check Collision (1)\n    end\nend\nset [loopcounter v] to [0]\n\ndefine None\nset [telecounter v] to [1]\nif <<(item (TeleCounter) of [teleportals v]) = (x)> and <(item ((TeleCounter) + (1)) of [teleportals v]) = (y)>> then\nelse\n    repeat until <<((TeleCounter) + (1)) > (length of [teleportals v])> or <<(item (TeleCounter) of [teleportals v]) = (x)> and <(item ((TeleCounter) + (1)) of [teleportals v]) = (y)>>>\n        change [telecounter v] by (2)\n    end\n    if <((TeleCounter) + (1)) > (length of [teleportals v])> then\n        set [telecounter v] to [0]\n    end\nend\n\ndefine Transform Character\nif <(yv) < [3]> then\n    change y by ((-1) * (Gravity Dir.))\n    Check Collision (1)\n    if <not <(<Collision?>) = [1]>> then\n        if <(water?) = [1]> then\n            change [yv v] by ((Gravity) * (0.2))\n        else\n            change [yv v] by (Gravity)\n        end\n    end\n    Check Collision (7)\n    if <(<Collision?>) = [1]> then\n        set [ice? v] to [1]\n    else\n        set [ice? v] to [0]\n    end\n    Check Collision (8)\n    if <(<Collision?>) = [1]> then\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            change [xv v] by (-0.9)\n        else\n            change [xv v] by (-1.5)\n        end\n    end\n    Check Collision (9)\n    if <(<Collision?>) = [1]> then\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            change [xv v] by (0.9)\n        else\n            change [xv v] by (1.5)\n        end\n    end\n    change y by ((1) * (Gravity Dir.))\nend\nif <(water?) = [1]> then\n    set [xv v] to ((xv) * (0.7))\nelse\n    if <(Ice?) = [1]> then\n        set [xv v] to ((xv) * (0.97))\n    else\n        set [xv v] to ((xv) * (0.84))\n    end\nend\nchange x by ((xv) * (Speed))\nCheck Collision (1)\nif <(<Collision?>) = [1]> then\n    change y by (([abs v] of ((([abs v] of (xv) ) / ((xv) + (0.0001))) + (xv)) ) * (Gravity Dir.))\n    Check Collision (1)\n    if <(<Collision?>) = [1]> then\n        point in direction ((90) * (Gravity Dir.))\n        change y by ((([abs v] of ((([abs v] of (xv) ) / ((xv) + (0.0001))) + (xv)) ) * (-1)) * (Gravity Dir.))\n        change x by (((xv) * (-1)) * (Speed))\n        set [xv v] to [0]\n    end\nend\nif <(length of (xv)) > [20]> then\n    set [xv v] to [0]\nend\nset [yv v] to ((yv) * (0.9))\nchange y by ((yv) * (Gravity Dir.))\nCheck Collision (1)\nif <(<Collision?>) = [1]> then\n    change y by (((yv) * (-1)) * (Gravity Dir.))\n    set [yv v] to [0]\nend\nCheck Collision (1)\nif <(<Collision?>) = [1]> then\n    go to x: (item (1) of [latest position x/y v]) y: (item (2) of [latest position x/y v])\nelse\n    if <<(([abs v] of (xv) ) + ([abs v] of (yv) )) = [0]> and <(<Collision?>) = [1]>> then\n        go to x: (((round (((x position) + (12)) / (24))) * (24)) - (12)) y: ((round ((y position) / (24))) * (24))\n    end\n    delete (all) of [latest position x/y v]\n    add (x position) to [latest position x/y v]\n    add (y position) to [latest position x/y v]\nend\n\nwhen I receive [main menu v]\nhide\nswitch costume to (#Character)\ngo to x: (0) y: (-20)\nstop [other scripts in sprite v]\npoint in direction (180)\nhide\nset size to (0) %\nwait (0.25) seconds\nshow\nrepeat (5)\n    change size by (((1000) - (size)) / (3))\n    turn right (((90) - (direction)) / (2.5)) degrees\nend\nset [animation counter v] to [0]\nrepeat until <(Switch to Game) = [1]>\n    if <<<touching (mouse-pointer v)?> and <mouse down?>> and <not <<([costume # v] of [levels button v]) > [1]> or <([costume # v] of [leader board button v]) = [2]>>>> then\n        repeat (5)\n            change size by (((0) - (size)) / (3))\n            turn left (((-90) - (direction)) / (2.5)) degrees\n        end\n        if <(#Character) < (#n of characters)> then\n            change [#character v] by (1)\n        else\n            set [#character v] to [1]\n        end\n        set size to (0) %\n        point in direction (180)\n        hide\n        switch costume to (#Character)\n        set [animation counter v] to [0]\n        show\n        repeat (5)\n            change size by (((1000) - (size)) / (3))\n            turn right (((90) - (direction)) / (2.5)) degrees\n        end\n    end\n    point in direction ((90) - (([sin v] of ((Animation Counter) * (8)) ) * (20)))\n    set size to ((825) + (([cos v] of ((Animation Counter) * (12)) ) * (65))) %\n    change [animation counter v] by (1)\nend\nrepeat (3)\n    point in direction ((90) - (([sin v] of ((Animation Counter) * (8)) ) * (20)))\n    change size by (((1150) - (size)) / (2))\n    change [animation counter v] by (1)\nend\nrepeat (2)\n    change size by (((0) - (size)) / (5))\n    turn left (((-90) - (direction)) / (100)) degrees\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen I receive [initiate playmode v]\nset [xv v] to [0]\nset [yv v] to [0]\nset [gravity dir. v] to (item (3) of [character spawn x/y v])\nset [disable v] to [0]\nset [restart v] to [0]\nset [<collision?> v] to [0]\ndelete (all) of [doors open/close v]\nadd [-] to [doors open/close v]\nadd [-] to [doors open/close v]\nadd [-] to [doors open/close v]\nadd [-] to [doors open/close v]\nreplace item (1) of [doors open/close v] with [Blue Door \[CLOSE\]]\nreplace item (2) of [doors open/close v] with [Green Door \[CLOSE\]]\nreplace item (3) of [doors open/close v] with [Red Door \[CLOSE\]]\nreplace item (4) of [doors open/close v] with [Yellow Door \[CLOSE\]]\ndelete (all) of [checkpoint x/y v]\nset size to (100) %\npoint in direction ((90) * (item (3) of [character spawn x/y v]))\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nset [play v] to [1]\nwait until <(PLAY) = [1]>\nclear graphic effects\ngo to [front v] layer\nrepeat until <(PLAY) = [0]>\n    if <(Disable) = [0]> then\n        if <key (r v) pressed?> then\n            broadcast (Restart v)\n            wait until <not <key (r v) pressed?>>\n        end\n        if <(PAUSE) = [0]> then\n            Character Physics (Disable)\n        end\n    else\n        if <<(Disable) = [1]> or <(Disable) = [0.5]>> then\n            repeat until <<<<(RESTART) > [0]> or <<<<touching (red block v)?> or <touching (spike v)?>> or <<touching (cannon shot v)?> or <<touching (enemy v)?> and <(item (3) of [level settings v]) = [0]>>>> or <<key (r v) pressed?> or <(PLAY) = [0]>>>> or <<(Disable) = [0.5]> and <not <touching (gravity switch v)?>>>> or <<<(Disable) = [1]> and <(length of [teleportals v]) > [2]>> and <not <<<((((TeleCounter) + (1)) / (2)) mod (2)) = [1]> and <<(item ((TeleCounter) + (2)) of [teleportals v]) = (((24) * (round (((x position) - (12)) / (24)))) + (12))> and <(item ((TeleCounter) + (3)) of [teleportals v]) = (((24) * (round (((y position) - (0)) / (24)))) + (0))>>> or <<((((TeleCounter) + (1)) / (2)) mod (2)) = [0]> and <<(item ((TeleCounter) - (2)) of [teleportals v]) = (((24) * (round (((x position) - (12)) / (24)))) + (12))> and <(item ((TeleCounter) - (1)) of [teleportals v]) = (((24) * (round (((y position) - (0)) / (24)))) + (0))>>>>>>>\n                if <(PAUSE) = [0]> then\n                    Character Physics (Disable)\n                end\n            end\n            if <<(RESTART) > [0]> or <<<<touching (red block v)?> or <touching (spike v)?>> or <<touching (cannon shot v)?> or <<touching (enemy v)?> and <(item (3) of [level settings v]) = [0]>>>> or <<key (r v) pressed?> or <(PLAY) = [0]>>>> then\n                broadcast (Restart v)\n            end\n            set [disable v] to [0]\n        else\n            if <<(Disable) = [2]> or <(Disable) = [3]>> then\n                if <(Disable) = [2]> then\n                    if <(yv) < [0]> then\n                        set [yv v] to ((yv) * (-0.5))\n                    else\n                        set [xv v] to ((xv) * (-0.5))\n                        if <(yv) > [0]> then\n                            set [yv v] to ((yv) * (-0.1))\n                        end\n                    end\n                    repeat (10)\n                        Character Physics (Disable)\n                        change [ghost v] effect by (10)\n                        turn right ((([abs v] of (xv) ) * (2)) * ((xv) / ([abs v] of (xv) ))) degrees\n                    end\n                else\n                    set [c1 v] to [5]\n                    repeat (30)\n                        change [c1 v] by (1)\n                        change size by (C1)\n                        change [ghost v] effect by (4)\n                        turn right ((C1) * ((xv) / ([abs v] of (xv) ))) degrees\n                    end\n                    set size to (100) %\n                    hide\n                    clear graphic effects\n                    change [#level v] by (1)\n                    broadcast (Next Level v)\n                    stop [this script v]\n                end\n                broadcast (Restart v)\n                repeat (10)\n                    change [ghost v] effect by (-10)\n                end\n                set [disable v] to [0]\n            end\n        end\n    end\nend\n\nwhen I receive [restart v]\nchange [mydeaths v] by (1)\nif <(item (1) of [level settings v]) = [1]> then\n    replace item (1) of [doors open/close v] with [Blue Door \[CLOSE\]]\n    replace item (2) of [doors open/close v] with [Green Door \[CLOSE\]]\n    replace item (3) of [doors open/close v] with [Red Door \[CLOSE\]]\n    replace item (4) of [doors open/close v] with [Yellow Door \[CLOSE\]]\nend\nif <(length of [checkpoint x/y v]) > [0]> then\n    go to x: (item (1) of [checkpoint x/y v]) y: (item (2) of [checkpoint x/y v])\n    if <(item (2) of [level settings v]) = [1]> then\n        set [gravity dir. v] to (item (3) of [checkpoint x/y v])\n        if <not <(direction) = (item (3) of [checkpoint x/y v])>> then\n            point in direction ((90) * (item (3) of [checkpoint x/y v]))\n        end\n    else\n        if <not <(direction) = ((Gravity Dir.) * (90))>> then\n            point in direction ((Gravity Dir.) * (90))\n        end\n    end\nelse\n    go to x: (item (1) of [character spawn x/y v]) y: (item (2) of [character spawn x/y v])\n    set [gravity dir. v] to (item (3) of [character spawn x/y v])\n    if <not <(direction) = (item (3) of [character spawn x/y v])>> then\n        point in direction ((90) * (item (3) of [character spawn x/y v]))\n    end\nend\nset [restart v] to [0]\nset [<collision?> v] to [0]\nset [xv v] to [0]\nset [yv v] to [0]\ngo to [front v] layer\n\nwhen I receive [win screen v]\nif <(Skipped?) = [0]> then\n    set size to (500) %\n    clear graphic effects\n    go to x: (0) y: (-60)\n    point in direction (90)\n    show\n    repeat until \n        point in direction ((90) + (([sin v] of ((timer) * (400)) ) * (10)))\n        set size to ((450) + (([sin v] of ((timer) * (350)) ) * (40))) %\n    end\nend\n\nwhen flag clicked\nhide\n\n@Shadow\n\nwhen I receive [main menu v]\ngo to x: (0) y: (-20)\nhide\ngo [backward v] (999) layers\nswitch costume to (#Character)\nset [#clone v] to [0]\nrepeat (5)\n    change [#clone v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nset [ghost v] effect to (100)\nwait (0.15) seconds\nshow\nrepeat (5)\n    change size by (((1000) - (size)) / (3))\n    turn right (((90) - (direction)) / (2.5)) degrees\nend\nset [animation counter v] to [0]\nrepeat until <(Switch to Game) = [1]>\n    point in direction ((([direction v] of [character v]) + ((#Clone) * (2.5))) / (#Clone))\n    set size to (([size v] of [character v]) + (100)) %\n    set [ghost v] effect to ((([size v] of [character v]) / (12)) + ((#Clone) * (5)))\n    switch costume to (#Character)\nend\nwait ((#Clone) / (24)) seconds\nrepeat (10)\n    change size by (((0) - (size)) / (3))\n    turn right (((90) - (direction)) / (2.5)) degrees\nend\nhide\n\nwhen flag clicked\nhide\n\n@Save/Load engine\n\nwhen I receive [next level v]\nset [loaded v] to [LOADING]\nset [play v] to [0]\nif <(#Level) > [15]> then\n    set [mytime v] to (round ((timer) - (Total Pause Time)))\n    wait (0.8) seconds\n    broadcast (WIN SCREEN v)\n    if <(Skipped?) = [0]> then\n        switch backdrop to (win screen v)\n    else\n        switch backdrop to (win screen2 v)\n    end\n    broadcast (Clear Vector v) and wait\n    set [#background v] to [0]\nelse\n    wait until <not <(Fade) = [1]>>\n    wait until <(Fade) = [1]>\n    Load Level from (item (#Level) of [levels v])\n    broadcast (Update Level Settings v)\n    broadcast (Update Character Physics v)\n    broadcast (Clear Vector v) and wait\n    broadcast (Build Level v) and wait\nend\nset [loaded v] to [DONE]\n\ndefine Load Level from []\nif <<(letter (1) of (code)) = [{]> and <(letter (length of (code)) of (code)) = [}]>> then\n    set [c1 v] to (length of (code))\n    repeat (length of (code))\n        change [c1 v] by (-1)\n        if <(letter (C1) of (code)) = [:]> then\n            set [v1 v] to [H]\n        end\n        if <(letter (C1) of (code)) = [;]> then\n            set [v1 v] to [V]\n        end\n    end\n    delete (all) of [placed blocks x/y v]\n    delete (all) of [blocks-x v]\n    delete (all) of [blocks-y v]\n    delete (all) of [costume v]\n    delete (all) of [teleportals v]\n    delete (all) of [teleportal order v]\n    if <(V1) = [H]> then\n        delete (all) of [character spawn x/y v]\n        set [c1 v] to [2]\n        if <(letter (2) of (code)) = [D]> then\n            add [-12] to [character spawn x/y v]\n            add [0] to [character spawn x/y v]\n        else\n            set [v1 v] to []\n            repeat (letter (2) of (code))\n                change [c1 v] by (1)\n                set [v1 v] to (join (V1) (letter (C1) of (code)))\n            end\n            add (item (V1) of [all x v]) to [character spawn x/y v]\n            add (item (V1) of [all y v]) to [character spawn x/y v]\n        end\n        change [c1 v] by (1)\n        add (((2) * (letter (C1) of (code))) - (1)) to [character spawn x/y v]\n        change [c1 v] by (1)\n        replace item (2) of [level settings v] with (letter (1) of (item (letter (C1) of (code)) of [level settings combinations v]))\n        replace item (1) of [level settings v] with (letter (2) of (item (letter (C1) of (code)) of [level settings combinations v]))\n        replace item (3) of [level settings v] with (letter (3) of (item (letter (C1) of (code)) of [level settings combinations v]))\n        change [c1 v] by (1)\n        set [cannon fire rate v] to (letter (C1) of (code))\n        change [c1 v] by (1)\n        set [enemy speed v] to (letter (C1) of (code))\n        change [c1 v] by (1)\n        set [#background v] to (letter (C1) of (code))\n        change [c1 v] by (1)\n        set [jumpheight v] to ((letter (C1) of (code)) + (6))\n        change [c1 v] by (1)\n        set [gravity v] to (((letter (C1) of (code)) + (1)) / (-4))\n        change [c1 v] by (1)\n        set [speed v] to ((letter (C1) of (code)) / (5))\n        set [c2 v] to [0]\n        repeat until <(letter ((C1) + (1)) of (code)) = [:]>\n            change [c1 v] by (1)\n            if <((letter (C1) of (code)) / (1)) = (letter (C1) of (code))> then\n                set [v1 v] to (letter (C1) of (code))\n                repeat until <not <((letter ((C1) + (1)) of (code)) / (1)) = (letter ((C1) + (1)) of (code))>>\n                    change [c1 v] by (1)\n                    set [v1 v] to (join (V1) (letter (C1) of (code)))\n                end\n                change [c1 v] by (1)\n                repeat (V1)\n                    change [c2 v] by (1)\n                    if <not <(letter (C1) of (code)) = [.]>> then\n                        add (item (C2) of [all x/y v]) to [placed blocks x/y v]\n                        add (item (C2) of [all x v]) to [blocks-x v]\n                        add (item (C2) of [all y v]) to [blocks-y v]\n                        add (letter (C1) of (code)) to [costume v]\n                        if <(letter (C1) of (code)) = [M]> then\n                            add (item (C2) of [all x v]) to [teleportal order v]\n                            add (item (C2) of [all y v]) to [teleportal order v]\n                        end\n                    end\n                end\n            else\n                change [c2 v] by (1)\n                if <not <(letter (C1) of (code)) = [.]>> then\n                    add (item (C2) of [all x/y v]) to [placed blocks x/y v]\n                    add (item (C2) of [all x v]) to [blocks-x v]\n                    add (item (C2) of [all y v]) to [blocks-y v]\n                    add (letter (C1) of (code)) to [costume v]\n                    if <(letter (C1) of (code)) = [M]> then\n                        add (item (C2) of [all x v]) to [teleportal order v]\n                        add (item (C2) of [all y v]) to [teleportal order v]\n                    end\n                end\n            end\n        end\n    else\n        delete (all) of [character spawn x/y v]\n        set [c1 v] to [2]\n        if <(letter (2) of (code)) = [D]> then\n            add [-12] to [character spawn x/y v]\n            add [0] to [character spawn x/y v]\n        else\n            set [v1 v] to []\n            repeat (letter (2) of (code))\n                change [c1 v] by (1)\n                set [v1 v] to (join (V1) (letter (C1) of (code)))\n            end\n            add (item (V1) of [all x \(vertical\) v]) to [character spawn x/y v]\n            add (item (V1) of [all y \(vertical\) v]) to [character spawn x/y v]\n        end\n        change [c1 v] by (1)\n        add (((2) * (letter (C1) of (code))) - (1)) to [character spawn x/y v]\n        change [c1 v] by (1)\n        replace item (2) of [level settings v] with (letter (1) of (item (letter (C1) of (code)) of [level settings combinations v]))\n        replace item (1) of [level settings v] with (letter (2) of (item (letter (C1) of (code)) of [level settings combinations v]))\n        replace item (3) of [level settings v] with (letter (3) of (item (letter (C1) of (code)) of [level settings combinations v]))\n        change [c1 v] by (1)\n        set [cannon fire rate v] to (letter (C1) of (code))\n        change [c1 v] by (1)\n        set [enemy speed v] to (letter (C1) of (code))\n        change [c1 v] by (1)\n        set [#background v] to (letter (C1) of (code))\n        change [c1 v] by (1)\n        set [jumpheight v] to ((letter (C1) of (code)) + (6))\n        change [c1 v] by (1)\n        set [gravity v] to (((letter (C1) of (code)) + (1)) / (-4))\n        change [c1 v] by (1)\n        set [speed v] to ((letter (C1) of (code)) / (5))\n        set [c2 v] to [0]\n        repeat until <(letter ((C1) + (1)) of (code)) = [;]>\n            change [c1 v] by (1)\n            if <((letter (C1) of (code)) / (1)) = (letter (C1) of (code))> then\n                set [v1 v] to (letter (C1) of (code))\n                repeat until <not <((letter ((C1) + (1)) of (code)) / (1)) = (letter ((C1) + (1)) of (code))>>\n                    change [c1 v] by (1)\n                    set [v1 v] to (join (V1) (letter (C1) of (code)))\n                end\n                change [c1 v] by (1)\n                repeat (V1)\n                    change [c2 v] by (1)\n                    if <not <(letter (C1) of (code)) = [.]>> then\n                        add (item (C2) of [all x/y \(vertical\) v]) to [placed blocks x/y v]\n                        add (item (C2) of [all x \(vertical\) v]) to [blocks-x v]\n                        add (item (C2) of [all y \(vertical\) v]) to [blocks-y v]\n                        add (letter (C1) of (code)) to [costume v]\n                        if <(letter (C1) of (code)) = [M]> then\n                            add (item (C2) of [all x \(vertical\) v]) to [teleportal order v]\n                            add (item (C2) of [all y \(vertical\) v]) to [teleportal order v]\n                        end\n                    end\n                end\n            else\n                change [c2 v] by (1)\n                if <not <(letter (C1) of (code)) = [.]>> then\n                    add (item (C2) of [all x/y \(vertical\) v]) to [placed blocks x/y v]\n                    add (item (C2) of [all x \(vertical\) v]) to [blocks-x v]\n                    add (item (C2) of [all y \(vertical\) v]) to [blocks-y v]\n                    add (letter (C1) of (code)) to [costume v]\n                    if <(letter (C1) of (code)) = [M]> then\n                        add (item (C2) of [all x \(vertical\) v]) to [teleportal order v]\n                        add (item (C2) of [all y \(vertical\) v]) to [teleportal order v]\n                    end\n                end\n            end\n        end\n    end\n    if <(length of [teleportal order v]) > [0]> then\n        delete (all) of [teleportals v]\n        repeat (length of [teleportal order v])\n            add [N/A] to [teleportals v]\n        end\n        set [c2 v] to [0]\n        repeat ((length of [teleportal order v]) / (2))\n            change [c1 v] by (2)\n            change [c2 v] by (2)\n            if <(letter (C1) of (code)) = [1]> then\n                replace item (((2) * (letter ((C1) + (1)) of (code))) - (1)) of [teleportals v] with (item ((C2) - (1)) of [teleportal order v])\n                replace item ((2) * (letter ((C1) + (1)) of (code))) of [teleportals v] with (item (C2) of [teleportal order v])\n            else\n                if <(letter (C1) of (code)) = [2]> then\n                    replace item (((2) * (((letter ((C1) + (1)) of (code)) * (10)) + (letter ((C1) + (2)) of (code)))) - (1)) of [teleportals v] with (item ((C2) - (1)) of [teleportal order v])\n                    replace item ((2) * (((letter ((C1) + (1)) of (code)) * (10)) + (letter ((C1) + (2)) of (code)))) of [teleportals v] with (item (C2) of [teleportal order v])\n                    change [c1 v] by (1)\n                else\n                    if <(letter (C1) of (code)) = [3]> then\n                        replace item (((2) * (((letter ((C1) + (1)) of (code)) * (100)) + (((letter ((C1) + (2)) of (code)) * (10)) + (letter ((C1) + (3)) of (code))))) - (1)) of [teleportals v] with (item ((C2) - (1)) of [teleportal order v])\n                        replace item ((2) * (((letter ((C1) + (1)) of (code)) * (100)) + (((letter ((C1) + (2)) of (code)) * (10)) + (letter ((C1) + (3)) of (code))))) of [teleportals v] with (item (C2) of [teleportal order v])\n                        change [c1 v] by (2)\n                    end\n                end\n            end\n        end\n    end\nelse\nend\n\n@Basic Block\n\nwhen I receive [main menu v]\nhide\nbroadcast (Clear Vector v) and wait\nstop [other scripts in sprite v]\n\nwhen I receive [clear vector v]\ndelete this clone\n\ndefine None\nset size to (size) %\nif <not <(direction) = [90]>> then\n    point in direction (90)\nend\nset [c1 v] to [0]\nrepeat (length of [costume v])\n    change [c1 v] by (1)\n    if <(item (C1) of [costume v]) = [A]> then\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\ngo [backward v] (999) layers\nset [clonex v] to (x position)\nset [cloney v] to (y position)\nif <not <(size) = [100]>> then\n    set size to (100) %\nend\nshow\nwait until <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>\ndelete this clone\n\nwhen I receive [build level v]\nif <[costume v] contains [A]?> then\n    show\n    Build Level with size: (100) at X: (0) Y: (0)\n    hide\nend\n\n@Slope Block\n\nwhen I receive [main menu v]\nhide\nbroadcast (Clear Vector v) and wait\nstop [other scripts in sprite v]\n\nwhen I receive [build level v]\nif <<[costume v] contains [B]?> or <<[costume v] contains [!]?> or <<[costume v] contains [=]?> or <[costume v] contains [*]?>>>> then\n    show\n    Build Level with size: (100) at X: (0) Y: (0)\n    hide\nend\n\ndefine None\nset size to (size) %\nif <not <(direction) = [90]>> then\n    point in direction (90)\nend\nset [c1 v] to [0]\nrepeat (length of [costume v])\n    change [c1 v] by (1)\n    if <(item (C1) of [costume v]) = [B]> then\n        point in direction (90)\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\n    if <(item (C1) of [costume v]) = [!]> then\n        point in direction (180)\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\n    if <(item (C1) of [costume v]) = [=]> then\n        point in direction (-90)\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\n    if <(item (C1) of [costume v]) = [*]> then\n        point in direction (0)\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\ngo [backward v] (999) layers\nset [clonex v] to (x position)\nset [cloney v] to (y position)\nif <not <(size) = [100]>> then\n    set size to (100) %\nend\nshow\nwait until <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>\ndelete this clone\n\nwhen I receive [clear vector v]\ndelete this clone\n\n@Red Block\n\nwhen I receive [main menu v]\nhide\nbroadcast (Clear Vector v) and wait\nstop [other scripts in sprite v]\n\nwhen I receive [clear vector v]\ndelete this clone\n\nwhen I receive [build level v]\nif <[costume v] contains [C]?> then\n    show\n    Build Level with size: (100) at X: (0) Y: (0)\n    hide\nend\n\ndefine None\nset size to (size) %\nif <not <(direction) = [90]>> then\n    point in direction (90)\nend\nset [c1 v] to [0]\nrepeat (length of [costume v])\n    change [c1 v] by (1)\n    if <(item (C1) of [costume v]) = [C]> then\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\ngo [backward v] (999) layers\nset [clonex v] to (x position)\nset [cloney v] to (y position)\nif <not <(size) = [100]>> then\n    set size to (100) %\nend\nshow\nwait until <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>\ndelete this clone\n\n@Spike\n\nwhen I receive [main menu v]\nhide\nbroadcast (Clear Vector v) and wait\nstop [other scripts in sprite v]\n\nwhen I receive [clear vector v]\ndelete this clone\n\nwhen I receive [build level v]\nif <<[costume v] contains [D]?> or <<[costume v] contains [€]?> or <<[costume v] contains [#]?> or <[costume v] contains ["]?>>>> then\n    show\n    Build Level with size: (100) at X: (0) Y: (0)\n    hide\nend\n\ndefine None\nset size to (size) %\nif <not <(direction) = [90]>> then\n    point in direction (90)\nend\nset [c1 v] to [0]\nrepeat (length of [costume v])\n    change [c1 v] by (1)\n    if <(item (C1) of [costume v]) = [D]> then\n        point in direction (90)\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\n    if <(item (C1) of [costume v]) = [€]> then\n        point in direction (180)\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\n    if <(item (C1) of [costume v]) = [#]> then\n        point in direction (-90)\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\n    if <(item (C1) of [costume v]) = ["]> then\n        point in direction (0)\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\ngo [backward v] (999) layers\nset [clonex v] to (x position)\nset [cloney v] to (y position)\nif <not <(size) = [100]>> then\n    set size to (100) %\nend\nshow\nwait until <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>\ndelete this clone\n\n@Gravity Block\n\nwhen I receive [main menu v]\nhide\nbroadcast (Clear Vector v) and wait\nstop [other scripts in sprite v]\n\nwhen I receive [clear vector v]\ndelete this clone\n\nwhen I receive [build level v]\nif <[costume v] contains [E]?> then\n    show\n    Build Level with size: (100) at X: (0) Y: (0)\n    hide\nend\n\ndefine None\nset size to (size) %\nif <not <(direction) = [90]>> then\n    point in direction (90)\nend\nset [c1 v] to [0]\nrepeat (length of [costume v])\n    change [c1 v] by (1)\n    if <(item (C1) of [costume v]) = [E]> then\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\ngo [backward v] (999) layers\nset [clonex v] to (x position)\nset [cloney v] to (y position)\nif <not <(size) = [100]>> then\n    set size to (100) %\nend\nshow\nwait until <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>\ndelete this clone\n\n@Water Block\n\nwhen I receive [main menu v]\nhide\nbroadcast (Clear Vector v) and wait\nstop [other scripts in sprite v]\n\nwhen I receive [clear vector v]\ndelete this clone\n\nwhen I receive [build level v]\nif <[costume v] contains [>]?> then\n    show\n    Build Level with size: (100) at X: (0) Y: (0)\n    hide\nend\n\ndefine None\nset size to (size) %\nif <not <(direction) = [90]>> then\n    point in direction (90)\nend\nset [c1 v] to [0]\nrepeat (length of [costume v])\n    change [c1 v] by (1)\n    if <(item (C1) of [costume v]) = [>]> then\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\ngo [backward v] (999) layers\nset [clonex v] to (x position)\nset [cloney v] to (y position)\nif <not <(size) = [100]>> then\n    set size to (100) %\nend\nshow\nwait until <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>\ndelete this clone\n\n@Ice Block\n\nwhen I receive [main menu v]\nhide\nbroadcast (Clear Vector v) and wait\nstop [other scripts in sprite v]\n\nwhen I receive [clear vector v]\ndelete this clone\n\nwhen I receive [build level v]\nif <[costume v] contains [F]?> then\n    show\n    Build Level with size: (100) at X: (0) Y: (0)\n    hide\nend\n\ndefine None\nset size to (size) %\nif <not <(direction) = [90]>> then\n    point in direction (90)\nend\nset [c1 v] to [0]\nrepeat (length of [costume v])\n    change [c1 v] by (1)\n    if <(item (C1) of [costume v]) = [F]> then\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\ngo [backward v] (999) layers\nset [clonex v] to (x position)\nset [cloney v] to (y position)\nif <not <(size) = [100]>> then\n    set size to (100) %\nend\nshow\nwait until <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>\ndelete this clone\n\n@Pulldown Block\n\nwhen I receive [main menu v]\nhide\nbroadcast (Clear Vector v) and wait\nstop [other scripts in sprite v]\n\nwhen I receive [clear vector v]\ndelete this clone\n\nwhen I receive [build level v]\nif <[costume v] contains [G]?> then\n    show\n    Build Level with size: (100) at X: (0) Y: (0)\n    hide\nend\n\ndefine None\nset size to (size) %\nif <not <(direction) = [90]>> then\n    point in direction (90)\nend\nset [c1 v] to [0]\nrepeat (length of [costume v])\n    change [c1 v] by (1)\n    if <(item (C1) of [costume v]) = [G]> then\n        point in direction (90)\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\n    if <(item (C1) of [costume v]) = [%]> then\n        point in direction (-90)\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\ngo [backward v] (999) layers\nset [clonex v] to (x position)\nset [cloney v] to (y position)\nif <not <(size) = [100]>> then\n    set size to (100) %\nend\nshow\nwait until <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>\ndelete this clone\n\n@Pulldown Block2\n\nwhen I receive [main menu v]\nhide\nbroadcast (Clear Vector v) and wait\nstop [other scripts in sprite v]\n\nwhen I receive [clear vector v]\ndelete this clone\n\nwhen I receive [build level v]\nif <[costume v] contains [%]?> then\n    show\n    Build Level with size: (100) at X: (0) Y: (0)\n    hide\nend\n\ndefine None\nset size to (size) %\nif <not <(direction) = [90]>> then\n    point in direction (90)\nend\nset [c1 v] to [0]\nrepeat (length of [costume v])\n    change [c1 v] by (1)\n    if <(item (C1) of [costume v]) = [G]> then\n        point in direction (90)\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\n    if <(item (C1) of [costume v]) = [%]> then\n        point in direction (-90)\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\ngo [backward v] (999) layers\nset [clonex v] to (x position)\nset [cloney v] to (y position)\nif <not <(size) = [100]>> then\n    set size to (100) %\nend\nshow\nwait until <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>\ndelete this clone\n\n@Jump Block\n\nwhen I receive [main menu v]\nhide\nbroadcast (Clear Vector v) and wait\nstop [other scripts in sprite v]\n\nwhen I receive [clear vector v]\ndelete this clone\n\nwhen I receive [build level v]\nif <[costume v] contains [H]?> then\n    show\n    Build Level with size: (100) at X: (0) Y: (0)\n    hide\nend\n\nwhen I start as a clone\ngo [backward v] (999) layers\nset [clonex v] to (x position)\nset [cloney v] to (y position)\nif <not <(size) = [100]>> then\n    set size to (100) %\nend\nshow\nwait until <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>\ndelete this clone\n\ndefine None\nset size to (size) %\nif <not <(direction) = [90]>> then\n    point in direction (90)\nend\nset [c1 v] to [0]\nrepeat (length of [costume v])\n    change [c1 v] by (1)\n    if <(item (C1) of [costume v]) = [H]> then\n        point in direction (90)\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\n    if <(item (C1) of [costume v]) = [&]> then\n        point in direction (-90)\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\nend\n\n@Jump Block2\n\nwhen I receive [main menu v]\nhide\nbroadcast (Clear Vector v) and wait\nstop [other scripts in sprite v]\n\nwhen I receive [clear vector v]\ndelete this clone\n\nwhen I receive [build level v]\nif <[costume v] contains [&]?> then\n    show\n    Build Level with size: (100) at X: (0) Y: (0)\n    hide\nend\n\ndefine None\nset size to (size) %\nif <not <(direction) = [90]>> then\n    point in direction (90)\nend\nset [c1 v] to [0]\nrepeat (length of [costume v])\n    change [c1 v] by (1)\n    if <(item (C1) of [costume v]) = [H]> then\n        point in direction (90)\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\n    if <(item (C1) of [costume v]) = [&]> then\n        point in direction (-90)\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\ngo [backward v] (999) layers\nset [clonex v] to (x position)\nset [cloney v] to (y position)\nif <not <(size) = [100]>> then\n    set size to (100) %\nend\nshow\nwait until <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>\ndelete this clone\n\n@Right Conveyor\n\nwhen I receive [main menu v]\nhide\nbroadcast (Clear Vector v) and wait\nstop [other scripts in sprite v]\n\nwhen I receive [clear vector v]\ndelete this clone\n\nwhen I receive [build level v]\nif <[costume v] contains [I]?> then\n    show\n    Build Level with size: (100) at X: (0) Y: (0)\n    hide\nend\n\ndefine None\nset size to (size) %\nif <not <(direction) = [90]>> then\n    point in direction (90)\nend\nset [c1 v] to [0]\nrepeat (length of [costume v])\n    change [c1 v] by (1)\n    if <(item (C1) of [costume v]) = [I]> then\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\ngo [backward v] (999) layers\nset [clonex v] to (x position)\nset [cloney v] to (y position)\nif <not <(size) = [100]>> then\n    set size to (100) %\nend\nshow\nwait until <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>\ndelete this clone\n\n@Left Conveyor\n\nwhen I receive [main menu v]\nhide\nbroadcast (Clear Vector v) and wait\nstop [other scripts in sprite v]\n\nwhen I receive [clear vector v]\ndelete this clone\n\nwhen I receive [build level v]\nif <[costume v] contains [J]?> then\n    show\n    Build Level with size: (100) at X: (0) Y: (0)\n    hide\nend\n\ndefine None\nset size to (size) %\nif <not <(direction) = [90]>> then\n    point in direction (90)\nend\nset [c1 v] to [0]\nrepeat (length of [costume v])\n    change [c1 v] by (1)\n    if <(item (C1) of [costume v]) = [J]> then\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\ngo [backward v] (999) layers\nset [clonex v] to (x position)\nset [cloney v] to (y position)\nif <not <(size) = [100]>> then\n    set size to (100) %\nend\nshow\nwait until <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>\ndelete this clone\n\n@Checkpoint\n\nwhen I receive [main menu v]\nhide\nbroadcast (Clear Vector v) and wait\nstop [other scripts in sprite v]\n\nwhen I receive [clear vector v]\ndelete this clone\n\nwhen I receive [build level v]\nif <[costume v] contains [K]?> then\n    show\n    Build Level with size: (100) at X: (0) Y: (0)\n    hide\nend\n\ndefine None\nset size to (size) %\nif <not <(direction) = [90]>> then\n    point in direction (90)\nend\nset [c1 v] to [0]\nrepeat (length of [costume v])\n    change [c1 v] by (1)\n    if <(item (C1) of [costume v]) = [K]> then\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\ngo [backward v] (999) layers\nset [clonex v] to (x position)\nset [cloney v] to (y position)\nif <not <(size) = [100]>> then\n    set size to (100) %\nend\nshow\nwait until <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>\ndelete this clone\n\n@Gravity Switch\n\nwhen I receive [main menu v]\nhide\nbroadcast (Clear Vector v) and wait\nstop [other scripts in sprite v]\n\nwhen I receive [clear vector v]\ndelete this clone\n\nwhen I receive [build level v]\nif <[costume v] contains [L]?> then\n    show\n    Build Level with size: (100) at X: (0) Y: (0)\n    hide\nend\n\ndefine None\nset size to (size) %\nif <not <(direction) = [90]>> then\n    point in direction (90)\nend\nset [c1 v] to [0]\nrepeat (length of [costume v])\n    change [c1 v] by (1)\n    if <(item (C1) of [costume v]) = [L]> then\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\ngo [backward v] (999) layers\nset [clonex v] to (x position)\nset [cloney v] to (y position)\nif <not <(size) = [100]>> then\n    set size to (100) %\nend\nshow\nwait until <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>\ndelete this clone\n\n@Teleportal\n\nwhen I receive [main menu v]\nhide\nbroadcast (Clear Vector v) and wait\nstop [other scripts in sprite v]\n\nwhen I receive [clear vector v]\ndelete this clone\n\nwhen I receive [build level v]\nif <[costume v] contains [M]?> then\n    show\n    Build Level with size: (100) at X: (0) Y: (0)\n    hide\nend\n\ndefine None\nset size to (size) %\nif <not <(direction) = [90]>> then\n    point in direction (90)\nend\nset [c1 v] to [0]\nrepeat (length of [costume v])\n    change [c1 v] by (1)\n    if <(item (C1) of [costume v]) = [M]> then\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\ngo [backward v] (999) layers\nset [clonex v] to (x position)\nset [cloney v] to (y position)\nif <not <(size) = [100]>> then\n    set size to (100) %\nend\nshow\nwait until <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>\ndelete this clone\n\n@Finish Block\n\nwhen I receive [main menu v]\nhide\nbroadcast (Clear Vector v) and wait\nstop [other scripts in sprite v]\n\nwhen I receive [clear vector v]\ndelete this clone\n\nwhen I receive [build level v]\nif <[costume v] contains [N]?> then\n    show\n    Build Level with size: (100) at X: (0) Y: (0)\n    hide\nend\n\ndefine None\nset size to (size) %\nif <not <(direction) = [90]>> then\n    point in direction (90)\nend\nset [c1 v] to [0]\nrepeat (length of [costume v])\n    change [c1 v] by (1)\n    if <(item (C1) of [costume v]) = [N]> then\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\ngo [backward v] (999) layers\nset [clonex v] to (x position)\nset [cloney v] to (y position)\nif <not <(size) = [100]>> then\n    set size to (100) %\nend\nshow\nwait until <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>\ndelete this clone\n\n@Blue Button\n\nwhen I receive [main menu v]\nhide\nbroadcast (Clear Vector v) and wait\nstop [other scripts in sprite v]\n\nwhen I receive [clear vector v]\ndelete this clone\n\nwhen I receive [build level v]\nif <[costume v] contains [O]?> then\n    show\n    Build Level with size: (100) at X: (0) Y: (0)\n    hide\nend\n\ndefine None\nset size to (size) %\nif <not <(direction) = [90]>> then\n    point in direction (90)\nend\nset [c1 v] to [0]\nrepeat (length of [costume v])\n    change [c1 v] by (1)\n    if <(item (C1) of [costume v]) = [O]> then\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\ngo [backward v] (999) layers\nset [clonex v] to (x position)\nset [cloney v] to (y position)\nif <not <(size) = [100]>> then\n    set size to (100) %\nend\nshow\nwait until <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>\ndelete this clone\n\n@Green Button\n\nwhen I receive [main menu v]\nhide\nbroadcast (Clear Vector v) and wait\nstop [other scripts in sprite v]\n\nwhen I receive [clear vector v]\ndelete this clone\n\nwhen I receive [build level v]\nif <[costume v] contains [P]?> then\n    show\n    Build Level with size: (100) at X: (0) Y: (0)\n    hide\nend\n\ndefine None\nset size to (size) %\nif <not <(direction) = [90]>> then\n    point in direction (90)\nend\nset [c1 v] to [0]\nrepeat (length of [costume v])\n    change [c1 v] by (1)\n    if <(item (C1) of [costume v]) = [P]> then\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\ngo [backward v] (999) layers\nset [clonex v] to (x position)\nset [cloney v] to (y position)\nif <not <(size) = [100]>> then\n    set size to (100) %\nend\nshow\nwait until <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>\ndelete this clone\n\n@Orange Button\n\nwhen I receive [main menu v]\nhide\nbroadcast (Clear Vector v) and wait\nstop [other scripts in sprite v]\n\nwhen I receive [clear vector v]\ndelete this clone\n\nwhen I receive [build level v]\nif <[costume v] contains [Q]?> then\n    show\n    Build Level with size: (100) at X: (0) Y: (0)\n    hide\nend\n\ndefine None\nset size to (size) %\nif <not <(direction) = [90]>> then\n    point in direction (90)\nend\nset [c1 v] to [0]\nrepeat (length of [costume v])\n    change [c1 v] by (1)\n    if <(item (C1) of [costume v]) = [Q]> then\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\ngo [backward v] (999) layers\nset [clonex v] to (x position)\nset [cloney v] to (y position)\nif <not <(size) = [100]>> then\n    set size to (100) %\nend\nshow\nwait until <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>\ndelete this clone\n\n@Yellow Button\n\nwhen I receive [main menu v]\nhide\nbroadcast (Clear Vector v) and wait\nstop [other scripts in sprite v]\n\nwhen I receive [clear vector v]\ndelete this clone\n\nwhen I receive [build level v]\nif <[costume v] contains [R]?> then\n    show\n    Build Level with size: (100) at X: (0) Y: (0)\n    hide\nend\n\ndefine None\nset size to (size) %\nif <not <(direction) = [90]>> then\n    point in direction (90)\nend\nset [c1 v] to [0]\nrepeat (length of [costume v])\n    change [c1 v] by (1)\n    if <(item (C1) of [costume v]) = [R]> then\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\ngo [backward v] (999) layers\nset [clonex v] to (x position)\nset [cloney v] to (y position)\nif <not <(size) = [100]>> then\n    set size to (100) %\nend\nshow\nwait until <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>\ndelete this clone\n\n@Blue Door\n\nwhen I receive [main menu v]\nhide\nbroadcast (Clear Vector v) and wait\nstop [other scripts in sprite v]\n\nwhen I receive [clear vector v]\ndelete this clone\n\nwhen I receive [build level v]\nif <[costume v] contains [S]?> then\n    show\n    Build Level with size: (100) at X: (0) Y: (0)\n    hide\nend\n\ndefine None\nset size to (size) %\nif <not <(direction) = [90]>> then\n    point in direction (90)\nend\nset [c1 v] to [0]\nrepeat (length of [costume v])\n    change [c1 v] by (1)\n    if <(item (C1) of [costume v]) = [S]> then\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\ngo [backward v] (999) layers\nset [clonex v] to (x position)\nset [cloney v] to (y position)\nif <not <(size) = [100]>> then\n    set size to (100) %\nend\nshow\nrepeat until <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>\n    wait until <<(PLAY) = [1]> or <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>>\n    if <(PLAY) = [1]> then\n        repeat until <(PLAY) = [0]>\n            if <[doors open/close v] contains (join (join [Blue Door] [ \[]) [OPEN\]])?> then\n                hide\n                wait until <<(PLAY) = [0]> or <[doors open/close v] contains (join (join [Blue Door] [ \[]) [CLOSE\]])?>>\n                show\n            end\n        end\n    end\nend\ndelete this clone\n\n@Green Door\n\nwhen I receive [main menu v]\nhide\nbroadcast (Clear Vector v) and wait\nstop [other scripts in sprite v]\n\nwhen I receive [clear vector v]\ndelete this clone\n\nwhen I receive [build level v]\nif <[costume v] contains [T]?> then\n    show\n    Build Level with size: (100) at X: (0) Y: (0)\n    hide\nend\n\ndefine None\nset size to (size) %\nif <not <(direction) = [90]>> then\n    point in direction (90)\nend\nset [c1 v] to [0]\nrepeat (length of [costume v])\n    change [c1 v] by (1)\n    if <(item (C1) of [costume v]) = [T]> then\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\ngo [backward v] (999) layers\nset [clonex v] to (x position)\nset [cloney v] to (y position)\nif <not <(size) = [100]>> then\n    set size to (100) %\nend\nshow\nrepeat until <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>\n    wait until <<(PLAY) = [1]> or <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>>\n    if <(PLAY) = [1]> then\n        repeat until <(PLAY) = [0]>\n            if <[doors open/close v] contains (join (join [Green Door] [ \[]) [OPEN\]])?> then\n                hide\n                wait until <<(PLAY) = [0]> or <[doors open/close v] contains (join (join [Green Door] [ \[]) [CLOSE\]])?>>\n                show\n            end\n        end\n    end\nend\ndelete this clone\n\n@Orange Door\n\nwhen I receive [main menu v]\nhide\nbroadcast (Clear Vector v) and wait\nstop [other scripts in sprite v]\n\nwhen I receive [clear vector v]\ndelete this clone\n\nwhen I receive [build level v]\nif <[costume v] contains [U]?> then\n    show\n    Build Level with size: (100) at X: (0) Y: (0)\n    hide\nend\n\ndefine None\nset size to (size) %\nif <not <(direction) = [90]>> then\n    point in direction (90)\nend\nset [c1 v] to [0]\nrepeat (length of [costume v])\n    change [c1 v] by (1)\n    if <(item (C1) of [costume v]) = [U]> then\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\ngo [backward v] (999) layers\nset [clonex v] to (x position)\nset [cloney v] to (y position)\nif <not <(size) = [100]>> then\n    set size to (100) %\nend\nshow\nrepeat until <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>\n    wait until <<(PLAY) = [1]> or <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>>\n    if <(PLAY) = [1]> then\n        repeat until <(PLAY) = [0]>\n            if <[doors open/close v] contains (join (join [Red Door] [ \[]) [OPEN\]])?> then\n                hide\n                wait until <<(PLAY) = [0]> or <[doors open/close v] contains (join (join [Red Door] [ \[]) [CLOSE\]])?>>\n                show\n            end\n        end\n    end\nend\ndelete this clone\n\n@Yellow Door\n\nwhen I receive [main menu v]\nhide\nbroadcast (Clear Vector v) and wait\nstop [other scripts in sprite v]\n\nwhen I receive [clear vector v]\ndelete this clone\n\nwhen I receive [build level v]\nif <[costume v] contains [V]?> then\n    show\n    Build Level with size: (100) at X: (0) Y: (0)\n    hide\nend\n\ndefine None\nset size to (size) %\nif <not <(direction) = [90]>> then\n    point in direction (90)\nend\nset [c1 v] to [0]\nrepeat (length of [costume v])\n    change [c1 v] by (1)\n    if <(item (C1) of [costume v]) = [V]> then\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\ngo [backward v] (999) layers\nset [clonex v] to (x position)\nset [cloney v] to (y position)\nif <not <(size) = [100]>> then\n    set size to (100) %\nend\nshow\nrepeat until <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>\n    wait until <<(PLAY) = [1]> or <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>>\n    if <(PLAY) = [1]> then\n        repeat until <(PLAY) = [0]>\n            if <[doors open/close v] contains (join (join [Yellow Door] [ \[]) [OPEN\]])?> then\n                hide\n                wait until <<(PLAY) = [0]> or <[doors open/close v] contains (join (join [Yellow Door] [ \[]) [CLOSE\]])?>>\n                show\n            end\n        end\n    end\nend\ndelete this clone\n\n@Cannon\n\nwhen I receive [main menu v]\nhide\nbroadcast (Clear Vector v) and wait\nstop [other scripts in sprite v]\n\nwhen I receive [clear vector v]\ndelete this clone\n\nwhen I receive [build level v]\nif <<[costume v] contains [W]?> or <<[costume v] contains [\)]?> or <<[costume v] contains [\(]?> or <[costume v] contains [/]?>>>> then\n    show\n    Build Level with size: (100) at X: (0) Y: (0)\n    hide\nend\n\ndefine None\nset size to (size) %\nif <not <(direction) = [90]>> then\n    point in direction (90)\nend\nset [c1 v] to [0]\nrepeat (length of [costume v])\n    change [c1 v] by (1)\n    if <(item (C1) of [costume v]) = [W]> then\n        point in direction (90)\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\n    if <(item (C1) of [costume v]) = [\)]> then\n        point in direction (180)\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\n    if <(item (C1) of [costume v]) = [\(]> then\n        point in direction (-90)\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\n    if <(item (C1) of [costume v]) = [/]> then\n        point in direction (0)\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\ngo [backward v] (999) layers\nset [clonex v] to (x position)\nset [cloney v] to (y position)\nset [clonedir v] to (direction)\nif <not <(size) = [100]>> then\n    set size to (100) %\nend\nshow\nrepeat until <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>\n    switch costume to (cannon v)\n    point in direction (CloneDir)\n    show\n    wait until <<(PLAY) = [1]> or <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>>\n    if <(PLAY) = [1]> then\n        repeat until <<(PLAY) = [0]> or <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>>\n            wait until <<(PAUSE) = [0]> and <<<(PLAY) = [0]> or <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>> or <<not <([costume # v] of [control bar v]) > [2]>> and <<(Cannon Fire Rate) > [0]> and <<<(CloneDir) = [0]> and <<([y position v] of [character v]) > (CloneY)> and <(((round (((CloneX) + (12)) / (24))) * (24)) - (12)) = (((round ((([x position v] of [character v]) + (12)) / (24))) * (24)) - (12))>>> or <<<(CloneDir) = [180]> and <<([y position v] of [character v]) < (CloneY)> and <(((round (((CloneX) + (12)) / (24))) * (24)) - (12)) = (((round ((([x position v] of [character v]) + (12)) / (24))) * (24)) - (12))>>> or <<<(CloneDir) = [90]> and <<((round (([y position v] of [character v]) / (24))) * (24)) = ((round ((CloneY) / (24))) * (24))> and <(CloneX) < ([x position v] of [character v])>>> or <<(CloneDir) = [-90]> and <<((round (([y position v] of [character v]) / (24))) * (24)) = ((round ((CloneY) / (24))) * (24))> and <(CloneX) > ([x position v] of [character v])>>>>>>>>>>\n            if <<(Cannon Fire Rate) > [0]> and <<<(CloneDir) = [0]> and <<([y position v] of [character v]) > (CloneY)> and <(((round (((CloneX) + (12)) / (24))) * (24)) - (12)) = (((round ((([x position v] of [character v]) + (12)) / (24))) * (24)) - (12))>>> or <<<(CloneDir) = [180]> and <<([y position v] of [character v]) < (CloneY)> and <(((round (((CloneX) + (12)) / (24))) * (24)) - (12)) = (((round ((([x position v] of [character v]) + (12)) / (24))) * (24)) - (12))>>> or <<<(CloneDir) = [90]> and <<((round (([y position v] of [character v]) / (24))) * (24)) = ((round ((CloneY) / (24))) * (24))> and <(CloneX) < ([x position v] of [character v])>>> or <<(CloneDir) = [-90]> and <<((round (([y position v] of [character v]) / (24))) * (24)) = ((round ((CloneY) / (24))) * (24))> and <(CloneX) > ([x position v] of [character v])>>>>>>> then\n                if <(SFX ON/OFF) = [ON]> then\n                    start sound [Laser Shot v]\n                end\n                if <(item (4) of [performence parameters v]) = [CannonAnimation \[ON\]]> then\n                    set [cannon animation v] to [-1.8]\n                    repeat (2)\n                        move (Cannon Animation) steps\n                    end\n                end\n                set [cannon shot x v] to (CloneX)\n                set [cannon shot y v] to (CloneY)\n                set [cannon shot dir. v] to (CloneDir)\n                create clone of (cannon shot v)\n                if <(item (4) of [performence parameters v]) = [CannonAnimation \[ON\]]> then\n                    repeat (2)\n                        change [cannon animation v] by (2.4)\n                        move (Cannon Animation) steps\n                    end\n                end\n                set [∆t v] to (timer)\n                wait until <<((timer) - (∆t)) > ((round (((5) / ((Cannon Fire Rate) + (1))) * (100))) / (100))> or <<(PLAY) = [0]> or <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>>>\n            end\n        end\n    end\nend\ndelete this clone\n\n@Enemy\n\nwhen I receive [main menu v]\nhide\nbroadcast (Clear Vector v) and wait\nstop [other scripts in sprite v]\n\nwhen I receive [clear vector v]\ndelete this clone\n\nwhen I receive [build level v]\nif <[costume v] contains [X]?> then\n    show\n    Build Level with size: (100) at X: (0) Y: (0)\n    hide\nend\n\ndefine None\nset [<collision?> v] to [0]\nif <<<(mode) = [Moving Block]> and <(join (((round ((([x position v] of [character v]) + (12)) / (24))) * (24)) - (12)) ((round (([y position v] of [character v]) / (24))) * (24))) = (join (((round (((x) + ((12) * ((dir.) + (1)))) / (24))) * (24)) - (12)) ((round ((y) / (24))) * (24)))>> or <<<([abs v] of ((round ((y) / (24))) * (24)) ) > [180]> or <([abs v] of (((round (((x) + ((12) * ((dir.) + (1)))) / (24))) * (24)) - (12)) ) > [240]>> or <[moving blocks x/y v] contains (join (((round (((x) + ((12) * ((dir.) + (1)))) / (24))) * (24)) - (12)) ((round ((y) / (24))) * (24)))?>>> then\n    set [<collision?> v] to [1]\nelse\n    if <[placed blocks x/y v] contains (join (((round (((x) + ((12) * ((dir.) + (1)))) / (24))) * (24)) - (12)) ((round ((y) / (24))) * (24)))?> then\n        set [<collision?> v] to [0]\n        repeat until <(item (<Collision?>) of [placed blocks x/y v]) = (join (((round (((x) + ((12) * ((dir.) + (1)))) / (24))) * (24)) - (12)) ((round ((y) / (24))) * (24)))>\n            change [<collision?> v] by (1)\n        end\n        if <<<[non-collision v] contains (item (<Collision?>) of [costume v])?> or <<<(item (<Collision?>) of [costume v]) = [S]> and <(item (1) of [doors open/close v]) = [Blue Door \[OPEN\]]>> or <<<(item (<Collision?>) of [costume v]) = [T]> and <(item (2) of [doors open/close v]) = [Green Door \[OPEN\]]>> or <<<(item (<Collision?>) of [costume v]) = [U]> and <(item (3) of [doors open/close v]) = [Red Door \[OPEN\]]>> or <<(item (<Collision?>) of [costume v]) = [V]> and <(item (4) of [doors open/close v]) = [Yellow Door \[OPEN\]]>>>>>> and <not <<(mode) = [Moving Block]> and <<(item (<Collision?>) of [costume v]) = [C]> or <<(item (<Collision?>) of [costume v]) = [D]> or <<(item (<Collision?>) of [costume v]) = [€]> or <<(item (<Collision?>) of [costume v]) = [#]> or <(item (<Collision?>) of [costume v]) = ["]>>>>>>>> then\n            set [<collision?> v] to [0]\n        else\n            set [<collision?> v] to [1]\n        end\n    end\nend\n\nwhen I start as a clone\ngo [backward v] (999) layers\nset [clonex v] to (x position)\nset [cloney v] to (y position)\nset [clonedir v] to (direction)\nif <not <(size) = [100]>> then\n    set size to (100) %\nend\nshow\nrepeat until <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>\n    if <not <(join (CloneX) (CloneY)) = (join (x position) (y position))>> then\n        go to x: (CloneX) y: (CloneY)\n    end\n    switch costume to ((1) + (item (3) of [level settings v]))\n    point in direction (CloneDir)\n    show\n    repeat until <<(PLAY) = [1]> or <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>>\n        wait until <<<(PLAY) = [1]> or <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>> or <not <((costume [number v]) - (1)) = ((24) + ((item (3) of [level settings v]) * (3)))>>>\n        switch costume to ((1) + (item (3) of [level settings v]))\n    end\n    set [initiate clone v] to [0]\n    Check Surrounding [Enemy]\n    repeat until <<(PLAY) = [0]> or <<(RESTART) = [1]> and <(item (1) of [level settings v]) = [1]>>>\n        if <(PAUSE) = [0]> then\n            if <(Initiate Clone) = [Stop]> then\n                repeat until <<not <(Initiate Clone) = [Stop]>> or <<(PLAY) = [0]> or <<<touching (character v)?> and <<([yv v] of [character v]) < [-5]> and <(item (3) of [level settings v]) = [1]>>> and <not <(RESTART) = [1]>>>>>\n                    Check Surrounding [Enemy]\n                    if <not <(costume [number v]) = ((1) + (item (3) of [level settings v]))>> then\n                        switch costume to ((1) + (item (3) of [level settings v]))\n                    end\n                end\n            else\n                if <(Enemy Speed) = [0]> then\n                    set [initiate clone v] to [Stop]\n                end\n                if <not <(Initiate Clone) = [Left]>> then\n                    repeat until <<<<(PLAY) = [0]> or <(<Collision?>) = [1]>> or <<(RESTART) = [1]> and <(item (1) of [level settings v]) = [1]>>> or <<<touching (character v)?> and <<([yv v] of [character v]) < [-5]> and <(item (3) of [level settings v]) = [1]>>> and <not <(RESTART) = [1]>>>>\n                        set [initiate clone v] to [0]\n                        if <(PAUSE) = [0]> then\n                            move (Enemy Speed) steps\n                            Check Collision (x position) (y position) (1) []\n                        end\n                        if <not <(costume [number v]) = ((1) + (item (3) of [level settings v]))>> then\n                            switch costume to ((1) + (item (3) of [level settings v]))\n                        end\n                    end\n                    repeat until <<<<(PLAY) = [0]> or <(<Collision?>) = [0]>> or <<(RESTART) = [1]> and <(item (1) of [level settings v]) = [1]>>> or <<<touching (character v)?> and <<([yv v] of [character v]) < [-5]> and <(item (3) of [level settings v]) = [1]>>> and <not <(RESTART) = [1]>>>>\n                        set [initiate clone v] to [0]\n                        if <(PAUSE) = [0]> then\n                            move ((Enemy Speed) * (-1)) steps\n                            Check Collision (x position) (y position) (-1) []\n                        end\n                        if <not <(costume [number v]) = ((1) + (item (3) of [level settings v]))>> then\n                            switch costume to ((1) + (item (3) of [level settings v]))\n                        end\n                    end\n                end\n                repeat until <<<<(PLAY) = [0]> or <(<Collision?>) = [1]>> or <<(RESTART) = [1]> and <(item (1) of [level settings v]) = [1]>>> or <<<touching (character v)?> and <<([yv v] of [character v]) < [-5]> and <(item (3) of [level settings v]) = [1]>>> and <not <(RESTART) = [1]>>>>\n                    set [initiate clone v] to [0]\n                    if <(PAUSE) = [0]> then\n                        move ((Enemy Speed) * (-1)) steps\n                        Check Collision (x position) (y position) (-1) []\n                    end\n                    if <not <(costume [number v]) = ((1) + (item (3) of [level settings v]))>> then\n                        switch costume to ((1) + (item (3) of [level settings v]))\n                    end\n                end\n                repeat until <<<<(PLAY) = [0]> or <(<Collision?>) = [0]>> or <<(RESTART) = [1]> and <(item (1) of [level settings v]) = [1]>>> or <<<touching (character v)?> and <<([yv v] of [character v]) < [-5]> and <(item (3) of [level settings v]) = [1]>>> and <not <(RESTART) = [1]>>>>\n                    set [initiate clone v] to [0]\n                    if <(PAUSE) = [0]> then\n                        move (Enemy Speed) steps\n                        Check Collision (x position) (y position) (1) []\n                    end\n                    if <not <(costume [number v]) = ((1) + (item (3) of [level settings v]))>> then\n                        switch costume to ((1) + (item (3) of [level settings v]))\n                    end\n                end\n                if <<touching (character v)?> and <<([yv v] of [character v]) < [-5]> and <(item (3) of [level settings v]) = [1]>>> then\n                    switch costume to (enemy dead v)\n                    repeat (3)\n                        change size by (-30)\n                        change y by (-2.5)\n                    end\n                    hide\n                    set size to (100) %\n                    switch costume to ((1) + (item (3) of [level settings v]))\n                    wait until <<(PLAY) = [0]> or <<(RESTART) = [1]> and <(item (3) of [level settings v]) = [1]>>>\n                end\n            end\n        end\n    end\nend\ndelete this clone\n\ndefine None\nset size to (size) %\nif <not <(direction) = [90]>> then\n    point in direction (90)\nend\nset [c1 v] to [0]\nrepeat (length of [costume v])\n    change [c1 v] by (1)\n    if <(item (C1) of [costume v]) = [X]> then\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\nend\n\ndefine Check Surrounding []\nif <(Initiate Clone) = [Right]> then\n    Check Collision ((x position) + (12)) (y position) (-1) (mode)\n    if <(<Collision?>) = [1]> then\n        set [initiate clone v] to [0]\n    end\nelse\n    if <(Initiate Clone) = [Left]> then\n        Check Collision ((x position) - (12)) (y position) (-1) (mode)\n        if <(<Collision?>) = [1]> then\n            set [initiate clone v] to [0]\n        end\n    else\n        if <(Initiate Clone) = [Up]> then\n            Check Collision (x position) ((y position) + (24)) (0) (mode)\n            if <(<Collision?>) = [1]> then\n                set [initiate clone v] to [0]\n            end\n        else\n            if <(Initiate Clone) = [Down]> then\n                Check Collision (x position) ((y position) - (24)) (0) (mode)\n                if <(<Collision?>) = [1]> then\n                    set [initiate clone v] to [0]\n                end\n            end\n        end\n    end\nend\nif <<(Initiate Clone) = [0]> or <(Initiate Clone) = [Stop]>> then\n    Check Collision ((x position) + (12)) (y position) (1) (mode)\n    if <(<Collision?>) = [1]> then\n        Check Collision ((x position) - (12)) (y position) (-1) (mode)\n        if <(<Collision?>) = [1]> then\n            if <(mode) = [Enemy]> then\n                set [initiate clone v] to [Stop]\n            else\n                Check Collision (x position) ((y position) + (24)) (0) (mode)\n                if <(<Collision?>) = [1]> then\n                    Check Collision (x position) ((y position) - (24)) (0) (mode)\n                    if <(<Collision?>) = [1]> then\n                        set [initiate clone v] to [Stop]\n                    else\n                        set [initiate clone v] to [Down]\n                    end\n                else\n                    set [initiate clone v] to [Up]\n                end\n            end\n        else\n            set [initiate clone v] to [Left]\n        end\n    else\n        set [initiate clone v] to [Right]\n    end\nend\n\n@Moving Block\n\nwhen I receive [main menu v]\nhide\nbroadcast (Clear Vector v) and wait\nstop [other scripts in sprite v]\n\nwhen I receive [clear vector v]\ndelete this clone\n\ndefine None\nset [<collision?> v] to [0]\nif <<<(mode) = [Moving Block]> and <(join (((round ((([x position v] of [character v]) + (12)) / (24))) * (24)) - (12)) ((round (([y position v] of [character v]) / (24))) * (24))) = (join (((round (((x) + ((12) * ((dir.) + (1)))) / (24))) * (24)) - (12)) ((round ((y) / (24))) * (24)))>> or <<<([abs v] of ((round ((y) / (24))) * (24)) ) > [180]> or <([abs v] of (((round (((x) + ((12) * ((dir.) + (1)))) / (24))) * (24)) - (12)) ) > [240]>> or <[moving blocks x/y v] contains (join (((round (((x) + ((12) * ((dir.) + (1)))) / (24))) * (24)) - (12)) ((round ((y) / (24))) * (24)))?>>> then\n    set [<collision?> v] to [1]\nelse\n    if <[placed blocks x/y v] contains (join (((round (((x) + ((12) * ((dir.) + (1)))) / (24))) * (24)) - (12)) ((round ((y) / (24))) * (24)))?> then\n        set [<collision?> v] to [0]\n        repeat until <(item (<Collision?>) of [placed blocks x/y v]) = (join (((round (((x) + ((12) * ((dir.) + (1)))) / (24))) * (24)) - (12)) ((round ((y) / (24))) * (24)))>\n            change [<collision?> v] by (1)\n        end\n        if <<<[non-collision v] contains (item (<Collision?>) of [costume v])?> or <<<(item (<Collision?>) of [costume v]) = [S]> and <(item (1) of [doors open/close v]) = [Blue Door \[OPEN\]]>> or <<<(item (<Collision?>) of [costume v]) = [T]> and <(item (2) of [doors open/close v]) = [Green Door \[OPEN\]]>> or <<<(item (<Collision?>) of [costume v]) = [U]> and <(item (3) of [doors open/close v]) = [Red Door \[OPEN\]]>> or <<(item (<Collision?>) of [costume v]) = [V]> and <(item (4) of [doors open/close v]) = [Yellow Door \[OPEN\]]>>>>>> and <not <<(mode) = [Moving Block]> and <<(item (<Collision?>) of [costume v]) = [C]> or <<(item (<Collision?>) of [costume v]) = [D]> or <<(item (<Collision?>) of [costume v]) = [€]> or <<(item (<Collision?>) of [costume v]) = [#]> or <(item (<Collision?>) of [costume v]) = ["]>>>>>>>> then\n            set [<collision?> v] to [0]\n        else\n            set [<collision?> v] to [1]\n        end\n    end\nend\n\nwhen I receive [build level v]\nif <[costume v] contains [Y]?> then\n    delete (all) of [moving blocks x/y v]\n    show\n    Build Level with size: (100) at X: (0) Y: (0)\n    hide\nend\n\ndefine None\nset size to (size) %\nif <not <(direction) = [90]>> then\n    point in direction (90)\nend\nset [c1 v] to [0]\nrepeat (length of [costume v])\n    change [c1 v] by (1)\n    if <(item (C1) of [costume v]) = [Y]> then\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\ngo [backward v] (900) layers\nset [clonex v] to (x position)\nset [cloney v] to (y position)\nset [clonedir v] to (direction)\nif <not <(size) = [100]>> then\n    set size to (100) %\nend\nshow\nadd (join (CloneX) (CloneY)) to [moving blocks x/y v]\nset [#movingblock v] to (length of [moving blocks x/y v])\nrepeat until <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>\n    if <not <(join (CloneX) (CloneY)) = (join (x position) (y position))>> then\n        go to x: (CloneX) y: (CloneY)\n        replace item (#MovingBlock) of [moving blocks x/y v] with (join (x position) (y position))\n    end\n    switch costume to (moving block v)\n    point in direction (CloneDir)\n    show\n    wait until <<(PLAY) = [1]> or <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>>\n    set [initiate clone v] to [0]\n    Check Surrounding [Moving Block]\n    repeat until <<(PLAY) = [0]> or <<(RESTART) = [1]> and <(item (1) of [level settings v]) = [1]>>>\n        if <(PAUSE) = [0]> then\n            if <(Moving Block Speed) > [0]> then\n                repeat until <<(PLAY) = [0]> or <<(RESTART) = [1]> and <(item (1) of [level settings v]) = [1]>>>\n                    if <(PAUSE) = [0]> then\n                        Check Surrounding [Moving Block]\n                        if <not <(Initiate Clone) = [Stop]>> then\n                            if <(Initiate Clone) = [Right]> then\n                                point in direction (90)\n                                replace item (#MovingBlock) of [moving blocks x/y v] with (join ((x position) + (24)) (y position))\n                            end\n                            if <(Initiate Clone) = [Left]> then\n                                point in direction (-90)\n                                replace item (#MovingBlock) of [moving blocks x/y v] with (join ((x position) - (24)) (y position))\n                            end\n                            if <(Initiate Clone) = [Up]> then\n                                point in direction (0)\n                                replace item (#MovingBlock) of [moving blocks x/y v] with (join (x position) ((y position) + (24)))\n                            end\n                            if <(Initiate Clone) = [Down]> then\n                                point in direction (180)\n                                replace item (#MovingBlock) of [moving blocks x/y v] with (join (x position) ((y position) - (24)))\n                            end\n                            repeat (6)\n                                if <<(PLAY) = [0]> or <<(RESTART) = [1]> and <(item (1) of [level settings v]) = [1]>>> then\n                                    if <not <(join (CloneX) (CloneY)) = (join (x position) (y position))>> then\n                                        go to x: (CloneX) y: (CloneY)\n                                        replace item (#MovingBlock) of [moving blocks x/y v] with (join (x position) (y position))\n                                    end\n                                else\n                                    move (4) steps\n                                end\n                            end\n                        end\n                        set [∆t v] to (timer)\n                        wait until <<((timer) - (∆t)) > ((round (((5) / ((Moving Block Speed) + (1))) * (100))) / (100))> or <<<(PLAY) = [0]> or <<(RESTART) = [1]> and <(item (1) of [level settings v]) = [1]>>> or <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>>>\n                    end\n                end\n            end\n        end\n    end\nend\nreplace item (#MovingBlock) of [moving blocks x/y v] with []\nif <((length of (Moving Blocks X/Y)) + (1)) = (length of [moving blocks x/y v])> then\n    delete (all) of [moving blocks x/y v]\nend\ndelete this clone\n\ndefine Check Surrounding []\nif <(Initiate Clone) = [Right]> then\n    Check Collision ((x position) + (12)) (y position) (-1) (mode)\n    if <(<Collision?>) = [1]> then\n        set [initiate clone v] to [0]\n    end\nelse\n    if <(Initiate Clone) = [Left]> then\n        Check Collision ((x position) - (12)) (y position) (-1) (mode)\n        if <(<Collision?>) = [1]> then\n            set [initiate clone v] to [0]\n        end\n    else\n        if <(Initiate Clone) = [Up]> then\n            Check Collision (x position) ((y position) + (24)) (0) (mode)\n            if <(<Collision?>) = [1]> then\n                set [initiate clone v] to [0]\n            end\n        else\n            if <(Initiate Clone) = [Down]> then\n                Check Collision (x position) ((y position) - (24)) (0) (mode)\n                if <(<Collision?>) = [1]> then\n                    set [initiate clone v] to [0]\n                end\n            end\n        end\n    end\nend\nif <<(Initiate Clone) = [0]> or <(Initiate Clone) = [Stop]>> then\n    Check Collision ((x position) + (12)) (y position) (1) (mode)\n    if <(<Collision?>) = [1]> then\n        Check Collision ((x position) - (12)) (y position) (-1) (mode)\n        if <(<Collision?>) = [1]> then\n            if <(mode) = [Enemy]> then\n                set [initiate clone v] to [Stop]\n            else\n                Check Collision (x position) ((y position) + (24)) (0) (mode)\n                if <(<Collision?>) = [1]> then\n                    Check Collision (x position) ((y position) - (24)) (0) (mode)\n                    if <(<Collision?>) = [1]> then\n                        set [initiate clone v] to [Stop]\n                    else\n                        set [initiate clone v] to [Down]\n                    end\n                else\n                    set [initiate clone v] to [Up]\n                end\n            end\n        else\n            set [initiate clone v] to [Left]\n        end\n    else\n        set [initiate clone v] to [Right]\n    end\nend\n\n@Laser Spike Block\n\nwhen I receive [main menu v]\nhide\nbroadcast (Clear Vector v) and wait\nstop [other scripts in sprite v]\n\nwhen I receive [clear vector v]\ndelete this clone\n\ndefine None\nset [<collision?> v] to [0]\nif <<<(mode) = [Moving Block]> and <(join (((round ((([x position v] of [character v]) + (12)) / (24))) * (24)) - (12)) ((round (([y position v] of [character v]) / (24))) * (24))) = (join (((round (((x) + ((12) * ((dir.) + (1)))) / (24))) * (24)) - (12)) ((round ((y) / (24))) * (24)))>> or <<<([abs v] of ((round ((y) / (24))) * (24)) ) > [180]> or <([abs v] of (((round (((x) + ((12) * ((dir.) + (1)))) / (24))) * (24)) - (12)) ) > [240]>> or <[moving blocks x/y v] contains (join (((round (((x) + ((12) * ((dir.) + (1)))) / (24))) * (24)) - (12)) ((round ((y) / (24))) * (24)))?>>> then\n    set [<collision?> v] to [1]\nelse\n    if <[placed blocks x/y v] contains (join (((round (((x) + ((12) * ((dir.) + (1)))) / (24))) * (24)) - (12)) ((round ((y) / (24))) * (24)))?> then\n        set [<collision?> v] to [0]\n        repeat until <(item (<Collision?>) of [placed blocks x/y v]) = (join (((round (((x) + ((12) * ((dir.) + (1)))) / (24))) * (24)) - (12)) ((round ((y) / (24))) * (24)))>\n            change [<collision?> v] by (1)\n        end\n        if <<<[non-collision v] contains (item (<Collision?>) of [costume v])?> or <<<(item (<Collision?>) of [costume v]) = [S]> and <(item (1) of [doors open/close v]) = [Blue Door \[OPEN\]]>> or <<<(item (<Collision?>) of [costume v]) = [T]> and <(item (2) of [doors open/close v]) = [Green Door \[OPEN\]]>> or <<<(item (<Collision?>) of [costume v]) = [U]> and <(item (3) of [doors open/close v]) = [Red Door \[OPEN\]]>> or <<(item (<Collision?>) of [costume v]) = [V]> and <(item (4) of [doors open/close v]) = [Yellow Door \[OPEN\]]>>>>>> and <not <<(mode) = [Moving Block]> and <<(item (<Collision?>) of [costume v]) = [C]> or <<(item (<Collision?>) of [costume v]) = [D]> or <<(item (<Collision?>) of [costume v]) = [€]> or <<(item (<Collision?>) of [costume v]) = [#]> or <(item (<Collision?>) of [costume v]) = ["]>>>>>>>> then\n            set [<collision?> v] to [0]\n        else\n            set [<collision?> v] to [1]\n        end\n    end\nend\n\nwhen I receive [build level v]\nif <[costume v] contains [Z]?> then\n    show\n    Build Level with size: (100) at X: (0) Y: (0)\n    hide\nend\n\nwhen I start as a clone\ngo [backward v] (999) layers\nset [clonex v] to (x position)\nset [cloney v] to (y position)\nset [clonedir v] to (direction)\nif <not <(size) = [100]>> then\n    set size to (100) %\nend\nshow\nrepeat until <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>\n    switch costume to (laser spike block v)\n    point in direction (CloneDir)\n    show\n    wait until <<(PLAY) = [1]> or <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>>\n    if <(PLAY) = [1]> then\n        repeat until <<(PLAY) = [0]> or <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>>\n            switch costume to (laser spike block v)\n            set [∆t v] to (timer)\n            wait until <<(PAUSE) = [0]> and <<((timer) - (∆t)) > ((round (((5) / ((Cannon Fire Rate) + (1))) * (100))) / (100))> or <<(PLAY) = [0]> or <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>>>>\n            if <((timer) - (∆t)) > ((round (((5) / ((Cannon Fire Rate) + (1))) * (100))) / (100))> then\n                set [#costume v] to []\n                if <not <<[placed blocks x/y v] contains (join (CloneX) ((round (((CloneY) + (24)) / (24))) * (24)))?> or <[moving blocks x/y v] contains (join (CloneX) ((round (((CloneY) + (24)) / (24))) * (24)))?>>> then\n                    set [#costume v] to (join (#Costume) [U])\n                end\n                if <not <<[placed blocks x/y v] contains (join (((round (((CloneX) + (12)) / (24))) * (24)) + (12)) (CloneY))?> or <[moving blocks x/y v] contains (join (((round (((CloneX) + (12)) / (24))) * (24)) + (12)) (CloneY))?>>> then\n                    set [#costume v] to (join (#Costume) [R])\n                end\n                if <not <<[placed blocks x/y v] contains (join (CloneX) ((round (((CloneY) - (24)) / (24))) * (24)))?> or <[moving blocks x/y v] contains (join (CloneX) ((round (((CloneY) - (24)) / (24))) * (24)))?>>> then\n                    set [#costume v] to (join (#Costume) [D])\n                end\n                if <not <<[placed blocks x/y v] contains (join (((round (((CloneX) - (12)) / (24))) * (24)) - (12)) (CloneY))?> or <[moving blocks x/y v] contains (join (((round (((CloneX) - (12)) / (24))) * (24)) - (12)) (CloneY))?>>> then\n                    set [#costume v] to (join (#Costume) [L])\n                end\n                switch costume to (#Costume)\n                set [∆t v] to (timer)\n                repeat until <<(PAUSE) = [0]> and <<((timer) - (∆t)) > ((round (((5) / ((Cannon Fire Rate) + (1))) * (100))) / (100))> or <<(PLAY) = [0]> or <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>>>>\n                    if <<touching (character v)?> and <(RESTART) = [0]>> then\n                        set [restart v] to [1]\n                    end\n                end\n            end\n        end\n    end\nend\ndelete this clone\n\ndefine None\nset size to (size) %\nif <not <(direction) = [90]>> then\n    point in direction (90)\nend\nset [c1 v] to [0]\nrepeat (length of [costume v])\n    change [c1 v] by (1)\n    if <(item (C1) of [costume v]) = [Z]> then\n        point in direction (90)\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\nend\n\ndefine Check Surrounding []\nif <(Initiate Clone) = [Right]> then\n    Check Collision ((x position) + (12)) (y position) (-1) (mode)\n    if <(<Collision?>) = [1]> then\n        set [initiate clone v] to [0]\n    end\nelse\n    if <(Initiate Clone) = [Left]> then\n        Check Collision ((x position) - (12)) (y position) (-1) (mode)\n        if <(<Collision?>) = [1]> then\n            set [initiate clone v] to [0]\n        end\n    else\n        if <(Initiate Clone) = [Up]> then\n            Check Collision (x position) ((y position) + (24)) (0) (mode)\n            if <(<Collision?>) = [1]> then\n                set [initiate clone v] to [0]\n            end\n        else\n            if <(Initiate Clone) = [Down]> then\n                Check Collision (x position) ((y position) - (24)) (0) (mode)\n                if <(<Collision?>) = [1]> then\n                    set [initiate clone v] to [0]\n                end\n            end\n        end\n    end\nend\nif <<(Initiate Clone) = [0]> or <(Initiate Clone) = [Stop]>> then\n    Check Collision ((x position) + (12)) (y position) (1) (mode)\n    if <(<Collision?>) = [1]> then\n        Check Collision ((x position) - (12)) (y position) (-1) (mode)\n        if <(<Collision?>) = [1]> then\n            if <(mode) = [Enemy]> then\n                set [initiate clone v] to [Stop]\n            else\n                Check Collision (x position) ((y position) + (24)) (0) (mode)\n                if <(<Collision?>) = [1]> then\n                    Check Collision (x position) ((y position) - (24)) (0) (mode)\n                    if <(<Collision?>) = [1]> then\n                        set [initiate clone v] to [Stop]\n                    else\n                        set [initiate clone v] to [Down]\n                    end\n                else\n                    set [initiate clone v] to [Up]\n                end\n            end\n        else\n            set [initiate clone v] to [Left]\n        end\n    else\n        set [initiate clone v] to [Right]\n    end\nend\n\n@One-way Block\n\nwhen I receive [main menu v]\nhide\nbroadcast (Clear Vector v) and wait\nstop [other scripts in sprite v]\n\nwhen I receive [clear vector v]\ndelete this clone\n\nwhen I receive [build level v]\nif <<[costume v] contains [<]?> or <<[costume v] contains [?]?> or <<[costume v] contains [$]?> or <[costume v] contains [\]?>>>> then\n    show\n    Build Level with size: (100) at X: (0) Y: (0)\n    hide\nend\n\nwhen I start as a clone\ngo [backward v] (999) layers\nset [clonex v] to (x position)\nset [cloney v] to (y position)\nset [clonedir v] to (direction)\nif <not <(size) = [100]>> then\n    set size to (100) %\nend\nshow\nswitch costume to (one-way block v)\ngo to x: (CloneX) y: (CloneY)\npoint in direction (CloneDir)\nrepeat until <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>\n    wait until <<(PLAY) = [1]> or <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>>\n    if <(PLAY) = [1]> then\n        if <(CloneDir) = [90]> then\n            repeat until <<(PLAY) = [0]> or <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>>\n                wait until <<<(PLAY) = [0]> or <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>> or <<<((round (([y position v] of [character v]) / (24))) * (24)) = ((round ((CloneY) / (24))) * (24))> and <<((CloneX) - (([x position v] of [character v]) + ([xv v] of [character v]))) > [0]> and <((CloneX) - (([x position v] of [character v]) + ([xv v] of [character v]))) < [21]>>> or <(distance to [character v]) < [19.5]>>>\n                hide\n                wait until <<<(PLAY) = [0]> or <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>> or <not <<<((round (([y position v] of [character v]) / (24))) * (24)) = ((round ((CloneY) / (24))) * (24))> and <<((CloneX) - (([x position v] of [character v]) + ([xv v] of [character v]))) > [0]> and <((CloneX) - (([x position v] of [character v]) + ([xv v] of [character v]))) < [21]>>> or <(distance to [character v]) < [19.5]>>>>\n                show\n            end\n        end\n        if <(CloneDir) = [-90]> then\n            repeat until <<(PLAY) = [0]> or <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>>\n                wait until <<<(PLAY) = [0]> or <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>> or <<<((round (([y position v] of [character v]) / (24))) * (24)) = ((round ((CloneY) / (24))) * (24))> and <<((([x position v] of [character v]) + ([xv v] of [character v])) - (CloneX)) > [0]> and <((([x position v] of [character v]) + ([xv v] of [character v])) - (CloneX)) < [21]>>> or <(distance to [character v]) < [19.5]>>>\n                hide\n                wait until <<<(PLAY) = [0]> or <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>> or <not <<<((round (([y position v] of [character v]) / (24))) * (24)) = ((round ((CloneY) / (24))) * (24))> and <<((([x position v] of [character v]) + ([xv v] of [character v])) - (CloneX)) > [0]> and <((([x position v] of [character v]) + ([xv v] of [character v])) - (CloneX)) < [21]>>> or <(distance to [character v]) < [19.5]>>>>\n                show\n            end\n        end\n        if <(CloneDir) = [180]> then\n            repeat until <<(PLAY) = [0]> or <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>>\n                wait until <<<(PLAY) = [0]> or <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>> or <<<(((round ((([x position v] of [character v]) + (12)) / (24))) * (24)) - (6)) = (((round (((CloneX) + (12)) / (24))) * (24)) - (6))> and <<((([y position v] of [character v]) + ([yv v] of [character v])) - (CloneY)) > [0]> and <((([y position v] of [character v]) + ([yv v] of [character v])) - (CloneY)) < [21]>>> or <(distance to [character v]) < [19.5]>>>\n                hide\n                wait until <<<(PLAY) = [0]> or <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>> or <not <<<(((round ((([x position v] of [character v]) + (12)) / (24))) * (24)) - (6)) = (((round (((CloneX) + (12)) / (24))) * (24)) - (6))> and <<((([y position v] of [character v]) + ([yv v] of [character v])) - (CloneY)) > [0]> and <((([y position v] of [character v]) + ([yv v] of [character v])) - (CloneY)) < [21]>>> or <(distance to [character v]) < [19.5]>>>>\n                show\n            end\n        end\n        if <(CloneDir) = [0]> then\n            repeat until <<(PLAY) = [0]> or <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>>\n                wait until <<<(PLAY) = [0]> or <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>> or <<<(((round ((([x position v] of [character v]) + (12)) / (24))) * (24)) - (6)) = (((round (((CloneX) + (12)) / (24))) * (24)) - (6))> and <<((CloneY) - (([y position v] of [character v]) + ([yv v] of [character v]))) > [0]> and <((CloneY) - (([y position v] of [character v]) + ([yv v] of [character v]))) < [21]>>> or <(distance to [character v]) < [18]>>>\n                if <(Gravity Dir.) = [1]> then\n                    add (join <(distance to [character v]) < [18]> (join [ \(] (join (distance to [character v]) [\)]))) to [tester v]\n                    add (join <<(((round ((([x position v] of [character v]) + (12)) / (24))) * (24)) - (6)) = (((round (((CloneX) + (12)) / (24))) * (24)) - (6))> and <<((CloneY) - (([y position v] of [character v]) + ([yv v] of [character v]))) > [0]> and <((CloneY) - (([y position v] of [character v]) + ([yv v] of [character v]))) < [21]>>> (join [ \(] (join ((CloneY) - (([y position v] of [character v]) + ([yv v] of [character v]))) [\)]))) to [tester v]\n                end\n                hide\n                wait until <<<(PLAY) = [0]> or <not <[placed blocks x/y v] contains (join (CloneX) (CloneY))?>>> or <not <<<(((round ((([x position v] of [character v]) + (12)) / (24))) * (24)) - (6)) = (((round (((CloneX) + (12)) / (24))) * (24)) - (6))> and <<((CloneY) - (([y position v] of [character v]) + ([yv v] of [character v]))) > [0]> and <((CloneY) - (([y position v] of [character v]) + ([yv v] of [character v]))) < [21]>>> or <(distance to [character v]) < [18]>>>>\n                show\n            end\n        end\n    end\nend\ndelete this clone\n\ndefine None\nset size to (size) %\nif <not <(direction) = [90]>> then\n    point in direction (90)\nend\nset [c1 v] to [0]\nrepeat (length of [costume v])\n    change [c1 v] by (1)\n    if <(item (C1) of [costume v]) = [<]> then\n        point in direction (90)\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\n    if <(item (C1) of [costume v]) = [?]> then\n        point in direction (180)\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\n    if <(item (C1) of [costume v]) = [$]> then\n        point in direction (-90)\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\n    if <(item (C1) of [costume v]) = [\]> then\n        point in direction (0)\n        go to x: ((((item (C1) of [blocks-x v]) / (100)) * (size)) + (xoffset)) y: ((((item (C1) of [blocks-y v]) / (100)) * (size)) + (yoffset))\n        create clone of (_myself_ v)\n    end\nend\n\nwhen [9 v] key pressed\ndelete (all) of [tester v]\n\n@Cannon Shot\n\nwhen I receive [main menu v]\nhide\n\nwhen I start as a clone\nset [clonex v] to (Cannon Shot X)\nset [cloney v] to (Cannon Shot Y)\nset [clonedir. v] to (Cannon Shot Dir.)\npoint in direction (CloneDir.)\nif <not <(join (CloneX) (CloneY)) = (join (x position) (y position))>> then\n    go to x: (CloneX) y: (CloneY)\nend\nshow\nCheck Collision (x position) (y position) (0) []\nif <(<Collision?>) = [1]> then\n    repeat until <<(PLAY) = [0]> or <<(<Collision?>) = [0]> or <<(<Collision?>) = [1]> and <not <(join (((round (((CloneX) + (12)) / (24))) * (24)) - (12)) ((round ((CloneY) / (24))) * (24))) = (join (((round (((x position) + (12)) / (24))) * (24)) - (12)) ((round ((y position) / (24))) * (24)))>>>>>\n        if <(PAUSE) = [0]> then\n            move ((Cannon Fire Rate) * (1.5)) steps\n            if <<touching (character v)?> and <(RESTART) = [0]>> then\n                if <(SFX ON/OFF) = [ON]> then\n                    start sound [Laser Death v]\n                end\n                set [restart v] to [1]\n            end\n            Check Collision (x position) (y position) (0) []\n        end\n    end\nend\nif <not <<(PLAY) = [0]> or <(<Collision?>) = [1]>>> then\n    repeat until <<(PLAY) = [0]> or <(<Collision?>) = [1]>>\n        if <(PAUSE) = [0]> then\n            move ((Cannon Fire Rate) * (1.5)) steps\n            if <<touching (character v)?> and <(RESTART) = [0]>> then\n                if <(SFX ON/OFF) = [ON]> then\n                    start sound [Laser Death v]\n                end\n                set [restart v] to [1]\n            end\n            Check Collision (x position) (y position) (0) []\n        end\n    end\nend\nif <<(<Collision?>) = [1]> and <(SFX ON/OFF) = [ON]>> then\n    start sound (pick random (1) to (2))\nend\nchange [test1 v] by (-1)\ndelete this clone\n\ndefine None\nset [<collision?> v] to [0]\nif <<<(mode) = [Moving Block]> and <(join (((round ((([x position v] of [character v]) + (12)) / (24))) * (24)) - (12)) ((round (([y position v] of [character v]) / (24))) * (24))) = (join (((round (((x) + ((12) * ((dir.) + (1)))) / (24))) * (24)) - (12)) ((round ((y) / (24))) * (24)))>> or <<<([abs v] of ((round ((y) / (24))) * (24)) ) > [180]> or <([abs v] of (((round (((x) + ((12) * ((dir.) + (1)))) / (24))) * (24)) - (12)) ) > [240]>> or <[moving blocks x/y v] contains (join (((round (((x) + ((12) * ((dir.) + (1)))) / (24))) * (24)) - (12)) ((round ((y) / (24))) * (24)))?>>> then\n    set [<collision?> v] to [1]\nelse\n    if <[placed blocks x/y v] contains (join (((round (((x) + ((12) * ((dir.) + (1)))) / (24))) * (24)) - (12)) ((round ((y) / (24))) * (24)))?> then\n        set [<collision?> v] to [0]\n        repeat until <(item (<Collision?>) of [placed blocks x/y v]) = (join (((round (((x) + ((12) * ((dir.) + (1)))) / (24))) * (24)) - (12)) ((round ((y) / (24))) * (24)))>\n            change [<collision?> v] by (1)\n        end\n        if <<<<[non-collision v] contains (item (<Collision?>) of [costume v])?> or <(item (<Collision?>) of [costume v]) = [>]>> or <<<(item (<Collision?>) of [costume v]) = [S]> and <(item (1) of [doors open/close v]) = [Blue Door \[OPEN\]]>> or <<<(item (<Collision?>) of [costume v]) = [T]> and <(item (2) of [doors open/close v]) = [Green Door \[OPEN\]]>> or <<<(item (<Collision?>) of [costume v]) = [U]> and <(item (3) of [doors open/close v]) = [Red Door \[OPEN\]]>> or <<(item (<Collision?>) of [costume v]) = [V]> and <(item (4) of [doors open/close v]) = [Yellow Door \[OPEN\]]>>>>>> and <not <<(mode) = [Moving Block]> and <<(item (<Collision?>) of [costume v]) = [C]> or <<(item (<Collision?>) of [costume v]) = [D]> or <<(item (<Collision?>) of [costume v]) = [€]> or <<(item (<Collision?>) of [costume v]) = [#]> or <(item (<Collision?>) of [costume v]) = ["]>>>>>>>> then\n            set [<collision?> v] to [0]\n        else\n            set [<collision?> v] to [1]\n        end\n    end\nend\n\nset [smooth physics on/off v] to [0]\n\n@Fader\n\nwhen I receive [main menu v]\nhide\n\nwhen I receive [next level v]\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\nif <(#Level) > [15]> then\n    switch costume to (white v)\nelse\n    switch costume to (#Level)\nend\ngo to [front v] layer\nshow\nset [fade v] to [0]\nrepeat (10)\n    change [ghost v] effect by (-10)\n    change volume by (-10)\nend\nset [fade v] to [1]\nwait until <not <(Loaded) = [DONE]>>\nset [∆t v] to (timer)\nwait until <(Loaded) = [DONE]>\nif <((timer) - (∆t)) < [1]> then\n    wait (1) seconds\nend\nrepeat (10)\n    change [ghost v] effect by (10)\n    change volume by (10)\nend\nhide\nif <(#Level) > [15]> then\n    show variable [mytime v]\n    show variable [mydeaths v]\nelse\n    broadcast (Initiate PlayMode v)\nend\n\n@Level Display\n\nwhen I receive [initiate playmode v]\nswitch costume to (#Level)\ngo to [front v] layer\nshow\nrepeat until <(#Level) > (length of [levels v])>\n    if <<([x position v] of [character v]) < [-180]> and <([y position v] of [character v]) > [115]>> then\n        go to x: (220) y: (160)\n        set [ghost v] effect to ((440) - (distance to [character v]))\n    else\n        go to x: (-220) y: (160)\n        set [ghost v] effect to ((120) - (distance to [character v]))\n    end\nend\nif <(#Level) < (length of [levels v])> then\n    wait (1.5) seconds\nend\nhide\n\nwhen I receive [main menu v]\nhide\n\nwhen I receive [level select v]\nset [#clone v] to [0]\nrepeat (15)\n    change [#clone v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nswitch costume to (#Clone)\nset size to (0) %\ngo to x: (10) y: (0)\nrepeat until <not <([costume # v] of [levels button v]) > [1]>>\n    go to x: ((0) - (([cos v] of (((#Clone) + (3)) * (24)) ) * (90))) y: ((([sin v] of (((#Clone) + (3)) * (24)) ) * (90)) - (15))\n    if <<touching (mouse-pointer v)?> and <not <mouse down?>>> then\n        repeat until <not <<touching (mouse-pointer v)?> and <not <mouse down?>>>>\n            change size by (((130) - (size)) / (2))\n            set [hover over v] to (#Clone)\n        end\n        if <mouse down?> then\n            repeat until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n                change size by (((110) - (size)) / (2))\n            end\n            if <touching (mouse-pointer v)?> then\n                broadcast (Start Game v)\n                set [#level v] to (#Clone)\n                if <(#Clone) > [1]> then\n                    set [skipped? v] to [1]\n                end\n            end\n        end\n        set [hover over v] to [0]\n    else\n        change size by (((100) - (size)) / (2))\n        go to [front v] layer\n        show\n    end\nend\ndelete this clone\n\nwhen I receive [start game v]\nstop [other scripts in sprite v]\ndelete this clone\n\n@Paused Screen\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen [p v] key pressed\nif <<(WIN) = [0]> and <(PLAY) = [1]>> then\n    if <(PAUSE) = [0]> then\n        set [pause v] to [1]\n        set [∆time v] to (timer)\n        clear graphic effects\n        set size to (140) %\n        show\n        go to [front v] layer\n        repeat (3)\n            change size by (((100) - (size)) / (2))\n            change [ghost v] effect by (((45) - (size)) / (2))\n        end\n    else\n        set [pause v] to [0]\n        set [∆time v] to ((timer) - (∆Time))\n        change [total pause time v] by (∆Time)\n        repeat (3)\n            change size by (((140) - (size)) / (2))\n            change [ghost v] effect by (((200) - (size)) / (2))\n        end\n        hide\n        clear graphic effects\n    end\n    wait until <not <key (p v) pressed?>>\nend\n\n@Leader Board Button\n\nwhen flag clicked\nshow list [☁ leaderboard v]\n\nwhen I receive [win screen v]\nswitch costume to (leader board button v)\ngo to x: (0) y: (-140)\nshow\nrepeat until \n    switch costume to (leader board button v)\n    if <<touching (mouse-pointer v)?> and <not <mouse down?>>> then\n        repeat until <not <touching (mouse-pointer v)?>>\n            change size by (((110) - (size)) / (2))\n            if <mouse down?> then\n                repeat (3)\n                    change size by (((90) - (size)) / (2))\n                end\n                wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n                if <touching (mouse-pointer v)?> then\n                    repeat (3)\n                        change y by (-1)\n                        change size by (((140) - (size)) / (2))\n                        change [ghost v] effect by (((200) - (size)) / (2))\n                    end\n                    hide\n                    switch costume to (leaderboard v)\n                    go to x: (0) y: (0)\n                    go to [front v] layer\n                    show\n                    repeat (3)\n                        change size by (((100) - (size)) / (2))\n                        change [ghost v] effect by (((46) - (size)) / (2))\n                    end\n                    hide list [☁ leaderboard v]\n                    wait until <<<mouse down?> and <<<(mouse x) > [210]> and <(mouse y) > [150]>> and <<(mouse x) < [235]> and <(mouse y) < [175]>>>> or >\n                    show list [☁ leaderboard v]\n                    hide\n                    switch costume to (leader board button v)\n                    clear graphic effects\n                    go to x: (0) y: (-140)\n                    show\n                end\n            end\n        end\n    else\n        change size by (((100) - (size)) / (2))\n    end\nend\n\nwhen I receive [start game v]\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen I receive [main menu v]\nswitch costume to (leaderboard2 v)\ngo to x: (215) y: (-155)\nshow\nrepeat until \n    switch costume to (leaderboard2 v)\n    if <<<touching (mouse-pointer v)?> and <not <mouse down?>>> and <not <([costume # v] of [levels button v]) > [1]>>> then\n        repeat until <not <touching (mouse-pointer v)?>>\n            change size by (((110) - (size)) / (2))\n            if <mouse down?> then\n                repeat (3)\n                    change size by (((90) - (size)) / (2))\n                end\n                wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n                if <touching (mouse-pointer v)?> then\n                    repeat (3)\n                        change y by (-1)\n                        change size by (((140) - (size)) / (2))\n                        change [ghost v] effect by (((200) - (size)) / (2))\n                    end\n                    hide\n                    switch costume to (leaderboard v)\n                    go to x: (0) y: (0)\n                    go to [front v] layer\n                    show\n                    repeat (3)\n                        change size by (((100) - (size)) / (2))\n                        change [ghost v] effect by (((46) - (size)) / (2))\n                    end\n                    broadcast (VIEW LEADERBOARD v) and wait\n                    hide list [☁ leaderboard v]\n                    wait until <<<mouse down?> and <<<(mouse x) > [210]> and <(mouse y) > [150]>> and <<(mouse x) < [235]> and <(mouse y) < [175]>>>> or >\n                    show list [☁ leaderboard v]\n                    hide\n                    switch costume to (leaderboard2 v)\n                    clear graphic effects\n                    go to x: (215) y: (-155)\n                    show\n                end\n            end\n        end\n    else\n        change size by (((100) - (size)) / (2))\n    end\nend\n\nwhen flag clicked\nhide\n\n@TUG2 Thumbnail\n\nwhen [t v] key pressed\nif <(username) = [Yllie]> then\n    switch costume to (tug2 thumbnail v)\n    go to x: (0) y: (0)\n    go to [front v] layer\n    show\nend\n\nwhen flag clicked\nhide\n\n@Cloud List (By Ante22)\n\nset [chars v] to [ !"#$%&'\(\)*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~�]\nset [var v] to [1]\nrepeat (length of (Chars))\n    if <(length of (Var)) = [1]> then\n        set [\['letter:of:', \['readvariable', 'var'\], \['readvariable', 'chars'\]\] v] to (join [0] (Var))\n    else\n        set [\['letter:of:', \['readvariable', 'var'\], \['readvariable', 'chars'\]\] v] to (Var)\n    end\n    change [var v] by (1)\nend\n\nwhen I receive [win screen v]\nif <(☁ Connection?) = [1]> then\n    broadcast (Load v) and wait\n    if <(Skipped?) = [0]> then\n        Add Score to Leaderboard\n        broadcast (Save v) and wait\n    end\n    Generate Leaderboard\nelse\n    delete (all) of [☁ leaderboard v]\n    if <(username) = []> then\n        add [Could not load cloud data. You are not signed in] to [spacing v]\n    else\n        add [Could not load cloud data. You are disconnected from the cloud server] to [spacing v]\n    end\nend\n\ndefine Add Score to Leaderboard\nif <(length of [cloud list v]) = [0]> then\n    add (username) to [cloud list v]\n    add (MyTime) to [cloud list v]\n    add (MyDeaths) to [cloud list v]\n    stop [this script v]\nend\nif <[cloud list v] contains (username)?> then\n    set [c1 v] to [1]\n    repeat until <(username) = (item (C1) of [cloud list v])>\n        change [c1 v] by (3)\n    end\n    if <<(MyTime) < (item ((C1) + (1)) of [cloud list v])> or <(MyTime) = (item ((C1) + (1)) of [cloud list v])>> then\n        if <(MyTime) < (item ((C1) + (1)) of [cloud list v])> then\n            delete (C1) of [cloud list v]\n            delete (C1) of [cloud list v]\n            delete (C1) of [cloud list v]\n        else\n            if <(MyDeaths) < (item ((C1) + (2)) of [cloud list v])> then\n                replace item ((C1) + (2)) of [cloud list v] with (MyDeaths)\n                stop [this script v]\n            end\n        end\n    end\nend\nif <not <[cloud list v] contains (username)?>> then\n    set [c1 v] to [1]\n    repeat until <<<(MyTime) < (item ((C1) + (1)) of [cloud list v])> or <(MyTime) = (item ((C1) + (1)) of [cloud list v])>> or <(C1) > (length of [cloud list v])>>\n        change [c1 v] by (3)\n    end\n    if <(C1) > (length of [cloud list v])> then\n        if <((length of [cloud list v]) / (3)) < ((Leaderboard Limit) + (3))> then\n            add (username) to [cloud list v]\n            add (MyTime) to [cloud list v]\n            add (MyDeaths) to [cloud list v]\n        end\n    else\n        if <(MyTime) < (item ((C1) + (1)) of [cloud list v])> then\n            insert (username) at (C1) of [cloud list v] \n            insert (MyTime) at ((C1) + (1)) of [cloud list v] \n            insert (MyDeaths) at ((C1) + (2)) of [cloud list v] \n        else\n            if <(MyDeaths) < (item ((C1) + (2)) of [cloud list v])> then\n                insert (username) at (C1) of [cloud list v] \n                insert (MyTime) at ((C1) + (1)) of [cloud list v] \n                insert (MyDeaths) at ((C1) + (2)) of [cloud list v] \n            else\n                repeat until <<not <(MyTime) = (item ((C1) + (1)) of [cloud list v])>> or <(MyDeaths) < (item ((C1) + (2)) of [cloud list v])>>\n                    change [c1 v] by (3)\n                end\n                insert (username) at (C1) of [cloud list v] \n                insert (MyTime) at ((C1) + (1)) of [cloud list v] \n                insert (MyDeaths) at ((C1) + (2)) of [cloud list v] \n            end\n        end\n    end\nend\nif <((length of [cloud list v]) / (3)) > (Leaderboard Limit)> then\n    delete (last) of [cloud list v]\n    delete (last) of [cloud list v]\n    delete (last) of [cloud list v]\nend\n\ndefine Generate Leaderboard\ndelete (all) of [☁ leaderboard v]\nset [c1 v] to [1]\nrepeat ((length of [cloud list v]) / (3))\n    add (join (join (join (join (item ((C1) + (1)) of [cloud list v]) [ s]) (item ((6) - (length of (item ((C1) + (1)) of [cloud list v]))) of [spacing v])) (item (C1) of [cloud list v])) (join [ ] (join [\(] (join (item ((C1) + (2)) of [cloud list v]) [ deaths\)])))) to [☁ leaderboard v]\n    if <(item (C1) of [cloud list v]) = (username)> then\n        set [c2 v] to (C1)\n    end\n    change [c1 v] by (3)\nend\nreplace item (C2) of [☁ leaderboard v] with (join [] (item (C2) of [☁ leaderboard v]))\n\ndefine None\ndelete (all) of [\['getparam', 'list', 'r'\] v]\nif <((length of (variable)) mod (2)) = [0]> then\n    delete (all) of [tmp v]\n    set [var v] to [1]\n    repeat ((length of (variable)) / (2))\n        set [var2 v] to (join (letter (Var) of (variable)) (letter ((Var) + (1)) of (variable)))\n        if <(Var2) = [00]> then\n            add (Tmp) to [\['getparam', 'list', 'r'\] v]\n            delete (all) of [tmp v]\n        else\n            add (letter (Var2) of (Chars)) to [tmp v]\n        end\n        change [var v] by (2)\n    end\nend\n\ndefine Save %m.list To %m.var\ndelete (all) of [tmp v]\nset [var v] to [1]\nrepeat (length of [\['getparam', 'list', 'r'\] v])\n    set [var2 v] to [1]\n    repeat (length of (item (Var) of [\['getparam', 'list', 'r'\] v]))\n        set [var3 v] to ([\['letter:of:', \['readvariable', 'var2'\], \['getline:oflist:', \['readvariable', 'var'\], \['getparam', 'list', 'r'\]\]\] v] of [cloud list \(by ante22\) v])\n        if <(Var3) = [0]> then\n            add [9] to [tmp v]\n            add [6] to [tmp v]\n        else\n            add (letter (1) of (Var3)) to [tmp v]\n            add (letter (2) of (Var3)) to [tmp v]\n        end\n        change [var2 v] by (1)\n    end\n    add [0] to [tmp v]\n    add [0] to [tmp v]\n    change [var v] by (1)\nend\nset [\['getparam', 'variable', 'r'\] v] to (Tmp)\n\nwhen I receive [load v]\nLoad (☁ Cloud) To %m.list\n\nwhen I receive [save v]\nSave %m.list To %m.var\n\nwhen I receive [view leaderboard v]\nif <(☁ Connection?) = [1]> then\n    broadcast (Load v) and wait\n    Generate Leaderboard\nelse\n    delete (all) of [☁ leaderboard v]\n    if <(username) = []> then\n        add [Could not load cloud data. You are not signed in] to [spacing v]\n    else\n        add [Could not load cloud data. You are disconnected from the cloud server] to [spacing v]\n    end\nend\n\nset [☁ connection? v] to [1]\n\nset [☁ connection? v] to [0]\nset [inprogress? v] to [1]\nshow list [cloud list v]\ndelete (all) of [tmp v]\ndelete (all) of [cloud list v]\n\n@ \n\nwhen [timer v] > (0.01)\nif <(YourUsername) = [null]> then\n    set [yourusername v] to (username)\n    set [currentusername v] to (YourUsername)\n    set [timerbackup v] to [0]\n    set [lasttimerstate v] to [0]\n    set [active v] to [0]\n    set [clonetype v] to [none]\n    set [checkuser? v] to [0]\nend\nset [reset. v] to [0]\nif <(CloneType) = [none]> then\n    switch costume to (costume3 v)\n    if <not <(username) = (CurrentUsername)>> then\n        if <not <(CurrentUsername) = (YourUsername)>> then\n            set [clonetype v] to [Notify]\n            create clone of (_myself_ v)\n            set [clonetype v] to [none]\n            stop [this script v]\n        end\n        RemixCheck\n        if <(CheckUser?) = [0]> then\n            set [reset. v] to [1]\n        end\n        set [checkuser? v] to [1]\n    else\n        if <not <(CurrentUsername) = (YourUsername)>> then\n            if <(CheckUser?) = [0]> then\n                set [reset. v] to [1]\n            end\n            set [checkuser? v] to [1]\n        end\n    end\nend\nif <(Reset.) = [1]> then\n    set [remixtimer v] to [0]\nend\n\nset [yourusername v] to [null]\n\ndefine RemixCheck\nset [currentusername v] to (username)\nif <(TimerBackup) > [300]> then\n    set [yourusername v] to (username)\n    set [timerbackup v] to [0]\n    set [active v] to [0]\n    set [checkuser? v] to [0]\nend\n\nwhen [timer v] > (0.01)\nif <(CheckUser?) = [1]> then\n    if <(Active) = [0]> then\n        if <not <(CloneType) = [Notify]>> then\n            set [remixtimer v] to [0]\n            show\n            go to [front v] layer\n            go to x: (200) y: (0)\n            switch costume to (costume4 v)\n            if <<not <touching (mouse-pointer v)?>> and <(mouse x) = [240]>> then\n                set [active v] to [1]\n            end\n            switch costume to (costume3 v)\n            hide\n            go to x: (0) y: (0)\n        end\n    end\nend\n\nwhen [timer v] > (10)\nif <(CloneType) = [none]> then\n    if <(Active) = [1]> then\n        change [timerbackup v] by (10)\n        RemixCheck\n        set [remixtimer v] to [0]\n    end\nend\n\nwhen I start as a clone\nif <(CloneType) = [Notify]> then\n    go to x: (0) y: (0)\n    switch costume to (costume1 v)\n    show\n    go to [front v] layer\n    set [reset. v] to [0]\n    set [lasttimerstate v] to ((timer) - (RemixTimer))\n    repeat until <((timer) - (RemixTimer)) > ((LastTimerState) + (5))>\n        go to [front v] layer\n    end\n    switch costume to (costume2 v)\n    repeat until <key (space v) pressed?>\n        go to [front v] layer\n    end\n    hide\nelse\nend\n\n