- Dash & Jump -


@Stage\n\nwhen I receive [hide lvl2 v]\nrepeat (20)\n    change volume by (5)\nend\n\nwhen I receive [enter water v]\nif <(world) > [2]> then\n    if <(1Music on?) = [1]> then\n        repeat (5)\n            change volume by (20)\n        end\n    end\nend\n\nwhen I receive [exit water v]\nif <(world) > [2]> then\n    if <(1Music on?) = [1]> then\n        repeat (5)\n            change volume by (-20)\n        end\n    end\nend\n\nwhen I receive [boss v]\nif <(1Music on?) = [1]> then\n    repeat (50)\n        change volume by (-2)\n    end\n    stop [other scripts in sprite v]\n    set volume to (0) %\nend\n\nwhen I receive [end intro v]\nswitch backdrop to (saved bg)\nset volume to (100) %\nforever\n    if <(1Music on?) = [1]> then\n        if <(jukebox song) = [0]> then\n            if <<(menu) = [2]> or <<(menu) = [4]> or <(menu) = [6]>>> then\n                play sound [competition v] until done\n            else\n                play sound [sonic menu v] until done\n            end\n        end\n    end\nend\n\nwhen I receive [hide level sprites v]\nstop [other scripts in stage v]\nbroadcast (hide lvl2 v)\nswitch backdrop to (saved bg)\nset volume to (0) %\nwait until <(menu) = [2]>\nforever\n    if <(1Music on?) = [1]> then\n        if <(jukebox song) = [0]> then\n            if <<(menu) = [2]> or <<(menu) = [4]> or <(menu) = [6]>>> then\n                play sound [competition v] until done\n            else\n                play sound [sonic menu v] until done\n            end\n        end\n    end\nend\n\nwhen I receive [boss killed v]\nstop [other scripts in stage v]\n\nwhen I receive [gameplay v]\nrepeat (20)\n    change volume by (-5)\nend\nif <(world) < [3]> then\n    stop [other scripts in sprite v]\nend\n\nwhen I receive [gameplay v]\nif <(1Music on?) = [1]> then\n    if <(world) > [2]> then\n        wait (0.5) seconds\n        stop [other scripts in sprite v]\n        set volume to (0) %\n        if <(jukebox song) = [0]> then\n            play sound (join [world ] (join (world) [ intro])) until done\n            forever\n                play sound (join [world ] (join (world) [ loop])) until done\n            end\n        end\n    end\nend\n\n@mike\n\nwhen I receive [fade v]\nset [left or right v] to [r]\nset [go in portal? v] to [0]\nif <<not <(costume [number v]) = [11]>> and <not <(costume [number v]) = [24]>>> then\n    set [turn v] to [90]\n    point in direction (90)\n    set size to (0) %\n    set [ghost v] effect to (100)\n    repeat (10)\n        change size by (((35) - (size)) / (2))\n        change [ghost v] effect by (-10)\n    end\n    set size to (35) %\nend\n\nwhen I receive [hide level sprites v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nhide\n\nwhen I receive [gameplay v]\nif <(world) > [2]> then\n    forever\n        wait until <touching (water v)?>\n        broadcast (enter water v)\n        wait (0.1) seconds\n        wait until <not <touching (water v)?>>\n        broadcast (exit water v)\n        wait (0.1) seconds\n    end\nend\n\nwhen I receive [hit by boss v]\nbroadcast (fade v)\nbroadcast (reset orbs v)\ncreate clone of (_myself_ v)\ngo to x: (-206) y: (-118)\nset [x speed v] to [0]\nset [y speed v] to [-1]\nset [up thing v] to [a]\n\nwhen I receive [gameplay v]\nforever\n    set [walk frame v] to [1]\n    repeat (3)\n        change [walk frame v] by (1)\n    end\n    repeat (3)\n        change [walk frame v] by (-1)\n    end\n    set [walk frame v] to [1]\n    wait (0) seconds\n    set [walk frame v] to [4]\n    repeat (3)\n        change [walk frame v] by (1)\n    end\n    repeat (2)\n        change [walk frame v] by (-1)\n    end\nend\n\nwhen I receive [goal v]\nif <(left or right) = [r]> then\n    switch costume to (jump3 v)\nelse\n    switch costume to (jump3-l v)\nend\n\nwhen flag clicked\nset [up or down? v] to [down]\nset [key? v] to [0]\nset [mini? v] to [1]\nset [level v] to [1]\nset [paused? v] to [0]\nset [touching star? v] to [0]\nset [falling2? v] to [0]\nset [red or blue? v] to [r]\nset [can jump? v] to [1]\nhide\n\nwhen I receive [gameplay v]\nif <(world) > [1]> then\n    forever\n        if <touching (arrow orbs v)?> then\n            wait (0.05) seconds\n            if <touching (arrow orbs v)?> then\n                if <(left or right) = [r]> then\n                    set [left or right v] to [l]\n                else\n                    set [left or right v] to [r]\n                end\n                broadcast (swap walk v)\n                set [x speed v] to [0]\n                wait (0.2) seconds\n                wait until <not <touching (arrow orbs v)?>>\n            end\n        end\n    end\nend\n\nwhen I receive [gameplay v]\nif <(world) > [1]> then\n    forever\n        if <<touching (arrow orbs2 v)?> and <not <(paused?) = [1]>>> then\n            wait (0.05) seconds\n            if <<touching (arrow orbs2 v)?> and <not <(paused?) = [1]>>> then\n                if <(up or down?) = [down]> then\n                    set [up or down? v] to [up]\n                else\n                    set [up or down? v] to [down]\n                end\n                turn right (180) degrees\n                if <not <touching (water v)?>> then\n                    set [falling2? v] to [1]\n                    set [x speed v] to [0]\n                end\n                set [y speed v] to [0]\n                broadcast (swap gravity v)\n                wait (0.2) seconds\n                wait until <not <touching (arrow orbs2 v)?>>\n            end\n        end\n    end\nend\n\ndefine ground\nset [jump thing1 v] to [0]\nset [old y v] to (y position)\nif <<touching (level v)?> or <touching (redblueblocks v)?>> then\n    set [on ground? v] to [1]\n    set [up thing v] to [0]\n    repeat until <<<not <touching (level v)?>> and <not <touching (redblueblocks v)?>>> or <(up thing) = [a]>>\n        if <(up or down?) = [down]> then\n            change y by (0.1)\n        else\n            change y by (-0.1)\n        end\n        change [up thing v] by (1)\n        if <(up thing) > [150]> then\n            create clone of (_myself_ v)\n            broadcast (fade v)\n            broadcast (reset orbs v)\n            go to x: (-206) y: (-118)\n            point in direction (90)\n            set [x speed v] to [0]\n            set [y speed v] to [0]\n            set [up thing v] to [a]\n        end\n    end\n    if <(up or down?) = [down]> then\n        set [y speed v] to [-1.5]\n    else\n        set [y speed v] to [1.5]\n    end\n    if <<<key (space v) pressed?> or <<key (up arrow v) pressed?> or <mouse down?>>> and <(can jump?) = [1]>> then\n        if <not <touching (water v)?>> then\n            if <(up or down?) = [down]> then\n                set [y speed v] to ((12) / (mini?))\n            else\n                set [y speed v] to ((-12) / (mini?))\n            end\n            broadcast (jump v)\n        else\n            if <(up or down?) = [down]> then\n                set [y speed v] to [1]\n            else\n                set [y speed v] to [-1]\n            end\n        end\n    end\nelse\n    set [on ground? v] to [0]\nend\n\ndefine costume\nif <(left or right) = [r]> then\n    if <(up or down?) = [down]> then\n        if <(on ground?) = [1]> then\n            switch costume to (walk frame)\n        else\n            switch costume to (jump frame)\n        end\n    else\n        if <(on ground?) = [1]> then\n            switch costume to ((walk frame) + (13))\n        else\n            switch costume to ((jump frame) + (13))\n        end\n    end\nelse\n    if <(up or down?) = [down]> then\n        if <(on ground?) = [1]> then\n            switch costume to ((walk frame) + (13))\n        else\n            switch costume to ((jump frame) + (13))\n        end\n    else\n        if <(on ground?) = [1]> then\n            switch costume to (walk frame)\n        else\n            switch costume to (jump frame)\n        end\n    end\nend\n\nwhen I receive [swap gravity v]\nwait (0.1) seconds\nwait until <<(on ground?) = [1]> or <touching (water v)?>>\nset [falling2? v] to [0]\n\nset y to (-124)\n\nwhen I start as a clone\nset [mini? v] to [1]\nset [red or blue? v] to [r]\nbroadcast (swap colours v)\nif <(classic mode?) = [0]> then\n    start sound [hit!! v]\nelse\n    start sound [fireball v]\nend\nset [up or down? v] to [down]\nbroadcast (player hit v)\ngo to [front v] layer\ngo [backward v] (3) layers\nset y to (old y)\nif <(left or right) = [r]> then\n    switch costume to (fall1 v)\n    set [x speed v] to [-8]\nelse\n    switch costume to (fall-l v)\n    set [x speed v] to [8]\nend\nset [y speed v] to [5]\nrepeat until <<(y position) < [-168]> or <(x position) < [-235]>>\n    turn left (8) degrees\n    change [y speed v] by (-1.5)\n    change [x speed v] by (((0) - (x speed)) / (18))\n    if <(size) = [35]> then\n        change x by (x speed)\n        change y by (y speed)\n    else\n        change x by ((x speed) / (2))\n        change y by ((y speed) / (2))\n    end\nend\ndelete this clone\n\nwhen I receive [gameplay v]\nset [can jump? v] to [1]\nset [mini? v] to [1]\nset [red or blue? v] to [r]\nset [falling2? v] to [0]\nset [up or down? v] to [down]\nset [touching star? v] to [0]\nset volume to ((1Sound on?) * (100)) %\nset [paused? v] to [0]\nset rotation style [all around v]\nset [left or right v] to [r]\nset [go in portal? v] to [0]\ndelete (all) of [doors v]\nset [key? v] to [0]\nwait (0.2) seconds\npoint in direction (90)\nset [turn v] to [90]\nswitch costume to (walk1 v)\nshow\ngo to x: (-206) y: (-118)\nset [x speed v] to [0]\nset [y speed v] to [-1]\nset [level v] to [1]\nset [on ground? v] to [1]\nset [floor v] to [2]\nset size to (0) %\nset [ghost v] effect to (100)\nrepeat (20)\n    change size by (((35) - (size)) / (4))\n    change [ghost v] effect by (-10)\nend\nset size to (35) %\nforever\n    set rotation style [don't rotate v]\n    if <(y speed) > [12]> then\n        set [y speed v] to [12]\n    end\n    if <(y speed) < [-12]> then\n        set [y speed v] to [-12]\n    end\n    switch costume to (hitbox v)\n    change x by (x speed)\n    change y by (y speed)\n    if <(up or down?) = [down]> then\n        turn right (((turn) - (direction)) / (3)) degrees\n    else\n        turn right ((((turn) * (-1)) - (direction)) / (3)) degrees\n    end\n    if <(mini?) = [1]> then\n        if <(left or right) = [r]> then\n            set [turn v] to ((y speed) + (93))\n        else\n            set [turn v] to (((y speed) * (-1)) + (87))\n        end\n    else\n        if <(left or right) = [r]> then\n            set [turn v] to (((y speed) / (2)) + (93))\n        else\n            set [turn v] to (((y speed) / (-2)) + (87))\n        end\n    end\n    if <(y position) < [-173]> then\n        create clone of (_myself_ v)\n        broadcast (fade v)\n        broadcast (reset orbs v)\n        go to x: (-206) y: (-118)\n        point in direction (90)\n        set [x speed v] to [0]\n        set [y speed v] to [0]\n        set [up thing v] to [a]\n    end\n    if <(y position) > [162]> then\n        if <(up or down?) = [down]> then\n            set [y speed v] to [-1]\n            set [up thing v] to [a]\n            set y to (162)\n        else\n            if <(y position) > [183]> then\n                create clone of (_myself_ v)\n                broadcast (fade v)\n                broadcast (reset orbs v)\n                go to x: (-206) y: (-118)\n                point in direction (90)\n                set [x speed v] to [0]\n                set [y speed v] to [0]\n                set [up thing v] to [a]\n            end\n        end\n    end\n    ground\n    if <<touching (keys v)?> and <(clone touching key or star?) = [0]>> then\n        set [key touch v] to [1]\n    else\n        set [key touch v] to [0]\n    end\n    if <<touching (boss v)?> and <(clone touching key or star?) = [0]>> then\n        set [boss touch v] to [1]\n    else\n        set [boss touch v] to [0]\n    end\n    if <touching (water v)?> then\n        if <<key (space v) pressed?> or <<key (up arrow v) pressed?> or <mouse down?>>> then\n            if <(up or down?) = [down]> then\n                change [y speed v] by ((((8) / (mini?)) - (y speed)) / (15))\n            else\n                change [y speed v] by ((((-8) / (mini?)) - (y speed)) / (15))\n            end\n        else\n            if <(up or down?) = [down]> then\n                change [y speed v] by ((((-8) / (mini?)) - (y speed)) / (15))\n            else\n                change [y speed v] by ((((8) / (mini?)) - (y speed)) / (15))\n            end\n        end\n    else\n        if <<key (space v) pressed?> or <<key (up arrow v) pressed?> or <mouse down?>>> then\n            if <(up or down?) = [down]> then\n                change [y speed v] by ((-1) / (mini?))\n            else\n                change [y speed v] by ((1) / (mini?))\n            end\n        else\n            if <(up or down?) = [down]> then\n                change [y speed v] by ((-1.5) / (mini?))\n            else\n                change [y speed v] by ((1.5) / (mini?))\n            end\n        end\n    end\n    if <(falling2?) = [0]> then\n        if <touching (water v)?> then\n            if <(left or right) = [r]> then\n                change [x speed v] by ((((2) / (mini?)) - (x speed)) / (16))\n            else\n                change [x speed v] by ((((-2) / (mini?)) - (x speed)) / (16))\n            end\n        else\n            if <(left or right) = [r]> then\n                change [x speed v] by ((((4) / (mini?)) - (x speed)) / (16))\n            else\n                change [x speed v] by ((((-4) / (mini?)) - (x speed)) / (16))\n            end\n        end\n    end\n    if <(x position) < [-230]> then\n        set [left or right v] to [r]\n        broadcast (reset orbs v)\n        set [x speed v] to [0]\n        set x to (-230)\n    end\n    if <<(x position) > [235]> or <<key (b v) pressed?> and <(username) = [ToadfanSchool]>>> then\n        set [red or blue? v] to [r]\n        broadcast (swap colours v)\n        set x to (236)\n        delete (all) of [keys v]\n        delete (all) of [doors v]\n        start sound [windows thing v]\n        set [up or down? v] to [down]\n        change [☁ level beats v] by (1)\n        set [key? v] to [0]\n        if <(floor) = [2]> then\n            set [floor v] to [1]\n            change [level v] by (1)\n        else\n            set [floor v] to [2]\n            change [level v] by (1)\n        end\n        set [x speed v] to [0]\n        set [y speed v] to [0]\n        hide\n        wait (0.5) seconds\n        set [turn v] to [90]\n        point in direction (90)\n        set [mini? v] to [1]\n        go to x: (-206) y: (-118)\n        wait until <([x position v] of [level v]) = [0]>\n        show\n        set [ghost v] effect to (100)\n        move up\n        broadcast (fade v)\n        if <<(level) = [10]> and <(world) = [4]>> then\n            broadcast (boss v)\n            switch costume to (walk1 v)\n            wait (2) seconds\n        end\n    end\n    if <touching (spikes v)?> then\n        broadcast (fade v)\n        broadcast (reset orbs v)\n        create clone of (_myself_ v)\n        point in direction (90)\n        go to x: (-206) y: (-118)\n        set [x speed v] to [0]\n        set [y speed v] to [-1]\n        set [up thing v] to [a]\n    end\n    if <touching (doors v)?> then\n        if <(key?) > [0]> then\n            set rotation style [all around v]\n            if <(left or right) = [r]> then\n                switch costume to (key v)\n            else\n                switch costume to (fall-l v)\n            end\n            change [key? v] by (-1)\n            broadcast (unlock door v)\n            start sound [MW_KeyOpen v]\n            wait (0.25) seconds\n            set [x speed v] to [0]\n            set [y speed v] to [-1]\n            switch costume to (hitbox v)\n        else\n            set rotation style [all around v]\n            if <(left or right) = [r]> then\n                switch costume to (key v)\n            else\n                switch costume to (key-l v)\n            end\n            broadcast (door fail v)\n            wait (0.25) seconds\n            broadcast (fade v)\n            broadcast (reset orbs v)\n            create clone of (_myself_ v)\n            go to x: (-206) y: (-118)\n            point in direction (90)\n            set [x speed v] to [0]\n            set [y speed v] to [-1]\n            set [up thing v] to [a]\n        end\n    end\n    if <<touching (portals v)?> and <(Go in portal?) = [1]>> then\n        set rotation style [all around v]\n        if <(left or right) = [r]> then\n            switch costume to (jump3 v)\n        else\n            switch costume to (jump3-l v)\n        end\n        set [go in portal? v] to [0]\n        start sound [teleport v]\n        if <(mini?) = [1]> then\n            set size to (35) %\n        else\n            set size to (17.5) %\n        end\n        repeat (5)\n            change x by (x speed)\n            change [ghost v] effect by (20)\n            if <(mini?) = [1]> then\n                change size by (-5)\n            else\n                change size by (-2.5)\n            end\n        end\n        set size to (5) %\n        if <<<(world) = [2]> and <<(level) = [6]> or <(level) = [8]>>> or <<(world) = [4]> and <<(level) = [3]> or <(level) > [6]>>>> then\n            set [left or right v] to [r]\n            set [up or down? v] to [down]\n            set [x speed v] to [4]\n            point in direction (90)\n            switch costume to (jump3 v)\n            broadcast (reset orbs v)\n        end\n        if <<(world) = [4]> and <(level) = [9]>> then\n            set [red or blue? v] to [b]\n            broadcast (swap colours v)\n        end\n        go to x: (item (1) of [portal exit v]) y: (item (2) of [portal exit v])\n        set [go in portal? v] to [0]\n        broadcast (teleport v)\n        set size to (5) %\n        repeat (5)\n            change x by (x speed)\n            change [ghost v] effect by (-20)\n            if <(mini?) = [1]> then\n                change size by (5)\n            else\n                change size by (2.5)\n            end\n        end\n        if <(mini?) = [1]> then\n            set size to (35) %\n        else\n            set size to (17.5) %\n        end\n        set [y speed v] to [0]\n        set [go in portal? v] to [0]\n    end\n    if <<(level) = [11]> and <(x position) > [-15]>> then\n        stop [other scripts in sprite v]\n        broadcast (goal v)\n        repeat (30)\n            change y by (((-121) - (y position)) / (4))\n        end\n        set y to (-121)\n        stop [this script v]\n    end\n    set rotation style [all around v]\n    if <<touching (lasers v)?> and <(mini?) = [1]>> then\n        switch costume to (fall1 v)\n        start sound [fireball v]\n        set [x speed v] to [0]\n        set [y speed v] to [0]\n        set [mini? v] to [1.5]\n        set size to (35) %\n        set [brightness v] effect to (100)\n        repeat (10)\n            change size by (((17.5) - (size)) / (2))\n            change [brightness v] effect by (-10)\n            change y by (-0.75)\n        end\n        set size to (17.5) %\n    end\n    if <<touching (stars v)?> and <(clone touching key or star?) = [0]>> then\n        set [touching star? v] to [1]\n    else\n        set [touching star? v] to [0]\n    end\n    costume\n    wait until <(paused?) = [0]>\nend\n\nwhen I receive [gameplay v]\nforever\n    if <<<key (space v) pressed?> or <<key (up arrow v) pressed?> or <mouse down?>>> and <touching (orbs v)?>> then\n        if <(up or down?) = [down]> then\n            set [y speed v] to [9]\n        else\n            set [y speed v] to [-9]\n        end\n        broadcast (jump v)\n        wait until <not <touching (orbs v)?>>\n    end\n    if <<<key (space v) pressed?> or <<key (up arrow v) pressed?> or <mouse down?>>> and <not <touching (orbs v)?>>> then\n        set [times v] to [0]\n        repeat until <<(times) > [3]> or <not <<key (space v) pressed?> or <<key (up arrow v) pressed?> or <mouse down?>>>>>\n            if <<<key (space v) pressed?> or <<key (up arrow v) pressed?> or <mouse down?>>> and <touching (orbs v)?>> then\n                if <(up or down?) = [down]> then\n                    set [y speed v] to ((9) / (mini?))\n                else\n                    set [y speed v] to ((-9) / (mini?))\n                end\n                broadcast (jump v)\n                set [times v] to [15]\n                wait until <not <touching (orbs v)?>>\n            end\n            change [times v] by (1)\n        end\n        wait until <not <<key (space v) pressed?> or <<key (up arrow v) pressed?> or <mouse down?>>>>\n    end\nend\n\nwhen I receive [gameplay v]\nif <(world) > [2]> then\n    forever\n        if <<touching (c-buttons v)?> or <touching (swap button v)?>> then\n            broadcast (touch button v)\n            if <not <touching (water v)?>> then\n                set [x speed v] to [0]\n                set [falling2? v] to [1]\n                wait until <<not <touching (c-buttons v)?>> and <not <touching (swap button v)?>>>\n                wait (0.1) seconds\n                wait until <<(on ground?) = [1]> or <touching (water v)?>>\n                wait (0.1) seconds\n            end\n            if <touching (water v)?> then\n                wait (0.75) seconds\n            end\n            wait until <<not <touching (c-buttons v)?>> and <not <touching (swap button v)?>>>\n        end\n    end\nend\n\nwhen I receive [fire v]\nset [y speed v] to [-2]\n\nwhen I receive [fire v]\nwait (0.1) seconds\nwait until <<(on ground?) = [1]> or <touching (water v)?>>\nset [falling2? v] to [0]\n\nwhen I start as a clone\nforever\n    if <<touching (boss v)?> or <<touching (stars v)?> or <touching (keys v)?>>> then\n        set [clone touching key or star? v] to [1]\n    else\n        set [clone touching key or star? v] to [0]\n        wait until <<touching (boss v)?> or <<touching (stars v)?> or <touching (keys v)?>>>\n    end\nend\n\nwhen I receive [jump v]\nset [allowed2jump v] to [0]\nif <(classic mode?) = [0]> then\n    start sound [jump1 v]\nelse\n    start sound [JUMP smb v]\nend\nset [jump frame v] to [8]\nrepeat (2)\n    wait (0) seconds\n    change [jump frame v] by (1)\nend\n\nwhen I receive [jump v]\nset [can jump? v] to [0]\nwait until <<not <key (space v) pressed?>> and <<not <key (up arrow v) pressed?>> and <not <mouse down?>>>>\nset [can jump? v] to [1]\n\ndefine move up\nset [up thing v] to [0]\nrepeat until <<<not <touching (level v)?>> and <not <touching (redblueblocks v)?>>> or <(up thing) > [500]>>\n    change y by (1)\n    change [up thing v] by (1)\nend\n\nwhen I receive [gameplay v]\nif <(world) > [2]> then\n    forever\n        wait until <(falling2?) = [1]>\n        wait until <(on ground?) = [1]>\n        set [falling2? v] to [0]\n    end\nend\n\n@level\n\nwhen I receive [slide v]\ncreate clone of (_myself_ v)\nrepeat (10)\n    change x by (((-465) - (x position)) / (4))\n    change [ghost v] effect by (10)\nend\nrepeat (10)\n    change x by (((-465) - (x position)) / (4))\nend\nset [ghost v] effect to (0)\nnext costume\nset x to (0)\n\nwhen flag clicked\nhide\n\nwhen I receive [hide level sprites v]\nrepeat (1)\n    delete this clone\nend\nrepeat (5)\n    change y by (((360) - (y position)) / (4))\nend\nbroadcast (worlds v)\nset [level v] to [1]\nrepeat (15)\n    change y by (((360) - (y position)) / (4))\n    change [ghost v] effect by (7.5)\nend\nset [ghost v] effect to (0)\nhide\n\nwhen I start as a clone\nnext costume\nset x to (455)\nrepeat (20)\n    change x by (((0) - (x position)) / (4))\nend\ndelete this clone\n\nwhen I receive [gameplay v]\nset [next lvl v] to [2]\nshow\nswitch costume to (join [costume] (join (world) [-1]))\ngo to x: (0) y: (-231)\nrepeat (20)\n    change y by (((0) - (y position)) / (4))\nend\ngo to x: (0) y: (0)\nforever\n    wait until <(level) = (next lvl)>\n    change [next lvl v] by (1)\n    broadcast (slide v)\nend\n\n@spikes\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nnext costume\nset x to (455)\nrepeat (20)\n    change x by (((0) - (x position)) / (4))\nend\ndelete this clone\n\nwhen I receive [gameplay v]\nshow\nswitch costume to (join [costume] (join (world) [-1]))\ngo to x: (0) y: (-231)\nrepeat (20)\n    change y by (((0) - (y position)) / (4))\nend\ngo to x: (0) y: (0)\n\nwhen I receive [slide v]\ncreate clone of (_myself_ v)\nrepeat (10)\n    change x by (((-465) - (x position)) / (4))\n    change [ghost v] effect by (10)\nend\nrepeat (10)\n    change x by (((-465) - (x position)) / (4))\nend\nset [ghost v] effect to (0)\nnext costume\nset x to (0)\n\nwhen I receive [hide level sprites v]\nrepeat (1)\n    delete this clone\nend\nrepeat (5)\n    change y by (((360) - (y position)) / (4))\nend\nrepeat (15)\n    change y by (((360) - (y position)) / (4))\n    change [ghost v] effect by (7.5)\nend\nset [ghost v] effect to (0)\nhide\n\n@bg\n\nwhen flag clicked\nhide\n\nwhen I receive [gameplay v]\nif <(1LDM on?) = [0]> then\n    show\n    switch costume to (join [costume] (join (world) [-1]))\n    go to x: (0) y: (-231)\n    repeat (20)\n        change y by (((0) - (y position)) / (4))\n    end\n    go to x: (0) y: (0)\nend\n\nwhen I receive [hide level sprites v]\nrepeat (1)\n    delete this clone\nend\nrepeat (5)\n    change y by (((360) - (y position)) / (4))\nend\nrepeat (15)\n    change y by (((360) - (y position)) / (4))\n    change [ghost v] effect by (7.5)\nend\nset [ghost v] effect to (0)\nhide\n\nwhen I start as a clone\nnext costume\nset x to (455)\nrepeat (20)\n    change x by (((0) - (x position)) / (4))\nend\ndelete this clone\n\nwhen I receive [slide v]\nif <(1LDM on?) = [0]> then\n    create clone of (_myself_ v)\n    repeat (10)\n        change x by (((-465) - (x position)) / (4))\n        change [ghost v] effect by (10)\n    end\n    repeat (10)\n        change x by (((-465) - (x position)) / (4))\n    end\n    set [ghost v] effect to (0)\n    next costume\n    set x to (0)\nend\n\ngo [forward v] (1) layers\n\n@redblueblocks\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nswitch costume to (join (red or blue?) (join (join (world) [-]) (level)))\nset x to (455)\nrepeat (20)\n    change x by (((0) - (x position)) / (4))\nend\ndelete this clone\n\nwhen I receive [slide v]\nif <(world) > [2]> then\n    stop [other scripts in sprite v]\n    set [ghost v] effect to (0)\n    create clone of (_myself_ v)\n    repeat (10)\n        change x by (((-465) - (x position)) / (4))\n        change [ghost v] effect by (10)\n    end\n    repeat (10)\n        change x by (((-465) - (x position)) / (4))\n    end\n    set [ghost v] effect to (0)\n    switch costume to (join (red or blue?) (join (join (world) [-]) (level)))\n    set x to (0)\nend\n\nwhen I receive [hide level sprites v]\nif <(world) > [2]> then\n    repeat (1)\n        delete this clone\n    end\n    repeat (5)\n        change y by (((360) - (y position)) / (4))\n    end\n    repeat (15)\n        change y by (((360) - (y position)) / (4))\n        change [ghost v] effect by (7.5)\n    end\n    set [ghost v] effect to (0)\n    hide\nend\n\nwhen I receive [swap colours v]\nset [ghost v] effect to (0)\nif <not <(letter (1) of ([costume name v] of [redblueblocks v])) = (red or blue?)>> then\n    repeat (4)\n        change [ghost v] effect by (25)\n    end\n    switch costume to (join (red or blue?) (join (join (world) [-]) (level)))\n    repeat (4)\n        change [ghost v] effect by (-25)\n    end\nend\n\nwhen I receive [gameplay v]\nif <(world) > [2]> then\n    show\n    switch costume to (r-nothing v)\n    go to x: (0) y: (-231)\n    repeat (20)\n        change y by (((0) - (y position)) / (4))\n    end\n    go to x: (0) y: (0)\nend\n\n@water\n\nwhen flag clicked\nhide\n\nwhen I receive [gameplay v]\nif <<(world) = [3]> or <(world) = [4]>> then\n    if <(world) = [3]> then\n        wait until <(level) = [7]>\n        switch costume to (costume3-7 v)\n    else\n        wait until <(level) = [9]>\n        switch costume to (costume4-8 v)\n    end\n    set [clone? v] to [0]\n    show\n    set [ghost v] effect to (50)\n    go to x: (465) y: (0)\n    repeat (20)\n        change x by (((0) - (x position)) / (4))\n    end\n    go to x: (0) y: (0)\nend\n\nwhen I start as a clone\nnext costume\nset x to (455)\nrepeat (20)\n    change x by (((0) - (x position)) / (4))\nend\ndelete this clone\n\nwhen I receive [slide v]\nif <<<(level) > [7]> and <(world) = [3]>> or <<(level) > [9]> and <(world) = [4]>>> then\n    create clone of (_myself_ v)\n    repeat (10)\n        change x by (((-465) - (x position)) / (4))\n        change [ghost v] effect by (10)\n    end\n    repeat (10)\n        change x by (((-465) - (x position)) / (4))\n    end\n    set [ghost v] effect to (50)\n    next costume\n    set x to (0)\nend\n\nwhen I receive [hide level sprites v]\nrepeat (1)\n    delete this clone\nend\nrepeat (5)\n    change y by (((360) - (y position)) / (4))\nend\nrepeat (15)\n    change y by (((360) - (y position)) / (4))\n    change [ghost v] effect by (7.5)\nend\nset [ghost v] effect to (0)\nhide\n\n@logo\n\nwhen flag clicked\nhide\n\nwhen I receive [title v]\ntitle logo\n\ndefine title logo\ngo to x: (0) y: (60)\npoint in direction (90)\nset size to (0) %\nshow\nset [y v] to [0]\nforever\n    switch costume to (hitbox v)\n    if <touching (mouse-pointer v)?> then\n        change size by ((((([sin v] of ((y) / (2)) ) * (25)) + (350)) - (size)) / (6))\n        if <mouse down?> then\n            set [let go v] to [0]\n            repeat until <(let go) = [1]>\n                switch costume to (hitbox v)\n                change size by ((((([sin v] of ((y) / (2)) ) * (25)) + (250)) - (size)) / (6))\n                if <<not <touching (mouse-pointer v)?>> or <not <mouse down?>>> then\n                    set [let go v] to [1]\n                end\n                if <<(length of [stars v]) = [12]> and <(length of [completed worlds v]) = [4]>> then\n                    switch costume to (logo2 v)\n                else\n                    switch costume to (logo v)\n                end\n            end\n            set [let go v] to [0]\n            switch costume to (hitbox v)\n            if <touching (mouse-pointer v)?> then\n                switch backdrop to ((backdrop [number v]) + (1))\n                set [saved bg v] to (backdrop [number v])\n                start sound [next v]\n            end\n        end\n    else\n        change size by ((((([sin v] of ((y) / (2)) ) * (25)) + (300)) - (size)) / (6))\n    end\n    change [y v] by (7)\n    change y by (([sin v] of (y) ) / (3))\n    turn right (([sin v] of ((100) - (y)) ) / (6)) degrees\n    if <<(length of [stars v]) = [12]> and <(length of [completed worlds v]) = [4]>> then\n        switch costume to (logo2 v)\n    else\n        switch costume to (logo v)\n    end\nend\n\nwhen I receive [boss killed v]\nif <(1Music on?) = [1]> then\n    if <(jukebox song) = [0]> then\n        repeat (50)\n            change volume by (-2)\n        end\n        stop [other scripts in sprite v]\n        set volume to (100) %\n    end\nend\n\nwhen I receive [gameplay v]\nif <(1Music on?) = [1]> then\n    set volume to (100) %\n    wait (0.5) seconds\n    if <(jukebox song) = [0]> then\n        play sound ((world) + (4)) until done\n        forever\n            play sound (world) until done\n        end\n    end\nend\n\nwhen I receive [boss v]\nif <(1Music on?) = [1]> then\n    repeat (50)\n        change volume by (-2)\n    end\n    stop [other scripts in sprite v]\n    set volume to (100) %\n    if <(jukebox song) = [0]> then\n        play sound [Boss intro v] until done\n        forever\n            play sound [Boss loop v] until done\n        end\n    end\nend\n\nwhen I receive [hide level sprites v]\nif <(1Music on?) = [1]> then\n    if <(jukebox song) = [0]> then\n        repeat (20)\n            change volume by (-5)\n        end\n        stop [other scripts in sprite v]\n        set volume to (100) %\n    end\nend\n\nwhen I receive [exit water v]\nif <not <<(world) = [3]> and <(level) = [13]>>> then\n    if <(1Music on?) = [1]> then\n        if <(jukebox song) = [0]> then\n            repeat (5)\n                change volume by (20)\n            end\n        end\n    end\nend\n\nwhen I receive [lists v]\nstop [other scripts in sprite v]\nrepeat (10)\n    turn right (5) degrees\n    change size by (((0) - (size)) / (6))\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nhide\n\nwhen I receive [worlds v]\nstop [other scripts in sprite v]\nrepeat (10)\n    turn right (5) degrees\n    change size by (((0) - (size)) / (6))\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nhide\n\nwhen I receive [end intro v]\ntitle logo\n\nwhen I receive [save/load menu v]\nstop [other scripts in sprite v]\nrepeat (10)\n    turn right (5) degrees\n    change size by (((0) - (size)) / (6))\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nhide\n\nwhen I receive [enter water v]\nif <not <<(world) = [3]> and <(level) = [13]>>> then\n    if <(1Music on?) = [1]> then\n        if <(jukebox song) = [0]> then\n            repeat (5)\n                change volume by (-20)\n            end\n        end\n    end\nend\n\n@buttons\n\nwhen flag clicked\ndelete (all) of [triple-click this code, then press ctrl+c / ⌘+c to copy. v]\ndelete (all) of [code stuff v]\nshow list [triple-click this code, then press ctrl+c / ⌘+c to copy. v]\nset [menu v] to [1]\nhide\n\ndefine button script\npoint in direction (125)\nset size to (0) %\nshow\nset [brightness v] to [0]\nset [y v] to [-100]\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((120) - (size)) / (6))\n        turn right (((85) - (direction)) / (6)) degrees\n        change [brightness v] by (((12) - (brightness)) / (6))\n        if <mouse down?> then\n            repeat until <<not <mouse down?>> or <not <touching (mouse-pointer v)?>>>\n                change size by (((80) - (size)) / (6))\n                turn right (((95) - (direction)) / (6)) degrees\n                change [brightness v] by (((-12) - (brightness)) / (6))\n                set [brightness v] effect to (brightness)\n                change [y v] by (5)\n                change y by (([sin v] of (y) ) / (4))\n            end\n            if <touching (mouse-pointer v)?> then\n                if <(costume [number v]) = [1]> then\n                    if <(jukebox song) = [0]> then\n                        stop all sounds\n                    end\n                    broadcast (worlds v)\n                else\n                    if <(id) = [14]> then\n                        change [jukebox song v] by (1)\n                        if <(jukebox song) > [7]> then\n                            set [jukebox song v] to [0]\n                        end\n                        switch costume to ((jukebox song) + (23))\n                        stop all sounds\n                        broadcast (change song v)\n                    else\n                        if <(id) = [13]> then\n                            set [menu v] to [6]\n                            broadcast (star list v)\n                        else\n                            if <(id) = [12]> then\n                                broadcast (ask for code v)\n                            else\n                                if <(id) = [11]> then\n                                    create code\n                                    hide list [triple-click this code, then press ctrl+c / ⌘+c to copy. v]\n                                else\n                                    if <(id) = [10]> then\n                                        set [menu v] to [5]\n                                        broadcast (save/load menu v)\n                                    else\n                                        if <<(id) < [5]> and <(id) > [1]>> then\n                                            if <(costume [number v]) = [6]> then\n                                                set [beat world name v] to [2]\n                                                broadcast (world locked! v)\n                                            else\n                                                if <<<not <((id) - (1)) = [1]>> and <(length of [completed worlds v]) = [0]>> and <not <([costume # v] of [menu text v]) = [4]>>> then\n                                                    set [menu v] to [4]\n                                                    broadcast (notice world 1 v)\n                                                    set [world v] to ((id) - (1))\n                                                else\n                                                    set [world v] to ((id) - (1))\n                                                    broadcast (gameplay v)\n                                                end\n                                            end\n                                        else\n                                            if <(costume [number v]) = [7]> then\n                                                if <<([costume # v] of [menu text v]) = [4]> or <([costume # v] of [menu text v]) = [11]>> then\n                                                    if <(menu) = [1]> then\n                                                        if <(jukebox song) = [0]> then\n                                                            stop all sounds\n                                                        end\n                                                    end\n                                                    broadcast (worlds v)\n                                                else\n                                                    if <(menu) = [2]> then\n                                                        if <(jukebox song) = [0]> then\n                                                            stop all sounds\n                                                        end\n                                                    end\n                                                    broadcast (exit to main menu v)\n                                                end\n                                            else\n                                                if <(id) = [15]> then\n                                                    if <(1LDM on?) = [1]> then\n                                                        set [1ldm on? v] to [0]\n                                                    else\n                                                        set [1ldm on? v] to [1]\n                                                    end\n                                                    switch costume to ((1LDM on?) + (31))\n                                                    broadcast (toggle ldm v)\n                                                else\n                                                    if <(id) = [6]> then\n                                                        if <(1Music on?) = [1]> then\n                                                            set [1music on? v] to [0]\n                                                        else\n                                                            set [1music on? v] to [1]\n                                                        end\n                                                        switch costume to ((1Music on?) + (8))\n                                                        stop all sounds\n                                                    else\n                                                        if <(id) = [7]> then\n                                                            if <(1Sound on?) = [1]> then\n                                                                set [1sound on? v] to [0]\n                                                            else\n                                                                set [1sound on? v] to [1]\n                                                            end\n                                                            switch costume to ((1Sound on?) + (10))\n                                                        else\n                                                            if <(id) = [8]> then\n                                                                switch costume to (lists v)\n                                                                broadcast (lists v)\n                                                            else\n                                                                if <(costume [number v]) = [6]> then\n                                                                    set [beat world name v] to [3]\n                                                                    broadcast (world locked! v)\n                                                                else\n                                                                    if <<(length of [completed worlds v]) = [0]> and <not <([costume # v] of [menu text v]) = [4]>>> then\n                                                                        set [menu v] to [4]\n                                                                        broadcast (notice world 1 v)\n                                                                        set [world v] to [4]\n                                                                    else\n                                                                        set [world v] to [4]\n                                                                        broadcast (gameplay v)\n                                                                    end\n                                                                end\n                                                            end\n                                                        end\n                                                    end\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n                if <<(1Sound on?) = [1]> and <not <(id) = [14]>>> then\n                    start sound [button v]\n                end\n            end\n        end\n    else\n        change size by (((100) - (size)) / (6))\n        turn right (((90) - (direction)) / (6)) degrees\n        change [brightness v] by (((0) - (brightness)) / (6))\n    end\n    set [brightness v] effect to (brightness)\n    change [y v] by (5)\n    change y by (([sin v] of (y) ) / (4))\nend\n\ndefine None\nrepeat (1)\n    delete this clone\nend\nset [id v] to (id)\nrepeat (repeat)\n    create clone of (_myself_ v)\n    change [id v] by (1)\nend\n\nadd [1] to [completed worlds v]\n\nadd [3] to [completed worlds v]\n\ndefine delete clone\ndelete this clone\n\nwhen I receive [worlds v]\nset [menu v] to [2]\nstop [other scripts in sprite v]\nrepeat (10)\n    turn right (5) degrees\n    change size by (((0) - (size)) / (6))\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nclone! id: (2) times: (4)\nclone! id: (9) times: (1)\nclone! id: (13) times: (1)\nhide\n\nwhen I receive [end intro v]\nswitch costume to (costume1 v)\ngo to x: (0) y: (-75)\nset [id v] to [1]\nclone! id: (6) times: (3)\nclone! id: (10) times: (1)\nif <[completed worlds v] contains [4]?> then\n    clone! id: (14) times: (1)\nend\nclone! id: (15) times: (1)\nbutton script\n\nwhen I receive [lists v]\nset [menu v] to [3]\nstop [other scripts in sprite v]\nrepeat (10)\n    turn right (5) degrees\n    change size by (((0) - (size)) / (6))\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nclone! id: (5) times: (1)\nhide\n\nwhen I start as a clone\nif <(id) = [8]> then\n    go to x: (-205) y: (-144)\nelse\n    if <(id) = [6]> then\n        go to x: (205) y: (-144)\n    else\n        if <(id) = [7]> then\n            go to x: (147) y: (-144)\n        end\n    end\n    if <(id) < [5]> then\n        go to x: ((((id) - (1)) * (150)) - (225)) y: (40)\n        if <(id) > [3]> then\n            go to x: ((((id) - (3)) * (150)) - (225)) y: (-40)\n        end\n    else\n        if <(id) = [5]> then\n            go to x: (-205) y: (-142)\n        end\n    end\nend\nif <<(id) < [5]> and <(id) > [1]>> then\n    if <[completed worlds v] contains ((id) - (1))?> then\n        switch costume to ((id) + (11))\n    else\n        switch costume to (id)\n    end\n    if <([costume # v] of [menu text v]) = [4]> then\n        go to x: (0) y: (-102)\n    end\n    if <<not <[completed worlds v] contains ((id) - (2))?>> and <not <<(id) = [2]> or <(id) = [3]>>>> then\n        switch costume to (locked-world v)\n    end\nelse\n    if <(id) = [8]> then\n        switch costume to (lists v)\n    else\n        if <(id) > [5]> then\n            if <(id) = [6]> then\n                switch costume to ((1Music on?) + (8))\n            else\n                switch costume to ((1Sound on?) + (10))\n            end\n        else\n            if <(id) > [4]> then\n                switch costume to ((id) + (2))\n            else\n                switch costume to (id)\n            end\n        end\n    end\nend\nif <(id) = [9]> then\n    if <[completed worlds v] contains [4]?> then\n        switch costume to (w4-c v)\n    else\n        if <not <[completed worlds v] contains [3]?>> then\n            switch costume to (locked-world v)\n        else\n            switch costume to (w4 v)\n        end\n    end\n    go to x: (75) y: (-40)\nend\nif <(id) = [10]> then\n    switch costume to (saveload v)\n    go to x: (0) y: (-150)\nend\nif <<(id) > [10]> and <(id) < [13]>> then\n    switch costume to ((id) + (9))\n    go to x: ((((id) - (9)) * (100)) - (250)) y: (-60)\nend\nif <(id) = [13]> then\n    switch costume to (star list v)\n    go to x: (152) y: (-136)\nend\nif <(id) = [14]> then\n    go to x: (174) y: (-93)\n    switch costume to ((jukebox song) + (23))\nend\nif <(id) = [15]> then\n    go to x: (-147) y: (-144)\n    if <(1LDM on?) = [0]> then\n        switch costume to (ldm off v)\n    else\n        switch costume to (ldm on v)\n    end\nend\nbutton script\n\nwhen I receive [exit to main menu v]\nshow list [triple-click this code, then press ctrl+c / ⌘+c to copy. v]\nset [menu v] to [1]\nstop [other scripts in sprite v]\nrepeat (10)\n    turn right (5) degrees\n    change size by (((0) - (size)) / (6))\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nhide\ndelete clone\nbroadcast (title v)\nset [id v] to [1]\ngo to x: (0) y: (-75)\nclone! id: (6) times: (3)\nclone! id: (10) times: (1)\nif <[completed worlds v] contains [4]?> then\n    clone! id: (14) times: (1)\nend\nclone! id: (15) times: (1)\nbutton script\n\nwhen I receive [save/load menu v]\nstop [other scripts in sprite v]\nrepeat (10)\n    turn right (5) degrees\n    change size by (((0) - (size)) / (6))\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nhide\ndelete clone\nclone! id: (11) times: (2)\nclone! id: (5) times: (1)\n\nwhen I receive [notice world 1 v]\nstop [other scripts in sprite v]\nrepeat (10)\n    turn right (5) degrees\n    change size by (((0) - (size)) / (6))\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nhide\ndelete clone\nclone! id: (5) times: (1)\nwait (1) seconds\nif <(world) = [4]> then\n    clone! id: (9) times: (1)\nelse\n    clone! id: ((world) + (1)) times: (1)\nend\n\nwhen I receive [ask for code v]\nif <[1] = [1]> then\n    delete this clone\nend\nshow list [triple-click this code, then press ctrl+c / ⌘+c to copy. v]\nask [Please enter your code.] and wait\nload code\nclone! id: (11) times: (2)\nclone! id: (5) times: (1)\n\nwhen I receive [gameplay v]\nset [menu v] to [0]\nstop [other scripts in sprite v]\nrepeat (10)\n    turn right (5) degrees\n    change size by (((0) - (size)) / (6))\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nhide\ndelete clone\n\nwhen I receive [star list v]\nstop [other scripts in sprite v]\nrepeat (10)\n    turn right (5) degrees\n    change size by (((0) - (size)) / (6))\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nhide\nclone! id: (5) times: (1)\n\ndefine create code\ndelete (all) of [triple-click this code, then press ctrl+c / ⌘+c to copy. v]\ndelete (all) of [code stuff v]\nset [code checker v] to [0]\nrepeat (12)\n    change [code checker v] by (1)\n    if <[stars v] contains (code checker)?> then\n        add [0] to [code stuff v]\n    else\n        add [1] to [code stuff v]\n    end\nend\nset [code checker v] to [0]\nrepeat (4)\n    change [code checker v] by (1)\n    if <[completed worlds v] contains (code checker)?> then\n        add [1] to [code stuff v]\n    else\n        add [0] to [code stuff v]\n    end\nend\nadd (join (saved bg) []) to [code stuff v]\nadd (join (jukebox song) []) to [code stuff v]\nadd (join (1Music on?) []) to [code stuff v]\nadd (join (1Sound on?) []) to [code stuff v]\nadd (join (1LDM on?) []) to [code stuff v]\nset [code checker v] to [0]\nrepeat (length of (username))\n    change [code checker v] by (1)\n    set [item v] to [1]\n    repeat until <(item (item) of [name2 v]) = (letter (code checker) of (username))>\n        change [item v] by (1)\n    end\n    add (item (item) of [name v]) to [code stuff v]\nend\nadd (code stuff) to [triple-click this code, then press ctrl+c / ⌘+c to copy. v]\n\ndefine load code\ndelete (all) of [name3 v]\nset [code checker v] to [21]\nrepeat ((length of (answer)) - (21))\n    change [code checker v] by (1)\n    set [item v] to [1]\n    set [failed name? v] to [0]\n    repeat until <<(item (item) of [name v]) = (letter (code checker) of (answer))> or <(failed name?) = [1]>>\n        change [item v] by (1)\n        if <(item) > (length of [name v])> then\n            set [failed name? v] to [1]\n        end\n    end\n    if <(failed name?) = [0]> then\n        add (item (item) of [name2 v]) to [name3 v]\n    end\nend\nif <(name3) = (username)> then\n    delete (all) of [completed worlds v]\n    delete (all) of [stars v]\n    switch backdrop to (letter (17) of (answer))\n    set [saved bg v] to (backdrop [number v])\n    set [code checker v] to [0]\n    repeat (12)\n        change [code checker v] by (1)\n        if <(letter (code checker) of (answer)) = [0]> then\n            add (code checker) to [stars v]\n        end\n    end\n    repeat (4)\n        change [code checker v] by (1)\n        if <(letter (code checker) of (answer)) = [1]> then\n            add ((code checker) - (12)) to [completed worlds v]\n        end\n    end\n    set [1music on? v] to (letter (19) of (answer))\n    set [1sound on? v] to (letter (20) of (answer))\n    set [1ldm on? v] to (letter (21) of (answer))\n    broadcast (toggle ldm v)\n    set [temp v] to (jukebox song)\n    set [jukebox song v] to (letter (18) of (answer))\n    if <not <(jukebox song) = (temp)>> then\n        broadcast (change song v)\n    end\n    broadcast (sucess! v)\nelse\n    broadcast (fail code v)\nend\n\n@text\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [gameplay v]\nset [lvl thing v] to [1]\nif <(world) = [1]> then\n    switch costume to (costume1 v)\n    text costume: (1) repeat: (2)\n    wait until <(level) = [4]>\n    text costume: (3) repeat: (1)\n    wait until <(level) = [6]>\n    text costume: (4) repeat: (2)\n    wait until <(level) = [10]>\n    text costume: (9) repeat: (1)\nelse\n    if <(world) = [2]> then\n        text costume: (10) repeat: (3)\n        wait until <(level) = [3]>\n        text costume: (13) repeat: (1)\n        wait until <(level) = [6]>\n        text costume: (14) repeat: (1)\n    else\n        if <(world) = [3]> then\n            text costume: (15) repeat: (2)\n            wait until <(level) = [7]>\n            text costume: (17) repeat: (1)\n        else\n            if <(world) = [4]> then\n                text costume: (18) repeat: (3)\n                wait until <(level) = [7]>\n                text costume: (21) repeat: (1)\n                wait until <(level) = [10]>\n                text costume: (22) repeat: (1)\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nshow\nswitch costume to (pick random (6) to (7))\nset [x v] to (pick random (-15) to (15))\nset [y v] to (pick random (4) to (12))\nrepeat until <(y position) < [-178]>\n    change y by (y)\n    change x by (x)\n    change [x v] by (((0) - (x)) / (40))\n    change [y v] by (-1)\n    if <(x position) < [-236]> then\n        set x to (-236)\n        set [x v] to ((x) * (-1))\n    end\n    if <(x position) > [236]> then\n        set x to (236)\n        set [x v] to ((x) * (-1))\n    end\nend\ndelete this clone\n\ndefine None\nif <(1LDM on?) = [0]> then\n    repeat (number1)\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I receive [goal v]\nif <not <[completed worlds v] contains (world)?>> then\n    add (world) to [completed worlds v]\nend\nif <(world) = [1]> then\n    change [☁ w1c v] by (1)\nelse\n    if <(world) = [2]> then\n        change [☁ w2c v] by (1)\n    else\n        if <(world) = [3]> then\n            change [☁ w3c v] by (1)\n        else\n            if <(world) = [4]> then\n                change [☁ w4c v] by (1)\n            end\n        end\n    end\nend\nif <(1Music on?) = [1]> then\n    if <(world) = [4]> then\n        if <(jukebox song) = [0]> then\n            start sound [Finish mk8 v]\n        end\n    end\nend\nhide\ngo to x: (-114) y: (-80)\nclone (8)\nwait (0.25) seconds\ngo to x: (114) y: (-80)\nclone (8)\nwait (0.25) seconds\ngo to x: (0) y: (80)\nclone (8)\nif <(world) = [4]> then\n    wait (0.5) seconds\n    go to x: (-114) y: (-80)\n    clone (8)\n    wait (0.25) seconds\n    go to x: (114) y: (-80)\n    clone (8)\n    wait (0.25) seconds\n    go to x: (0) y: (80)\n    clone (8)\n    wait (0.5) seconds\nend\nshow\nif <(world) = [4]> then\n    switch costume to (congrats v)\nelse\n    switch costume to (costume5 v)\nend\ngo to x: (0) y: (118)\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\n    change y by (((83) - (y position)) / (4))\nend\nif <(world) = [4]> then\n    wait (4) seconds\nelse\n    wait (1) seconds\nend\nbroadcast (hide level sprites v)\n\ndefine None\nswitch costume to (costume)\nset [lvl thing v] to (level)\nwait until <(level) = (lvl thing)>\nchange [lvl thing v] by (1)\nwait (0.5) seconds\nrepeat (repeat)\n    go to x: (0) y: (0)\n    set [ghost v] effect to (100)\n    show\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    if <(costume [number v]) = [11]> then\n        wait until <([x position v] of [mike v]) > [162]>\n    else\n        wait until <([x position v] of [mike v]) > [233]>\n    end\n    repeat (10)\n        change y by (((120) - (y position)) / (6))\n        change [ghost v] effect by (10)\n    end\n    next costume\n    if <(costume [number v]) = [5]> then\n        switch costume to (costume8 v)\n    end\n    set [ghost v] effect to (0)\n    hide\n    if <(repeat) > [1]> then\n        if <not <(costume [number v]) = [12]>> then\n            wait until <(level) = (lvl thing)>\n        end\n    end\n    if <not <(costume [number v]) = [12]>> then\n        change [lvl thing v] by (1)\n    end\nend\n\nwhen I receive [hide level sprites v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nhide\ndelete this clone\n\nwhen I receive [fire v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nhide\n\n@stars\n\nwhen flag clicked\nset [this a clone? v] to [0]\nhide\n\nwhen I receive [gameplay v]\nif <(world) = [1]> then\n    for level (4)\n    go to x: (185) y: (90)\n    star id: (1) type: (1)\n    for level (7)\n    go to x: (202) y: (-83)\n    star id: (2) type: (1)\n    for level (9)\n    go to x: (204) y: (-6)\n    star id: (3) type: (1)\nelse\n    if <(world) = [2]> then\n        for level (5)\n        go to x: (-218) y: (114)\n        star id: (4) type: (1)\n        for level (7)\n        go to x: (-107) y: (28)\n        star id: (5) type: (1)\n        for level (10)\n        go to x: (198) y: (149)\n        star id: (6) type: (1)\n    else\n        if <(world) = [3]> then\n            for level (5)\n            go to x: (-191) y: (112)\n            star id: (7) type: (1)\n            for level (9)\n            go to x: (182) y: (-8)\n            star id: (8) type: (2)\n            for level (10)\n            go to x: (-223) y: (15)\n            star id: (9) type: (2)\n        else\n            if <(world) = [4]> then\n                for level (5)\n                go to x: (-94) y: (-146)\n                star id: (10) type: (3)\n                for level (8)\n                go to x: (-222) y: (153)\n                star id: (11) type: (1)\n                for level (9)\n                go to x: (-169) y: (58)\n                star id: (12) type: (3)\n            end\n        end\n    end\nend\n\nwhen I receive [slide v]\nif <(this a clone?) = [1]> then\n    repeat (5)\n        change [ghost v] effect by (20)\n        change x by (-35)\n    end\n    delete this clone\nend\n\ndefine None\nwait until <(level) = (level)>\nwait (0.5) seconds\n\ndefine None\nset [star id v] to (id)\nset [type v] to (type)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <[stars v] contains (star id)?> then\n    switch costume to (collected star2 v)\nelse\n    if <(type) = [1]> then\n        switch costume to (star v)\n    else\n        if <(type) = [2]> then\n            switch costume to (star-red v)\n        else\n            switch costume to (star-blue v)\n        end\n    end\nend\ngo [backward v] (99) layers\ngo [backward v] (-4) layers\nset [ghost v] effect to (100)\nshow\nset size to (25) %\nset [size v] to [0]\nset [this a clone? v] to [1]\nrepeat (10)\n    change [ghost v] effect by (-10)\n    change size by (((100) - (size)) / (2))\nend\nset [ghost v] effect to (0)\nset size to (100) %\nforever\n    animate\n    if <<touching (mike v)?> and <(touching star?) = [1]>> then\n        if <<(costume [number v]) = [1]> or <<<(red or blue?) = [r]> and <(costume [number v]) = [4]>> or <<(red or blue?) = [b]> and <(costume [number v]) = [5]>>>> then\n            switch costume to (collected star v)\n            start sound [star v]\n            repeat (5)\n                animate\n            end\n            repeat until <<not <touching (mike v)?>> and <not <(touching star?) = [1]>>>\n                animate\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <(type) = [2]> then\n    forever\n        wait until <(red or blue?) = [b]>\n        if <(costume [number v]) = [4]> then\n            repeat (5)\n                change [ghost v] effect by (20)\n            end\n            set [ghost v] effect to (0)\n            hide\n        end\n        wait until <(red or blue?) = [r]>\n        if <(costume [number v]) = [4]> then\n            show\n            set [ghost v] effect to (100)\n            repeat (5)\n                change [ghost v] effect by (-20)\n            end\n        end\n    end\nelse\n    if <(type) = [3]> then\n        forever\n            if <(costume [number v]) = [5]> then\n                repeat (5)\n                    change [ghost v] effect by (20)\n                end\n                set [ghost v] effect to (0)\n                hide\n            end\n            wait until <(red or blue?) = [b]>\n            if <(costume [number v]) = [5]> then\n                show\n                set [ghost v] effect to (100)\n                repeat (5)\n                    change [ghost v] effect by (-20)\n                end\n            end\n            wait until <(red or blue?) = [r]>\n        end\n    end\nend\n\nwhen I receive [hide level sprites v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nhide\ndelete this clone\n\nwhen I start as a clone\nset [old lvl v] to (level)\nwait until <(level) > (old lvl)>\nif <(costume [number v]) = [2]> then\n    if <not <[stars v] contains (star id)?>> then\n        add (star id) to [stars v]\n        if <(length of [stars v]) = [12]> then\n            change [☁ global all stars v] by (1)\n        end\n        set [old lvl v] to [s]\n    end\nend\nrepeat (5)\n    change size by (-8)\n    change [ghost v] effect by (20)\nend\nif <(old lvl) = [s]> then\n    set [message type v] to [1]\n    broadcast (message v)\nend\ndelete this clone\n\nwhen I receive [player hit v]\nif <<(costume [number v]) = [2]> and <not <[stars v] contains (star id)?>>> then\n    set [brightness v] effect to (0)\n    if <(type) = [1]> then\n        switch costume to (star v)\n    else\n        if <(type) = [2]> then\n            switch costume to (star-red v)\n        else\n            switch costume to (star-blue v)\n        end\n    end\n    set size to (150) %\n    repeat (8)\n        change size by (((100) - (size)) / (4))\n        set [brightness v] effect to (0)\n    end\n    set size to (100) %\n    set [size v] to [0]\nend\n\ndefine animate\nchange [size v] by (4)\nchange size by (([sin v] of (size) ) / (2))\nchange [brightness v] effect by (([sin v] of (size) ) / (2))\n\n@orbs\n\nwhen flag clicked\nset [this a clone? v] to [0]\nhide\n\nwhen I receive [gameplay v]\nif <(world) = [1]> then\n    for level (4)\n    go to x: (185) y: (36)\n    create clone of (_myself_ v)\n    for level (6)\n    go to x: (-11) y: (-71)\n    create clone of (_myself_ v)\n    go to x: (60) y: (-71)\n    create clone of (_myself_ v)\n    for level (7)\n    go to x: (-62) y: (-74)\n    create clone of (_myself_ v)\n    go to x: (-2) y: (-74)\n    create clone of (_myself_ v)\n    go to x: (135) y: (-26)\n    create clone of (_myself_ v)\n    for level (8)\n    go to x: (78) y: (-57)\n    create clone of (_myself_ v)\n    go to x: (135) y: (-15)\n    create clone of (_myself_ v)\n    for level (9)\n    go to x: (56) y: (27)\n    create clone of (_myself_ v)\n    go to x: (90) y: (-103)\n    create clone of (_myself_ v)\n    go to x: (148) y: (-92)\n    create clone of (_myself_ v)\n    go to x: (188) y: (-52)\n    create clone of (_myself_ v)\nelse\n    if <(world) = [2]> then\n        wait (0.5) seconds\n        go to x: (144) y: (-68)\n        create clone of (_myself_ v)\n        for level (4)\n        go to x: (0) y: (-99)\n        create clone of (_myself_ v)\n        for level (5)\n        go to x: (-8) y: (95)\n        create clone of (_myself_ v)\n        for level (6)\n        go to x: (63) y: (-38)\n        create clone of (_myself_ v)\n        for level (7)\n        go to x: (2) y: (115)\n        create clone of (_myself_ v)\n        for level (8)\n        go to x: (-158) y: (-7)\n        create clone of (_myself_ v)\n        go to x: (-45) y: (93)\n        create clone of (_myself_ v)\n        for level (9)\n        go to x: (202) y: (73)\n        create clone of (_myself_ v)\n    else\n        if <(world) = [3]> then\n            for level (4)\n            go to x: (-8) y: (-89)\n            create clone of (_myself_ v)\n            for level (5)\n            go to x: (11) y: (96)\n            create clone of (_myself_ v)\n            go to x: (-53) y: (96)\n            create clone of (_myself_ v)\n            for level (6)\n            go to x: (0) y: (-91)\n            create clone of (_myself_ v)\n            go to x: (-157) y: (94)\n            create clone of (_myself_ v)\n            for level (8)\n            go to x: (44) y: (112)\n            create clone of (_myself_ v)\n            for level (9)\n            go to x: (-87) y: (92)\n            create clone of (_myself_ v)\n        else\n            if <(world) = [4]> then\n                wait (0.5) seconds\n                go to x: (-44) y: (-98)\n                create clone of (_myself_ v)\n                go to x: (188) y: (90)\n                create clone of (_myself_ v)\n                for level (6)\n                go to x: (59) y: (93)\n                create clone of (_myself_ v)\n                for level (7)\n                go to x: (-34) y: (72)\n                create clone of (_myself_ v)\n                for level (8)\n                go to x: (-58) y: (23)\n                create clone of (_myself_ v)\n            end\n        end\n    end\nend\n\nwhen I receive [slide v]\nif <(this a clone?) = [1]> then\n    repeat (5)\n        change [ghost v] effect by (20)\n        change x by (-35)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nforever\n    if <touching (mike v)?> then\n        change size by (((75) - (size)) / (2))\n    else\n        change size by (((100) - (size)) / (2))\n    end\nend\n\ndefine None\nwait until <(level) = (level)>\nwait (0.5) seconds\n\nwhen I receive [hide level sprites v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nhide\ndelete this clone\n\nwhen I start as a clone\ngo [backward v] (99) layers\ngo [backward v] (-4) layers\nset [ghost v] effect to (100)\nshow\nset size to (25) %\nrepeat (10)\n    set [this a clone? v] to [1]\n    change [ghost v] effect by (-10)\nend\nset [ghost v] effect to (0)\n\nfor level (10)\ngo to x: (-164) y: (134)\ncreate clone of (_myself_ v)\n\n@flag\n\nwhen flag clicked\nhide\n\nwhen I receive [goal v]\nrepeat (30)\n    change y by (((-67) - (y position)) / (6))\nend\nset y to (-67)\n\nwhen I receive [hide level sprites v]\nrepeat (2)\n    change y by (((250) - (y position)) / (4))\n    change [ghost v] effect by (25)\nend\nset [ghost v] effect to (0)\nhide\n\nwhen I receive [slide v]\nif <(level) = [11]> then\n    if <(world) = [3]> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume9 v)\n    end\n    show\n    go to x: (456) y: (-160)\n    repeat (20)\n        change x by (((1) - (x position)) / (4))\n    end\n    go to x: (1) y: (-160)\nend\n\n@bg elements\n\nwhen flag clicked\nhide\n\nwhen I receive [gameplay v]\nswitch backdrop to (world)\nif <(costume [number v]) = [3]> then\n    repeat (12)\n        change [ghost v] effect by (1.25)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nswitch costume to (backdrop1 v)\ngo to x: (0) y: (0)\nset size to (100) %\nset [circle size v] to [0]\nforever\n    change [circle size v] by (2)\n    switch costume to (backdrop1 v)\n    change size by (([sin v] of (circle size) ) / (2))\n    switch costume to (circle v)\n    turn right (1) degrees\n    if <<(backdrop [number v]) = [2]> or <(backdrop [number v]) = [4]>> then\n        set [brightness v] effect to (-100)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen I receive [end intro v]\nshow\nif <(1LDM on?) = [0]> then\n    create clone of (_myself_ v)\nend\nswitch costume to (backdrop1 v)\nset size to (100) %\nswitch costume to (lines v)\nset [ghost v] effect to (75)\nforever\n    go to x: (0) y: (0)\n    repeat (200)\n        change x by (0.5)\n        if <<(backdrop [number v]) = [2]> or <(backdrop [number v]) = [4]>> then\n            set [brightness v] effect to (-100)\n        else\n            set [brightness v] effect to (0)\n        end\n    end\nend\n\nwhen I start as a clone\nset [ghost v] effect to (100)\nrepeat (12)\n    change [ghost v] effect by (-1.25)\nend\n\nwhen I receive [toggle ldm v]\nif <[1] = [1]> then\n    delete this clone\nend\nif <(1LDM on?) = [1]> then\n    delete this clone\nelse\n    create clone of (_myself_ v)\nend\n\nwhen I receive [hide level sprites v]\nif <(1LDM on?) = [0]> then\n    create clone of (_myself_ v)\nend\n\n@keys\n\nwhen flag clicked\ndelete (all) of [keys v]\nset [collected? v] to [0]\nset [this a clone? v] to [0]\nhide\n\ndefine None\nwait until <(level) = (level)>\nwait (0.5) seconds\n\nwhen I receive [slide v]\nif <(this a clone?) = [1]> then\n    repeat (5)\n        change [ghost v] effect by (20)\n        change x by (-35)\n    end\n    delete this clone\nend\n\nwhen I receive [fade v]\nif <(collected?) = [1]> then\n    go to x: (-206) y: (-118)\nend\n\nwhen I start as a clone\nswitch costume to (type)\ngo [backward v] (99) layers\ngo [backward v] (-4) layers\nset [collected? v] to [0]\nset [ghost v] effect to (100)\nshow\nset [turn v] to [0]\nset size to (25) %\nrepeat (10)\n    set [this a clone? v] to [1]\n    change [ghost v] effect by (-10)\n    change size by (((100) - (size)) / (4))\n    change [turn v] by (4)\n    turn right (([sin v] of (turn) ) / (2)) degrees\n    wait until <(paused?) = [0]>\nend\nset size to (100) %\nset [ghost v] effect to (0)\nforever\n    change [turn v] by (4)\n    turn right (([sin v] of (turn) ) / (2)) degrees\n    wait until <(paused?) = [0]>\nend\n\nwhen I receive [gameplay v]\nset volume to ((1Sound on?) * (100)) %\nif <(world) = [4]> then\n    for level (2)\n    go to x: (-216) y: (-22)\n    create clone. key type: (1)\n    for level (3)\n    go to x: (6) y: (130)\n    create clone. key type: (1)\n    go to x: (-216) y: (18)\n    create clone. key type: (1)\n    for level (4)\n    go to x: (169) y: (137)\n    create clone. key type: (1)\n    go to x: (-119) y: (101)\n    create clone. key type: (1)\n    for level (5)\n    go to x: (-220) y: (42)\n    create clone. key type: (1)\n    for level (6)\n    go to x: (-9) y: (58)\n    create clone. key type: (2)\n    for level (7)\n    go to x: (-30) y: (136)\n    create clone. key type: (1)\n    for level (8)\n    go to x: (-188) y: (-30)\n    create clone. key type: (1)\n    go to x: (141) y: (134)\n    create clone. key type: (1)\n    for level (9)\n    go to x: (-35) y: (26)\n    create clone. key type: (2)\n    go to x: (-156) y: (117)\n    create clone. key type: (1)\nend\n\nwhen I receive [hide level sprites v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nhide\ndelete this clone\n\nwhen I start as a clone\nif <(type) = [2]> then\n    forever\n        wait until <(red or blue?) = [b]>\n        if <(costume [number v]) = (type)> then\n            repeat (5)\n                change [ghost v] effect by (20)\n            end\n            set [ghost v] effect to (0)\n            hide\n        end\n        wait until <(red or blue?) = [r]>\n        if <(costume [number v]) = (type)> then\n            show\n            set [ghost v] effect to (100)\n            repeat (5)\n                change [ghost v] effect by (-20)\n            end\n        end\n    end\nelse\n    if <(type) = [3]> then\n        forever\n            if <(costume [number v]) = (type)> then\n                repeat (5)\n                    change [ghost v] effect by (20)\n                end\n                set [ghost v] effect to (0)\n                hide\n            end\n            wait until <(red or blue?) = [b]>\n            if <(costume [number v]) = (type)> then\n                show\n                set [ghost v] effect to (100)\n                repeat (5)\n                    change [ghost v] effect by (-20)\n                end\n            end\n            wait until <(red or blue?) = [r]>\n        end\n    end\nend\n\ndefine None\nset [type v] to (type)\ncreate clone of (_myself_ v)\n\nwhen I receive [teleport v]\nif <(collected?) = [1]> then\n    go to (mike v)\n    change y by (-10)\nend\n\nwhen I start as a clone\nwait until <<(key touch) = [1]> and <touching (mike v)?>>\nif <not <(costume [number v]) = [4]>> then\n    switch costume to (costume1 v)\nend\nchange [key? v] by (1)\nadd (key?) to [keys v]\nset [key id v] to (key?)\nset [collected? v] to [1]\nif <(classic mode?) = [0]> then\n    start sound [SE_KeyGet v]\nelse\n    start sound [coin smw v]\nend\nset size to (175) %\nforever\n    change x by ((([x position v] of [mike v]) - (x position)) / ((8) * (key id)))\n    change y by (((([y position v] of [mike v]) - (10)) - ((y position) - (10))) / ((8) * (key id)))\n    change size by (((100) - (size)) / (4))\n    wait until <(paused?) = [0]>\nend\n\nwhen I receive [key use v]\nif <(key id) = [1]> then\n    repeat (10)\n        change size by (((25) - (size)) / (4))\n        change [ghost v] effect by (10)\n        change x by (((([x position v] of [mike v]) + (15)) - (x position)) / (3))\n        change y by ((([y position v] of [mike v]) - (y position)) / (3))\n    end\n    hide\n    delete this clone\nend\nset [key id v] to ((key id) - (1))\n\nwhen I receive [boss killed v]\ngo to (boss v)\ncreate clone. key type: (4)\n\n@doors\n\nwhen I start as a clone\nset [ghost v] effect to (100)\ngo [backward v] (999) layers\ngo [backward v] (-4) layers\nadd [door] to [doors v]\nset size to (160) %\nset [y v] to (y position)\nchange y by (60)\nshow\nrepeat (15)\n    set [this a clone? v] to [1]\n    change [ghost v] effect by (-10)\n    change y by (((y) - (y position)) / (4))\nend\nset y to (y)\nset [ghost v] effect to (0)\n\ndefine None\nset [door no. v] to (door no)\ncreate clone of (_myself_ v)\n\nwhen I receive [slide v]\nif <(this a clone?) = [1]> then\n    repeat (5)\n        change [ghost v] effect by (20)\n        change x by (-35)\n    end\n    delete this clone\nend\n\nwhen flag clicked\ndelete (all) of [doors v]\npoint in direction (90)\nset [this a clone? v] to [0]\nhide\n\ndefine None\nwait until <(level) = (level)>\nwait (0.5) seconds\n\nwhen I receive [door fail v]\nif <(this a clone?) = [1]> then\n    if <(length of [doors v]) = (door no.)> then\n        start sound [MW_RopeLiftMove v]\n        repeat (2)\n            turn right (5) degrees\n        end\n        repeat (4)\n            turn right (-5) degrees\n        end\n        repeat (2)\n            turn right (5) degrees\n        end\n    end\nend\n\nwhen I receive [gameplay v]\nset volume to ((1Sound on?) * (100)) %\nif <(world) = [4]> then\n    for level (2)\n    go to x: (214) y: (-97)\n    clone! door no: (1)\n    for level (3)\n    go to x: (200) y: (-97)\n    clone! door no: (2)\n    go to x: (228) y: (-97)\n    clone! door no: (1)\n    for level (4)\n    go to x: (200) y: (-97)\n    clone! door no: (2)\n    go to x: (228) y: (-97)\n    clone! door no: (1)\n    for level (5)\n    go to x: (214) y: (-97)\n    clone! door no: (1)\n    for level (6)\n    go to x: (214) y: (-97)\n    clone! door no: (1)\n    for level (7)\n    go to x: (214) y: (-97)\n    clone! door no: (1)\n    for level (8)\n    go to x: (200) y: (-97)\n    clone! door no: (2)\n    go to x: (228) y: (-97)\n    clone! door no: (1)\n    for level (9)\n    go to x: (200) y: (-97)\n    clone! door no: (2)\n    go to x: (228) y: (-97)\n    clone! door no: (1)\n    for level (10)\n    go to x: (214) y: (-97)\n    clone! door no: (1)\nend\n\nwhen I receive [unlock door v]\nif <(this a clone?) = [1]> then\n    if <(length of [doors v]) = (door no.)> then\n        broadcast (key use v)\n        delete (1) of [keys v]\n        thing\n        repeat (5)\n            change size by (((80) - (size)) / (2))\n        end\n        repeat (5)\n            change size by (-10)\n            change [ghost v] effect by (10)\n            change y by ((((y) + (60)) - (y position)) / (6))\n        end\n        set [ghost v] effect to (0)\n        hide\n        delete (1) of [doors v]\n        delete this clone\n    end\nend\n\ndefine thing\nset [temp thing v] to [0]\nrepeat (length of [keys v])\n    change [temp thing v] by (1)\n    replace item (temp thing) of [keys v] with (temp thing)\nend\n\nwhen I receive [hide level sprites v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nhide\ndelete this clone\n\n@portals\n\nwhen flag clicked\nset [this a clone? v] to [0]\nhide\n\ndefine None\nwait until <(level) = (level)>\nwait (0.5) seconds\nset [portal type v] to [1]\n\nwhen I receive [slide v]\nif <(this a clone?) = [1]> then\n    repeat (5)\n        change [ghost v] effect by (20)\n        change x by (-35)\n    end\n    delete this clone\nend\n\nwhen I receive [gameplay v]\nif <(world) = [2]> then\n    for level (6)\n    go to x: (-214) y: (106)\n    create clone of (_myself_ v)\n    go to x: (144) y: (-103)\n    change [portal type v] by (1)\n    create clone of (_myself_ v)\n    for level (7)\n    go to x: (189) y: (-82)\n    create clone of (_myself_ v)\n    go to x: (-210) y: (101)\n    change [portal type v] by (1)\n    create clone of (_myself_ v)\n    for level (8)\n    go to x: (-215) y: (38)\n    create clone of (_myself_ v)\n    go to x: (106) y: (106)\n    change [portal type v] by (1)\n    create clone of (_myself_ v)\n    for level (10)\n    go to x: (195) y: (-98)\n    create clone of (_myself_ v)\n    go to x: (-213) y: (55)\n    change [portal type v] by (1)\n    create clone of (_myself_ v)\nelse\n    if <(world) = [3]> then\n        for level (8)\n        go to x: (169) y: (-99)\n        create clone of (_myself_ v)\n        go to x: (-163) y: (80)\n        change [portal type v] by (1)\n        create clone of (_myself_ v)\n        for level (9)\n        go to x: (93) y: (24)\n        create clone of (_myself_ v)\n        go to x: (220) y: (0)\n        change [portal type v] by (1)\n        create clone of (_myself_ v)\n    else\n        if <(world) = [4]> then\n            for level (7)\n            go to x: (47) y: (127)\n            create clone of (_myself_ v)\n            go to x: (-221) y: (-112)\n            change [portal type v] by (1)\n            create clone of (_myself_ v)\n            for level (8)\n            go to x: (181) y: (135)\n            create clone of (_myself_ v)\n            go to x: (-175) y: (154)\n            create clone of (_myself_ v)\n            go to x: (-221) y: (-112)\n            change [portal type v] by (1)\n            create clone of (_myself_ v)\n            for level (9)\n            go to x: (-214) y: (132)\n            create clone of (_myself_ v)\n            go to x: (-221) y: (-112)\n            change [portal type v] by (1)\n            create clone of (_myself_ v)\n        end\n    end\nend\n\nwhen I start as a clone\nwait (0.25) seconds\nif <(costume [number v]) = [3]> then\n    forever\n        wait until <(red or blue?) = [b]>\n        show\n        set [ghost v] effect to (100)\n        repeat (5)\n            change [ghost v] effect by (-20)\n        end\n        wait until <(red or blue?) = [r]>\n        repeat (5)\n            change [ghost v] effect by (20)\n        end\n        set [ghost v] effect to (0)\n        hide\n    end\nend\n\nwhen I receive [teleport v]\nif <(portal type) = [2]> then\n    repeat (5)\n        change [ghost v] effect by (-10)\n        change size by (((90) - (size)) / (2))\n    end\n    set size to (90) %\n    wait (0.4) seconds\n    repeat (5)\n        change [ghost v] effect by (10)\n        change size by (((70) - (size)) / (2))\n    end\n    set size to (70) %\nend\n\nwhen I start as a clone\ngo [backward v] (999) layers\ngo [backward v] (-7) layers\nset [this a clone? v] to [1]\nswitch costume to (portal type)\nif <<(portal type) = [1]> and <<(level) = [9]> and <(world) = [3]>>> then\n    switch costume to (costume1-blue v)\nend\nif <(portal type) = [2]> then\n    delete (all) of [portal exit v]\n    add (x position) to [portal exit v]\n    add (y position) to [portal exit v]\nend\nset [ghost v] effect to (100)\nif <not <(costume [number v]) = [3]>> then\n    show\nend\nset size to (25) %\nrepeat (10)\n    if <(portal type) = [1]> then\n        change [ghost v] effect by (-10)\n        change size by (((90) - (size)) / (4))\n    else\n        change [ghost v] effect by (-5)\n        change size by (((70) - (size)) / (4))\n    end\nend\nif <(portal type) = [1]> then\n    set size to (90) %\nelse\n    set size to (70) %\nend\nif <(portal type) = [1]> then\n    forever\n        if <<<(costume [number v]) = [3]> and <<(red or blue?) = [b]> and <touching (mike v)?>>> or <<not <(costume [number v]) = [3]>> and <touching (mike v)?>>> then\n            set [go in portal? v] to [1]\n        end\n    end\nend\n\nwhen I receive [hide level sprites v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nhide\ndelete this clone\n\n@arrow orbs\n\nwhen flag clicked\nset [this a clone? v] to [0]\nhide\n\nwhen I receive [gameplay v]\nset volume to ((1Sound on?) * (100)) %\nset [clone id v] to [1]\nif <(world) = [2]> then\n    for level (2)\n    go to x: (186) y: (-114)\n    create clone of (_myself_ v)\n    go to x: (-217) y: (14)\n    create clone of (_myself_ v)\n    for level (4)\n    go to x: (197) y: (114)\n    create clone of (_myself_ v)\n    go to x: (-216) y: (40)\n    create clone of (_myself_ v)\n    for level (5)\n    go to x: (202) y: (10)\n    create clone of (_myself_ v)\n    go to x: (-38) y: (-116)\n    create clone of (_myself_ v)\n    for level (6)\n    go to x: (199) y: (115)\n    create clone of (_myself_ v)\n    for level (8)\n    go to x: (197) y: (-114)\n    create clone of (_myself_ v)\n    for level (9)\n    go to x: (197) y: (-15)\n    create clone of (_myself_ v)\nelse\n    if <(world) = [3]> then\n        for level (4)\n        go to x: (192) y: (-115)\n        create clone of (_myself_ v)\n        for level (5)\n        go to x: (184) y: (116)\n        create clone of (_myself_ v)\n        for level (6)\n        go to x: (188) y: (116)\n        create clone of (_myself_ v)\n        for level (7)\n        go to x: (203) y: (49)\n        create clone of (_myself_ v)\n        for level (8)\n        go to x: (183) y: (136)\n        create clone of (_myself_ v)\n        for level (9)\n        go to x: (186) y: (-117)\n        create clone of (_myself_ v)\n        for level (10)\n        go to x: (191) y: (-17)\n        create clone of (_myself_ v)\n    else\n        if <(world) = [4]> then\n            for level (2)\n            go to x: (171) y: (19)\n            create clone of (_myself_ v)\n            for level (3)\n            go to x: (29) y: (36)\n            create clone of (_myself_ v)\n            go to x: (167) y: (116)\n            create clone of (_myself_ v)\n            for level (4)\n            go to x: (170) y: (-13)\n            create clone of (_myself_ v)\n            for level (5)\n            go to x: (170) y: (-13)\n            create clone of (_myself_ v)\n            for level (6)\n            go to x: (172) y: (112)\n            create clone of (_myself_ v)\n            for level (7)\n            go to x: (159) y: (68)\n            create clone of (_myself_ v)\n            for level (8)\n            go to x: (160) y: (73)\n            create clone of (_myself_ v)\n            go to x: (-180) y: (105)\n            create clone of (_myself_ v)\n            for level (9)\n            go to x: (170) y: (-13)\n            create clone of (_myself_ v)\n            go to x: (201) y: (137)\n            create clone of (_myself_ v)\n            for level (10)\n            go to x: (159) y: (-55)\n            create clone of (_myself_ v)\n        end\n    end\nend\n\nwhen I receive [slide v]\nif <(this a clone?) = [1]> then\n    set [this a clone? v] to [0]\n    repeat (5)\n        change [ghost v] effect by (20)\n        change x by (-35)\n    end\n    delete this clone\nend\n\ndefine None\nwait until <(level) = (level)>\nwait (0.5) seconds\n\nwhen I receive [swap walk v]\nif <(this a clone?) = [1]> then\n    if <(left or right) = [r]> then\n        switch costume to (l v)\n    else\n        switch costume to (r v)\n    end\n    set size to (125) %\n    set [old id v] to (clone id)\n    if <(old id) = [3]> then\n        set [clone id v] to [4]\n    else\n        set [clone id v] to [2]\n    end\n    start sound [SE_KeyAppear v]\n    create clone of (_myself_ v)\n    set [clone id v] to (old id)\nend\n\nwhen I start as a clone\nif <(clone id) = [2]> then\n    switch costume to (circle v)\n    set size to (100) %\n    repeat (10)\n        change size by (2)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nelse\n    go [backward v] (99) layers\n    go [backward v] (-4) layers\n    switch costume to (l v)\n    set [ghost v] effect to (100)\n    show\n    set size to (25) %\n    repeat (10)\n        set [this a clone? v] to [1]\n        change [ghost v] effect by (-10)\n        change size by (((100) - (size)) / (2))\n    end\n    set [ghost v] effect to (0)\n    set size to (100) %\n    forever\n        change size by (((100) - (size)) / (2))\n        if <(left or right) = [r]> then\n            switch costume to (l v)\n        else\n            switch costume to (r v)\n        end\n    end\nend\n\nwhen I receive [hide level sprites v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nhide\ndelete this clone\n\nwhen I receive [reset orbs v]\nif <(this a clone?) = [1]> then\n    switch costume to (l v)\nend\n\n@arrow orbs2\n\nwhen flag clicked\nset [this a clone? v] to [0]\nhide\n\nwhen I receive [gameplay v]\nset volume to ((1Sound on?) * (100)) %\nset [clone id v] to [1]\nif <(world) = [2]> then\n    for level (3)\n    go to x: (-15) y: (-116)\n    create clone of (_myself_ v)\n    for level (4)\n    go to x: (197) y: (-112)\n    create clone of (_myself_ v)\n    go to x: (-216) y: (114)\n    create clone of (_myself_ v)\n    for level (5)\n    go to x: (-112) y: (-79)\n    create clone of (_myself_ v)\n    go to x: (188) y: (109)\n    create clone of (_myself_ v)\n    for level (6)\n    go to x: (199) y: (13)\n    create clone of (_myself_ v)\n    for level (7)\n    go to x: (-144) y: (59)\n    create clone of (_myself_ v)\n    go to x: (113) y: (136)\n    create clone of (_myself_ v)\n    for level (8)\n    go to x: (-95) y: (-117)\n    create clone of (_myself_ v)\n    go to x: (27) y: (113)\n    create clone of (_myself_ v)\n    for level (9)\n    go to x: (36) y: (-81)\n    create clone of (_myself_ v)\n    go to x: (37) y: (108)\n    create clone of (_myself_ v)\n    for level (10)\n    go to x: (30) y: (-108)\n    create clone of (_myself_ v)\n    go to x: (-43) y: (150)\n    create clone of (_myself_ v)\nelse\n    if <(world) = [3]> then\n        for level (5)\n        go to x: (187) y: (-110)\n        create clone of (_myself_ v)\n        go to x: (-220) y: (42)\n        create clone of (_myself_ v)\n        go to x: (-223) y: (112)\n        create clone of (_myself_ v)\n        for level (6)\n        go to x: (195) y: (-116)\n        create clone of (_myself_ v)\n        go to x: (-220) y: (118)\n        create clone of (_myself_ v)\n        go to x: (87) y: (118)\n        create clone of (_myself_ v)\n        go to x: (-1) y: (48)\n        create clone of (_myself_ v)\n        for level (8)\n        go to x: (194) y: (-29)\n        create clone of (_myself_ v)\n        go to x: (-220) y: (137)\n        create clone of (_myself_ v)\n        for level (9)\n        go to x: (-222) y: (-5)\n        create clone of (_myself_ v)\n        go to x: (194) y: (120)\n        create clone of (_myself_ v)\n        for level (10)\n        go to x: (-220) y: (61)\n        create clone of (_myself_ v)\n    else\n        if <(world) = [4]> then\n            wait (0.5) seconds\n            go to x: (47) y: (-115)\n            create clone of (_myself_ v)\n            for level (3)\n            go to x: (167) y: (-12)\n            create clone of (_myself_ v)\n            for level (4)\n            go to x: (1) y: (31)\n            create clone of (_myself_ v)\n            go to x: (-221) y: (62)\n            create clone of (_myself_ v)\n            for level (6)\n            go to x: (173) y: (4)\n            create clone of (_myself_ v)\n            go to x: (-221) y: (114)\n            create clone of (_myself_ v)\n            for level (7)\n            go to x: (170) y: (-13)\n            create clone of (_myself_ v)\n            for level (8)\n            go to x: (168) y: (-13)\n            create clone of (_myself_ v)\n            go to x: (-222) y: (7)\n            create clone of (_myself_ v)\n            for level (9)\n            go to x: (148) y: (28)\n            create clone of (_myself_ v)\n            for level (10)\n            go to x: (-220) y: (-26)\n            create clone of (_myself_ v)\n            go to x: (165) y: (136)\n            create clone of (_myself_ v)\n        end\n    end\nend\n\nwhen I receive [slide v]\nif <(this a clone?) = [1]> then\n    set [this a clone? v] to [0]\n    repeat (5)\n        change [ghost v] effect by (20)\n        change x by (-35)\n    end\n    delete this clone\nend\n\ndefine None\nwait until <(level) = (level)>\nwait (0.5) seconds\n\nwhen I receive [hide level sprites v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nhide\ndelete this clone\n\nwhen I receive [swap gravity v]\nif <(this a clone?) = [1]> then\n    if <(up or down?) = [up]> then\n        switch costume to (down v)\n    else\n        switch costume to (up v)\n    end\n    set size to (125) %\n    set [old id v] to (clone id)\n    if <(old id) = [3]> then\n        set [clone id v] to [4]\n    else\n        set [clone id v] to [2]\n    end\n    start sound [SE_KeyAppear v]\n    create clone of (_myself_ v)\n    set [clone id v] to (old id)\nend\n\nwhen I start as a clone\nif <(clone id) = [2]> then\n    switch costume to (circle v)\n    set size to (100) %\n    repeat (10)\n        change size by (2)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nelse\n    go [backward v] (99) layers\n    go [backward v] (-4) layers\n    switch costume to (up v)\n    set [ghost v] effect to (100)\n    show\n    set size to (25) %\n    repeat (10)\n        set [this a clone? v] to [1]\n        change [ghost v] effect by (-10)\n        change size by (((100) - (size)) / (2))\n    end\n    set [ghost v] effect to (0)\n    set size to (100) %\n    forever\n        change size by (((100) - (size)) / (2))\n        if <(up or down?) = [up]> then\n            switch costume to (down v)\n        else\n            switch costume to (up v)\n        end\n    end\nend\n\nwhen I receive [boss killed v]\nif <(x position) = [-220]> then\n    delete this clone\nend\n\nwhen I receive [reset orbs v]\nif <(this a clone?) = [1]> then\n    switch costume to (up v)\nend\n\n@Sprite1\n\nwhen flag clicked\nhide\n\nwhen I receive [enter water v]\nstop [other scripts in sprite v]\ngo to [front v] layer\ngo to x: (0) y: (0)\nshow\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-3)\nend\n\nwhen I receive [exit water v]\nstop [other scripts in sprite v]\ngo to x: (0) y: (0)\nshow\nrepeat (10)\n    change [ghost v] effect by (3)\nend\nset [ghost v] effect to (0)\nhide\n\nwhen I receive [hide level sprites v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nhide\ndelete this clone\n\n@thumbnail\n\nwhen flag clicked\nhide\n\nswitch costume to (backdrop2 v)\nset size to (100) %\nswitch costume to (backdrop1 v)\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\n\n@boss\n\nwhen I receive [boss v]\nset volume to ((1Sound on?) * (100)) %\nset size to (75) %\nset rotation style [left-right v]\npoint in direction (90)\nset [boss health v] to [4]\ngo to x: (97) y: (205)\nshow\nset [x v] to [0]\nset [y v] to [0]\nrepeat (20)\n    set rotation style [don't rotate v]\n    switch costume to (hitbox v)\n    change [y v] by (-1)\n    change y by (y)\n    set rotation style [left-right v]\n    switch costume to (walk v)\nend\nrepeat (40)\n    set rotation style [don't rotate v]\n    switch costume to (hitbox v)\n    change [y v] by (-1)\n    change y by (y)\n    if <(y position) < [72]> then\n        ground\n    end\n    set rotation style [left-right v]\n    switch costume to (walk v)\nend\nforever\n    set rotation style [don't rotate v]\n    switch costume to (hitbox v)\n    change [y v] by (-1)\n    if <(((x position) - ([x position v] of [mike v])) / ([abs v] of ((x position) - ([x position v] of [mike v])) )) = [1]> then\n        if <(direction) = [90]> then\n            change [x v] by (((((direction) / ([abs v] of (direction) )) * (-3.5)) - (x)) / (6))\n        else\n            change [x v] by (((((direction) / ([abs v] of (direction) )) * (-4.5)) - (x)) / (6))\n        end\n    else\n        if <(direction) = [90]> then\n            change [x v] by (((((direction) / ([abs v] of (direction) )) * (-4.5)) - (x)) / (6))\n        else\n            change [x v] by (((((direction) / ([abs v] of (direction) )) * (-3.5)) - (x)) / (6))\n        end\n    end\n    if <(x position) < [-138]> then\n        point in direction (-90)\n    end\n    if <(x position) > [90]> then\n        point in direction (90)\n    end\n    change y by (y)\n    change x by (x)\n    ground\n    if <<(boss touch) = [1]> and <touching (mike v)?>> then\n        broadcast (hit by boss v)\n        if <<<(boss health) < [4]> and <(level) = [10]>> and <(world) = [4]>> then\n            change [boss health v] by (1)\n        end\n    end\n    if <touching (cannons v)?> then\n        if <(classic mode?) = [0]> then\n            start sound [hit!! v]\n        else\n            start sound [shell v]\n        end\n        change [boss health v] by (-1)\n        set [x v] to [0]\n        switch costume to (ouch4 v)\n        repeat (3)\n            wait (0) seconds\n            switch costume to ((costume [number v]) - (1))\n        end\n        switch costume to (ouch v)\n        repeat (3)\n            wait (0) seconds\n            next costume\n        end\n        if <(boss health) = [0]> then\n            broadcast (boss killed v)\n            stop [this script v]\n        end\n        wait (0.25) seconds\n    end\n    set rotation style [left-right v]\n    costume\n    wait until <(paused?) = [0]>\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [boss killed v]\nset [x v] to [-8]\npoint in direction (90)\nif <(classic mode?) = [0]> then\n    start sound [die v]\nelse\n    start sound [dead v]\nend\nset [y v] to [8]\nrepeat until <<(y position) < [-148]> or <(x position) < [-235]>>\n    set rotation style [all around v]\n    turn left (8) degrees\n    change [y v] by (-1)\n    change [x v] by (((0) - (x)) / (18))\n    change x by (x)\n    change y by (y)\nend\nhide\n\nwhen I receive [hit by boss v]\ngo to x: (97) y: (-116)\nshow\nset [x v] to [0]\nset [y v] to [0]\n\ndefine ground\nif <touching (level v)?> then\n    repeat until <not <touching (level v)?>>\n        change y by (1)\n    end\n    set [y v] to [0]\nend\n\ndefine costume\nswitch costume to (costume)\n\nwhen I receive [boss v]\nforever\n    set [costume v] to [2]\n    repeat (2)\n        wait (0.05) seconds\n        change [costume v] by (1)\n    end\n    repeat (2)\n        wait (0.05) seconds\n        change [costume v] by (-1)\n    end\n    set [costume v] to [5]\n    repeat (1)\n        wait (0.05) seconds\n        change [costume v] by (1)\n    end\n    repeat (1)\n        wait (0.05) seconds\n    end\n    change [costume v] by (-1)\nend\n\nwhen I receive [hide level sprites v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nhide\ndelete this clone\n\n@boss hp\n\nwhen flag clicked\nhide\n\nwhen I receive [boss v]\nshow\ngo to x: (-281) y: (158)\nset [boss health v] to [4]\nswitch costume to (4 v)\nrepeat (10)\n    change x by (((-217) - (x position)) / (2))\nend\ngo to x: (-217) y: (158)\nforever\n    switch costume to (boss health)\nend\n\nwhen I receive [boss killed v]\nwait (1.5) seconds\nstop [other scripts in sprite v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nset [ghost v] effect to (0)\nhide\n\nwhen I receive [hide level sprites v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nhide\ndelete this clone\n\n@cannons\n\nwhen flag clicked\nset [this a clone? v] to [0]\nhide\n\nwhen I receive [gameplay v]\nif <(world) = [4]> then\n    for level (10)\n    set [type v] to [1]\n    set [id v] to [0]\n    go to x: (-122) y: (-40)\n    change [id v] by (1)\n    create clone of (_myself_ v)\n    go to x: (-80) y: (-40)\n    change [id v] by (1)\n    create clone of (_myself_ v)\n    go to x: (-24) y: (-40)\n    change [id v] by (1)\n    create clone of (_myself_ v)\n    go to x: (34) y: (-40)\n    change [id v] by (1)\n    create clone of (_myself_ v)\n    go to x: (76) y: (-40)\n    change [id v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [slide v]\nif <(this a clone?) = [1]> then\n    repeat (5)\n        change [ghost v] effect by (20)\n        change x by (-35)\n    end\n    delete this clone\nend\n\ndefine None\nwait until <(level) = (level)>\nwait (0.5) seconds\n\nwhen I start as a clone\ngo [backward v] (999) layers\ngo [backward v] (-9) layers\nif <(type) = [1]> then\n    switch costume to (cannon v)\n    set [ghost v] effect to (100)\n    show\n    set size to (25) %\n    repeat (10)\n        set [this a clone? v] to [1]\n        change [ghost v] effect by (-10)\n        change size by (((100) - (size)) / (2))\n    end\n    set [ghost v] effect to (0)\n    set size to (100) %\nelse\n    switch costume to (ball v)\n    set [y v] to [0]\n    repeat until <(y position) < [-134]>\n        change [y v] by (-1)\n        change y by (y)\n    end\n    repeat (5)\n        change [ghost v] effect by (20)\n        change [y v] by (-1)\n        change y by (y)\n    end\n    set [ghost v] effect to (0)\n    delete this clone\nend\n\nwhen I receive [fire v]\nif <(this a clone?) = [1]> then\n    if <(id) = (fired cannon id)> then\n        set [type v] to [2]\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I receive [hide level sprites v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nhide\ndelete this clone\n\n@c-buttons\n\nwhen flag clicked\nset [this a clone? v] to [0]\nhide\n\nwhen I receive [gameplay v]\nset volume to ((1Sound on?) * (100)) %\nif <(world) = [4]> then\n    for level (10)\n    set [id v] to [0]\n    go to x: (-119) y: (71)\n    change [id v] by (1)\n    create clone of (_myself_ v)\n    go to x: (-80) y: (71)\n    change [id v] by (1)\n    create clone of (_myself_ v)\n    go to x: (-25) y: (78)\n    change [id v] by (1)\n    create clone of (_myself_ v)\n    go to x: (33) y: (71)\n    change [id v] by (1)\n    create clone of (_myself_ v)\n    go to x: (70) y: (71)\n    change [id v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [slide v]\nif <(this a clone?) = [1]> then\n    repeat (5)\n        change [ghost v] effect by (20)\n        change x by (-35)\n    end\n    delete this clone\nend\n\ndefine None\nwait until <(level) = (level)>\nwait (0.5) seconds\n\nwhen I start as a clone\ngo [backward v] (999) layers\ngo [backward v] (-3) layers\nset [ghost v] effect to (100)\nshow\nset size to (25) %\nrepeat (10)\n    set [this a clone? v] to [1]\n    change [ghost v] effect by (-10)\n    change size by (((100) - (size)) / (2))\nend\nset [ghost v] effect to (0)\nset size to (100) %\n\nwhen I receive [touch button v]\nif <touching (mike v)?> then\n    start sound [machine v]\n    set [fired cannon id v] to (id)\n    broadcast (fire v)\n    set [y v] to (y position)\n    set y to (y)\n    repeat (5)\n        change y by ((((y) + (-5)) - (y position)) / (2))\n    end\n    repeat (5)\n        change y by (((y) - (y position)) / (2))\n    end\n    set y to (y)\nend\n\nwhen I receive [fire v]\nif <(this a clone?) = [1]> then\n    repeat (5)\n        change [ghost v] effect by (20)\n    end\n    hide\n    wait (1.5) seconds\n    show\n    repeat (5)\n        change [ghost v] effect by (-20)\n    end\nend\n\nwhen I receive [hide level sprites v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nhide\ndelete this clone\n\n@swap button\n\nwhen flag clicked\nset [this a clone? v] to [0]\nhide\n\nwhen I receive [gameplay v]\nset volume to ((1Sound on?) * (100)) %\nif <(world) = [3]> then\n    for level (2)\n    go to x: (-12) y: (35)\n    create clone of (_myself_ v)\n    for level (3)\n    go to x: (15) y: (33)\n    create clone of (_myself_ v)\n    go to x: (157) y: (-40)\n    create clone of (_myself_ v)\n    for level (4)\n    go to x: (153) y: (-71)\n    create clone of (_myself_ v)\n    go to x: (-215) y: (50)\n    create clone of (_myself_ v)\n    for level (5)\n    go to x: (183) y: (78)\n    create clone of (_myself_ v)\n    for level (6)\n    go to x: (188) y: (78)\n    create clone of (_myself_ v)\n    for level (7)\n    go to x: (-126) y: (54)\n    create clone of (_myself_ v)\n    for level (8)\n    go to x: (-212) y: (31)\n    create clone of (_myself_ v)\n    for level (9)\n    go to x: (191) y: (79)\n    create clone of (_myself_ v)\n    for level (10)\n    go to x: (30) y: (9)\n    create clone of (_myself_ v)\n    go to x: (-24) y: (74)\n    create clone of (_myself_ v)\nelse\n    if <(world) = [4]> then\n        for level (5)\n        go to x: (18) y: (-20)\n        create clone of (_myself_ v)\n        go to x: (96) y: (55)\n        create clone of (_myself_ v)\n        go to x: (-222) y: (17)\n        create clone of (_myself_ v)\n        for level (6)\n        go to x: (20) y: (-16)\n        create clone of (_myself_ v)\n        go to x: (-208) y: (68)\n        create clone of (_myself_ v)\n        for level (9)\n        go to x: (84) y: (24)\n        create clone of (_myself_ v)\n        go to x: (-225) y: (-28)\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I receive [slide v]\nif <(this a clone?) = [1]> then\n    repeat (5)\n        change [ghost v] effect by (20)\n        change x by (-35)\n    end\n    delete this clone\nend\n\ndefine None\nwait until <(level) = (level)>\nwait (0.5) seconds\n\nwhen I receive [fire v]\nif <(this a clone?) = [1]> then\n    repeat (5)\n        change [ghost v] effect by (20)\n    end\n    hide\n    wait (2.25) seconds\n    show\n    repeat (5)\n        change [ghost v] effect by (-20)\n    end\nend\n\nwhen I receive [hide level sprites v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nhide\ndelete this clone\n\nwhen I start as a clone\nif <(red or blue?) = [r]> then\n    switch costume to (red v)\nelse\n    switch costume to (blue v)\nend\nset [ghost v] effect to (100)\nshow\nset size to (25) %\nrepeat (10)\n    set [this a clone? v] to [1]\n    change [ghost v] effect by (-10)\n    change size by (((100) - (size)) / (2))\nend\nset [ghost v] effect to (0)\nset size to (100) %\n\nwhen I receive [swap colours v]\nif <(red or blue?) = [r]> then\n    switch costume to (red v)\nelse\n    switch costume to (blue v)\nend\n\nwhen I receive [touch button v]\nif <touching (mike v)?> then\n    if <(red or blue?) = [r]> then\n        set [red or blue? v] to [b]\n    else\n        set [red or blue? v] to [r]\n    end\n    start sound [zelda-heart.mp3 v]\n    broadcast (swap colours v)\n    set [y v] to (y position)\n    set y to (y)\n    set [brightness v] effect to (50)\n    repeat (5)\n        change y by ((((y) + (5)) - (y position)) / (2))\n        change [brightness v] effect by (-10)\n    end\n    repeat (5)\n        change y by (((y) - (y position)) / (2))\n    end\n    set y to (y)\nend\n\n@menu text\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [exit to main menu v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nstop [other scripts in sprite v]\ngo to x: (0) y: (0)\nset [ghost v] effect to (0)\nswitch costume to (g v)\nhide\ndelete this clone\n\nset [completed? v] to [0]\n\nwhen I receive [notice world 1 v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nhide\ndelete this clone\n\nwhen I receive [notice world 1 v]\nwait (0.25) seconds\nstop [other scripts in sprite v]\ngo to x: (0) y: (0)\nswitch costume to (hint v)\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [worlds v]\nif <(length of [completed worlds v]) = [0]> then\n    wait (0.25) seconds\n    stop [other scripts in sprite v]\n    switch costume to (new v)\n    set [ghost v] effect to (100)\n    show\n    set [x v] to [0]\n    repeat (10)\n        change [ghost v] effect by (-8)\n        change [x v] by (-5)\n        change y by (([sin v] of (x) ) / (4))\n    end\n    forever\n        change [x v] by (-5)\n        change y by (([sin v] of (x) ) / (4))\n    end\nend\n\nwhen I receive [save/load menu v]\nwait (0.25) seconds\nswitch costume to (sl v)\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [sucess! v]\nswitch costume to (sl-s v)\n\nwhen I receive [fail code v]\nswitch costume to (sl-f v)\n\nwhen I receive [lists v]\nwait (0.25) seconds\ngo [backward v] (99) layers\ngo [backward v] (-2) layers\nswitch costume to (g v)\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [ask for code v]\nswitch costume to (sl-ask v)\nrepeat (2)\n    go to [front v] layer\nend\n\nwhen I start as a clone\nshow\nswitch costume to (join [beat w] (beat world name))\nset [ghost v] effect to (0)\ngo to x: (654) y: (0)\nrepeat (10)\n    change x by (((0) - (x position)) / (2))\nend\ngo to x: (0) y: (0)\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen I receive [world locked! v]\nif <[1] = [1]> then\n    delete this clone\nend\ncreate clone of (_myself_ v)\n\nwhen I receive [goal v]\nset [time v] to (time2)\nif <(world) = [1]> then\n    if <(time) < (☁ w1t)> then\n        start sound [star v]\n        set [☁ w1t v] to (time)\n        set [message type v] to [2]\n        broadcast (message v)\n    end\nelse\n    if <(world) = [2]> then\n        if <(time) < (☁ w2t)> then\n            start sound [star v]\n            set [☁ w2t v] to (time)\n            set [message type v] to [2]\n            broadcast (message v)\n        end\n    else\n        if <(world) = [3]> then\n            if <(time) < (☁ w3t)> then\n                start sound [star v]\n                set [☁ w3t v] to (time)\n                set [message type v] to [2]\n                broadcast (message v)\n            end\n        else\n            if <(world) = [4]> then\n                if <(time) < (☁ w4t)> then\n                    start sound [star v]\n                    set [☁ w4t v] to (time)\n                    set [message type v] to [2]\n                    broadcast (message v)\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [worlds v]\nif <<(costume [number v]) = [4]> or <(costume [number v]) = [11]>> then\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    set [ghost v] effect to (0)\n    switch costume to (g v)\n    hide\nend\n\nset [☁ w1c v] to [0]\nset [☁ w2c v] to [0]\nset [☁ w3c v] to [0]\nset [☁ w4c v] to [0]\nset [☁ w1t v] to [9999]\nset [☁ w2t v] to [9999]\nset [☁ w3t v] to [9999]\nset [☁ w4t v] to [9999]\nset [☁ global all stars v] to [0]\n\nwhen I receive [gameplay v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nstop [other scripts in sprite v]\ngo to x: (0) y: (0)\nset [ghost v] effect to (0)\nswitch costume to (g v)\nhide\nif <[1] = [1]> then\n    delete this clone\nend\nset [time2 v] to [0]\nforever\n    wait (1) seconds\n    wait until <(paused?) = [0]>\n    change [time2 v] by (1)\nend\n\nwhen I receive [star list v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nstop [other scripts in sprite v]\ngo to x: (0) y: (0)\nshow\nswitch costume to (star v)\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\ndelete this clone\n\n@numbers\n\nwhen I receive [lists v]\nwait (0.25) seconds\n\ndefine None\nset [row v] to (id)\nset [id v] to [0]\nif <(id) = [1]> then\n    repeat (length of (☁ w1c))\n        change [id v] by (1)\n        switch costume to (letter (id) of (☁ w1c))\n        create clone of (_myself_ v)\n    end\nelse\n    if <(id) = [2]> then\n        repeat (length of (☁ w2c))\n            change [id v] by (1)\n            switch costume to (letter (id) of (☁ w2c))\n            create clone of (_myself_ v)\n        end\n    else\n        if <(id) = [3]> then\n            repeat (length of (☁ w3c))\n                change [id v] by (1)\n                switch costume to (letter (id) of (☁ w3c))\n                create clone of (_myself_ v)\n            end\n        else\n            if <(id) = [4]> then\n                repeat (length of (☁ w4c))\n                    change [id v] by (1)\n                    switch costume to (letter (id) of (☁ w4c))\n                    create clone of (_myself_ v)\n                end\n            else\n                if <(id) = [5]> then\n                    repeat (length of (☁ w1t))\n                        change [id v] by (1)\n                        switch costume to (letter (id) of (☁ w1t))\n                        create clone of (_myself_ v)\n                    end\n                    change [id v] by (1)\n                    switch costume to (seconds v)\n                    create clone of (_myself_ v)\n                else\n                    if <(id) = [6]> then\n                        repeat (length of (☁ w2t))\n                            change [id v] by (1)\n                            switch costume to (letter (id) of (☁ w2t))\n                            create clone of (_myself_ v)\n                        end\n                        change [id v] by (1)\n                        switch costume to (seconds v)\n                        create clone of (_myself_ v)\n                    else\n                        if <(id) = [7]> then\n                            repeat (length of (☁ w3t))\n                                change [id v] by (1)\n                                switch costume to (letter (id) of (☁ w3t))\n                                create clone of (_myself_ v)\n                            end\n                            change [id v] by (1)\n                            switch costume to (seconds v)\n                            create clone of (_myself_ v)\n                        else\n                            if <(id) = [8]> then\n                                repeat (length of (☁ w4t))\n                                    change [id v] by (1)\n                                    switch costume to (letter (id) of (☁ w4t))\n                                    create clone of (_myself_ v)\n                                end\n                                change [id v] by (1)\n                                switch costume to (seconds v)\n                                create clone of (_myself_ v)\n                            else\n                                repeat (length of (☁ global all stars))\n                                    change [id v] by (1)\n                                    switch costume to (letter (id) of (☁ global all stars))\n                                    create clone of (_myself_ v)\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [lists v]\nwait (0.25) seconds\nclone (1)\nclone (2)\nclone (3)\nclone (4)\nclone (5)\nclone (6)\nclone (7)\nclone (8)\nclone (9)\n\nwhen flag clicked\nset size to (80) %\nhide\n\nwhen I start as a clone\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I start as a clone\nif <(row) = [1]> then\n    go to x: ((-60) + (((14) * (id)) - (14))) y: (108)\nelse\n    if <(row) = [2]> then\n        go to x: ((-56) + (((14) * (id)) - (14))) y: (82)\n    else\n        if <(row) = [3]> then\n            go to x: ((-56) + (((14) * (id)) - (14))) y: (57)\n        else\n            if <(row) = [4]> then\n                go to x: ((-53) + (((14) * (id)) - (14))) y: (32)\n            else\n                if <(row) = [5]> then\n                    go to x: ((-33) + (((14) * (id)) - (14))) y: (-3)\n                else\n                    if <(row) = [6]> then\n                        go to x: ((-29) + (((14) * (id)) - (14))) y: (-28)\n                    else\n                        if <(row) = [7]> then\n                            go to x: ((-31) + (((14) * (id)) - (14))) y: (-53)\n                        else\n                            if <(row) = [8]> then\n                                go to x: ((-27) + (((14) * (id)) - (14))) y: (-78)\n                            else\n                                go to x: ((53) + (((14) * (id)) - (14))) y: (-140)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [exit to main menu v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nhide\ndelete this clone\n\n@pause menu\n\nwhen I receive [hide level sprites v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nhide\ndelete this clone\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [gameplay v]\nset [paused? v] to [0]\nforever\n    wait until <(paused?) = [1]>\n    start sound [button v]\n    go to [front v] layer\n    set [id v] to [1]\n    create clone of (_myself_ v)\n    change [id v] by (1)\n    create clone of (_myself_ v)\n    set [ghost v] effect to (100)\n    show\n    repeat (5)\n        change [ghost v] effect by (-8)\n    end\n    wait until <(paused?) = [0]>\n    start sound [button v]\n    repeat (5)\n        change [ghost v] effect by (8)\n    end\n    set [ghost v] effect to (0)\n    hide\nend\n\nwhen I receive [gameplay v]\nset [paused? v] to [0]\nforever\n    if <key (p v) pressed?> then\n        if <(paused?) = [0]> then\n            set [paused? v] to [1]\n        else\n            set [paused? v] to [0]\n        end\n        wait until <not <key (p v) pressed?>>\n    end\nend\n\nwhen I start as a clone\ngo to [front v] layer\nif <(id) = [1]> then\n    go to x: (0) y: (0)\n    set [ghost v] effect to (100)\n    switch costume to (costume2 v)\n    show\n    set [size v] to [0]\n    repeat (10)\n        change [ghost v] effect by (-10)\n        change [size v] by (4)\n        change size by (([sin v] of (size) ) / (2))\n    end\n    repeat until <(paused?) = [0]>\n        change [size v] by (4)\n        change size by (([sin v] of (size) ) / (2))\n    end\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    set [ghost v] effect to (0)\n    hide\n    delete this clone\nelse\n    set size to (80) %\n    set [ghost v] effect to (100)\n    go to x: (-200) y: (138)\n    switch costume to (costume3 v)\n    show\n    repeat (10)\n        change [ghost v] effect by (-5)\n    end\n    repeat until <(paused?) = [0]>\n        if <touching (mouse-pointer v)?> then\n            change size by (((100) - (size)) / (4))\n            if <mouse down?> then\n                repeat until <<not <touching (mouse-pointer v)?>> or <not <mouse down?>>>\n                    change size by (((70) - (size)) / (4))\n                end\n                if <touching (mouse-pointer v)?> then\n                    broadcast (hide level sprites v)\n                    start sound [button v]\n                    stop [this script v]\n                end\n            end\n        else\n            change size by (((80) - (size)) / (4))\n        end\n    end\n    repeat (10)\n        change [ghost v] effect by (5)\n    end\n    set [ghost v] effect to (0)\n    hide\n    delete this clone\nend\n\n@notification\n\nwhen I receive [message v]\nswitch costume to ((message type) + (1))\ngo to x: (-255) y: (157)\nset size to (100) %\nshow\nrepeat (10)\n    switch costume to (0 v)\n    change x by (((-201) - (x position)) / (3))\n    switch costume to ((message type) + (1))\nend\ngo to x: (-201) y: (157)\nset [bounce v] to [10]\nrepeat (18)\n    change [bounce v] by (-1)\n    change size by ((bounce) / (2))\nend\nset size to (100) %\nwait (1) seconds\nchange x by (-1)\nrepeat (15)\n    switch costume to (0 v)\n    change x by (((-201) - (x position)) / (-1.5))\n    switch costume to ((message type) + (1))\nend\nhide\n\nwhen flag clicked\nhide\n\n@Intro\n\nwhen I start as a clone\nset [brightness v] effect to (0)\nif <(id) = [1]> then\n    point in direction (80)\n    switch costume to (logo bg v)\n    show\n    set size to (50) %\n    go to [front v] layer\n    repeat (25)\n        change size by (((100) - (size)) / (3))\n        turn right (((90) - (direction)) / (3)) degrees\n    end\n    wait (44) seconds\n    repeat (4)\n        change size by (((-15) - (size)) / (3))\n    end\n    hide\n    delete this clone\nelse\n    if <(id) = [2]> then\n        change y by (-5)\n        point in direction (65)\n        switch costume to (logo v)\n        show\n        set size to (0) %\n        go to [front v] layer\n        repeat (25)\n            change size by (((100) - (size)) / (3))\n            turn right (((90) - (direction)) / (3)) degrees\n        end\n        wait (44) seconds\n        repeat (6)\n            change size by (((-8) - (size)) / (3))\n        end\n        hide\n        delete this clone\n    else\n        go to [front v] layer\n        set size to (100) %\n        go to x: (0) y: (0)\n        repeat (40)\n            switch costume to (costume2 v)\n            change size by (((2750) - (size)) / (8))\n            if <(id) = [3]> then\n                switch costume to (costume3 v)\n            else\n                change [brightness v] effect by (-4)\n                switch costume to (costume1 v)\n            end\n        end\n        if <(id) = [3]> then\n            switch costume to (notices v)\n            go to [front v] layer\n            set size to (100) %\n            go to x: (0) y: (0)\n            set [brightness v] effect to (-100)\n            repeat (5)\n                change [brightness v] effect by (20)\n            end\n            wait until <not <mouse down?>>\n            if <(mouse y) > [179]> then\n                wait until <not <(mouse x) = (x)>>\n                wait until <not <(mouse y) = (y)>>\n            end\n            forever\n                if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                    wait until <<not <mouse down?>> or <touching (mouse-pointer v)?>>\n                    if <touching (mouse-pointer v)?> then\n                        wait until <not <mouse down?>>\n                        if <touching (mouse-pointer v)?> then\n                            start sound [button v]\n                            repeat (10)\n                                change [brightness v] effect by (-10)\n                            end\n                            broadcast (end intro v)\n                            delete this clone\n                        end\n                    end\n                end\n            end\n        end\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nset [float v] to [0]\nwait (0.25) seconds\nif <(id) = [1]> then\n    repeat (27)\n        float\n    end\n    repeat (5)\n        change x by (50)\n        float\n    end\n    set x to ((x position) * (-1))\n    repeat (32)\n        change x by (((0) - (x position)) / (2))\n        float\n    end\n    set x to (0)\n    repeat (2)\n        repeat (5)\n            change y by (((25) - (y position)) / (2))\n            float\n        end\n        repeat (5)\n            change y by (((-25) - (y position)) / (2))\n            float\n        end\n    end\n    repeat (5)\n        change y by (((25) - (y position)) / (2))\n        float\n    end\n    set [spin! v] to [90]\n    repeat (15)\n        change y by (((0) - (y position)) / (2))\n        change [spin! v] by (((135) - (spin!)) / (8))\n        point in direction (spin!)\n    end\n    repeat (20)\n        change y by (((0) - (y position)) / (2))\n        change [spin! v] by (((45) - (spin!)) / (8))\n        point in direction (spin!)\n    end\n    set [zoom v] to [0]\n    repeat (100)\n        change y by (((0) - (y position)) / (2))\n        change [spin! v] by (((90) - (spin!)) / (8))\n        point in direction (spin!)\n        change [zoom v] by (-2)\n        change size by (zoom)\n    end\nelse\n    if <(id) = [2]> then\n        repeat (27)\n            float\n        end\n        repeat (5)\n            change x by (-50)\n            float\n        end\n        set x to ((x position) * (-1))\n        repeat (32)\n            change x by (((0) - (x position)) / (2))\n            float\n        end\n        set x to (0)\n        repeat (2)\n            repeat (5)\n                change y by (((-25) - (y position)) / (2))\n                float\n            end\n            repeat (5)\n                change y by (((25) - (y position)) / (2))\n                float\n            end\n        end\n        repeat (5)\n            change y by (((-25) - (y position)) / (2))\n            float\n        end\n        set [spin! v] to [90]\n        repeat (15)\n            change y by (((0) - (y position)) / (2))\n            change [spin! v] by (((45) - (spin!)) / (8))\n            point in direction (spin!)\n        end\n        repeat (20)\n            change y by (((0) - (y position)) / (2))\n            change [spin! v] by (((135) - (spin!)) / (8))\n            point in direction (spin!)\n        end\n        set [zoom v] to [0]\n        repeat (100)\n            change y by (((0) - (y position)) / (2))\n            change [spin! v] by (((90) - (spin!)) / (8))\n            point in direction (spin!)\n            change [zoom v] by (-2)\n            change size by (zoom)\n        end\n    end\nend\n\nwhen flag clicked\nwait (2.5) seconds\nif <(intro end animation?) = [0]> then\n    set [id v] to [1]\n    create clone of (_myself_ v)\n    change [id v] by (1)\n    create clone of (_myself_ v)\nend\nset [brightness v] effect to (20)\nrepeat (20)\n    change [brightness v] effect by (-1)\nend\nwait (0.6) seconds\nset size to (150) %\nset [brightness v] effect to (20)\nrepeat (20)\n    change [brightness v] effect by (-1)\nend\nwait (0.45) seconds\nrepeat (4)\n    set size to (150) %\n    set [brightness v] effect to (20)\n    repeat (5)\n        change [brightness v] effect by (-1)\n    end\nend\nrepeat (15)\n    change [brightness v] effect by (-1.5)\nend\nwait (0.675) seconds\nset size to (150) %\nset [brightness v] effect to (20)\nrepeat (20)\n    change [brightness v] effect by (-1)\nend\n\nwhen flag clicked\nset [intro end animation? v] to [0]\nset volume to (100) %\nstart sound [TheFatRat+-+Monody+\(feat.+Laura+Brehm\) v]\nset [brightness v] effect to (-100)\ngo to x: (0) y: (0)\nset size to (87) %\nswitch costume to (bg v)\npoint in direction (90)\nshow\ngo to [front v] layer\nrepeat (75)\n    change size by (((125) - (size)) / (50))\n    change [brightness v] effect by (1)\n    float\nend\nforever\n    float\n    change size by (((100) - (size)) / (25))\nend\n\nwhen I receive [end intro v]\nstop [other scripts in sprite v]\nif <(costume [number v]) = [1]> then\n    go to x: (0) y: (0)\n    switch costume to (bg2 v)\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    set [ghost v] effect to (0)\n    hide\nelse\n    delete this clone\nend\n\nwhen flag clicked\nwait (7.2) seconds\nif <(intro end animation?) = [0]> then\n    set [intro end animation? v] to [1]\n    set [id v] to [3]\n    start sound [Hit_Hurt4 v]\n    create clone of (_myself_ v)\n    wait (0.15) seconds\n    set [id v] to [4]\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nset [x v] to (mouse x)\nset [y v] to (mouse y)\nwait until <not <mouse down?>>\nif <(mouse y) > [179]> then\n    wait until <not <(mouse x) = (x)>>\n    wait until <not <(mouse y) = (y)>>\nend\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        wait until <<not <mouse down?>> or <touching (mouse-pointer v)?>>\n        if <<touching (mouse-pointer v)?> and <(intro end animation?) = [0]>> then\n            set [intro end animation? v] to [1]\n            set [id v] to [3]\n            start sound [Hit_Hurt4 v]\n            create clone of (_myself_ v)\n            wait (0.15) seconds\n            set [id v] to [4]\n            create clone of (_myself_ v)\n            repeat (15)\n                change volume by (-7.5)\n            end\n            stop [this script v]\n        end\n    end\nend\n\ndefine float\nif <(costume [number v]) = [1]> then\n    change [float v] by (3)\n    change y by (([sin v] of (float) ) / (4))\nelse\n    if <(costume [number v]) = [3]> then\n        change [float v] by (6)\n    else\n        change [float v] by (-6)\n    end\n    change y by (([sin v] of (float) ) / (3))\n    change size by (([sin v] of (float) ) / (4))\n    turn right (([sin v] of (float) ) / (5)) degrees\nend\n\n@lasers\n\nwhen flag clicked\nset [this a clone? v] to [0]\nhide\n\nwhen I receive [gameplay v]\nif <(world) = [4]> then\n    for level (7)\n    go to x: (-159) y: (-106)\n    create clone of (_myself_ v)\n    for level (8)\n    go to x: (-159) y: (-106)\n    create clone of (_myself_ v)\n    for level (9)\n    go to x: (-159) y: (-106)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [slide v]\nif <(this a clone?) = [1]> then\n    repeat (5)\n        change [ghost v] effect by (20)\n        change x by (-35)\n    end\n    delete this clone\nend\n\ndefine None\nwait until <(level) = (level)>\nwait (0.5) seconds\n\nwhen I receive [hide level sprites v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nhide\ndelete this clone\n\nwhen I start as a clone\nforever\n    set rotation style [left-right v]\n    point in direction (90)\n    switch costume to (costume1 v)\n    repeat (2)\n        wait (0) seconds\n        next costume\n    end\n    point in direction (-90)\n    repeat (3)\n        wait (0) seconds\n        switch costume to ((costume [number v]) - (1))\n    end\n    point in direction (90)\n    repeat (2)\n        wait (0) seconds\n        switch costume to ((costume [number v]) - (1))\n    end\nend\n\nwhen I start as a clone\ngo [backward v] (999) layers\ngo [backward v] (-4) layers\nset [ghost v] effect to (100)\nshow\nset size to (100) %\nrepeat (10)\n    set [this a clone? v] to [1]\n    change [ghost v] effect by (-5)\nend\nset [ghost v] effect to (50)\n\n@stars2\n\nwhen flag clicked\nhide\n\nwhen I receive [star list v]\nrepeat (10)\nend\nset [id v] to [0]\nset [row v] to [0]\nrepeat (4)\n    change [row v] by (1)\n    repeat (3)\n        change [id v] by (1)\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\ngo to [front v] layer\nif <[stars v] contains (id)?> then\n    switch costume to (collected v)\nelse\n    switch costume to (empty v)\nend\ngo to x: (((14) + (((id) - (1)) * (32))) - (((row) - (1)) * (96))) y: ((98) - (((row) - (1)) * (36)))\nshow\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait until <key (space v) pressed?>\ndelete this clone\n\nwhen I receive [worlds v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\ndelete this clone\n\n@jukebox\n\nwhen I receive [change song v]\nstop [other scripts in sprite v]\nstop all sounds\nbroadcast (check sound v)\nif <(1Music on?) = [0]> then\n    set volume to (0) %\nend\nif <(jukebox song) > [0]> then\n    if <(jukebox song) = [3]> then\n        play sound [Vexento - Tevo \(Original Mix\) v] until done\n    else\n        if <(jukebox song) = [4]> then\n            play sound [world 2 v] until done\n        else\n            if <(jukebox song) = [5]> then\n                play sound [world 3 intro v] until done\n            else\n                if <(jukebox song) = [6]> then\n                    play sound [world 4 intro v] until done\n                else\n                    if <(jukebox song) = [7]> then\n                        play sound [Boss intro v] until done\n                    end\n                end\n            end\n        end\n    end\n    if <(1Music on?) = [0]> then\n        set volume to (0) %\n    end\n    forever\n        play sound (jukebox song) until done\n    end\nend\n\nwhen I receive [end intro v]\nbroadcast (check sound v)\nif <(1Music on?) = [0]> then\n    set volume to (0) %\nend\nif <(jukebox song) > [0]> then\n    if <(jukebox song) = [3]> then\n        play sound [Vexento - Tevo \(Original Mix\) v] until done\n    else\n        if <(jukebox song) = [4]> then\n            play sound [world 2 v] until done\n        else\n            if <(jukebox song) = [5]> then\n                play sound [world 3 intro v] until done\n            else\n                if <(jukebox song) = [6]> then\n                    play sound [world 4 intro v] until done\n                else\n                    if <(jukebox song) = [7]> then\n                        play sound [Boss intro v] until done\n                    end\n                end\n            end\n        end\n    end\n    if <(1Music on?) = [0]> then\n        set volume to (0) %\n    end\n    forever\n        play sound (jukebox song) until done\n    end\nend\n\nwhen flag clicked\ngo to x: (216) y: (157)\nset size to (75) %\n\nwhen I receive [check sound v]\nforever\n    if <<(jukebox song) > [0]> and <(1Music on?) = [1]>> then\n        turn right (2) degrees\n        show\n        set [ghost v] effect to (75)\n    else\n        set [ghost v] effect to (0)\n        hide\n    end\nend\n\nwhen I receive [check sound v]\nforever\n    wait until <(1Music on?) = [1]>\n    set volume to (100) %\n    wait until <(1Music on?) = [0]>\n    set volume to (0) %\nend\n\n