Mega Man: Phantom Challenger - The Second Chapter [DEMO]       /// Scrolling Platformer #games
@Stage\n\nwhen I receive [die v]\nset volume to (0) %\nwait (4) seconds\nset [music v] to [1]\nstop all sounds\nwait (0) seconds\nset volume to (100) %\nset [scroll x v] to [15]\nset [scroll y v] to [15]\nbroadcast (SetUp v)\nbroadcast (READY v)\nwait (1) seconds\nbroadcast (Teleportin v)\n\nwhen flag clicked\nset [@i am speed v] to [.68]\nset [size v] to [200]\nset [megaman costume v] to [1]\nbroadcast (Disable Movement v)\n\nwhen I receive [take dmg v]\nset [dmg thingy v] to [1]\ncreate clone of (ready v)\nwait (0) seconds\nset [dmg thingy v] to [2]\ncreate clone of (ready v)\nwait (0) seconds\nset [dmg thingy v] to [3]\ncreate clone of (ready v)\nwait (0) seconds\nset [dmg thingy v] to [4]\ncreate clone of (ready v)\nwait (0) seconds\n\nwhen flag clicked\nset [@mega man: special weapon v] to [0]\nset volume to (80) %\nset [music v] to [5]\nforever\n    play sound (Music) until done\nend\n\nwhen I receive [bosscutscene v]\nbroadcast (Disable Movement v)\nset [music v] to [3]\nrepeat (10)\n    wait (0) seconds\n    change volume by (-10)\nend\nstop all sounds\nrepeat (10)\n    wait (0) seconds\n    change volume by (10)\nend\n\nwhen I receive [battle begin v]\nbroadcast (Disable Movement v)\nset [music v] to [4]\nrepeat (10)\n    wait (0) seconds\n    change volume by (-10)\nend\nstop all sounds\nrepeat (10)\n    wait (0) seconds\n    change volume by (10)\nend\nbroadcast (Enable Movement v)\n\nwhen I receive [bossdie v]\nrepeat (10)\n    change volume by (-10)\n    wait (0) seconds\nend\nset volume to (0) %\n\nbroadcast (READY v)\nbroadcast (SetUp v)\nbroadcast (Teleportin v)\n\nwhen I receive [menu start v]\nrepeat (10)\n    wait (.05) seconds\n    change volume by (-10)\nend\n\nwhen I receive [transition fade out v]\nwait (2) seconds\nset volume to (0) %\nset [music v] to [1]\nstop all sounds\nrepeat (10)\n    wait (0) seconds\n    change volume by (10)\nend\n\n@hitbox\n\nwhen flag clicked\nforever\n    if <key (space v) pressed?> then\n        set [using gun? v] to [1]\n    else\n        set [using gun? v] to [0]\n    end\nend\n\nwhen I receive [teleportin v]\nset [falling? v] to [0]\nforever\n    wait until <(falling?) > [3]>\n    wait until <(falling?) < [2]>\n    start sound [Mega Man 5 SFX \(5\) v]\nend\n\nwhen I receive [take dmg v]\nstart sound [Mega Man 5 SFX \(6\) v]\nset [takingdmg v] to [1]\nwait (.6) seconds\nset [takingdmg v] to [0]\n\nwhen flag clicked\nset [sliding?2 v] to [0]\n\nwhen flag clicked\nforever\n    if <(SLIDING?2) = [1]> then\n        switch costume to (idle4 v)\n    else\n        switch costume to (idle3 v)\n    end\nend\n\nwhen flag clicked\n\nwhen I receive [slide v]\nif <(falling?) < [3]> then\n    reset timer\n    create clone of (hpbar v)\n    repeat (10)\n        slide\n    end\n    repeat until <<<<<not <<key (down arrow v) pressed?> or <key (s v) pressed?>>> or <(falling?) > [3]>> and <not <(Megaman Costume) = [3]>>> or <(timer) > [.5]>> and <(STAY SLIDING) = [0]>>\n        slide\n    end\nend\nset [sliding?2 v] to [0]\nwait (.25) seconds\nset [slide time2 v] to [1]\n\nwhen I receive [die v]\nset [canmove? v] to [0]\n\nwhen I receive [die v]\nrepeat (10)\n    set [canmove? v] to [0]\nend\n\nwhen I receive [bossdie v]\nset [canmove? v] to [0]\n\nwhen I receive [bossdie v]\nrepeat (50)\n    set [canmove? v] to [0]\nend\n\nwhen flag clicked\nset [slide time2 v] to [1]\n\nwhen I receive [stuncheck v]\nif <(falling?) < [2]> then\n    broadcast (STUNNED v)\nend\n\nwhen I receive [stunned v]\nset [canmove? v] to [0]\nwait (2) seconds\nset [canmove? v] to [1]\n\nwhen I receive [hitboxsnap v]\ngo to (mega man/protoman/bass v)\nchange y by (-15)\nfindground\n\ndefine Tick <<> <^> <>> <v>\nif <(CanMove?) = [1]> then\n    if <(Collide with ladder) = [1]> then\n        if <<(Scroll X) = (Scroll X Min)> or <(Scroll X) = (Scroll X Max)>> then\n            set x to (((LADDER_SNP) - (Scroll X)) + (12))\n            set [scroll x v] to (LADDER_SNP)\n        else\n            set [scroll x v] to ((LADDER_SNP) + (12))\n        end\n        if <<not <mouse down?>> and <not <key (space v) pressed?>>> then\n            if <([animations: using gun?2 v] of [mega man/protoman/bass v]) = [0]> then\n                if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(mouse y) > (y position)>>>> then\n                    change y by (6)\n                end\n                if <v> then\n                    if <mouse down?> then\n                        change y by (6)\n                    else\n                        change y by (-6)\n                    end\n                end\n            end\n        end\n    else\n        if <(@QuickDash?) = [1]> then\n            if <(takingdmg) = [1]> then\n                set [@quickdash? v] to [0]\n            end\n            if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n                set [speed y v] to [5]\n            else\n                if <v> then\n                    set [speed y v] to [-5]\n                else\n                    set [speed y v] to [0]\n                end\n            end\n            change [speed y v] by (-.16)\n            change y by (speed y)\n            if <<> then\n                point in direction (-90)\n            end\n            if <>> then\n                point in direction (90)\n            end\n            if <(direction) = [90]> then\n                set [speed x v] to [10]\n            else\n                set [speed x v] to [-10]\n            end\n            Touch Ground <(speed y) > [0]>\n            change y by (speed y)\n            Walk (direction) (speed x)\n        else\n            if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(mouse y) > (y position)>>>> then\n                if <(Antigravity?) = [1]> then\n                    change [speed y v] by (-.16)\n                    change y by (speed y)\n                else\n                    change [speed y v] by (-.4)\n                    change y by (speed y)\n                end\n            else\n                if <(Antigravity?) = [1]> then\n                    change [speed y v] by (-.16)\n                    change y by (speed y)\n                else\n                    change [speed y v] by (-.4)\n                    change y by (speed y)\n                end\n            end\n            Touch Ground <(speed y) > [0]>\n            if <<> then\n                if <(getting ouched ?) = [0]> then\n                    change [htbx_frme v] by (.4)\n                    if <(Megaman Costume) = [3]> then\n                        point in direction (-90)\n                        if <<<<not <key (space v) pressed?>> and <not <mouse down?>>> or <not <(falling?) < [3]>>> or <(TrebleBoostTimer) > [0]>> then\n                            if <(HTBX_FRME) < [1]> then\n                                change [speed x v] by (([abs v] of ((@i am speed) - (2)) ) * (-2))\n                            else\n                                change [speed x v] by (([abs v] of ((@i am speed) - (2)) ) * (-5))\n                            end\n                            if <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n                                if <(slide time2) = [1]> then\n                                    broadcast (slide v)\n                                end\n                            end\n                        end\n                    else\n                        if <(HTBX_FRME) < [1]> then\n                            change [speed x v] by (([abs v] of ((@i am speed) - (2)) ) * (-2))\n                        else\n                            change [speed x v] by (([abs v] of ((@i am speed) - (2)) ) * (-5))\n                        end\n                        point in direction (-90)\n                        if <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n                            if <(slide time2) = [1]> then\n                                broadcast (slide v)\n                            end\n                        end\n                    end\n                end\n            end\n            if <>> then\n                change [htbx_frme v] by (.4)\n                if <(getting ouched ?) = [0]> then\n                    if <(Megaman Costume) = [3]> then\n                        point in direction (90)\n                        if <<<<not <key (space v) pressed?>> and <not <mouse down?>>> or <not <(falling?) < [3]>>> or <(TrebleBoostTimer) > [0]>> then\n                            if <(HTBX_FRME) < [1]> then\n                                change [speed x v] by (([abs v] of ((@i am speed) - (2)) ) * (2))\n                            else\n                                change [speed x v] by (([abs v] of ((@i am speed) - (2)) ) * (5))\n                            end\n                            if <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n                                if <(slide time2) = [1]> then\n                                    broadcast (slide v)\n                                end\n                            end\n                        end\n                    else\n                        if <(HTBX_FRME) < [1]> then\n                            change [speed x v] by (([abs v] of ((@i am speed) - (2)) ) * (2))\n                        else\n                            change [speed x v] by (([abs v] of ((@i am speed) - (2)) ) * (5))\n                        end\n                        point in direction (90)\n                        if <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n                            if <(slide time2) = [1]> then\n                                broadcast (slide v)\n                            end\n                        end\n                    end\n                end\n            end\n            if <<(Ice Physics?) = [1]> and <(falling?) < [3]>> then\n                set [speed x v] to ((speed x) * (.6))\n                change [htbx_frme v] by (-.1)\n            else\n                set [speed x v] to ((speed x) * (.5))\n                change [htbx_frme v] by (-.1)\n            end\n            if <(round (speed x)) = [0]> then\n                set [htbx_frme v] to [0]\n            end\n            change y by (speed y)\n            Walk (direction) (speed x)\n            Touch Ground <(speed y) > [0]>\n            if <<^> and <(falling?) < [3]>> then\n                if <(getting ouched ?) = [0]> then\n                    set [speed y v] to [8]\n                end\n            end\n            if <<<key (s v) pressed?> or <key (down arrow v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(mouse y) < (y position)>>>> then\n            if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(mouse y) > (y position)>>>> then\n                if <(getting ouched ?) = [0]> then\n                    if <(falling?) < [3]> then\n                        if <(JUMP KEY) = [1]> then\n                            change [speed y v] by (([abs v] of ((@i am speed) - (.9)) ) * (-1))\n                        end\n                    else\n                        change [speed y v] by (([abs v] of ((@i am speed) - (.9)) ) * (-1))\n                    end\n                end\n            else\n                change [speed y v] by (([abs v] of ((@i am speed) - (1.9)) ) * (-1.1))\n            end\n        end\n    end\nend\n\ndefine Walk (direction) (speed)\npoint in direction (direction)\nchange x by (speed)\nset [slope v] to [0]\nif <(Collide with ladder) = [2]> then\n    repeat until <<(slope) = [8]> or <not <touching (ground v)?>>>\n        change [slope v] by (1)\n        change y by (1)\n    end\n    if <(slope) = [8]> then\n        set [speed x v] to [0]\n        change x by ((0) - (speed))\n        change y by ((0) - (slope))\n    end\nelse\n    repeat until <<(slope) = [8]> or <<not <touching (ground v)?>> and <<not <touching (misc objects v)?>> and <(Collide with ladder) = [0]>>>>\n        change [slope v] by (1)\n        change y by (1)\n    end\n    if <(slope) = [8]> then\n        set [speed x v] to [0]\n        change x by ((0) - (speed))\n        change y by ((0) - (slope))\n    end\nend\n\nwhen flag clicked\nswitch costume to (idle v)\nset size to (200) %\nset size to (200) %\nset [falling v] to [0]\nset [speed y v] to [0]\nset [canmove? v] to [0]\nset [dead: v] to [0]\nset [health v] to [1]\ngo to x: (0) y: (-120)\nhide\nforever\n    if <<(CanMove?) = [1]> and <(TRANSITION2) = [0]>> then\n        Tick <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(mouse x) < (x position)>>>> <(JUMP KEY) = [1]> <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(x position) < (mouse x)>>>> <<<key (s v) pressed?> or <key (down arrow v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(mouse y) < (y position)>>>>\n    end\nend\n\nwhen flag clicked\nset volume to (60) %\nset [canmove? v] to [0]\n\nwhen flag clicked\nset rotation style [left-right v]\nset [speed v] to [3]\n\nwhen flag clicked\nset size to (SIZE) %\nset [speed v] to [1]\nforever\n    if <key (left arrow v) pressed?> then\n        set [speed v] to [-3]\n    end\n    if <key (right arrow v) pressed?> then\n        set [speed v] to [-3]\n    end\nend\n\nwhen I receive [die v]\nset [speed v] to [1]\n\ndefine Touch Ground <up?>\nchange [falling? v] by (.5)\nrepeat until <<not <touching (ground v)?>> and <not <<touching (misc objects v)?> and <(Collide with ladder) = [0]>>>>\n    if <up?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [falling? v] to [0]\n    end\n    set [speed y v] to [0]\nend\n\nwhen I receive [die v]\nset [canmove? v] to [0]\n\nwhen I receive [knockback v]\nset [knock v] to [10]\nif <(direction) = [90]> then\n    repeat (10)\n        change [knock v] by (-1)\n        Walk [90] ((knock) * (-1))\n    end\nelse\n    repeat (10)\n        change [knock v] by (-1)\n        Walk [-90] (knock)\n    end\nend\n\ndefine Scrolling Blocks\nchange [scroll x v] by (x position)\nif <(Scroll X) < (Scroll X Min)> then\n    set [scroll x v] to (Scroll X Min)\nelse\n    if <(Scroll X) > (Scroll X Max)> then\n        set [scroll x v] to (Scroll X Max)\n    else\n        set x to (0)\n    end\nend\nchange [scroll y v] by (y position)\nif <(Scroll Y) < (Scroll Y Min)> then\n    set [scroll y v] to (Scroll Y Min)\nelse\n    if <(Scroll Y) > (Scroll Y Max)> then\n        set [scroll y v] to (Scroll Y Max)\n    else\n        set y to (0)\n    end\nend\n\nwhen flag clicked\nforever\n    Scrolling Blocks\nend\n\nwhen I receive [teleportin v]\nset [a v] to [0]\nhide\npoint in direction (90)\nset [speed y v] to [0]\nset [canmove? v] to [0]\ngo to [front v] layer\ngo to x: (0) y: (150)\nchange y by (300)\nwait (1) seconds\nset [ghost v] effect to (100)\nshow\nif <(Section At) = (() + (-1))> then\n    repeat (14)\n        change y by (-20)\n    end\nelse\n    repeat (8)\n        change y by (-20)\n    end\nend\nrepeat until <touching (ground v)?>\n    change y by (-20)\nend\nset x to (0)\nchange y by (-15)\nfindground\nstart sound [Mega Man 5 SFX \(21\) v]\nset [a v] to [1]\n\nwhen flag clicked\nset [checkpoint # v] to [0]\n\nwhen I receive [transition effect v]\nrepeat (15)\n    reset timer\nend\n\nwhen I receive [rush_jump v]\nset [speed y v] to [15]\n\nwhen I receive [battle begin v]\nset [canmove? v] to [0]\nwait (2) seconds\nset [canmove? v] to [1]\n\nwhen I receive [ready v]\nset [canmove? v] to [0]\nhide\n\nwhen I receive [fwd_10 v]\nWalk (direction) [10]\n\nwhen I receive [bck_10 v]\nWalk (direction) [-10]\n\nwhen I receive [teleportin v]\nset [jump key v] to [0]\nforever\n    set [jump key v] to [0]\n    wait until <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(y position) < (mouse y)>>>>\n    set [jump key v] to [1]\n    wait (.05) seconds\n    set [jump key v] to [0]\n    wait until <not <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(y position) < (mouse y)>>>>>\nend\n\nwhen I receive [teleportin v]\nforever\n    if <(CanMove?) = [1]> then\n        Walk (direction) (() * (.2))\n    end\nend\n\nwhen I receive [teleportin v]\nset [ladder climb alternate v] to [1]\nforever\n    if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(y position) < (mouse y)>>>> or <<<key (s v) pressed?> or <key (down arrow v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(mouse y) < (y position)>>>>> then\n        if <([animations: using gun?2 v] of [mega man/protoman/bass v]) = [0]> then\n            if <(Ladder Climb Alternate) = [4]> then\n                set [ladder climb alternate v] to [1]\n            else\n                if <(Ladder Climb Alternate) = [3]> then\n                    set [ladder climb alternate v] to [4]\n                else\n                    if <(Ladder Climb Alternate) = [2]> then\n                        set [ladder climb alternate v] to [3]\n                    else\n                        set [ladder climb alternate v] to [2]\n                    end\n                end\n            end\n            wait (.05) seconds\n        end\n    end\nend\n\nwhen I receive [player_moveup v]\nchange y by (8)\n\nwhen I receive [player_movedown v]\nchange y by (-8)\n\nwhen I receive [disable movement v]\nset [canmove? v] to [0]\n\nwhen I receive [enable movement v]\nset [canmove? v] to [1]\n\nwhen I receive [teleportin v]\nforever\n    wait (.1) seconds\n    wait until <<(y position) < [-155]> or <(y position) > [190]>>\n    if <(y position) > [190]> then\n        if <(CanMove?) = [1]> then\n            if <<(Collide with ladder) = [1]> and <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(y position) < (mouse y)>>>>> then\n                Transition [up]\n            end\n        end\n    end\n    if <(y position) < [-155]> then\n        if <(CanMove?) = [1]> then\n            if <(Collide with ladder) = [1]> then\n                if <<<key (s v) pressed?> or <key (down arrow v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(mouse y) < (y position)>>>> then\n                    Transition [down]\n                end\n            else\n                if <<(Scroll X) = [9696]> or <<<(Scroll X) > [5589]> and <(Scroll X) < [5600]>> or <<(Scroll X) > [5090]> and <(Scroll X) < [5125]>>>> then\n                    Transition [down]\n                else\n                    set [health v] to [15]\n                    set [sliding?2 v] to [0]\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [player_moveleft v]\nchange x by (-10)\n\nwhen I receive [teleportin v]\nforever\n    if <(FIGHTSTART?) = [1]> then\n        if <(x position) < [-200]> then\n            set x to (-200)\n        end\n    end\nend\n\ndefine findground\nrepeat until <not <touching (ground v)?>>\n    change y by (1)\nend\n\nwhen I receive [boss battle v]\nwait (.2) seconds\nrepeat (10)\n    if <(x position) < [-200]> then\n        set x to (-200)\n    end\nend\n\nwhen I receive [bacc v]\nchange x by (-2)\n\ndefine slide\nif <(Megaman Costume) = [3]> then\n    set [slide time2 v] to [0]\n    set [sliding?2 v] to [1]\n    if <(direction) = [90]> then\n        if <(CanMove?) = [1]> then\n            change [speed x v] by (6)\n        end\n    else\n        if <(CanMove?) = [1]> then\n            change [speed x v] by (-6)\n        end\n    end\nelse\n    set [slide time2 v] to [0]\n    set [sliding?2 v] to [1]\n    if <(direction) = [90]> then\n        if <(falling?) < [3]> then\n            set [speed x v] to [17]\n        end\n    else\n        if <(falling?) < [3]> then\n            set [speed x v] to [-17]\n        end\n    end\nend\n\nwhen I receive [teleportin v]\nforever\n    wait (1) seconds\n    wait until <(x position) > [220]>\n    if <<(Scroll X) = [9696]> and <(Scroll Y) = [4032]>> then\n        Transition [right]\n        set [scroll x max v] to [11232]\n        set [checkpoint # v] to [4]\n    else\n        if <<(Scroll X) = [5600]> or <<(Scroll X) = [5100]> and <(Scroll Y) = [896]>>> then\n            if <(Scroll X) = [5600]> then\n                Transition [right]\n                set [scroll x max v] to [9196]\n                broadcast (@Load New set of enemies v)\n            else\n                Transition [right]\n                wait (1) seconds\n                wait until <(x position) > [-180]>\n                set [scroll y max v] to [925]\n            end\n        else\n            if <(Scroll X) = [9196]> then\n                Transition [right]\n                set [checkpoint # v] to [3]\n                broadcast (@Load Final Wave of Enemies v)\n                wait (1) seconds\n                set [scroll y max v] to [896]\n            else\n                if <(Scroll X) = [4600]> then\n                    Transition [right]\n                    set [checkpoint # v] to [2]\n                    set [scroll y max v] to [0]\n                end\n            end\n        end\n    end\nend\n\ndefine Transition (direction)\nbroadcast (Transition Effect v)\nif <(direction) = [right]> then\n    set [scroll x min v] to (Scroll X)\n    set [scroll x max v] to (Scroll X)\n    broadcast (Disable Movement v)\n    repeat (50)\n        if <not <(x position) < [-220]>> then\n            broadcast (bck_10 v)\n        end\n        change [scroll x max v] by (10)\n        change [scroll x min v] by (10)\n    end\n    broadcast (Enable Movement v)\nend\nif <(direction) = [down]> then\n    broadcast (Disable Movement v)\n    repeat (44)\n        if <not <(y position) > [190]>> then\n            broadcast (Player_MoveUp v)\n        end\n        change [scroll y max v] by (-10)\n        change [scroll y min v] by (-10)\n    end\n    if <not <(y position) > [190]>> then\n        broadcast (Player_MoveUp v)\n    end\n    change [scroll y max v] by (-8)\n    change [scroll y min v] by (-8)\n    broadcast (Enable Movement v)\nend\nif <(direction) = [up]> then\n    broadcast (Disable Movement v)\n    repeat (44)\n        if <not <(y position) < [-190]>> then\n            broadcast (Player_MoveDown v)\n        end\n        change [scroll y max v] by (10)\n        change [scroll y min v] by (10)\n    end\n    if <not <(y position) < [-190]>> then\n        broadcast (Player_MoveDown v)\n    end\n    change [scroll y max v] by (8)\n    change [scroll y min v] by (8)\n    broadcast (Enable Movement v)\nend\n\nwhen I receive [change player x by a v]\nif <<(HEALTH) < [15]> and <not <(x position) > [180]>>> then\n    if <not <<<(Scroll X) = [9696]> and <(Scroll Y) = [2688]>> and <<(x position) > [-60]> and <(x position) < [-31]>>>> then\n        change x by (a)\n    end\nend\n\nwhen I receive [teleportin v]\nforever\n    set [scroll y v] to (round (Scroll Y))\nend\n\nwhen I receive [bossgate transition right v]\nif <(clone) = [0]> then\n    Transition [right]\nend\n\n@READY\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [ready v]\nswitch costume to (costume2 v)\ngo to x: (10) y: (15)\nif <(Megaman Costume) = [2]> then\n    broadcast (MuteMusic v)\n    start sound [whistle v]\nend\nrepeat (8)\n    go to [front v] layer\n    show\n    wait (.02) seconds\n    hide\n    wait (0.02) seconds\nend\n\nwhen I start as a clone\nif <(Dmg thingy) = [1]> then\n    switch costume to (dmg v)\n    go to [front v] layer\n    repeat (3)\n        go to [front v] layer\n        show\n        wait (.05) seconds\n        hide\n        wait (.05) seconds\n    end\n    delete this clone\nelse\n    if <(Dmg thingy) = [2]> then\n        switch costume to (slide1 v)\n        go to (mega man/protoman/bass v)\n        change y by (40)\n        change x by (-35)\n        go to [front v] layer\n        go to [front v] layer\n        show\n        repeat (2)\n            wait (.05) seconds\n            next costume\n        end\n        wait (.05) seconds\n        delete this clone\n    else\n        if <(Dmg thingy) = [3]> then\n            switch costume to (slide1 v)\n            go to (mega man/protoman/bass v)\n            change y by (40)\n            change x by (0)\n            go to [front v] layer\n            go to [front v] layer\n            show\n            repeat (2)\n                wait (.05) seconds\n                next costume\n            end\n            wait (.05) seconds\n            delete this clone\n        else\n            if <(Dmg thingy) = [4]> then\n                switch costume to (slide1 v)\n                go to (mega man/protoman/bass v)\n                change y by (40)\n                change x by (35)\n                go to [front v] layer\n                go to [front v] layer\n                show\n                repeat (2)\n                    wait (.05) seconds\n                    next costume\n                end\n                wait (.05) seconds\n                delete this clone\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <(Dmg thingy) = [1]> then\n    forever\n        go to (mega man/protoman/bass v)\n    end\nelse\nend\n\n@ground\n\nwhen I receive [setup v]\nhide\nclear graphic effects\ngo to x: (0) y: (0)\nset [level_x v] to [0]\nif <[1] = [1]> then\n    delete this clone\nend\nCreate\n\ndefine Create\nset [scroll x v] to [0]\nset [level_y v] to [15]\nset [level_x v] to [0]\nswitch costume to (phantom1 v)\nset size to (200) %\nrepeat (11)\n    create clone of (_myself_ v)\n    next costume\n    change [level_x v] by (510)\nend\nchange [level_x v] by (-510)\nrepeat (2)\n    change [level_y v] by (448)\n    create clone of (_myself_ v)\n    next costume\nend\nrepeat (9)\n    change [level_x v] by (510)\n    create clone of (_myself_ v)\n    next costume\nend\nrepeat (7)\n    change [level_y v] by (448)\n    create clone of (_myself_ v)\n    next costume\nend\nrepeat (4)\n    change [level_x v] by (510)\n    create clone of (_myself_ v)\n    next costume\nend\nswitch costume to (phantom9 v)\nchange [level_x v] by (450)\ncreate clone of (_myself_ v)\n\nswitch costume to (costume20 v)\n\nwhen flag clicked\nset [clone v] to [0]\nhide\n\nwhen I start as a clone\nset [clone v] to [1]\ngo to [front v] layer\nforever\n    set [brightness v] effect to (10)\n    set [ghost v] effect to (0)\n    set x to ((Level_X) - (Scroll X))\n    set y to ((Level_Y) - (Scroll Y))\n    if <<([abs v] of ((Level_X) - (Scroll X)) ) > [489]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [450]>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [setup v]\ndelete this clone\n\nset [scroll x v] to [4000]\n\nset [scroll x max v] to [0]\n\nwhen I receive [begin autoscroller v]\nif <(clone) = [1]> then\n    forever\n        change [level_x v] by (-2)\n    end\nend\n\nrepeat (6)\n    change [level_x v] by (510)\n    create clone of (_myself_ v)\n    next costume\nend\nset [level_y v] to [2120]\nset [level_x v] to [5570]\nswitch costume to (costume19 v)\nrepeat (3)\n    create clone of (_myself_ v)\n    next costume\n    change [level_y v] by (510)\nend\nchange [level_y v] by (-850)\nchange [level_x v] by (510)\ncreate clone of (_myself_ v)\n\n@hpbar\n\nwhen flag clicked\nset [i_frames v] to [0]\nwait (1) seconds\nforever\n    wait until <(HEALTH) > [14]>\n    if <([costume # v] of [boss hp v]) > [28]> then\n        set [health v] to [13]\n    else\n        broadcast (die v)\n        wait (5) seconds\n        set [health v] to [1]\n    end\n    wait (.05) seconds\nend\n\nwhen I receive [take dmg v]\nif <(INVINCIBILITY) = [0]> then\n    set [brightness v] effect to (60)\n    wait (.2) seconds\nend\nclear graphic effects\nwait (.2) seconds\n\nwhen flag clicked\nhide\nrepeat (50)\n    go to [front v] layer\nend\n\nwhen I receive [teleportin v]\nset [i_frames v] to [0]\nset [health v] to [1]\npoint in direction (90)\ngo to x: (-205) y: (90)\nclear graphic effects\nset size to (250) %\nshow\nforever\n    switch costume to (HEALTH)\nend\n\nwhen I receive [heal v]\nstart sound [Mega Man 5 SFX \(16\) v]\nrepeat (5)\n    set [ghost v] effect to (100)\n    wait (0) seconds\n    clear graphic effects\n    wait (0) seconds\nend\n\nwhen I receive [you win v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [die v]\nset [@mega man: special weapon v] to [0]\nhide\nwait (6) seconds\nset [health v] to [1]\n\nwhen I start as a clone\nstart sound [propeller_dagger_flip v]\nclear graphic effects\ngo to [front v] layer\nset size to (200) %\nif <([direction v] of [hitbox v]) = [90]> then\n    set [level_x v] to (((Scroll X) + ([x position v] of [hitbox v])) + (-35))\nelse\n    set [level_x v] to (((Scroll X) + ([x position v] of [hitbox v])) + (35))\nend\nset [level_y v] to (((Scroll Y) + ([y position v] of [hitbox v])) + (-24))\nshow\nswitch costume to (slide1 v)\nrepeat (2)\n    wait (.05) seconds\n    next costume\nend\nwait (.05) seconds\ndelete this clone\n\nwhen I receive [die v]\ndelete this clone\n\nwhen I receive [teleportin v]\nset [invincibility v] to [0]\n\nwhen I receive [take dmg v]\nset [invincibility v] to [1]\nwait (.8) seconds\nset [invincibility v] to [0]\n\nwhen I receive [battle begin v]\ngo to [front v] layer\n\nwhen I receive [set up stage v]\nrepeat (10)\n    set [health v] to [1]\nend\nshow\n\nwhen I receive [stage intro v]\nhide\n\nwhen I receive [teleportin v]\nrepeat (50)\n    go to [front v] layer\nend\n\nwhen I receive [enable movement v]\nshow\n\nwhen I start as a clone\nforever\n    set x to ((Level_X) - (Scroll X))\n    set y to ((Level_Y) - (Scroll Y))\n    if <<([abs v] of ((Level_X) - (Scroll X)) ) > [400]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [300]>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [@load new set of enemies v]\nrepeat (20)\n    go to [front v] layer\nend\n\nwhen I receive [@load final wave of enemies v]\nrepeat (20)\n    go to [front v] layer\nend\n\n@ladder downward collision\n\nwhen flag clicked\nset [ghost v] effect to (100)\nshow\nforever\n    go to (hitbox v)\nend\n\nwhen flag clicked\nforever\n    if <touching (misc objects v)?> then\n        set [leg_collidew/ladder v] to [1]\n    else\n        set [leg_collidew/ladder v] to [0]\n    end\nend\n\n@slide checker\n\nwhen flag clicked\nset [ghost v] effect to (99)\nshow\nforever\n    go to (hitbox v)\nend\n\nwhen flag clicked\nforever\n    if <touching (ground v)?> then\n        set [stay sliding v] to [1]\n    else\n        set [stay sliding v] to [0]\n    end\nend\n\n@Player_Head\n\nwhen flag clicked\nset [ghost v] effect to (99)\nshow\nforever\n    go to (hitbox v)\nend\n\nwhen flag clicked\nforever\n    if <touching (misc objects v)?> then\n        set [head_collidingw/ladder v] to [1]\n    else\n        set [head_collidingw/ladder v] to [0]\n    end\nend\n\n@misc objects\n\nwhen I receive [setup v]\ndelete this clone\n\nwhen I start as a clone\nset [active v] to [1]\nset [clone v] to [1]\ngo to [front v] layer\nclear graphic effects\nforever\n    set x to ((Level_X) - (Scroll X))\n    set y to ((Level_Y) - (Scroll Y))\n    if <(letter (3) of (costume [name v])) = [v]> then\n        if <<([abs v] of ((Level_X) - (Scroll X)) ) > [250]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [300]>> then\n            hide\n        else\n            go to [front v] layer\n            if <touching (ladder downward collision v)?> then\n                set [ghost v] effect to (pick random (60) to (70))\n            else\n                set [ghost v] effect to (99)\n            end\n            show\n        end\n    else\n        if <(costume [number v]) = [17]> then\n            forever\n                set [ghost v] effect to (99)\n                show\n            end\n        else\n            if <(letter (1) of (costume [name v])) = [j]> then\n                if <<(active) = [0]> or <<([abs v] of ((Level_X) - (Scroll X)) ) > [250]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [180]>>> then\n                    hide\n                else\n                    show\n                end\n            else\n                if <(costume [number v]) = [1]> then\n                    if <<([abs v] of ((Level_X) - (Scroll X)) ) > [250]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [466]>> then\n                        hide\n                    else\n                        show\n                    end\n                else\n                    if <<([abs v] of ((Level_X) - (Scroll X)) ) > [250]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [400]>> then\n                        hide\n                    else\n                        show\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [setup v]\nhide\nclear graphic effects\ngo to x: (0) y: (0)\nset [level_x v] to [0]\nswitch costume to (ld1 v)\nif <[1] = [1]> then\n    delete this clone\nend\nCreate\n\ndefine Create\nset [l_dist# v] to [100]\nclear graphic effects\nset size to (200) %\nset [mscobj_prop v] to [2]\nset [level_y v] to [-182]\nset [level_x v] to [928]\nswitch costume to (jspawner v)\ncreate clone of (_myself_ v)\nset [mscobj_prop v] to [2]\nset [level_y v] to [-182]\nset [level_x v] to [4343]\nswitch costume to (jspawner v)\ncreate clone of (_myself_ v)\nset [mscobj_prop v] to [2]\nset [level_y v] to [-182]\nset [level_x v] to [4523]\nswitch costume to (jspawner2 v)\ncreate clone of (_myself_ v)\nset [mscobj_prop v] to [2]\nset [level_y v] to [50]\nset [level_x v] to [5200]\nswitch costume to (ld1 v)\ncreate clone of (_myself_ v)\nset [level_y v] to [600]\nset [level_x v] to [4980]\nswitch costume to (ld2 v)\ncreate clone of (_myself_ v)\nset [level_y v] to [830]\nset [level_x v] to [5160]\nswitch costume to (invisplat1 v)\ncreate clone of (_myself_ v)\nset [level_y v] to [742]\nset [level_x v] to [5660]\nswitch costume to (invisplat1 v)\ncreate clone of (_myself_ v)\nset [level_y v] to [830]\nset [level_x v] to [5725]\nswitch costume to (invisplat2 v)\ncreate clone of (_myself_ v)\nset [level_y v] to [915]\nset [level_x v] to [5660]\nswitch costume to (invisplat1 v)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nforever\n    if <(letter (1) of (costume [name v])) = [l]> then\n        wait until <<<not <<([abs v] of ((Level_X) - (Scroll X)) ) > [250]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [466]>>> and <<(distance to [hitbox v]) < (L_Dist#)> or <not <([y position v] of [hitbox v]) < (y position)>>>> and <not <<((Scroll X) + ([x position v] of [hitbox v])) < ((Level_X) + (-250))> or <((Scroll X) + ([x position v] of [hitbox v])) > ((Level_X) + (250))>>>>\n        if <([y position v] of [hitbox v]) < (y position)> then\n            set [collide with ladder v] to [2]\n        end\n        if <<<touching (ladder downward collision v)?> and <<key (s v) pressed?> or <key (down arrow v) pressed?>>> or <<<<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <key (s v) pressed?>> or <key (down arrow v) pressed?>> and <touching (ladder collision checker v)?>>> then\n            set [ladder_snp v] to ((Level_X) + (-12))\n            set [collide with ladder v] to [1]\n            wait until <<not <touching (ladder downward collision v)?>> or <<((Scroll X) + ([x position v] of [hitbox v])) < ((Level_X) + (-50))> or <((Scroll X) + ([x position v] of [hitbox v])) > ((Level_X) + (50))>>>\n            wait until <<not <touching (ladder collision checker v)?>> or <<((Scroll X) + ([x position v] of [hitbox v])) < ((Level_X) + (-50))> or <((Scroll X) + ([x position v] of [hitbox v])) > ((Level_X) + (50))>>>\n            if <<([y position v] of [hitbox v]) < (y position)> and <not <<((Scroll X) + ([x position v] of [hitbox v])) < ((Level_X) + (-50))> or <((Scroll X) + ([x position v] of [hitbox v])) > ((Level_X) + (50))>>>> then\n                set [collide with ladder v] to [2]\n            else\n                set [collide with ladder v] to [0]\n                broadcast (Player_MoveUp v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen I receive [blink v]\nif <(username) = [legobuzz12]> then\n    delete this clone\nend\n\nbroadcast (blink v)\n\nwhen I receive [teleportin v]\nset [collide with ladder v] to [0]\n\nwhen flag clicked\nset [clone v] to [0]\n\nwhen I receive [ready v]\nset [collide with ladder v] to [0]\n\nwhen I start as a clone\nif <(letter (1) of (costume [name v])) = [l]> then\n    forever\n        wait until <<touching (ladder collision checker v)?> and <(Collide with ladder) = [1]>>\n        wait until <<<((([y position v] of [hitbox v]) + (Scroll Y)) + ((L_Dist#) * (.8))) < (Level_Y)> and <(Collide with ladder) = [2]>> and <<not <touching (ladder downward collision v)?>> and <not <touching (mega man/protoman/bass v)?>>>>\n        if <(Collide with ladder) = [2]> then\n            set [collide with ladder v] to [0]\n        end\n    end\nend\nif <<(costume [number v]) = [17]> or <(costume [number v]) = [18]>> then\n    forever\n        if <not <<([abs v] of ((Level_X) - (Scroll X)) ) > [300]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [600]>>> then\n            if <(MscObj_Prop) = [4]> then\n                wait (2) seconds\n                switch costume to (jetplatform v)\n                create clone of (_myself_ v)\n            end\n            if <(MscObj_Prop) = [2]> then\n                if <(costume [number v]) = [18]> then\n                    wait (2) seconds\n                else\n                    wait (1) seconds\n                end\n                switch costume to (jetplatform13 v)\n                create clone of (_myself_ v)\n            end\n        end\n    end\nend\n\nbroadcast (blink v)\n\nwhen I start as a clone\ndelete all of [xyz v]\nadd [0] to [xyz v]\nadd [0] to [xyz v]\nadd [0] to [xyz v]\nif <(costume [number v]) = [4]> then\n    go to [front v] layer\n    clear graphic effects\n    if <(Level_X) > [9400]> then\n        replace item (1) of [xyz v] with (Level_X)\n        replace item (2) of [xyz v] with (Level_Y)\n        replace item (3) of [xyz v] with [1]\n        wait until <<<touching (ladder downward collision v)?> and <(HEALTH) < [15]>> or <(y) > [38]>>\n    else\n        repeat until <<<touching (ladder downward collision v)?> and <(HEALTH) < [15]>> or <(y) > [38]>>\n            change [y v] by (.5)\n            change [level_y v] by (5)\n        end\n    end\n    if <(y) > [38]> then\n        delete this clone\n    else\n        start sound [missile_platform_launch v]\n        set [x v] to [4]\n        set [y v] to [0]\n        set [z v] to [0]\n        repeat (125)\n            change [y v] by (.25)\n            if <(y) > [3]> then\n                change [level_x v] by (y)\n                set [a v] to (y)\n            else\n                change [level_x v] by (4)\n                set [a v] to [4]\n            end\n            if <touching (ladder downward collision v)?> then\n                broadcast (Change Player X by A v)\n            end\n            if <((y) mod (5)) = [0]> then\n                start sound [2xgravelblock_damage v]\n                change [x v] by (-1)\n            end\n            if <(x) < [0]> then\n                set [proj direction v] to [90]\n                set [proj x v] to (Level_X)\n                set [proj y v] to (Level_Y)\n                set [projectile name v] to [explo]\n                broadcast (CREATE PROJECTILE v)\n                if <(item (3) of [xyz v]) = [1]> then\n                    set [level_x v] to (item (1) of [xyz v])\n                    set [active v] to [0]\n                    set [level_y v] to (item (2) of [xyz v])\n                    set [ghost v] effect to (100)\n                    wait until <([canmove? v] of [hitbox v]) = [0]>\n                    wait until <([canmove? v] of [hitbox v]) = [1]>\n                    wait (.5) seconds\n                    set [ghost v] effect to (0)\n                    set [active v] to [1]\n                    repeat [2]\n                else\n                    delete this clone\n                end\n            end\n            if <(z) = [0]> then\n                set [z v] to [1]\n            else\n                set [z v] to [0]\n            end\n            if <(x) = [4]> then\n                switch costume to ((z) + (6))\n            end\n            if <(x) = [3]> then\n                switch costume to ((z) + (8))\n            end\n            if <(x) = [2]> then\n                switch costume to ((z) + (11))\n            end\n            if <(x) = [1]> then\n                switch costume to ((z) + (13))\n            end\n            if <(x) = [0]> then\n                switch costume to ((z) + (15))\n            end\n        end\n        set [proj direction v] to [90]\n        set [proj x v] to (Level_X)\n        set [proj y v] to (Level_Y)\n        set [projectile name v] to [explo]\n        broadcast (CREATE PROJECTILE v)\n        if <(item (3) of [xyz v]) = [1]> then\n            set [level_x v] to (item (1) of [xyz v])\n            set [active v] to [0]\n            set [level_y v] to (item (2) of [xyz v])\n            set [ghost v] effect to (100)\n            wait until <([canmove? v] of [hitbox v]) = [0]>\n            wait until <([canmove? v] of [hitbox v]) = [1]>\n            wait (.5) seconds\n            set [ghost v] effect to (0)\n            set [active v] to [1]\n            repeat [2]\n        else\n            delete this clone\n        end\n    end\nend\nif <(costume [number v]) = [10]> then\n    go to [front v] layer\n    clear graphic effects\n    if <(Level_X) > [9400]> then\n        replace item (1) of [xyz v] with (Level_X)\n        replace item (2) of [xyz v] with (Level_Y)\n        replace item (3) of [xyz v] with [1]\n        wait until <<<touching (ladder downward collision v)?> and <(HEALTH) < [15]>> or <(y) > [38]>>\n    else\n        repeat until <<<touching (ladder downward collision v)?> and <(HEALTH) < [15]>> or <(y) > [38]>>\n            change [y v] by (1)\n            change [level_y v] by (10)\n        end\n    end\n    if <(y) > [38]> then\n        delete this clone\n    else\n        start sound [missile_platform_launch v]\n        set [x v] to [2]\n        set [y v] to [0]\n        set [z v] to [0]\n        repeat (50)\n            change [y v] by (.5)\n            change [level_x v] by (y)\n            set [a v] to (y)\n            if <touching (ladder downward collision v)?> then\n                broadcast (Change Player X by A v)\n            end\n            if <((y) mod (5)) = [0]> then\n                start sound [2xgravelblock_damage v]\n                change [x v] by (-1)\n            end\n            if <(x) < [0]> then\n                set [proj direction v] to [90]\n                set [proj x v] to (Level_X)\n                set [proj y v] to (Level_Y)\n                set [projectile name v] to [explo]\n                broadcast (CREATE PROJECTILE v)\n                if <(item (3) of [xyz v]) = [1]> then\n                    set [level_x v] to (item (1) of [xyz v])\n                    set [active v] to [0]\n                    set [level_y v] to (item (2) of [xyz v])\n                    set [ghost v] effect to (100)\n                    wait until <([canmove? v] of [hitbox v]) = [0]>\n                    wait until <([canmove? v] of [hitbox v]) = [1]>\n                    wait (.5) seconds\n                    set [ghost v] effect to (0)\n                    set [active v] to [1]\n                    repeat [1]\n                else\n                    delete this clone\n                end\n            end\n            if <(z) = [0]> then\n                set [z v] to [1]\n            else\n                set [z v] to [0]\n            end\n            if <(x) = [2]> then\n                switch costume to ((z) + (11))\n            end\n            if <(x) = [1]> then\n                switch costume to ((z) + (13))\n            end\n            if <(x) = [0]> then\n                switch costume to ((z) + (15))\n            end\n        end\n        set [proj direction v] to [90]\n        set [proj x v] to (Level_X)\n        set [proj y v] to (Level_Y)\n        set [projectile name v] to [explo]\n        broadcast (CREATE PROJECTILE v)\n        if <(item (3) of [xyz v]) = [1]> then\n            set [level_x v] to (item (1) of [xyz v])\n            set [level_y v] to (item (2) of [xyz v])\n            set [active v] to [0]\n            set [ghost v] effect to (100)\n            wait until <([canmove? v] of [hitbox v]) = [0]>\n            wait until <([canmove? v] of [hitbox v]) = [1]>\n            wait (.5) seconds\n            set [active v] to [1]\n            set [ghost v] effect to (0)\n            repeat [1]\n        else\n            delete this clone\n        end\n    end\nend\n\nwhen I receive [@load new set of enemies v]\nset [l_dist# v] to [100]\nif <[1] = [1]> then\n    delete this clone\nend\nset [level_y v] to [830]\nset [level_x v] to [6758]\nswitch costume to (spikes1 v)\ncreate clone of (_myself_ v)\nset [level_y v] to [961]\nset [level_x v] to [6758]\nswitch costume to (spikes2 v)\ncreate clone of (_myself_ v)\nset [level_y v] to [830]\nset [level_x v] to [6947]\nswitch costume to (spikes1 v)\ncreate clone of (_myself_ v)\nset [level_y v] to [961]\nset [level_x v] to [6947]\nswitch costume to (spikes2 v)\ncreate clone of (_myself_ v)\nset [mscobj_prop v] to [4]\nset [level_y v] to [714]\nset [level_x v] to [6631]\nswitch costume to (jspawner v)\ncreate clone of (_myself_ v)\nset [level_y v] to [805]\nset [level_x v] to [7745]\nswitch costume to (invisplat3 v)\ncreate clone of (_myself_ v)\nset [level_y v] to [714]\nset [level_y v] to [850]\nset [level_x v] to [8060]\nswitch costume to (invisplat3 v)\ncreate clone of (_myself_ v)\nset [level_y v] to [780]\nset [level_x v] to [8400]\nswitch costume to (invisplat3 v)\ncreate clone of (_myself_ v)\nset [level_y v] to [800]\nset [level_x v] to [8750]\nswitch costume to (invisplat1 v)\ncreate clone of (_myself_ v)\n\nwhen I receive [@load final wave of enemies v]\nif <[1] = [1]> then\n    delete this clone\nend\nset [l_dist# v] to [100]\nset [level_y v] to [922]\nset [level_x v] to [9882]\nswitch costume to (ld1 v)\ncreate clone of (_myself_ v)\nset [l_dist# v] to [118]\nset [level_y v] to [1450]\nset [level_x v] to [9495]\nswitch costume to (ld1 v)\ncreate clone of (_myself_ v)\nset [level_y v] to [1270]\nset [level_x v] to [9550]\nswitch costume to (jetplatform13 v)\ncreate clone of (_myself_ v)\nset [level_y v] to [1760]\nset [level_x v] to [9755]\nswitch costume to (jetplatform13 v)\ncreate clone of (_myself_ v)\nset [l_dist# v] to [100]\nset [level_y v] to [1919]\nset [level_x v] to [9882]\nswitch costume to (ld1 v)\ncreate clone of (_myself_ v)\nset [l_dist# v] to [110]\nset [level_y v] to [2350]\nset [level_x v] to [9500]\nswitch costume to (ld1 v)\ncreate clone of (_myself_ v)\nset [level_y v] to [2688]\nset [level_x v] to [9600]\nswitch costume to (jetplatform v)\ncreate clone of (_myself_ v)\nset [level_y v] to [2166]\nset [level_x v] to [9700]\nswitch costume to (jetplatform13 v)\ncreate clone of (_myself_ v)\nset [l_dist# v] to [90]\nset [level_y v] to [2800]\nset [level_x v] to [9882]\nswitch costume to (ld1 v)\ncreate clone of (_myself_ v)\nset [l_dist# v] to [200]\nset [level_y v] to [3250]\nset [level_x v] to [9500]\nswitch costume to (ld1 v)\ncreate clone of (_myself_ v)\nset [l_dist# v] to [75]\nset [level_y v] to [3680]\nset [level_x v] to [9882]\nswitch costume to (ld1 v)\ncreate clone of (_myself_ v)\nset [level_y v] to [3500]\nset [level_x v] to [9760]\nswitch costume to (invisplat1 v)\ncreate clone of (_myself_ v)\n\ndefine repeat (e)\ngo to [front v] layer\nclear graphic effects\nif <(e) = [2]> then\n    switch costume to (jetplatform v)\n    wait until <<<touching (ladder downward collision v)?> and <(HEALTH) < [15]>> or <(y) > [38]>>\n    if <(y) > [38]> then\n        delete this clone\n    else\n        start sound [missile_platform_launch v]\n        set [x v] to [4]\n        set [y v] to [0]\n        set [z v] to [0]\n        repeat (125)\n            change [y v] by (.25)\n            if <(y) > [3]> then\n                change [level_x v] by (y)\n                set [a v] to (y)\n            else\n                change [level_x v] by (4)\n                set [a v] to [4]\n            end\n            if <touching (ladder downward collision v)?> then\n                broadcast (Change Player X by A v)\n            end\n            if <((y) mod (5)) = [0]> then\n                start sound [2xgravelblock_damage v]\n                change [x v] by (-1)\n            end\n            if <(x) < [0]> then\n                set [proj direction v] to [90]\n                set [proj x v] to (Level_X)\n                set [proj y v] to (Level_Y)\n                set [projectile name v] to [explo]\n                broadcast (CREATE PROJECTILE v)\n                set [level_x v] to (item (1) of [xyz v])\n                set [active v] to [0]\n                set [level_y v] to (item (2) of [xyz v])\n                set [ghost v] effect to (100)\n                wait until <([canmove? v] of [hitbox v]) = [0]>\n                wait until <([canmove? v] of [hitbox v]) = [1]>\n                wait (.5) seconds\n                set [ghost v] effect to (0)\n                set [active v] to [1]\n                repeat [2]\n            end\n            if <(z) = [0]> then\n                set [z v] to [1]\n            else\n                set [z v] to [0]\n            end\n            if <(x) = [4]> then\n                switch costume to ((z) + (6))\n            end\n            if <(x) = [3]> then\n                switch costume to ((z) + (8))\n            end\n            if <(x) = [2]> then\n                switch costume to ((z) + (11))\n            end\n            if <(x) = [1]> then\n                switch costume to ((z) + (13))\n            end\n            if <(x) = [0]> then\n                switch costume to ((z) + (15))\n            end\n        end\n        set [proj direction v] to [90]\n        set [proj x v] to (Level_X)\n        set [proj y v] to (Level_Y)\n        set [projectile name v] to [explo]\n        broadcast (CREATE PROJECTILE v)\n        set [level_x v] to (item (1) of [xyz v])\n        set [active v] to [0]\n        set [level_y v] to (item (2) of [xyz v])\n        set [ghost v] effect to (100)\n        wait until <([canmove? v] of [hitbox v]) = [0]>\n        wait until <([canmove? v] of [hitbox v]) = [1]>\n        wait (.5) seconds\n        set [ghost v] effect to (0)\n        set [active v] to [1]\n        repeat [2]\n    end\nend\nif <(e) = [1]> then\n    switch costume to (jetplatform13 v)\n    wait until <<<touching (ladder downward collision v)?> and <(HEALTH) < [15]>> or <(y) > [38]>>\n    if <(y) > [38]> then\n        delete this clone\n    else\n        start sound [missile_platform_launch v]\n        set [x v] to [2]\n        set [y v] to [0]\n        set [z v] to [0]\n        repeat (50)\n            change [y v] by (.5)\n            change [level_x v] by (y)\n            set [a v] to (y)\n            if <touching (ladder downward collision v)?> then\n                broadcast (Change Player X by A v)\n            end\n            if <((y) mod (5)) = [0]> then\n                start sound [2xgravelblock_damage v]\n                change [x v] by (-1)\n            end\n            if <(x) < [0]> then\n                set [proj direction v] to [90]\n                set [proj x v] to (Level_X)\n                set [proj y v] to (Level_Y)\n                set [projectile name v] to [explo]\n                broadcast (CREATE PROJECTILE v)\n                set [level_x v] to (item (1) of [xyz v])\n                set [level_y v] to (item (2) of [xyz v])\n                set [active v] to [0]\n                set [ghost v] effect to (100)\n                wait until <([canmove? v] of [hitbox v]) = [0]>\n                wait until <([canmove? v] of [hitbox v]) = [1]>\n                wait (.5) seconds\n                set [active v] to [1]\n                set [ghost v] effect to (0)\n                repeat [1]\n            end\n            if <(z) = [0]> then\n                set [z v] to [1]\n            else\n                set [z v] to [0]\n            end\n            if <(x) = [2]> then\n                switch costume to ((z) + (11))\n            end\n            if <(x) = [1]> then\n                switch costume to ((z) + (13))\n            end\n            if <(x) = [0]> then\n                switch costume to ((z) + (15))\n            end\n        end\n        set [proj direction v] to [90]\n        set [proj x v] to (Level_X)\n        set [proj y v] to (Level_Y)\n        set [projectile name v] to [explo]\n        broadcast (CREATE PROJECTILE v)\n        set [level_x v] to (item (1) of [xyz v])\n        set [level_y v] to (item (2) of [xyz v])\n        set [active v] to [0]\n        set [ghost v] effect to (100)\n        wait until <([canmove? v] of [hitbox v]) = [0]>\n        wait until <([canmove? v] of [hitbox v]) = [1]>\n        wait (.5) seconds\n        set [active v] to [1]\n        set [ghost v] effect to (0)\n        repeat [1]\n    end\nend\n\nwhen I start as a clone\nif <(letter (1) of (costume [name v])) = [s]> then\n    forever\n        wait until <<touching (ladder collision checker v)?> or <touching (hitbox v)?>>\n        set [health v] to [15]\n        wait (5) seconds\n    end\nend\n\n@Boss\n\nwhen I receive [bass appear v]\npoint in direction (-90)\ngo to x: (173) y: (-113)\nshow\nswitch costume to (bassdiveland2 v)\nwait (1) seconds\nswitch costume to (bassdiveland1 v)\nwait (.2) seconds\nswitch costume to (bass2 v)\nwait (.05) seconds\nswitch costume to (bass1 v)\nset [showbasswings? v] to [1]\nwait (.5) seconds\nbroadcast (bATTLE begin v)\nswitch costume to (basssmirk v)\nwait (1) seconds\nset y to (-113)\nswitch costume to (basssmirkfly v)\nset [y v] to [0]\nrepeat (15)\n    switch costume to (((round ((timer) * (22222))) mod (2)) + (4))\n    change y by (y)\n    change [y v] by (1)\nend\nrepeat (15)\n    switch costume to (((round ((timer) * (22222))) mod (2)) + (4))\n    change y by (y)\n    change [y v] by (-1)\nend\nswitch costume to (bassflytaunt v)\nwait (.3) seconds\nforever\n    repeat (pick random (1) to (2))\n        Act [1] (pick random (15) to (30))\n        if <(pick random (1) to (2)) = [1]> then\n            Act [3] [35]\n            Act [4] [35]\n        else\n            Act [2] [35]\n        end\n    end\n    Act [3] [35]\n    Act [5] [35]\n    wait (.4) seconds\n    Act [6] [35]\n    wait (3.5) seconds\n    repeat (pick random (1) to (3))\n        Act [7] [35]\n    end\n    Act [3] [35]\n    Act [1] [35]\nend\n\nwhen flag clicked\nset rotation style [left-right v]\nhide\n\nwhen I receive [die v]\nwait (4) seconds\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\ndefine Act (pattern) (#)\nif <(pattern) = [7]> then\n    switch costume to (bassjet3 v)\n    point towards (hitbox v)\n    set [showbasswings? v] to [1]\n    start sound [joustus_boss_windup v]\n    set [x v] to [-20]\n    set [y v] to [0]\n    repeat (25)\n        show\n        change [y v] by (.6)\n        change x by (([sin v] of (direction) ) * (y))\n        change y by (x)\n        change [x v] by (.8)\n        if <(y position) < [-100]> then\n            set y to (-100)\n        end\n    end\n    repeat (15)\n        change [y v] by (-.4)\n        change x by (([sin v] of (direction) ) * (y))\n        change y by (x)\n        change [x v] by (.2)\n        if <(y position) < [-100]> then\n            set y to (-100)\n        end\n    end\n    repeat (15)\n        change [y v] by (-.1)\n        change x by (([sin v] of (direction) ) * (y))\n        change y by (x)\n        change [x v] by (1)\n        if <(y position) < [-100]> then\n            set y to (-100)\n        end\n    end\n    repeat (4)\n        switch costume to (basshandscrossedfly1 v)\n        wait (0) seconds\n        switch costume to (basshandscrossedfly2 v)\n        wait (0) seconds\n    end\nend\nif <(pattern) = [6]> then\n    if <(pick random (1) to (3)) = [1]> then\n        set [a v] to [200]\n        broadcast (BassLaserAlert v)\n        wait (.2) seconds\n        set [a v] to [-200]\n        broadcast (BassLaserAlert v)\n        wait (.2) seconds\n        set [a v] to [150]\n        broadcast (BassLaserAlert v)\n        wait (.2) seconds\n        set [a v] to [-150]\n        broadcast (BassLaserAlert v)\n        wait (.2) seconds\n        set [a v] to [100]\n        broadcast (BassLaserAlert v)\n        wait (.2) seconds\n        set [a v] to [-100]\n        broadcast (BassLaserAlert v)\n    else\n        if <(pick random (1) to (2)) = [1]> then\n            set [a v] to [200]\n            broadcast (BassLaserAlert v)\n            repeat (4)\n                wait (.2) seconds\n                change [a v] by (-80)\n                broadcast (BassLaserAlert v)\n            end\n        else\n            set [a v] to [-200]\n            broadcast (BassLaserAlert v)\n            repeat (4)\n                wait (.2) seconds\n                change [a v] by (80)\n                broadcast (BassLaserAlert v)\n            end\n        end\n    end\nend\nif <(pattern) = [5]> then\n    if <([x position v] of [hitbox v]) < (x position)> then\n        point in direction (-90)\n    else\n        point in direction (90)\n    end\n    switch costume to (basshandscrossedfly1 v)\n    wait (.05) seconds\n    next costume\n    wait (.05) seconds\n    switch costume to (bassjet1 v)\n    wait (.1) seconds\n    repeat (2)\n        next costume\n        wait (.05) seconds\n    end\n    set [showbasswings? v] to [1]\n    start sound [joustus_boss_windup v]\n    set [y v] to [0]\n    show\n    if <([x position v] of [hitbox v]) < (x position)> then\n        point in direction (-90)\n        repeat until <(x position) < [-250]>\n            change [y v] by (-.5)\n            change x by (y)\n            change y by (([sin v] of ((y) * (10)) ) * (6))\n        end\n        set [showbasswings? v] to [0]\n        hide\n    else\n        point in direction (90)\n        repeat until <(x position) > [250]>\n            change [y v] by (-.5)\n            change x by ((y) * (-1))\n            change y by (([sin v] of ((y) * (10)) ) * (6))\n        end\n        set [showbasswings? v] to [0]\n        hide\n    end\nend\nif <(pattern) = [4]> then\n    set [y v] to [0]\n    repeat until <<(y position) > [55]> and <(y position) < [70]>>\n        switch costume to (((round ((timer) * (22222))) mod (2)) + (6))\n        point towards (hitbox v)\n        if <(y position) > [70]> then\n            change [y v] by (-.5)\n            change y by (y)\n        else\n            change [y v] by (.5)\n            change y by (y)\n        end\n    end\n    set y to (64)\n    switch costume to (bassdive1 v)\n    repeat (50)\n        point towards (hitbox v)\n        change x by (([sin v] of (direction) ) * (15))\n    end\n    repeat (2)\n        wait (.05) seconds\n        next costume\n    end\n    set y to (64)\n    set [y v] to [0]\n    repeat (5)\n        change [y v] by (1)\n        change y by (y)\n    end\n    next costume\n    repeat (5)\n        change [y v] by (-15)\n        change y by (y)\n    end\n    start sound [explode_large v]\n    broadcast (STUNCHECK v)\n    set y to (-106)\n    repeat (3)\n        set [proj direction v] to [90]\n        set [proj x v] to ((Scroll X) + (x position))\n        set [proj y v] to ((Scroll Y) + (-100))\n        set [projectile name v] to [commx]\n        broadcast (CREATE PROJECTILE v)\n        wait (0) seconds\n        set [proj direction v] to [-90]\n        set [proj x v] to ((Scroll X) + (x position))\n        set [proj y v] to ((Scroll Y) + (-100))\n        set [projectile name v] to [commx]\n        broadcast (CREATE PROJECTILE v)\n        wait (0) seconds\n    end\n    switch costume to (bassdiveland1 v)\n    set y to (-112)\n    wait (0.05) seconds\n    switch costume to (bassdiveland2 v)\n    wait (.5) seconds\nend\nif <(pattern) = [3]> then\n    set [y v] to [0]\n    repeat until <<(y position) > [55]> and <(y position) < [70]>>\n        switch costume to (((round ((timer) * (22222))) mod (2)) + (6))\n        point towards (hitbox v)\n        if <(y position) > [70]> then\n            change [y v] by (-.5)\n            change y by (y)\n        else\n            change [y v] by (.5)\n            change y by (y)\n        end\n    end\n    set y to (64)\nend\nif <(pattern) = [1]> then\n    set [y v] to [0]\n    repeat (#)\n        point towards (hitbox v)\n        switch costume to (((round ((timer) * (22222))) mod (2)) + (6))\n        change [y v] by (5)\n        move (([sin v] of (y) ) * ((distance to [hitbox v]) / (35))) steps\n        if <(x position) < [-200]> then\n            set x to (-200)\n        end\n        if <(x position) > [200]> then\n            set x to (200)\n        end\n    end\nend\nif <(pattern) = [2]> then\n    set [y v] to [5]\n    repeat (10)\n        change [y v] by (-.5)\n        change y by (y)\n    end\n    set [y v] to [-1]\n    if <([x position v] of [hitbox v]) < (x position)> then\n        repeat until <(x position) < [0]>\n            point towards (hitbox v)\n            change [y v] by (-.5)\n            change x by (y)\n        end\n        set [y v] to [0]\n        repeat until <<(y position) > [55]> and <(y position) < [70]>>\n            point towards (hitbox v)\n            if <(y position) > [70]> then\n                change [y v] by (-.5)\n                change y by (y)\n            else\n                change [y v] by (.5)\n                change y by (y)\n            end\n        end\n        set y to (64)\n        point in direction (-90)\n        wait (.2) seconds\n        set [y v] to [0]\n        set [proj direction v] to (direction)\n        set [proj x v] to ((Scroll X) + (x position))\n        set [proj y v] to ((Scroll Y) + ((y position) + (-23)))\n        set [projectile name v] to [basslaser]\n        broadcast (CREATE PROJECTILE v)\n        switch costume to (basslaser1 v)\n        broadcast (BassLaser v)\n        repeat (3)\n            repeat (4)\n                change [y v] by (1)\n                change x by (y)\n            end\n            next costume\n        end\n        repeat (5)\n            change [y v] by (-3)\n            change x by (y)\n        end\n    else\n        repeat until <(x position) > [0]>\n            point towards (hitbox v)\n            change [y v] by (.5)\n            change x by (y)\n        end\n        set [y v] to [0]\n        repeat until <<(y position) > [55]> and <(y position) < [70]>>\n            point towards (hitbox v)\n            if <(y position) > [70]> then\n                change [y v] by (-.5)\n                change y by (y)\n            else\n                change [y v] by (.5)\n                change y by (y)\n            end\n        end\n        set y to (64)\n        point in direction (90)\n        wait (.2) seconds\n        set [y v] to [0]\n        set [proj direction v] to (direction)\n        set [proj x v] to ((Scroll X) + (x position))\n        set [proj y v] to ((Scroll Y) + ((y position) + (-23)))\n        set [projectile name v] to [basslaser]\n        broadcast (CREATE PROJECTILE v)\n        switch costume to (basslaser1 v)\n        broadcast (BassLaser v)\n        repeat (3)\n            repeat (4)\n                change [y v] by (-1)\n                change x by (y)\n            end\n            next costume\n        end\n        repeat (5)\n            change [y v] by (3)\n            change x by (y)\n        end\n    end\nend\n\nwhen I receive [battle begin v]\nwait (.05) seconds\nforever\n    wait until <<touching (hitbox v)?> and <(I_FRAMES) = [0]>>\n    broadcast (KNOCKBACK v)\n    change [health v] by (4)\n    broadcast (TAKE DMG v)\n    wait (1) seconds\nend\n\nwhen I receive [battle begin v]\nwait (.05) seconds\nforever\n    wait until <<<<touching (mega man/protoman/bass v)?> and <touching color (#fae0c1)?>> and <not <touching (hitbox v)?>>> or <touching (chargeshot v)?>>\n    if <touching (chargeshot v)?> then\n        if <(@Mega Man: Special Weapon) = [0]> then\n            if <(@Chargeshot type) = [2]> then\n                start sound [09 - EnemyDamage v]\n                broadcast (BossLvl2chargedmg v)\n            else\n                start sound [09 - EnemyDamage v]\n                broadcast (@BossLvl1chargedmg v)\n            end\n        end\n    else\n        start sound [09 - EnemyDamage v]\n        broadcast (BossDMG v)\n    end\n    wait (.5) seconds\nend\n\nwhen I receive [bossdie v]\nstop [other scripts in sprite v]\nset [y v] to [0]\nrepeat (10)\n    switch costume to (bassinjured1 v)\n    point towards (hitbox v)\n    change y by (y)\n    change [y v] by (-.4)\nend\nset [y v] to [0]\nrepeat until <(y position) > [0]>\n    switch costume to (bassinjured1 v)\n    point towards (hitbox v)\n    change y by (y)\n    change [y v] by (.4)\nend\nset [y v] to [0]\nrepeat until <(x position) > [150]>\n    point towards (hitbox v)\n    change x by (2)\n    change y by (([sin v] of (y) ) * (5))\n    switch costume to (((round ((timer) * (22222))) mod (2)) + (14))\n    change [y v] by (5)\nend\nswitch costume to (bassinjured1 v)\nwait (1) seconds\nswitch costume to (bassflytaunt v)\nstart sound [fanfare v]\nsay [congrats! you beat the prototype stage! Good job!] for (3) seconds\nsay [remember to love and favorite this game if you enjoyed it!] for (5) seconds\n\n@mega man/protoman/bass\n\nwhen I receive [you win v]\nstop [other scripts in sprite v]\n\nwhen flag clicked\nset [health v] to [1]\nset [health v] to [1]\n\nwhen flag clicked\n\nwhen I receive [die v]\nset [speed v] to [1]\nset [canmove? v] to [0]\n\nwhen I start as a clone\nset rotation style [left-right v]\ngo to [front v] layer\nshow\nif <(HEALTH) > [14]> then\n    set size to (250) %\n    switch costume to (death v)\n    wait (0) seconds\n    switch costume to (death2 v)\n    wait (0) seconds\n    switch costume to (death3 v)\n    wait (0) seconds\nelse\n    if <(Megaman Costume) = [3]> then\n        start sound [Mega Man 5 SFX \(4\) v]\n        switch costume to (bassshot v)\n    else\n        if <(hold) = [60]> then\n            forever\n                switch costume to (shot1 v)\n                wait (0) seconds\n                next costume\n                wait (0) seconds\n                next costume\n                wait (0) seconds\n                next costume\n                wait (0) seconds\n            end\n        else\n            start sound [Mega Man 5 SFX \(4\) v]\n            switch costume to (laser v)\n        end\n    end\nend\n\nwhen flag clicked\nset [@chargeeffect v] to [0]\nset [sliding? v] to [0]\nforever\n    if <<<(CanMove?) = [1]> and <<<key (space v) pressed?> or <mouse down?>> and <(Onscreen Bullets) < [3]>>> and <(Using Special Weapon) = [0]>> then\n        if <(@Mega Man: Special Weapon) < [2]> then\n            if <(SLIDING?) = [0]> then\n                set [hold v] to [0]\n                change y by (5)\n                create clone of (_myself_ v)\n                broadcast (Fire Effect v)\n                if <not <(@Mega Man: Special Weapon) = [1]>> then\n                    repeat until <<not <key (space v) pressed?>> and <not <mouse down?>>>\n                        change [hold v] by (1)\n                        if <(hold) > [15]> then\n                            start sound [Mega Man 5 SFX \(12\) v]\n                            if <(hold) > [30]> then\n                                set [@chargeeffect v] to [2]\n                            else\n                                set [@chargeeffect v] to [1]\n                            end\n                            if <(hold) > [30]> then\n                                set [brightness v] effect to (80)\n                            else\n                                set [brightness v] effect to (25)\n                            end\n                            repeat (2)\n                                if <<key (space v) pressed?> or <mouse down?>> then\n                                    wait (0) seconds\n                                end\n                            end\n                            change [hold v] by (4)\n                            set [brightness v] effect to (0)\n                            repeat (2)\n                                if <<key (space v) pressed?> or <mouse down?>> then\n                                    wait (0) seconds\n                                end\n                            end\n                        end\n                    end\n                    set [@chargeeffect v] to [0]\n                    if <(hold) > [15]> then\n                        if <(hold) > [30]> then\n                            if <(SLIDING?) = [0]> then\n                                if <not <(HEALTH) > [14]>> then\n                                    set [@chargeshot type v] to [2]\n                                    set [@fire key v] to [1]\n                                    broadcast (Fire Effect v)\n                                    create clone of (chargeshot v)\n                                    start sound [Mega Man 5 SFX \(21\) v]\n                                    wait (.1) seconds\n                                    set [@fire key v] to [0]\n                                end\n                            end\n                        else\n                            if <(SLIDING?) = [0]> then\n                                if <not <(HEALTH) > [14]>> then\n                                    set [@chargeshot type v] to [1]\n                                    set [@fire key v] to [1]\n                                    create clone of (chargeshot v)\n                                    broadcast (Fire Effect v)\n                                    start sound [Mega Man 5 SFX \(21\) v]\n                                    wait (.1) seconds\n                                    set [@fire key v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n                wait until <<not <key (space v) pressed?>> and <not <mouse down?>>>\n            end\n        else\n            broadcast (@MegaMan_Fire Special Weapon v)\n            wait until <<not <key (space v) pressed?>> and <not <mouse down?>>>\n        end\n    end\nend\n\nwhen flag clicked\nset rotation style [left-right v]\nset [speed v] to [3]\n\nwhen flag clicked\nforever\n    if <(@Fire Key) = [1]> then\n        set [animations: using gun?2 v] to [1]\n        repeat (2)\n            repeat until <(@Fire Key) = [0]>\n                wait (.5) seconds\n            end\n        end\n        set [animations: using gun?2 v] to [0]\n    else\n        set [animations: using gun?2 v] to [0]\n    end\nend\n\ndefine Do (what?)\nif <<(CanMove?) = [1]> and <(SLIDING?) = [0]>> then\n    if <(what?) = [Walk]> then\n        if <not <(dead:) = [1]>> then\n            if <(HTBX_FRME) < [1]> then\n                if <(animations: using gun?2) = [1]> then\n                    switch costume to (mshootstep v)\n                else\n                    switch costume to (mstep v)\n                end\n                set [animcounter v] to [1]\n            else\n                if <<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(x position) < (mouse x)>>>> or <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(mouse x) < (x position)>>>>> then\n                    if <(animations: using gun?2) = [1]> then\n                        if <(SLIDING?) = [0]> then\n                            switch costume to ((animcounter) + (38))\n                        end\n                    else\n                        if <(SLIDING?) = [0]> then\n                            switch costume to ((animcounter) + (23))\n                        end\n                    end\n                    if <(SLIDING?) = [0]> then\n                        wait ((@i am speed) * (.02)) seconds\n                    end\n                    change [animcounter v] by (1)\n                    if <(animcounter) > [8]> then\n                        set [animcounter v] to [1]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset rotation style [left-right v]\nforever\n    if <(getting ouched ?) = [1]> then\n        if <([falling? v] of [hitbox v]) > [3]> then\n            switch costume to (mhurt1 v)\n        else\n            switch costume to (mhurt2 v)\n        end\n    else\n        if <(SLIDING?) = [1]> then\n    end\nend\n\nwhen I start as a clone\nif <not <(HEALTH) > [14]>> then\n    move (20) steps\n    change y by (-8)\n    repeat until <<(x position) < [-235]> or <(x position) > [235]>>\n        move (14) steps\n    end\nend\nif <(HEALTH) > [14]> then\n    set size to (100) %\n    repeat until <touching (_edge_ v)?>\n        move (5) steps\n    end\n    delete this clone\nend\n\ndefine death\nif <(clone) = [0]> then\n    hide\n    start sound [Mega Man 5 SFX \(7\) v]\n    switch costume to (death v)\n    point in direction (0)\n    create clone of (_myself_ v)\n    turn right (45) degrees\n    create clone of (_myself_ v)\n    turn right (45) degrees\n    create clone of (_myself_ v)\n    turn right (45) degrees\n    create clone of (_myself_ v)\n    turn right (45) degrees\n    create clone of (_myself_ v)\n    turn right (45) degrees\n    create clone of (_myself_ v)\n    turn right (45) degrees\n    create clone of (_myself_ v)\n    turn right (45) degrees\n    create clone of (_myself_ v)\n    turn right (45) degrees\n    point in direction (90)\nend\n\nwhen I start as a clone\nforever\n    show\nend\n\nwhen flag clicked\nset volume to (100) %\nset size to (SIZE) %\nclear graphic effects\nset [falling v] to [0]\nset [speed y v] to [0]\nset [dead: v] to [0]\nset [health v] to [1]\ngo to x: (0) y: (-120)\npoint in direction (90)\nset volume to (100) %\n\nwhen I receive [die v]\nset [canmove? v] to [0]\nhide\ndeath\nwait (1) seconds\nswitch costume to (idle v)\n\nwhen I receive [take dmg v]\nstart sound [Mega Man 2 SFX \(5\) v]\nset [i_frames v] to [1]\nset [takingdmg v] to [1]\nset [canmove? v] to [0]\nset [getting ouched ? v] to [1]\nrepeat (8)\n    set [ghost v] effect to (100)\n    wait (0) seconds\n    set [ghost v] effect to (0)\n    wait (0) seconds\nend\nset [getting ouched ? v] to [0]\nset [canmove? v] to [1]\nset [takingdmg v] to [0]\nrepeat (8)\n    set [ghost v] effect to (100)\n    wait (0) seconds\n    set [ghost v] effect to (0)\n    wait (0) seconds\nend\nset [i_frames v] to [0]\n\nwhen flag clicked\nset [getting ouched ? v] to [0]\nset [takingdmg v] to [0]\n\nwhen I receive [blink v]\nif <(clone?) = [0]> then\n    repeat (3)\n        set [ghost v] effect to (100)\n        wait (.05) seconds\n        set [ghost v] effect to (0)\n        wait (.05) seconds\n    end\nend\n\nwhen I receive [teleportin v]\nif <(clone?) = [0]> then\n    hide\n    set [canmove? v] to [-1]\n    go to [front v] layer\n    switch costume to (mtele1 v)\n    wait (1) seconds\n    go to x: (0) y: (899)\n    set [y v] to [-4]\n    show\n    repeat (15)\n        go to [front v] layer\n        change y by (y)\n        change [y v] by (-1)\n    end\n    repeat until <touching (ground v)?>\n        change y by (y)\n        change [y v] by (-2)\n    end\n    if <<(Checkpoint #) = [1]> and <(STAGE #) = [4]>> then\n        change y by (-48)\n    else\n        change y by (-28)\n    end\n    start sound [Mega Man 2 SFX \(16\) v]\n    switch costume to (mtele1 v)\n    repeat (5)\n        wait (0) seconds\n        next costume\n    end\n    change [scroll x v] by (0)\n    set [canmove? v] to [1]\n    broadcast (Enable Movement v)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [teleportin v]\nclear graphic effects\n\nwhen I start as a clone\nclear graphic effects\n\nwhen I receive [teleportin v]\nrepeat (10)\n    clear graphic effects\nend\n\nwhen I receive [battle begin v]\nset [canmove? v] to [1]\nset rotation style [left-right v]\n\nwhen flag clicked\nforever\n    if <(Collide with ladder) = [1]> then\n        if <(animations: using gun?2) = [1]> then\n            if <<(Ladder Climb Alternate) = [2]> or <(Ladder Climb Alternate) = [4]>> then\n                switch costume to (mladdershoot2 v)\n            else\n                switch costume to (mladdershoot1 v)\n            end\n        else\n            if <<(Head_collidingw/ladder) = [0]> and <(Leg_collidew/ladder) = [1]>> then\n                switch costume to (mclimb6 v)\n            else\n                if <(Ladder Climb Alternate) = [4]> then\n                    switch costume to (mclimb4 v)\n                else\n                    if <(Ladder Climb Alternate) = [3]> then\n                        switch costume to (mclimb3 v)\n                    else\n                        if <(Ladder Climb Alternate) = [2]> then\n                            switch costume to (mclimb2 v)\n                        else\n                            switch costume to (mclimb1 v)\n                        end\n                    end\n                end\n            end\n        end\n    else\n        if <<([falling? v] of [hitbox v]) > [.5]> and <(CanMove?) = [1]>> then\n            if <([falling? v] of [hitbox v]) > [17]> then\n                if <(animations: using gun?2) = [25]> then\n                    switch costume to (mshootjump5 v)\n                else\n                    switch costume to (mjump5 v)\n                end\n            else\n                if <([falling? v] of [hitbox v]) > [15]> then\n                    if <(animations: using gun?2) = [1]> then\n                        switch costume to (mshootjump4 v)\n                    else\n                        switch costume to (mjump4 v)\n                    end\n                else\n                    if <([falling? v] of [hitbox v]) > [4]> then\n                        if <(animations: using gun?2) = [1]> then\n                            switch costume to (mshootjump3 v)\n                        else\n                            switch costume to (mjump3 v)\n                        end\n                    else\n                        if <([falling? v] of [hitbox v]) > [3]> then\n                            if <(animations: using gun?2) = [1]> then\n                                switch costume to (mshootjump2 v)\n                            else\n                                switch costume to (mjump2 v)\n                            end\n                        else\n                        end\n                    end\n                end\n            end\n        else\n            if <(SLIDING?) = [1]> then\n                if <(timer) < [.15]> then\n                    switch costume to (mslide1 v)\n                else\n                    switch costume to (mslide2 v)\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\ngo to [front v] layer\n\nwhen I start as a clone\nif <(HEALTH) > [14]> then\n    forever\n        set size to (250) %\n        switch costume to (enemeexp1 v)\n        wait (0) seconds\n        switch costume to (enemyexp2 v)\n        wait (0) seconds\n        switch costume to (enemyxp3 v)\n        wait (0) seconds\n        switch costume to (enemyxp4 v)\n        wait (0) seconds\n        switch costume to (enemyexp5 v)\n        wait (0) seconds\n    end\nend\n\nwhen I start as a clone\nset [clone? v] to [1]\n\nwhen I receive [die v]\nset [health v] to [15]\n\nwhen I start as a clone\nset [clone v] to [1]\n\nwhen I receive [die v]\nset [canmove? v] to [0]\n\nwhen I receive [die v]\nrepeat (50)\n    set [canmove? v] to [0]\nend\n\nwhen I receive [back to select v]\nrepeat (25)\n    set [canmove? v] to [0]\nend\n\nwhen I receive [bossdie v]\nset [canmove? v] to [0]\n\nwhen I receive [bossdie v]\nset [onscreen bullets v] to [0]\ndelete this clone\n\nwhen I start as a clone\nwait until <<touching (boss v)?> or <touching (enemies v)?>>\nif <not <(HEALTH) > [14]>> then\n    wait (.05) seconds\n    change [onscreen bullets v] by (-1)\n    delete this clone\nend\n\nwhen I receive [teleportin v]\nset [onscreen bullets v] to [0]\nset size to (SIZE) %\nset [speed v] to [1]\nforever\n    if <(CanMove?) = [1]> then\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(mouse x) < (x position)>>>> then\n            point in direction (-90)\n            set [speed v] to [-4]\n        end\n        if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(x position) < (mouse x)>>>> then\n            point in direction (90)\n            set [speed v] to [-4]\n        end\n    end\nend\n\nwhen I receive [teleportin v]\nforever\n    if <<not <(HEALTH) > [14]>> and <not <(CanMove?) = [-1]>>> then\n        go to x: (([x position v] of [hitbox v]) + (item (1) of [visgroundshake v])) y: ((([y position v] of [hitbox v]) + (-5)) + (item (2) of [visgroundshake v]))\n    end\nend\n\nwhen I receive [stunned v]\nbroadcast (Disable Movement v)\nset [canmove? v] to [-1]\nrepeat (10)\n    change x by (5)\n    wait (0) seconds\n    repeat (2)\n        change x by (-5)\n    end\n    change x by (5)\n    wait (0) seconds\nend\nset [canmove? v] to [1]\nbroadcast (Enable Movement v)\n\nwhen flag clicked\nforever\n    set [sliding? v] to ([sliding?2 v] of [hitbox v])\nend\n\nwhen I start as a clone\nif <not <(HEALTH) > [14]>> then\n    change [onscreen bullets v] by (1)\n    wait until <touching (boss v)?>\n    if <(@Boss Invincible?) = [1]> then\n        stop [other scripts in sprite v]\n        start sound [SE \[12\] v]\n        go to (boss v)\n        if <(direction) = [90]> then\n            point in direction (-45)\n        else\n            point in direction (45)\n        end\n        repeat until <touching (_edge_ v)?>\n            move (15) steps\n        end\n        change [onscreen bullets v] by (-1)\n        delete this clone\n    else\n        wait (.05) seconds\n        change [onscreen bullets v] by (-1)\n        delete this clone\n    end\nend\n\nwhen I receive [battle begin v]\nset [canmove? v] to [0]\nwait (2) seconds\nset [canmove? v] to [1]\n\nwhen I receive [ready v]\nset [canmove? v] to [0]\nhide\n\nwhen I receive [teleportin v]\ndelete this clone\n\nwhen I receive [take dmg v]\nrepeat (45)\n    set [invincibility v] to [1]\nend\nset [invincibility v] to [0]\n\nwhen I receive [die v]\nwait (1) seconds\nrepeat (10)\n    hide\nend\n\nwhen I start as a clone\nwait until <touching (_edge_ v)?>\nif <not <(HEALTH) > [14]>> then\n    change [onscreen bullets v] by (-1)\nend\ndelete this clone\n\nwhen I receive [teleportin v]\nforever\n    if <(TrebleBoostTimer) = [1]> then\n        set [ghost v] effect to (100)\n        wait (.05) seconds\n        clear graphic effects\n        wait (.05) seconds\n    end\nend\n\nwhen I receive [ready v]\nset [hold v] to [0]\n\nwhen I receive [disable movement v]\nset [canmove? v] to [0]\n\nwhen I receive [enable movement v]\nset [canmove? v] to [1]\n\nwait (.1) seconds\n\nwhen I start as a clone\nif <(Collide with ladder) = [1]> then\n    change y by (9)\nend\n\nwhen I receive [reset dir v]\npoint in direction (90)\ndelete this clone\n\nwhen flag clicked\nforever\n    if <(Megaman Costume) = [3]> then\n        if <<key (space v) pressed?> or <mouse down?>> then\n            set [@fire key v] to [1]\n        else\n            set [@fire key v] to [0]\n        end\n    else\n        if <<key (space v) pressed?> or <mouse down?>> then\n            set [@fire key v] to [1]\n            wait (.1) seconds\n            set [@fire key v] to [0]\n            wait until <not <<key (space v) pressed?> or <mouse down?>>>\n        end\n    end\nend\n\nwhen I receive [teleportin v]\nforever\n    set [universal hold v] to (hold)\nend\n\nwhen I receive [teleportin v]\nforever\n    wait until <(Collide with ladder) = [1]>\n    wait until <not <(Collide with ladder) = [1]>>\n    point in direction ([direction v] of [hitbox v])\nend\n\ndefine findground\nrepeat until <not <touching (ground v)?>>\n    change y by (.5)\nend\n\nwhen I receive [@load final wave of enemies v]\nrepeat (20)\n    go to [front v] layer\nend\n\nwhen I receive [@load new set of enemies v]\nrepeat (20)\n    go to [front v] layer\nend\n\nwhen I receive [bosscutscene v]\nwait (.05) seconds\nset [canmove? v] to [-1]\nset [y v] to [0]\nswitch costume to (mjump3 v)\nrepeat until <(y position) < [-100]>\n    change [y v] by (-1)\n    change y by (y)\nend\nset y to (-118)\nswitch costume to (mtele6 v)\nwait (1) seconds\nswitch costume to (mstep v)\npoint in direction (90)\nset [scroll x max v] to [11905]\nwait (.05) seconds\nset [# v] to [1]\nbroadcast (MegamanCutscene- run animation v)\nrepeat until <(Scroll X) > [11900]>\n    set [a v] to [6]\n    broadcast (Change Player X by A v)\nend\nset [# v] to [0]\nset [scroll x min v] to (Scroll X Max)\nbroadcast (hitboxsnap v)\nwait (.5) seconds\nbroadcast (Boss Fight v)\n\nwhen I receive [megamancutscene- run animation v]\nrepeat until <(#) = [0]>\n    switch costume to (mrun1 v)\n    repeat (7)\n        wait (.02) seconds\n        next costume\n    end\n    wait (.02) seconds\nend\nswitch costume to (mtele6 v)\n\nwhen I receive [bossdie v]\nwait (.05) seconds\nset [canmove? v] to [-1]\nset [y v] to [0]\nswitch costume to (mjump3 v)\nrepeat until <(y position) < [-100]>\n    change [y v] by (-1)\n    change y by (y)\nend\nset y to (-118)\nswitch costume to (mtele6 v)\nset [# v] to [1]\nbroadcast (MegamanCutscene- run animation v)\nrepeat until <(x position) < [-150]>\n    set [a v] to [6]\n    change x by (-5)\nend\nset [# v] to [0]\nset [scroll x min v] to (Scroll X Max)\nbroadcast (hitboxsnap v)\npoint towards (boss v)\n\n@chargeshot\n\nwhen I start as a clone\nrepeat (2)\n    point in direction ([direction v] of [mega man/protoman/bass v])\nend\n\nwhen flag clicked\nset rotation style [left-right v]\nhide\n\nwhen I start as a clone\nif <(@Mega Man: Special Weapon) = [0]> then\n    repeat (1)\n        change [level_x v] by (([sin v] of (direction) ) * (15))\n    end\n    repeat until <([abs v] of ((Level_X) - (Scroll X)) ) > [250]>\n        change [level_x v] by (([sin v] of (direction) ) * (15))\n    end\n    change [onscreen bullets v] by (-1)\n    delete this clone\nend\nif <(@Mega Man: Special Weapon) = [6]> then\n    switch costume to (crash1 v)\n    start sound [SE \[28\] v]\n    repeat (1)\n        change [level_x v] by (([sin v] of (direction) ) * (15))\n        change [level_y v] by (y)\n        change [y v] by (-2)\n    end\n    repeat until <<touching (ground v)?> or <(y position) < [-180]>>\n        change [level_x v] by (([sin v] of (direction) ) * (15))\n        change [level_y v] by (y)\n        change [y v] by (-2)\n    end\n    if <(y position) < [-180]> then\n        change [onscreen bullets v] by (-1)\n        delete this clone\n    else\n        set [x v] to [0]\n        start sound [SE \[90\] v]\n        switch costume to (crash2 v)\n        repeat until <<not <touching (ground v)?>> or <(x) > [4]>>\n            change [x v] by (1)\n            change [level_y v] by (3)\n        end\n        wait (0) seconds\n        next costume\n        wait (0) seconds\n        repeat (5)\n            switch costume to (crash3 v)\n            wait (0) seconds\n            next costume\n            wait (0) seconds\n        end\n        start sound [SE \[83\] v]\n        switch costume to (explmk1 v)\n        repeat (6)\n            next costume\n        end\n        wait (0) seconds\n        change [onscreen bullets v] by (-1)\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nif <(@Mega Man: Special Weapon) = [0]> then\n    if <(@Chargeshot type) = [1]> then\n        set [chargeshot_type v] to [1]\n        forever\n            switch costume to (chargeshot1 v)\n            wait (.02) seconds\n            next costume\n            wait (.02) seconds\n        end\n    end\n    if <(@Chargeshot type) = [2]> then\n        set [chargeshot_type v] to [2]\n        switch costume to (chargeshot3 v)\n        wait (.05) seconds\n        forever\n            switch costume to (chargeshot4 v)\n            wait (.02) seconds\n            repeat (3)\n                next costume\n                wait (.02) seconds\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nset [@clone v] to [1]\nchange [onscreen bullets v] by (1)\nwait until <<touching (enemies v)?> or <touching (boss v)?>>\nif <(@Boss Invincible?) = [1]> then\n    stop [other scripts in sprite v]\n    start sound [SE \[12\] v]\n    go to (boss v)\n    if <(direction) = [90]> then\n        point in direction (-45)\n    else\n        point in direction (45)\n    end\n    repeat until <touching (_edge_ v)?>\n        move (15) steps\n    end\n    change [onscreen bullets v] by (-1)\n    delete this clone\nelse\n    if <(@Mega Man: Special Weapon) = [6]> then\n        start sound [SE \[83\] v]\n        switch costume to (explmk1 v)\n        repeat (6)\n            next costume\n        end\n        wait (0) seconds\n        change [onscreen bullets v] by (-1)\n        delete this clone\n    else\n        wait (1) seconds\n        change [onscreen bullets v] by (-1)\n        delete this clone\n    end\nend\n\nwhen I receive [@megaman_fire special weapon v]\nif <not <(@Mega Man: Special Weapon) = [0]>> then\n    set [using special weapon v] to [1]\nend\nif <(@clone) = [0]> then\n    if <(@Mega Man: Special Weapon) = [7]> then\n        if <(item (@Mega Man: Special Weapon) of [special weapon energy v]) < [24]> then\n            replace item (@Mega Man: Special Weapon) of [special weapon energy v] with ((item (@Mega Man: Special Weapon) of [special weapon energy v]) + (5))\n            broadcast (Flashbang v)\n            start sound [SE \[46\] v]\n            wait (.4) seconds\n            start sound [SE \[56\] v]\n            broadcast (Flash v)\n            wait (1) seconds\n            set [using special weapon v] to [0]\n        end\n    end\n    if <(@Mega Man: Special Weapon) = [6]> then\n        if <(item (@Mega Man: Special Weapon) of [special weapon energy v]) < [26]> then\n            replace item (@Mega Man: Special Weapon) of [special weapon energy v] with ((item (@Mega Man: Special Weapon) of [special weapon energy v]) + (3))\n            set [y v] to [0]\n            repeat (3)\n                create clone of (_myself_ v)\n                change [y v] by (4)\n            end\n            set [using special weapon v] to [0]\n        end\n    end\n    if <<<(@Mega Man: Special Weapon) = [4]> and <not <(Collide with ladder) = [1]>>> and <(@QuickDash?) = [0]>> then\n        if <(item (@Mega Man: Special Weapon) of [special weapon energy v]) < [27]> then\n            start sound [SE \[84\] v]\n            replace item (@Mega Man: Special Weapon) of [special weapon energy v] with ((item (@Mega Man: Special Weapon) of [special weapon energy v]) + (2))\n            set [@quickdash? v] to [1]\n            wait (.3) seconds\n            set [@quickdash? v] to [0]\n            set [using special weapon v] to [0]\n        end\n    end\nend\n\nwhen flag clicked\nset [@clone v] to [0]\n\nwhen I start as a clone\nwait until <<touching (enemies v)?> or <touching (boss v)?>>\nwait (.05) seconds\nchange [onscreen bullets v] by (-1)\ndelete this clone\n\nwhen I start as a clone\nset [level_x v] to ((([x position v] of [hitbox v]) + (Scroll X)) + (([sin v] of (direction) ) * (35)))\nset [level_y v] to ((([y position v] of [hitbox v]) + (Scroll Y)) + (-6))\nset [clone v] to [1]\ngo [forward v] (3333) layers\nforever\n    set x to (((Level_X) - (Scroll X)) + (item (1) of [visgroundshake v]))\n    set y to (((Level_Y) - (Scroll Y)) + (item (1) of [visgroundshake v]))\n    if <<([abs v] of ((Level_X) - (Scroll X)) ) > [250]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [450]>> then\n        hide\n    else\n        show\n    end\nend\n\n@Level_Art\n\nwhen I receive [setup v]\nhide\nclear graphic effects\ngo to x: (0) y: (0)\nif <[1] = [1]> then\n    delete this clone\nend\nCreate\n\ndefine Create\nset [antigravity? v] to [0]\nset [level_x v] to [0]\nset [level_y v] to [15]\nswitch costume to (bgmm9wily1_4 v)\nset size to (200) %\ncreate clone of (_myself_ v)\nswitch costume to (nitro2 v)\nset [level_x v] to [150]\nset size to (200) %\nrepeat (4)\n    create clone of (_myself_ v)\n    change [level_x v] by (510)\n    switch costume to (nitro v)\nend\nswitch costume to (nitro3 v)\ncreate clone of (_myself_ v)\nrepeat (2)\n    change [level_x v] by (510)\nend\nswitch costume to (bgmagma4 v)\nset size to (200) %\nrepeat (4)\n    create clone of (_myself_ v)\n    change [level_x v] by (510)\nend\nset [level_x v] to [5100]\nset [level_y v] to [448]\nswitch costume to (bgmagma4 v)\nset size to (200) %\ncreate clone of (_myself_ v)\nchange [level_y v] by (448)\ncreate clone of (_myself_ v)\nset [level_x v] to [4900]\nset [level_y v] to [896]\nswitch costume to (nitro2 v)\nset size to (200) %\nrepeat (4)\n    create clone of (_myself_ v)\n    change [level_x v] by (510)\n    switch costume to (nitro v)\nend\nswitch costume to (nitro3 v)\ncreate clone of (_myself_ v)\nset [level_x v] to [8780]\nset [level_y v] to [4032]\nswitch costume to (nitro2 v)\nset size to (200) %\nrepeat (2)\n    create clone of (_myself_ v)\n    change [level_x v] by (510)\n    switch costume to (nitro v)\nend\nswitch costume to (nitro3 v)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nset [brightness v] effect to (0)\nif <(costume [number v]) = [3]> then\n    forever\n        wait (.1) seconds\n        if <(Scroll X) < [500]> then\n            set [brightness v] effect to (0)\n            switch costume to (bgmm9wily1_4 v)\n            wait (pick random (3) to (4.5)) seconds\n            start sound (pick random (2) to (4))\n            switch costume to (bgmm9wily1_42 v)\n            wait (0) seconds\n        else\n            switch costume to (bgmm9wily1_4 v)\n        end\n    end\nend\nif <(costume [number v]) = [6]> then\n    forever\n        go to [back v] layer\n        set [brightness v] effect to (0)\n        switch costume to (bgmagma4 v)\n        repeat (5)\n            wait (0) seconds\n            next costume\n        end\n        wait (0) seconds\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nforever\n    if <(costume [number v]) = [5]> then\n        if <<<(x position) < [-80]> or <(x position) > [480]>> or <([abs v] of (y position) ) > [350]>> then\n            hide\n        else\n            show\n        end\n    else\n        if <(costume [number v]) = [2]> then\n            if <<<(x position) < [-480]> or <(x position) > [80]>> or <([abs v] of (y position) ) > [350]>> then\n                hide\n            else\n                show\n            end\n        else\n            if <<(costume [number v]) = [1]> or <<(costume [number v]) = [3]> or <(costume [number v]) = [4]>>> then\n                if <<<(x position) < [-480]> or <(x position) > [480]>> or <([abs v] of (y position) ) > [350]>> then\n                    hide\n                else\n                    show\n                end\n            else\n                set x to ((Level_X) - (Scroll X))\n                set y to (((Level_Y) - (Scroll Y)) + (YPos Offset))\n                if <<([abs v] of ((Level_X) - (Scroll X)) ) > [500]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [400]>> then\n                    hide\n                else\n                    show\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [setup v]\ndelete this clone\n\nwhen I receive [ready v]\nif <(Checkpoint #) = [1]> then\n    repeat (15)\n        set [scroll y min v] to [0]\n        set [scroll x min v] to [0]\n        set [scroll x max v] to [4600]\n        set [scroll y max v] to [50]\n    end\nend\nif <(Checkpoint #) = [2]> then\n    repeat (15)\n        set [scroll y min v] to [0]\n        set [scroll y max v] to [0]\n        set [scroll x min v] to [5100]\n        set [scroll x max v] to [5100]\n    end\nend\nif <(Checkpoint #) = [3]> then\n    repeat (10)\n        set [scroll y min v] to [896]\n        set [scroll y max v] to [896]\n        set [scroll x min v] to [9696]\n        set [scroll x max v] to [9696]\n    end\n    broadcast (@Load Final Wave of Enemies v)\nend\nif <(Checkpoint #) = [4]> then\n    repeat (30)\n        set [scroll y min v] to [4032]\n        set [scroll y max v] to [4032]\n        set [scroll x min v] to [9696]\n        set [scroll x max v] to [9696]\n    end\n    broadcast (@Load Final Wave of Enemies v)\nend\n\nwhen flag clicked\nset [checkpoint # v] to [1]\n\nwhen I receive [blink v]\n\nbroadcast (blink v)\n\nwhen I start as a clone\nset [ogx v] to (Level_X)\nforever\n    if <<(costume [number v]) < [3]> or <(costume [number v]) = [5]>> then\n        forever\n            set x to (((Scroll X) * (-.9)) + (OGX))\n            set y to ((Level_Y) - (Scroll Y))\n        end\n    end\n    if <(costume [number v]) = [3]> then\n        forever\n            set x to (((Scroll X) * (-.4)) + (OGX))\n            set y to ((Level_Y) - (Scroll Y))\n        end\n    end\nend\n\ndelete this clone\n\nif <(costume [number v]) = [4]> then\n\nif <<<((Level_X) - (Scroll X)) < [-200]> or <((Level_X) - (Scroll X)) > [500]>> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [400]>> then\n    hide\nelse\n    show\nend\n\nset [antigravity? v] to [1]\n\nset [antigravity? v] to [0]\n\nchange [level_x v] by (-510)\nrepeat (5)\n    change [level_y v] by (-448)\n    create clone of (_myself_ v)\nend\nrepeat (4)\n    change [level_x v] by (-510)\n    create clone of (_myself_ v)\nend\n\nset [scroll x max v] to [4600]\n\n@Rain\n\nwhen I start as a clone\nforever\n    set x to ((Level_X) - (Scroll X))\n    set y to (((Level_Y) - (Scroll Y)) + (YPos Offset))\n    if <<([abs v] of ((Level_X) - (Scroll X)) ) > [400]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [400]>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\ngo to [front v] layer\ngo [backward v] (35) layers\nswitch costume to (costume1 v)\nrepeat until <<(y position) < [-175]> or <touching (ground v)?>>\n    change [level_x v] by (-2)\n    change [level_y v] by (-20)\nend\nif <(y position) < [-175]> then\n    delete this clone\nelse\n    change [level_y v] by (([abs v] of (y position) ) * (.10))\n    repeat (2)\n        wait (0) seconds\n        next costume\n    end\n    wait (0) seconds\n    delete this clone\nend\n\nwhen I start as a clone\nwait (2) seconds\ndelete this clone\n\nwhen flag clicked\nwait (1) seconds\nforever\n    if <<(Scroll X) < [400]> and <([canmove? v] of [hitbox v]) = [1]>> then\n        set [level_x v] to ((Scroll X) + (pick random (-200) to (250)))\n        set [level_y v] to ((Scroll Y) + (200))\n        create clone of (_myself_ v)\n        wait (.02) seconds\n    end\nend\n\n@ladder collision checker\n\nwhen flag clicked\nset [ghost v] effect to (100)\nshow\nforever\n    go to (hitbox v)\nend\n\nwhen flag clicked\n\nforever\n    if <touching (misc objects v)?> then\n        set [collide with ladder v] to [1]\n    else\n        set [collide with ladder v] to [0]\n    end\nend\n\n@enemies\n\nwhen flag clicked\nhide\n\ndefine Create Enemy (what enemy ) (x) (y) (prop1) (prop2)\ngo to [front v] layer\nset size to (200) %\nset rotation style [left-right v]\nswitch costume to (what enemy )\nset [@eprop1 v] to (prop1)\nset [@eprop2 v] to (prop2)\nset [level_x v] to (x)\nset [level_y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\nset rotation style [left-right v]\n\nwhen I receive [die v]\nwait (1) seconds\ndelete this clone\n\nwhen I start as a clone\nset [y v] to [0]\nset [x v] to [0]\ngo to [front v] layer\nif <(costume [number v]) = [74]> then\n    set [hp v] to [2]\n    forever\n        if <not <<([abs v] of ((Level_X) - (Scroll X)) ) > [250]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [300]>>> then\n            point in direction (90)\n            set [y v] to [0]\n            set [x v] to [1]\n            set [proj direction v] to (direction)\n            set [proj x v] to (Level_X)\n            set [proj y v] to ((Level_Y) + (-70))\n            start sound [laser v]\n            set [projectile name v] to (join [x] (@EProp1))\n            broadcast (CREATE PROJECTILE v)\n            repeat (@EProp1)\n                change [level_x v] by (y)\n                change [y v] by (1)\n            end\n            set [x v] to [0]\n            set [y v] to [0]\n            wait (pick random (.19) to (.21)) seconds\n            repeat (@EProp1)\n                change [level_x v] by (y)\n                change [y v] by (-1)\n            end\n        end\n    end\nend\nif <(costume [number v]) = [71]> then\n    set [hp v] to [1]\n    point in direction (pick random (-180) to (180))\n    set [y v] to [10]\n    repeat (10)\n        change [level_x v] by (([sin v] of (direction) ) * (y))\n        change [level_y v] by (([cos v] of (direction) ) * (y))\n        change [y v] by (-1)\n    end\n    set [y v] to [0]\n    set [x v] to (Level_Y)\n    point towards (hitbox v)\n    forever\n        set [level_y v] to ((x) + (([sin v] of (y) ) * (25)))\n        change [y v] by (5)\n        change [level_x v] by (([sin v] of (direction) ) * (2))\n        if <<touching (mega man/protoman/bass v)?> or <touching (chargeshot v)?>> then\n            point towards (hitbox v)\n            set [proj direction v] to (direction)\n            set [proj x v] to (Level_X)\n            set [proj y v] to ((Level_Y) + (5))\n            set [projectile name v] to [bullet]\n            broadcast (CREATE PROJECTILE v)\n            repeat (2)\n                set [level_y v] to ((x) + (([sin v] of (y) ) * (25)))\n                change [y v] by (5)\n                switch costume to (dev5 v)\n            end\n            repeat (2)\n                set [level_y v] to ((x) + (([sin v] of (y) ) * (25)))\n                change [y v] by (5)\n                switch costume to (dev8 v)\n            end\n            repeat (2)\n                set [level_y v] to ((x) + (([sin v] of (y) ) * (25)))\n                change [y v] by (5)\n                switch costume to (dev5 v)\n            end\n            repeat (2)\n                set [level_y v] to ((x) + (([sin v] of (y) ) * (25)))\n                change [y v] by (5)\n                switch costume to (dev4 v)\n            end\n        end\n    end\nend\nif <(costume [number v]) = [68]> then\n    set [hp v] to [4]\n    set [x v] to (Level_Y)\n    set [y v] to [0]\n    forever\n        switch costume to (dev v)\n        set [level_y v] to ((x) + (([sin v] of (y) ) * (25)))\n        change [y v] by (5)\n        if <<touching (mega man/protoman/bass v)?> or <touching (chargeshot v)?>> then\n            point towards (hitbox v)\n            set [proj direction v] to (direction)\n            set [proj x v] to (Level_X)\n            set [proj y v] to ((Level_Y) + (5))\n            set [projectile name v] to [bullet]\n            broadcast (CREATE PROJECTILE v)\n            repeat (2)\n                set [level_y v] to ((x) + (([sin v] of (y) ) * (25)))\n                change [y v] by (5)\n                switch costume to (dev2 v)\n            end\n            repeat (2)\n                set [level_y v] to ((x) + (([sin v] of (y) ) * (25)))\n                change [y v] by (5)\n                switch costume to (dev3 v)\n            end\n            repeat (2)\n                set [level_y v] to ((x) + (([sin v] of (y) ) * (25)))\n                change [y v] by (5)\n                switch costume to (dev2 v)\n            end\n            repeat (2)\n                set [level_y v] to ((x) + (([sin v] of (y) ) * (25)))\n                change [y v] by (5)\n                switch costume to (dev v)\n            end\n        end\n    end\nend\nif <(costume [number v]) = [65]> then\n    set [hp v] to [1]\n    set [x v] to (Level_Y)\n    set [y v] to [0]\n    point in direction (-90)\n    forever\n        if <(ENEMY ONSCREEN?) = [1]> then\n            change [level_x v] by (([sin v] of (direction) ) * (@EProp2))\n            if <(@EProp1) = [0]> then\n                set [level_y v] to ((x) + (([sin v] of (y) ) * (100)))\n            else\n                set [level_y v] to ((x) + (([sin v] of (y) ) * (-100)))\n            end\n            change [y v] by (7)\n            if <((Level_X) - (Scroll X)) < [-250]> then\n                delete this clone\n            end\n        end\n    end\nend\nif <(costume [number v]) = [60]> then\n    set [hp v] to [10]\n    point in direction (@EProp1)\n    forever\n        if <(ENEMY ONSCREEN?) = [1]> then\n            switch costume to (skor v)\n            repeat (3)\n                repeat (3)\n                    if <([x position v] of [hitbox v]) < (x position)> then\n                        point in direction (-90)\n                    else\n                        point in direction (90)\n                    end\n                    repeat (2)\n                        change [level_x v] by ([sin v] of ((direction) * (-15)) )\n                    end\n                    next costume\n                end\n                repeat (2)\n                    change [level_x v] by ([sin v] of ((direction) * (-15)) )\n                end\n                switch costume to (skor v)\n            end\n            repeat (3)\n                repeat (3)\n                    repeat (2)\n                        change [level_x v] by ([sin v] of ((direction) * (15)) )\n                    end\n                    next costume\n                end\n                repeat (2)\n                    change [level_x v] by ([sin v] of ((direction) * (15)) )\n                end\n                switch costume to (skor v)\n            end\n            switch costume to (skor5 v)\n            set [proj direction v] to (direction)\n            set [proj x v] to ((Level_X) + (([sin v] of (direction) ) * (-15)))\n            set [proj y v] to ((Level_Y) + (50))\n            set [projectile name v] to [skorprok]\n            broadcast (CREATE PROJECTILE v)\n            wait (.2) seconds\n            set [proj direction v] to (direction)\n            set [proj x v] to ((Level_X) + (([sin v] of (direction) ) * (-15)))\n            set [proj y v] to ((Level_Y) + (50))\n            set [projectile name v] to [skorprok2]\n            broadcast (CREATE PROJECTILE v)\n            switch costume to (skor v)\n            wait (.2) seconds\n        end\n    end\nend\nif <(costume [number v]) = [57]> then\n    set [hp v] to [2]\nend\nif <(costume [number v]) = [51]> then\n    set [hp v] to [4]\n    forever\n        if <(ENEMY ONSCREEN?) = [1]> then\n            repeat (pick random (4) to (7))\n                point towards (hitbox v)\n                if <(([sin v] of ([y position v] of [hitbox v]) ) * ([tan v] of (distance to [hitbox v]) )) > [1]> then\n                    switch costume to (crazy v)\n                    wait (.1) seconds\n                    next costume\n                    wait (.1) seconds\n                else\n                    if <(([sin v] of ([y position v] of [hitbox v]) ) * ([tan v] of (distance to [hitbox v]) )) > [0]> then\n                        switch costume to (sprcrazycannonred_2 v)\n                        wait (.1) seconds\n                        next costume\n                        wait (.1) seconds\n                    else\n                        switch costume to (sprcrazycannonred_4 v)\n                        wait (.1) seconds\n                        next costume\n                        wait (.1) seconds\n                    end\n                end\n            end\n        end\n        set [proj direction v] to (direction)\n        set [proj x v] to ((Level_X) + (([sin v] of (direction) ) * (15)))\n        set [proj y v] to (Level_Y)\n        set [projectile name v] to [bullet2]\n        broadcast (CREATE PROJECTILE v)\n    end\nend\nif <(costume [number v]) = [47]> then\n    set [hp v] to [4]\n    forever\n        if <(ENEMY ONSCREEN?) = [1]> then\n            repeat (15)\n                switch costume to (hothead v)\n                wait (.02) seconds\n                switch costume to (sprhothead_1 v)\n                wait (.02) seconds\n            end\n            switch costume to (sprhothead_1 v)\n            wait (.05) seconds\n            next costume\n            wait (.05) seconds\n            next costume\n            set [proj direction v] to (direction)\n            set [proj x v] to ((Level_X) + (([sin v] of (direction) ) * (25)))\n            set [proj y v] to ((Level_Y) + (5))\n            set [projectile name v] to [fireball]\n            broadcast (CREATE PROJECTILE v)\n        end\n    end\nend\nif <(costume [number v]) = [40]> then\n    set [hp v] to [15]\n    switch costume to (sprhotdogteleport_0 v)\n    set [enemy_prop1 v] to (Level_Y)\n    change [level_y v] by (100)\n    wait until <(ENEMY ONSCREEN?) = [1]>\n    forever\n        set [y v] to [0]\n        repeat until <((Level_Y) + (-20)) < (Enemy_Prop1)>\n            if <([x position v] of [hitbox v]) < (x position)> then\n                point in direction (-90)\n            else\n                point in direction (90)\n            end\n            change [level_y v] by (y)\n            change [y v] by (-2)\n        end\n        set [level_y v] to (Enemy_Prop1)\n        repeat (2)\n            wait (.02) seconds\n            next costume\n        end\n        wait (.02) seconds\n        switch costume to (sprhotdog_1 v)\n        forever\n            if <(ENEMY ONSCREEN?) = [1]> then\n                switch costume to (hotdog v)\n                wait (.6) seconds\n                start sound [SE \[59\] v]\n                repeat (3)\n                    wait (.05) seconds\n                    next costume\n                end\n                repeat (4)\n                    wait (.05) seconds\n                    point towards (hitbox v)\n                    set [proj direction v] to (direction)\n                    set [proj x v] to ((Level_X) + (([sin v] of (direction) ) * (25)))\n                    set [proj y v] to ((Level_Y) + (-15))\n                    set [projectile name v] to [hotfire]\n                    broadcast (CREATE PROJECTILE v)\n                end\n                wait (.5) seconds\n            end\n        end\n    end\nend\nif <(costume [number v]) = [35]> then\n    set [hp v] to [1]\n    forever\n        repeat until <(Level_X) > (@EProp2)>\n            point in direction (90)\n            if <<([y position v] of [hitbox v]) > ((y position) + (-5))> and <([y position v] of [hitbox v]) < ((y position) + (25))>> then\n                change [level_x v] by (10)\n            else\n                change [level_x v] by (4)\n            end\n            if <<touching (mega man/protoman/bass v)?> or <touching (chargeshot v)?>> then\n                EnemyAct [3]\n            end\n        end\n        repeat until <(Level_X) < (@EProp1)>\n            point in direction (-90)\n            if <<([y position v] of [hitbox v]) > ((y position) + (-5))> and <([y position v] of [hitbox v]) < ((y position) + (25))>> then\n                change [level_x v] by (-10)\n            else\n                change [level_x v] by (-4)\n            end\n            if <<touching (mega man/protoman/bass v)?> or <touching (chargeshot v)?>> then\n                EnemyAct [3]\n            end\n        end\n    end\nend\nif <(costume [number v]) = [30]> then\n    point in direction (90)\n    set [hp v] to [2]\n    forever\n        wait until <<(distance to [hitbox v]) < [150]> and <(ENEMY ONSCREEN?) = [1]>>\n        switch costume to (bat v)\n        wait (0) seconds\n        switch costume to (bat2 v)\n        wait (.05) seconds\n        forever\n            if <(ENEMY ONSCREEN?) = [1]> then\n                repeat (4)\n                    switch costume to (bat3 v)\n                    point towards (hitbox v)\n                    change [level_x v] by (([sin v] of (direction) ) * (3))\n                    change [level_y v] by (([cos v] of (direction) ) * (3))\n                end\n                repeat (4)\n                    switch costume to (bat4 v)\n                    point towards (hitbox v)\n                    change [level_x v] by (([sin v] of (direction) ) * (3))\n                    change [level_y v] by (([cos v] of (direction) ) * (3))\n                end\n                repeat (4)\n                    switch costume to (bat5 v)\n                    point towards (hitbox v)\n                    change [level_x v] by (([sin v] of (direction) ) * (3))\n                    change [level_y v] by (([cos v] of (direction) ) * (3))\n                end\n                repeat (4)\n                    switch costume to (bat4 v)\n                    point towards (hitbox v)\n                    change [level_x v] by (([sin v] of (direction) ) * (3))\n                    change [level_y v] by (([cos v] of (direction) ) * (3))\n                end\n            end\n        end\n    end\nend\nif <(costume [number v]) = [27]> then\n    set [@enemy_timer v] to [0]\n    set [hp v] to [5]\n    set [enemy_prop1 v] to (Level_Y)\n    forever\n        if <(ENEMY ONSCREEN?) = [1]> then\n            if <(@EProp1) = [na]> then\n                EnemyAct [2]\n            else\n                switch costume to (mech v)\n                change [@enemy_timer v] by (1)\n            end\n            if <<(@Enemy_Timer) > [19]> and <(@Enemy_Timer) < [23]>> then\n                if <(@EProp1) = [na]> then\n                    EnemyAct [2]\n                else\n                    switch costume to (sprmm2sniperjoemech_1 v)\n                    change [@enemy_timer v] by (1)\n                end\n            end\n            if <(@Enemy_Timer) > [22]> then\n                if <(@EProp1) = [na]> then\n                    EnemyAct [2]\n                else\n                    switch costume to (sprmm2sniperjoemech_2 v)\n                    set [@enemy_timer v] to [0]\n                    set [y v] to [15]\n                    if <([x position v] of [hitbox v]) < (x position)> then\n                        point in direction (-90)\n                    else\n                        point in direction (90)\n                    end\n                    repeat (3)\n                        change [level_x v] by (([sin v] of (direction) ) * (10))\n                        change [level_y v] by (y)\n                        change [y v] by (-2)\n                        if <(Level_X) > (@EProp2)> then\n                            set [level_x v] to (@EProp2)\n                        end\n                        if <(Level_X) < (@EProp1)> then\n                            set [level_x v] to (@EProp1)\n                        end\n                    end\n                end\n            end\n            if <(y) > [0]> then\n                repeat until <<(@EProp1) = [na]> or <(Level_Y) < ((Enemy_Prop1) + (15))>>\n                    change [level_x v] by (([sin v] of (direction) ) * (10))\n                    change [level_y v] by (y)\n                    change [y v] by (-2)\n                    if <(Level_X) > (@EProp2)> then\n                        set [level_x v] to (@EProp2)\n                    end\n                    if <(Level_X) < (@EProp1)> then\n                        set [level_x v] to (@EProp1)\n                    end\n                end\n                if <(@EProp1) = [na]> then\n                    EnemyAct [2]\n                else\n                    set [y v] to [0]\n                    set [level_y v] to (Enemy_Prop1)\n                    start sound [Mega Man 5 SFX \(34\) v]\n                    point towards (hitbox v)\n                    set [proj direction v] to (direction)\n                    set [proj x v] to (Level_X)\n                    set [proj y v] to (Level_Y)\n                    set [projectile name v] to [bullet]\n                    broadcast (CREATE PROJECTILE v)\n                end\n            end\n        end\n    end\nend\nif <(costume [number v]) = [19]> then\nend\nif <(costume [number v]) = [15]> then\n    set [hp v] to [2]\n    forever\n        if <(ENEMY ONSCREEN?) = [1]> then\n            switch costume to (hmm v)\n            repeat (3)\n                wait (.05) seconds\n                next costume\n            end\n            set [proj direction v] to [90]\n            set [proj x v] to (Level_X)\n            set [proj y v] to (Level_Y)\n            set [projectile name v] to [hmmproj]\n            broadcast (CREATE PROJECTILE v)\n            switch costume to (hmm v)\n            wait (1) seconds\n        end\n    end\nend\n\nwhen I start as a clone\nwait (.05) seconds\nforever\n    wait until <<touching (hitbox v)?> and <(I_FRAMES) = [0]>>\n    broadcast (KNOCKBACK v)\n    if <<(costume [number v]) > [26]> and <(costume [number v]) < [30]>> then\n        change [health v] by (5)\n    else\n        change [health v] by (2)\n    end\n    broadcast (TAKE DMG v)\n    wait (1) seconds\nend\n\nwhen I start as a clone\nset [clone v] to [1]\nforever\n    set x to ((Level_X) - (Scroll X))\n    set y to ((Level_Y) - (Scroll Y))\n    if <<([abs v] of ((Level_X) - (Scroll X)) ) > [250]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [200]>> then\n        set [enemy onscreen? v] to [0]\n        hide\n    else\n        set [enemy onscreen? v] to [1]\n        show\n    end\nend\n\nwhen I start as a clone\nforever\n    wait until <<<<touching (mega man/protoman/bass v)?> and <touching color (#fae0c1)?>> and <not <touching (hitbox v)?>>> or <touching (chargeshot v)?>>\n    if <<(costume [number v]) > [34]> and <(costume [number v]) < [40]>> then\n        if <<touching (chargeshot v)?> and <(@Mega Man: Special Weapon) = [6]>> then\n            stop [other scripts in sprite v]\n            switch costume to (enemeexp1 v)\n            start sound [09 - EnemyDamage v]\n            set [brightness v] effect to (100)\n            wait (.05) seconds\n            clear graphic effects\n            wait (.05) seconds\n            repeat (4)\n                wait (0) seconds\n                set x to ((Level_X) - (Scroll X))\n                set y to ((Level_Y) - (Scroll Y))\n                next costume\n            end\n            wait (0) seconds\n            delete this clone\n        else\n            start sound [cling v]\n            set [ghost v] effect to (100)\n            wait (0) seconds\n            clear graphic effects\n            wait (.1) seconds\n        end\n    else\n        if <<(costume [number v]) = [64]> or <<<<<(costume [number v]) > [26]> and <(costume [number v]) < [30]>> and <not <<color (#ff7858) is touching (#fbe3c2)?> or <color (#ffffff) is touching (#fbe3c2)?>>>> and <not <<(@Mega Man: Special Weapon) = [6]> or <(@Mega Man: Special Weapon) = [4]>>>> or <<<(costume [number v]) > [22]> and <(costume [number v]) < [25]>> or <<(costume [number v]) = [25]> or <(costume [number v]) = [30]>>>>> then\n            start sound [cling v]\n            set [ghost v] effect to (100)\n            wait (0) seconds\n            clear graphic effects\n            wait (.1) seconds\n        else\n            if <touching (chargeshot v)?> then\n                if <(Chargeshot_type) = [1]> then\n                    change [hp v] by (-3)\n                else\n                    change [hp v] by (-5)\n                end\n            else\n                change [hp v] by (-1)\n            end\n            if <(HP) < [1]> then\n                if <<(costume [number v]) > [56]> and <(costume [number v]) < [60]>> then\n                    set [proj direction v] to (direction)\n                    set [proj x v] to (Level_X)\n                    set [proj y v] to (Level_Y)\n                    set [projectile name v] to [explo]\n                    broadcast (CREATE PROJECTILE v)\n                    wait (0) seconds\n                    set [proj direction v] to (direction)\n                    set [proj x v] to (Level_X)\n                    set [proj y v] to (Level_Y)\n                    set [projectile name v] to [spreadmine]\n                    broadcast (CREATE PROJECTILE v)\n                    delete this clone\n                else\n                    if <<(costume [number v]) > [26]> and <(costume [number v]) < [30]>> then\n                        set [@eprop1 v] to [na]\n                        set [hp v] to [3]\n                    else\n                        if <<(costume [number v]) > [39]> and <(costume [number v]) < [47]>> then\n                            stop [other scripts in sprite v]\n                            repeat (10)\n                                set [proj direction v] to [90]\n                                set [proj x v] to ((Level_X) + (pick random (-25) to (25)))\n                                set [proj y v] to ((Level_Y) + (pick random (-25) to (25)))\n                                set [projectile name v] to [explo]\n                                broadcast (CREATE PROJECTILE v)\n                                change [ghost v] effect by (5)\n                                change [brightness v] effect by (10)\n                                repeat (2)\n                                    set x to ((Level_X) - (Scroll X))\n                                    set y to ((Level_Y) - (Scroll Y))\n                                end\n                            end\n                            set [hpx v] to (Level_X)\n                            set [hpy v] to (Level_Y)\n                            set [projectile name v] to [health3]\n                            create clone of (hp drops v)\n                            delete this clone\n                        else\n                            if <<(costume [number v]) > [67]> and <(costume [number v]) < [71]>> then\n                                stop [other scripts in sprite v]\n                                start sound [09 - EnemyDamage v]\n                                switch costume to (enemeexp1 v)\n                                repeat (3)\n                                    switch costume to (dev4 v)\n                                    create clone of (_myself_ v)\n                                end\n                                switch costume to (enemeexp1 v)\n                                repeat (4)\n                                    wait (0) seconds\n                                    set x to ((Level_X) - (Scroll X))\n                                    set y to ((Level_Y) - (Scroll Y))\n                                    next costume\n                                end\n                                wait (0) seconds\n                                delete this clone\n                            else\n                                stop [other scripts in sprite v]\n                                start sound [09 - EnemyDamage v]\n                                switch costume to (enemeexp1 v)\n                                if <(pick random (1) to (2)) = [1]> then\n                                    set [hpx v] to (Level_X)\n                                    set [hpy v] to (Level_Y)\n                                    if <(pick random (1) to (10)) = [1]> then\n                                        set [projectile name v] to [1up]\n                                    else\n                                        if <(pick random (1) to (2)) = [1]> then\n                                            if <(pick random (1) to (4)) = [1]> then\n                                                set [projectile name v] to [wen3]\n                                            else\n                                                set [projectile name v] to [wen]\n                                            end\n                                        else\n                                            if <(pick random (1) to (4)) = [1]> then\n                                                set [projectile name v] to [health3]\n                                            else\n                                                set [projectile name v] to [health]\n                                            end\n                                        end\n                                    end\n                                    create clone of (hp drops v)\n                                end\n                                repeat (4)\n                                    wait (0) seconds\n                                    set x to ((Level_X) - (Scroll X))\n                                    set y to ((Level_Y) - (Scroll Y))\n                                    next costume\n                                end\n                                wait (0) seconds\n                                delete this clone\n                            end\n                        end\n                    end\n                end\n            else\n                start sound [09 - EnemyDamage v]\n                set [brightness v] effect to (100)\n                wait (.05) seconds\n                clear graphic effects\n                wait (.05) seconds\n            end\n        end\n    end\nend\n\ndefine findground\nif <touching (ground v)?> then\n    change [level_y v] by (.5)\nend\n\nwhen I start as a clone\nforever\n    if <touching (ground v)?> then\n        set [touch_floor_cooldown v] to [0]\n    else\n        change [touch_floor_cooldown v] by (1)\n    end\nend\n\nwhen I receive [teleportin v]\nif <(Checkpoint #) < [3]> then\n    if <[1] = [1]> then\n        delete this clone\n    end\n    Create Enemy [annoying] [1095] [-103] [1038] [1160]\n    Create Enemy [spreadmine] [1200] [115] [100] [300]\n    Create Enemy [spreadmine] [1200] [45] [100] [300]\n    Create Enemy [spreadmine] [2310] [150] [100] [300]\n    Create Enemy [spreadmine] [2310] [80] [100] [300]\n    Create Enemy [skor] [1950] [105] [-90] [0]\n    Create Enemy [dev] [2125] [-80] [100] [300]\n    Create Enemy [birdo] [2700] [100] [0] [5]\n    Create Enemy [birdo] [2700] [100] [1] [5]\n    Create Enemy [birdo] [3200] [100] [1] [5]\n    Create Enemy [birdo] [3500] [80] [0] [5]\n    Create Enemy [birdo] [3600] [80] [0] [5]\n    Create Enemy [birdo] [3700] [80] [0] [5]\n    Create Enemy [dev] [2950] [70] [100] [300]\n    Create Enemy [hotdog] [3860] [107] [100] [300]\n    Create Enemy [birdo] [4300] [130] [0] [5]\n    Create Enemy [birdo] [4300] [130] [1] [5]\n    Create Enemy [dev] [4975] [480] [100] [300]\n    Create Enemy [kaminari] [5050] [1020] [15] [300]\n    Create Enemy [kaminari] [5680] [1020] [12] [300]\n    Create Enemy [kaminari] [5545] [1104] [12] [300]\nend\n\ndefine EnemyAct (act)\nif <(act) = [3]> then\n    repeat (2)\n        start sound [SE \[100\] v]\n        switch costume to (annoying v)\n        repeat (4)\n            wait (.02) seconds\n            next costume\n        end\n        wait (.02) seconds\n    end\n    switch costume to (annoyingthin4 v)\n    wait (.02) seconds\n    switch costume to (annoying v)\n    wait (.4) seconds\nend\nif <(act) = [2]> then\n    switch costume to (enemeexp1 v)\n    start sound [09 - EnemyDamage v]\n    repeat (4)\n        next costume\n    end\n    switch costume to (sprmm2sniperjoe_0 v)\n    set [y v] to [0]\n    repeat until <(Level_Y) < ((Enemy_Prop1) + (-30))>\n        change [y v] by (-1)\n        change [level_y v] by (y)\n    end\n    set [level_y v] to ((Enemy_Prop1) + (-38))\n    forever\n        if <(ENEMY ONSCREEN?) = [1]> then\n            if <([x position v] of [hitbox v]) < (x position)> then\n                point in direction (-90)\n            else\n                point in direction (90)\n            end\n            switch costume to (sprmm2sniperjoe_0 v)\n            wait (pick random (1) to (2.5)) seconds\n            if <not <touching (mega man/protoman/bass v)?>> then\n                if <([x position v] of [hitbox v]) < (x position)> then\n                    point in direction (-90)\n                else\n                    point in direction (90)\n                end\n                switch costume to (sprmm2sniperjoe_1 v)\n            end\n        end\n    end\nend\nif <(act) = [1]> then\n    start sound [Mega Man 6 SRX \(32\) v]\n    switch costume to (sprbyouz_3 v)\n    repeat (2)\n        wait (.05) seconds\n        next costume\n    end\n    wait until <not <<key (space v) pressed?> or <mouse down?>>>\n    wait (1) seconds\n    if <<key (space v) pressed?> or <mouse down?>> then\n        EnemyAct [1]\n    end\n    switch costume to (sprbyouz_3 v)\n    wait (.05) seconds\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [57]> then\n    forever\n        switch costume to (spreadmine v)\n        repeat (2)\n            wait (0) seconds\n            next costume\n        end\n        wait (0) seconds\n    end\nend\nif <(costume [number v]) = [65]> then\n    forever\n        switch costume to (birdo v)\n        repeat (2)\n            wait (0) seconds\n            next costume\n        end\n        wait (0) seconds\n    end\nend\nif <(costume [number v]) = [74]> then\n    forever\n        if <(x) = [1]> then\n            switch costume to (kaminari v)\n            repeat (3)\n                wait (.05) seconds\n                next costume\n            end\n            wait (.05) seconds\n            switch costume to (kaminari v)\n        end\n    end\nend\n\nset [using special weapon v] to [0]\nset [@mega man: special weapon v] to [1]\n\nrepeat (10)\n\nwhen I receive [@load new set of enemies v]\nif <[1] = [1]> then\n    delete this clone\nend\nCreate Enemy [hotdog] [6345] [810] [100] [300]\nCreate Enemy [birdo] [7780] [860] [0] [5]\nCreate Enemy [birdo] [7780] [860] [1] [5]\nCreate Enemy [kaminari] [7637] [994] [20] [300]\nCreate Enemy [kaminari] [7959] [1040] [20] [300]\nCreate Enemy [birdo] [8600] [860] [0] [5]\nCreate Enemy [birdo] [8600] [860] [1] [5]\nCreate Enemy [kaminari] [8291] [969] [20] [300]\nCreate Enemy [kaminari] [8655] [990] [12] [300]\nCreate Enemy [skor] [9300] [876] [12] [300]\n\nwhen I receive [delete all enemies v]\ndelete this clone\n\nbroadcast (Delete All Enemies v)\n\nwhen I receive [@load final wave of enemies v]\nif <[1] = [1]> then\n    delete this clone\nend\nCreate Enemy [dev] [9800] [1270] [100] [300]\nCreate Enemy [annoying] [9500] [2200] [9488] [9570]\nCreate Enemy [skor] [9680] [3260] [12] [300]\nCreate Enemy [dev] [9550] [3200] [100] [300]\nif <not <(Checkpoint #) = [4]>> then\n    Create Enemy [kaminari] [9670] [3690] [12] [300]\nend\nCreate Enemy [dev] [9600] [1792] [100] [300]\nCreate Enemy [dev] [9734] [1835] [100] [300]\nCreate Enemy [spreadmine] [10434] [4048] [100] [300]\nCreate Enemy [spreadmine] [10434] [4016] [100] [300]\nCreate Enemy [spreadmine] [10434] [3984] [100] [300]\nCreate Enemy [spreadmine] [10434] [4080] [100] [300]\nCreate Enemy [birdo] [10700] [4032] [0] [5]\nCreate Enemy [birdo] [10700] [4032] [1] [5]\nCreate Enemy [dev] [10908] [4032] [100] [300]\nCreate Enemy [dev] [11170] [4000] [100] [300]\n\nwhen I receive [bosscutscene v]\ndelete this clone\n\n@Projectiles\n\nwhen flag clicked\nset [clone v] to [0]\nset size to (200) %\nhide\n\nwhen I receive [create projectile v]\nif <(clone) = [0]> then\n    if <(PROJECTILE NAME) = [spreadmine]> then\n        Spreadmine explosion\n    else\n        clear graphic effects\n        switch costume to (PROJECTILE NAME)\n        set [level_x v] to (PROJ X)\n        set [level_y v] to (PROJ Y)\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\nset [clone v] to [1]\nshow\n\nwhen I start as a clone\nset [clone v] to [1]\nif <not <(PROJECTILE NAME) = [spreadmine]>> then\n    point in direction (PROJ DIRECTION)\nend\ngo to [front v] layer\nshow\nif <(costume [number v]) = [40]> then\n    start sound (pick random (22) to (24))\n    repeat (35)\n        set [ghost v] effect to (pick random (0) to (50))\n    end\n    delete this clone\nend\nif <(costume [number v]) = [36]> then\n    set [x v] to [0]\n    repeat (15)\n        change [x v] by (2)\n        change [level_x v] by (([sin v] of (direction) ) * (x))\n    end\n    delete this clone\nend\nif <(costume [number v]) = [30]> then\n    start sound [sfxBlockDevilLaser v]\n    set [x v] to [0]\n    repeat (10)\n        change [x v] by (-1)\n        change [level_x v] by (([sin v] of (direction) ) * (x))\n    end\n    repeat (10)\n        change [x v] by (1)\n        change [level_x v] by (([sin v] of (direction) ) * (x))\n    end\n    delete this clone\nend\nif <(letter (1) of (PROJECTILE NAME)) = [x]> then\n    set [x v] to [0]\n    set [y v] to (PROJECTILE NAME)\n    repeat until <(x) > (join (join (letter (2) of (y)) (letter (3) of (y))) (letter (4) of (y)))>\n        change [x v] by (1)\n        change [level_x v] by ((x) * (.9))\n    end\n    delete this clone\nelse\n    if <<(costume [number v]) = [21]> or <(PROJECTILE NAME) = [skorprok2]>> then\n        start sound [shovel_upgrade_groundspark v]\n        set [y v] to [0]\n        repeat (2)\n            set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n            set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n            change [y v] by (1)\n            point towards (hitbox v)\n        end\n        if <(PROJECTILE NAME) = [skorprok2]> then\n            repeat until <(distance to [hitbox v]) < [100]>\n                set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n                set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n                change [y v] by (1)\n                point towards (hitbox v)\n            end\n            set [y v] to ((([sin v] of (Level_X) ) * (80)) - (([cos v] of (Level_Y) ) * (80)))\n            repeat (15)\n                change [y v] by (-15)\n                set [level_x v] to (((Scroll X) + (([x position v] of [hitbox v]) + (0))) + (([sin v] of (y) ) * (80)))\n                set [level_y v] to (((Scroll Y) + (([y position v] of [hitbox v]) + (0))) + (([cos v] of (y) ) * (80)))\n            end\n            repeat (3)\n                change [y v] by (-15)\n                set [brightness v] effect to (((round (y)) mod (3)) * (100))\n                point towards (hitbox v)\n                set [level_x v] to (((Scroll X) + (([x position v] of [hitbox v]) + (0))) + (([sin v] of (y) ) * (80)))\n                set [level_y v] to (((Scroll Y) + (([y position v] of [hitbox v]) + (0))) + (([cos v] of (y) ) * (80)))\n            end\n            repeat (3)\n                change [y v] by (-5)\n                set [brightness v] effect to (((round (y)) mod (3)) * (100))\n                point towards (hitbox v)\n                set [level_x v] to (((Scroll X) + (([x position v] of [hitbox v]) + (0))) + (([sin v] of (y) ) * (80)))\n                set [level_y v] to (((Scroll Y) + (([y position v] of [hitbox v]) + (0))) + (([cos v] of (y) ) * (80)))\n            end\n            start sound [shovel_upgrade_charge_slash v]\n            set [brightness v] effect to (0)\n            set [y v] to [0]\n            repeat (25)\n                change [level_y v] by (([cos v] of (direction) ) * (y))\n                change [level_x v] by (([sin v] of (direction) ) * (y))\n                change [y v] by (1)\n            end\n            delete this clone\n        else\n            repeat until <(distance to [hitbox v]) < [100]>\n                set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n                set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n                change [y v] by (1)\n                point towards (hitbox v)\n            end\n            set [y v] to ((([sin v] of (Level_X) ) * (80)) - (([cos v] of (Level_Y) ) * (80)))\n            repeat (15)\n                change [y v] by (15)\n                set [level_x v] to (((Scroll X) + (([x position v] of [hitbox v]) + (0))) + (([sin v] of (y) ) * (80)))\n                set [level_y v] to (((Scroll Y) + (([y position v] of [hitbox v]) + (0))) + (([cos v] of (y) ) * (80)))\n            end\n            repeat (3)\n                change [y v] by (10)\n                set [brightness v] effect to (((round (y)) mod (3)) * (100))\n                point towards (hitbox v)\n                set [level_x v] to (((Scroll X) + (([x position v] of [hitbox v]) + (0))) + (([sin v] of (y) ) * (80)))\n                set [level_y v] to (((Scroll Y) + (([y position v] of [hitbox v]) + (0))) + (([cos v] of (y) ) * (80)))\n            end\n            repeat (8)\n                change [y v] by (5)\n                set [brightness v] effect to (((round (y)) mod (3)) * (100))\n                point towards (hitbox v)\n                set [level_x v] to (((Scroll X) + (([x position v] of [hitbox v]) + (0))) + (([sin v] of (y) ) * (80)))\n                set [level_y v] to (((Scroll Y) + (([y position v] of [hitbox v]) + (0))) + (([cos v] of (y) ) * (80)))\n            end\n            start sound [shovel_upgrade_charge_slash v]\n            set [brightness v] effect to (0)\n            set [y v] to [0]\n            repeat (25)\n                change [level_y v] by (([cos v] of (direction) ) * (y))\n                change [level_x v] by (([sin v] of (direction) ) * (y))\n                change [y v] by (1)\n            end\n            delete this clone\n        end\n    end\n    if <(costume [number v]) = [3]> then\n        start sound [SE \[83\] v]\n        switch costume to (explmk1 v)\n        wait (0) seconds\n        next costume\n        wait (0) seconds\n        switch costume to (explo v)\n        repeat (4)\n            wait (0) seconds\n            next costume\n        end\n        wait (0) seconds\n        delete this clone\n    end\n    if <(costume [number v]) = [2]> then\n        start sound [SE \[6\] v]\n        set rotation style [left-right v]\n        set [y v] to ((([sin v] of ([y position v] of [hitbox v]) ) * (-100)) + (((distance to [hitbox v]) / (2)) * (1.5)))\n        repeat (50)\n            change [y v] by (-1.5)\n            change [level_y v] by (y)\n            change [level_x v] by (([sin v] of (direction) ) * (10))\n        end\n        delete this clone\n    end\n    if <(costume [number v]) = [19]> then\n        start sound [SE \[67\] v]\n        set rotation style [left-right v]\n        set [y v] to ((distance to [hitbox v]) * (.17))\n        repeat (50)\n            change [y v] by (-2)\n            change [level_y v] by (y)\n            change [level_x v] by (([sin v] of (direction) ) * (10))\n        end\n        delete this clone\n    end\n    if <(costume [number v]) = [17]> then\n        set rotation style [left-right v]\n        set [y v] to ((([sqrt v] of (((distance to [hitbox v]) * (.15)) * ((distance to [hitbox v]) * (.15))) ) * (-1)) + ((((([y position v] of [hitbox v]) - (y position)) * (-.1)) + ((([x position v] of [hitbox v]) - (x position)) * (-.1))) + (0)))\n        repeat (50)\n            change [y v] by (2)\n            change [level_y v] by (y)\n            change [level_x v] by (([sin v] of (direction) ) * (15))\n        end\n        delete this clone\n    end\n    if <(costume [number v]) = [10]> then\n        set rotation style [left-right v]\n        set [y v] to [15]\n        repeat (2)\n            point towards (hitbox v)\n            turn right (pick random (-35) to (35)) degrees\n            change [y v] by (-2)\n            change [level_y v] by (y)\n            change [level_x v] by (([sin v] of (direction) ) * (8))\n        end\n        repeat until <touching (ground v)?>\n            change [y v] by (-1)\n            change [level_y v] by (y)\n            change [level_x v] by (([sin v] of (direction) ) * (4))\n        end\n        change [level_y v] by (2)\n        repeat (10)\n            if <touching (ground v)?> then\n                change [level_y v] by (3)\n            end\n        end\n        repeat (5)\n            set [ghost v] effect to (100)\n            wait (0) seconds\n            set [ghost v] effect to (0)\n            wait (0) seconds\n        end\n        delete this clone\n    end\n    if <(costume [number v]) = [1]> then\n        start sound [SE \[6\] v]\n        set rotation style [left-right v]\n        repeat until <touching (_edge_ v)?>\n            set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (15)))\n            set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (15)))\n        end\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nforever\n    set x to ((Level_X) - (Scroll X))\n    set y to ((Level_Y) - (Scroll Y))\n    if <<([abs v] of ((Level_X) - (Scroll X)) ) > [300]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [200]>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I start as a clone\nset [internal timer v] to [0]\nrepeat until <(internal timer) > [1]>\n    wait (3) seconds\n    change [internal timer v] by (1)\nend\ndelete this clone\n\nwhen I receive [teleportin v]\ndelete this clone\n\nwhen I receive [bossdie v]\ndelete this clone\n\nwhen I receive [die v]\ndelete this clone\n\nwhen I receive [bossdie v]\ndelete this clone\n\nwhen I start as a clone\nif <(PROJECTILE NAME) = [basslaser]> then\n    forever\n        if <touching (hitbox v)?> then\n            if <<(INVINCIBILITY) = [0]> and <(HEALTH) < [15]>> then\n                change [health v] by (3)\n                broadcast (TAKE DMG v)\n                broadcast (KNOCKBACK v)\n            end\n        end\n    end\nelse\n    forever\n        if <touching (hitbox v)?> then\n            if <<(INVINCIBILITY) = [0]> and <(HEALTH) < [15]>> then\n                change [health v] by (1)\n                broadcast (TAKE DMG v)\n                broadcast (KNOCKBACK v)\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nset size to (200) %\nif <(costume [number v]) = [36]> then\n    forever\n        switch costume to (commx v)\n        repeat (3)\n            wait (.05) seconds\n            next costume\n        end\n    end\nend\nif <(costume [number v]) = [30]> then\n    switch costume to (basslaser v)\n    repeat (4)\n        wait (.1) seconds\n        next costume\n    end\nend\nif <(costume [number v]) = [10]> then\n    forever\n        switch costume to (hmmproj v)\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n    end\nend\nif <(costume [number v]) = [17]> then\n    forever\n        switch costume to (hotfire v)\n        wait (0) seconds\n        next costume\n        wait (0) seconds\n    end\nend\nif <(costume [number v]) = [19]> then\n    forever\n        switch costume to (fireball v)\n        wait (0) seconds\n        next costume\n        wait (0) seconds\n    end\nend\nif <<(costume [number v]) = [21]> or <(PROJECTILE NAME) = [skorprok2]>> then\n    forever\n        switch costume to (skorprok v)\n        wait (0) seconds\n        repeat (3)\n            next costume\n            wait (0) seconds\n        end\n    end\nend\nif <(costume [number v]) = [40]> then\n    forever\n        switch costume to (lightning v)\n        point in direction (pick random (-90) to (90))\n        wait (0) seconds\n        point in direction (pick random (-90) to (90))\n        next costume\n        wait (0) seconds\n    end\nend\n\nwhen I receive [flash v]\nstop [other scripts in sprite v]\nset [ghost v] effect to (100)\nwait (pick random (0) to (.1)) seconds\nstart sound [SE \[67\] v]\nset [hpx v] to (Level_X)\nset [hpy v] to (Level_Y)\nif <(pick random (1) to (4)) = [1]> then\n    set [projectile name v] to [health3]\nelse\n    set [projectile name v] to [health]\nend\ncreate clone of (hp drops v)\nset [ghost v] effect to (0)\nswitch costume to (enemeexp1 v)\nrepeat (5)\n    set x to ((Level_X) - (Scroll X))\n    set y to ((Level_Y) - (Scroll Y))\n    next costume\nend\ndelete this clone\n\ndefine Spreadmine explosion\npoint in direction (0)\nswitch costume to (bullet v)\nset [level_x v] to (PROJ X)\nset [level_y v] to (PROJ Y)\ncreate clone of (_myself_ v)\nturn right (45) degrees\ncreate clone of (_myself_ v)\nturn right (45) degrees\ncreate clone of (_myself_ v)\nturn right (45) degrees\ncreate clone of (_myself_ v)\nturn right (45) degrees\ncreate clone of (_myself_ v)\nturn right (45) degrees\ncreate clone of (_myself_ v)\nturn right (45) degrees\ncreate clone of (_myself_ v)\nturn right (45) degrees\ncreate clone of (_myself_ v)\nturn right (45) degrees\n\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(letter (1) of (PROJECTILE NAME)) = [x]> then\n    forever\n        switch costume to (thunder1 v)\n        wait (0) seconds\n        switch costume to (thunder2 v)\n        wait (0) seconds\n    end\nend\n\nwhen I start as a clone\nwait (4) seconds\ndelete this clone\n\n@HP drops\n\nwhen flag clicked\nclear graphic effects\nhide\n\nwhen I start as a clone\npoint in direction (90)\nset [level_x v] to (HPX)\nset [level_y v] to (HPY)\nswitch costume to (PROJECTILE NAME)\ngo to [front v] layer\nshow\nif <(costume [number v]) = [9]> then\n    switch costume to (health v)\nend\nif <(costume [number v]) = [1]> then\n    forever\n        switch costume to (health v)\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n    end\nend\nif <(costume [number v]) = [3]> then\n    forever\n        switch costume to (health3 v)\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n    end\nend\nif <(costume [number v]) = [6]> then\n    forever\n        switch costume to (wen v)\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n    end\nend\nif <(costume [number v]) = [8]> then\n    forever\n        switch costume to (wen3 v)\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n    end\nend\n\nwhen I start as a clone\nwait (5) seconds\nrepeat (3)\n    clear graphic effects\n    wait (.1) seconds\n    set [ghost v] effect to (100)\n    wait (.1) seconds\nend\ndelete this clone\n\nwhen I start as a clone\nforever\n    set x to ((Level_X) - (Scroll X))\n    set y to ((Level_Y) - (Scroll Y))\n    if <<([abs v] of ((Level_X) - (Scroll X)) ) > [250]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [200]>> then\n        hide\n        delete this clone\n    else\n        show\n    end\nend\n\nwhen I start as a clone\nclear graphic effects\nwait (.1) seconds\nwait until <touching (hitbox v)?>\nif <(costume [number v]) < [3]> then\n    set [ghost v] effect to (100)\n    repeat (1)\n        if <(HEALTH) > [1]> then\n            broadcast (Heal v)\n            change [health v] by (-1)\n        end\n    end\nelse\n    if <(costume [number v]) < [5]> then\n        set [ghost v] effect to (100)\n        repeat (3)\n            if <(HEALTH) > [1]> then\n                broadcast (Heal v)\n                change [health v] by (-1)\n            end\n        end\n    else\n        if <(costume [number v]) < [6]> then\n            set [ghost v] effect to (100)\n            if <(LIVES) < [8]> then\n                change [lives v] by (1)\n            end\n            start sound [25 - 1up v]\n        else\n            if <(costume [number v]) < [8]> then\n                set [ghost v] effect to (100)\n                repeat (4)\n                    if <<not <(@Mega Man: Special Weapon) = [1]>> and <(item ((@Mega Man: Special Weapon) + (0)) of [special weapon energy v]) > [1]>> then\n                        broadcast (Spec_Weap_Replenish v)\n                        replace item ((@Mega Man: Special Weapon) + (0)) of [special weapon energy v] with ((item ((@Mega Man: Special Weapon) + (0)) of [special weapon energy v]) + (-1))\n                    end\n                end\n            else\n                set [ghost v] effect to (100)\n                repeat (10)\n                    if <<not <(@Mega Man: Special Weapon) = [1]>> and <(item ((@Mega Man: Special Weapon) + (0)) of [special weapon energy v]) > [1]>> then\n                        broadcast (Spec_Weap_Replenish v)\n                        replace item ((@Mega Man: Special Weapon) + (0)) of [special weapon energy v] with ((item ((@Mega Man: Special Weapon) + (0)) of [special weapon energy v]) + (-1))\n                    end\n                end\n            end\n        end\n    end\nend\ndelete this clone\n\nwhen I start as a clone\nset [y v] to [0]\nrepeat until <<touching (ground v)?> or <touching (misc objects v)?>>\n    change [level_y v] by (y)\n    change [y v] by (-2)\nend\nrepeat until <<not <touching (ground v)?>> and <not <touching (misc objects v)?>>>\n    change [level_y v] by (3)\nend\n\nwhen I start as a clone\nwait until <(HEALTH) > [14]>\ndelete this clone\n\n@SpcBar1\n\nwhen flag clicked\nhide\nrepeat (25)\n    go to [front v] layer\nend\n\nwhen I receive [teleportin v]\npoint in direction (90)\ngo to x: (-175) y: (90)\nclear graphic effects\nset size to (250) %\nforever\n    switch costume to (item (@Mega Man: Special Weapon) of [special weapon energy v])\nend\n\nwhen I receive [stage intro v]\nhide\n\nwhen I receive [teleportin v]\nrepeat (50)\n    go to [front v] layer\nend\nforever\n    if <(@Mega Man: Special Weapon) > [0]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\ndelete all of [special weapon energy v]\nrepeat (9)\n    add [1] to [special weapon energy v]\nend\n\nwhen I receive [die v]\nhide\n\nwhen flag clicked\nforever\n    if <(@Mega Man: Special Weapon) = [0]> then\n        set [color v] effect to (0)\n    end\n    if <(@Mega Man: Special Weapon) = [1]> then\n        set [color v] effect to (80)\n        set [brightness v] effect to (0)\n    end\n    if <(@Mega Man: Special Weapon) = [2]> then\n        set [color v] effect to (150)\n        set [brightness v] effect to (-20)\n    end\n    if <(@Mega Man: Special Weapon) = [3]> then\n        set [color v] effect to (4)\n        set [brightness v] effect to (0)\n    end\n    if <(@Mega Man: Special Weapon) = [4]> then\n        set [color v] effect to (70)\n        set [brightness v] effect to (15)\n    end\n    if <(@Mega Man: Special Weapon) = [5]> then\n        set [color v] effect to (140)\n        set [brightness v] effect to (-25)\n    end\n    if <(@Mega Man: Special Weapon) = [6]> then\n        set [color v] effect to (90)\n        set [brightness v] effect to (15)\n    end\n    if <(@Mega Man: Special Weapon) = [7]> then\n        set [color v] effect to (25)\n        set [brightness v] effect to (15)\n    end\n    if <(@Mega Man: Special Weapon) = [8]> then\n        set [color v] effect to (100)\n        set [brightness v] effect to (-5)\n    end\n    if <(@Mega Man: Special Weapon) = [9]> then\n        set [color v] effect to (80)\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen I receive [spec_weap_replenish v]\nstart sound [Mega Man 5 SFX \(16\) v]\n\nwhen I receive [@load new set of enemies v]\nrepeat (20)\n    go to [front v] layer\nend\n\n@SpcBar2\n\nwhen flag clicked\nhide\nrepeat (50)\n    go to [front v] layer\nend\n\nwhen I receive [teleportin v]\npoint in direction (90)\ngo to x: (-175) y: (90)\nclear graphic effects\nset size to (250) %\nforever\n    switch costume to (item (@Mega Man: Special Weapon) of [special weapon energy v])\nend\n\nwhen I receive [stage intro v]\nhide\n\nwhen I receive [teleportin v]\nrepeat (50)\n    go to [front v] layer\nend\nforever\n    if <(@Mega Man: Special Weapon) > [0]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [die v]\nhide\n\nwhen flag clicked\nforever\n    if <(@Mega Man: Special Weapon) = [0]> then\n        set [color v] effect to (0)\n    end\n    if <<(@Mega Man: Special Weapon) = [1]> or <(@Mega Man: Special Weapon) = [3]>> then\n        set [brightness v] effect to (100)\n    end\n    if <(@Mega Man: Special Weapon) = [2]> then\n        set [color v] effect to (-25)\n        set [brightness v] effect to (70)\n    end\n    if <(@Mega Man: Special Weapon) = [4]> then\n        set [color v] effect to (70)\n        set [brightness v] effect to (44)\n    end\n    if <(@Mega Man: Special Weapon) = [5]> then\n        set [color v] effect to (1)\n        set [brightness v] effect to (80)\n    end\n    if <(@Mega Man: Special Weapon) = [6]> then\n        set [color v] effect to (110)\n        set [brightness v] effect to (55)\n    end\n    if <(@Mega Man: Special Weapon) = [7]> then\n        set [color v] effect to (2)\n        set [brightness v] effect to (75)\n    end\n    if <(@Mega Man: Special Weapon) = [8]> then\n        set [color v] effect to (110)\n        set [brightness v] effect to (50)\n    end\n    if <(@Mega Man: Special Weapon) = [9]> then\n        set [color v] effect to (105)\n        set [brightness v] effect to (35)\n    end\nend\n\nwhen I receive [@load final wave of enemies v]\nrepeat (20)\n    go to [front v] layer\nend\n\n@Transition\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [flashbang v]\nswitch costume to (costume1 v)\nclear graphic effects\nset [brightness v] effect to (100)\nset [ghost v] effect to (50)\ngo to [front v] layer\nshow\nrepeat (4)\n    set [ghost v] effect to (50)\n    wait (.02) seconds\n    set [ghost v] effect to (67)\n    wait (.02) seconds\nend\nhide\n\nwhen I receive [boss fight v]\nswitch costume to (costume1 v)\nclear graphic effects\nset [brightness v] effect to (100)\nset [ghost v] effect to (50)\ngo to [front v] layer\nshow\nrepeat (4)\n    set [ghost v] effect to (50)\n    wait (.02) seconds\n    set [ghost v] effect to (67)\n    wait (.02) seconds\nend\nset [ghost v] effect to (100)\nbroadcast (Bass Appear v)\nrepeat (3)\n    go to [front v] layer\n    change [ghost v] effect by (-5)\nend\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (-25)\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [stuncheck v]\nswitch costume to (costume1 v)\nclear graphic effects\nset [brightness v] effect to (100)\nset [ghost v] effect to (0)\ngo to [front v] layer\nshow\nwait (.02) seconds\nset [ghost v] effect to (50)\nwait (0) seconds\nset [ghost v] effect to (35)\nwait (0) seconds\nhide\n\nwhen I receive [show instructions v]\nclear graphic effects\nswitch costume to (costume2 v)\nset [brightness v] effect to (0)\nset [ghost v] effect to (100)\ngo to [front v] layer\nshow\nrepeat (8)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [hide instructions v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nclear graphic effects\nswitch costume to (costume1 v)\n\nwhen I receive [menu start v]\nwait (.4) seconds\nclear graphic effects\nswitch costume to (costume1 v)\nset [brightness v] effect to (0)\nset [ghost v] effect to (100)\ngo to [front v] layer\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\n    wait (.05) seconds\nend\n\nwhen I receive [transition fade out v]\nclear graphic effects\nswitch costume to (costume1 v)\nset [brightness v] effect to (0)\nset [ghost v] effect to (100)\ngo to [front v] layer\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\n    wait (.05) seconds\nend\nwait (1) seconds\nbroadcast (SetUp v)\nbroadcast (READY v)\nbroadcast (Teleportin v)\ngo to [front v] layer\nshow\nrepeat (10)\n    go to [front v] layer\n    set [ghost v] effect to (0)\nend\nrepeat (10)\n    wait (.05) seconds\n    go to [front v] layer\n    change [ghost v] effect by (10)\nend\n\n@Sprite1\n\nwhen flag clicked\nset rotation style [left-right v]\nhide\n\nwhen I receive [fire effect v]\npoint in direction ([direction v] of [mega man/protoman/bass v])\ngo to (hitbox v)\nmove (35) steps\nif <(Collide with ladder) = [1]> then\n    change y by (0)\nelse\n    change y by (-8)\nend\ngo to [front v] layer\nshow\nswitch costume to (enemeexp1 v)\nrepeat (4)\n    next costume\nend\nhide\nwait until <not <key (space v) pressed?>>\n\n@foreground\n\nwhen I receive [setup v]\ndelete this clone\n\nwhen I start as a clone\nset [active v] to [1]\nset [clone v] to [1]\ngo to [front v] layer\ngo [backward v] (25) layers\nforever\n    set x to ((Level_X) - (Scroll X))\n    set y to ((Level_Y) - (Scroll Y))\n    if <<([abs v] of ((Level_X) - (Scroll X)) ) > [250]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [500]>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [setup v]\nhide\nclear graphic effects\ngo to x: (0) y: (0)\nset [level_x v] to [0]\nswitch costume to (r1 v)\nif <[1] = [1]> then\n    delete this clone\nend\nCreate\n\ndefine Create\nclear graphic effects\nset size to (200) %\nset [level_y v] to [0]\nset [level_x v] to [955]\nswitch costume to (r1 v)\ncreate clone of (_myself_ v)\nset [level_y v] to [0]\nset [level_x v] to [4370]\nswitch costume to (r1 v)\ncreate clone of (_myself_ v)\nset [level_y v] to [0]\nset [level_x v] to [4550]\nswitch costume to (r1 v)\ncreate clone of (_myself_ v)\nset [level_y v] to [-130]\nset [level_x v] to [2200]\nswitch costume to (1up v)\ncreate clone of (_myself_ v)\nset [level_y v] to [94]\nset [level_x v] to [410]\nswitch costume to (1up v)\ncreate clone of (_myself_ v)\nset [level_y v] to [896]\nset [level_x v] to [6655]\nswitch costume to (r1 v)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nhide\n\nwhen I receive [blink v]\nif <(username) = [legobuzz12]> then\n    delete this clone\nend\n\nbroadcast (blink v)\n\nwhen flag clicked\nset [clone v] to [0]\n\nbroadcast (blink v)\n\nwhen I start as a clone\nif <(costume [number v]) = [2]> then\n    wait (1) seconds\n    wait until <touching (hitbox v)?>\n    change [lives v] by (1)\n    start sound [25 - 1up v]\n    delete this clone\nend\n\n@boss door\n\nwhen I start as a clone\ngo to [front v] layer\nforever\n    set [ghost v] effect to (0)\n    set x to ((Level_X) - (Scroll X))\n    set y to ((Level_Y) - (Scroll Y))\n    if <<([abs v] of ((Level_X) - (Scroll X)) ) > [265]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [300]>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [ready v]\nhide\nclear graphic effects\ngo to x: (0) y: (0)\nset [level_x v] to [0]\nswitch costume to (bossdoor1 v)\nif <[1] = [1]> then\n    delete this clone\nend\nCreate\n\ndefine Create\nif <(STAGE #) = [4]> then\n    switch costume to (bossdoortall v)\n    set size to (200) %\n    set [level_y v] to [4032]\n    set [level_x v] to [11425]\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nhide\n\nset [scroll x min v] to [0]\n\nwhen I receive [blink v]\nif <(username) = [legobuzz12]> then\n    delete this clone\nend\n\nwhen I receive [stage select v]\nhide\ndelete this clone\n\nbroadcast (blink v)\n\nwhen I start as a clone\nif <(STAGE #) = [4]> then\n    if <(Level_X) = [11425]> then\n        wait until <touching (hitbox v)?>\n        start sound [SE \[16\]2 v]\n        set [scroll x max v] to (Scroll X Min)\n        broadcast (Bossgate Transition Right v)\n        switch costume to (bossdoortall v)\n        repeat (6)\n            wait (.05) seconds\n            next costume\n        end\n        wait (.5) seconds\n        repeat (6)\n            wait (.05) seconds\n            switch costume to ((costume [number v]) + (-1))\n        end\n        wait (1) seconds\n        broadcast (Bosscutscene v)\n    end\nend\n\n@Basswings\n\nwhen I receive [boss fight v]\nrepeat (7)\n    clear graphic effects\n    set [x# v] to [1]\n    create clone of (_myself_ v)\n    wait (0) seconds\nend\n\nwhen flag clicked\nset [clone v] to [0]\nset rotation style [left-right v]\nhide\n\nwhen I start as a clone\nset [clone v] to [1]\ngo to [front v] layer\nshow\nif <(X#) = [1]> then\n    set y to (-90)\n    start sound (pick random (1) to (3))\n    repeat (10)\n        set [ghost v] effect to (pick random (-90) to (90))\n        point in direction (pick random (-90) to (90))\n        switch costume to (lightning2 v)\n        wait (0) seconds\n        switch costume to (lightning1 v)\n        set [ghost v] effect to (pick random (-90) to (90))\n        point in direction (pick random (-90) to (90))\n        wait (0) seconds\n    end\n    delete this clone\nend\nif <(X#) = [2]> then\n    forever\n        set [ghost v] effect to (pick random (-90) to (90))\n        point in direction (pick random (-90) to (90))\n        switch costume to (basslaser v)\n        wait (0) seconds\n        set [ghost v] effect to (pick random (-90) to (90))\n        point in direction (pick random (-90) to (90))\n        wait (0) seconds\n    end\nend\nif <(X#) = [3]> then\n    set [ghost v] effect to (100)\n    go to x: (a) y: (-100)\n    repeat (4)\n        start sound [mirror_warning v]\n        change [ghost v] effect by (-25)\n    end\n    wait (1) seconds\n    set [proj direction v] to [-90]\n    set [proj x v] to ((Scroll X) + (x position))\n    set [proj y v] to ((Scroll Y) + (-90))\n    set [projectile name v] to [lightning]\n    broadcast (CREATE PROJECTILE v)\n    repeat (4)\n        change [ghost v] effect by (25)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nset [x v] to [0]\nif <(X#) = [1]> then\n    forever\n        set x to ((150) + (([sin v] of (X) ) * (55)))\n        change [x v] by (15)\n    end\nend\nif <(X#) = [2]> then\n    go to x: (([x position v] of [boss v]) + (([sin v] of (PROJ DIRECTION) ) * (170))) y: (-88)\n    repeat (10)\n        if <(PROJ DIRECTION) = [90]> then\n            change x by (X)\n            change [x v] by (-3.5)\n        else\n            change x by (X)\n            change [x v] by (3.5)\n        end\n    end\n    repeat (10)\n        if <(PROJ DIRECTION) = [90]> then\n            change x by (X)\n            change [x v] by (3.5)\n        else\n            change x by (X)\n            change [x v] by (-3.5)\n        end\n    end\n    delete this clone\nend\nif <(X#) = [3]> then\n    forever\n        switch costume to (costume1 v)\n        wait (0) seconds\n        switch costume to (costume2 v)\n        wait (0) seconds\n    end\nend\n\nwhen I receive [battle begin v]\ngo to [back v] layer\nswitch costume to (wings1 v)\nset [ghost v] effect to (100)\nset [brightness v] effect to (100)\nset rotation style [left-right v]\ngo to x: (([x position v] of [boss v]) + (([sin v] of ([direction v] of [boss v]) ) * (-10))) y: ([y position v] of [boss v])\nshow\nrepeat (10)\n    change [ghost v] effect by (-15)\nend\nrepeat (4)\n    change [brightness v] effect by (-25)\nend\nforever\n    point in direction ([direction v] of [boss v])\n    go to x: (([x position v] of [boss v]) + (([sin v] of ([direction v] of [boss v]) ) * (-5))) y: ([y position v] of [boss v])\n    if <<([costume # v] of [boss v]) > [8]> and <([costume # v] of [boss v]) < [11]>> then\n        switch costume to (((round ((timer) * (22222))) mod (2)) + (5))\n        go to [front v] layer\n    else\n        switch costume to (((round ((timer) * (22222))) mod (2)) + (2))\n        go to [back v] layer\n    end\n    if <(ShowBassWings?) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [die v]\nwait (4) seconds\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [basslaser v]\nif <(clone) = [0]> then\n    clear graphic effects\n    set [x# v] to [2]\n    create clone of (_myself_ v)\nend\n\nset y to (-90)\n\nwhen I receive [basslaseralert v]\nif <(clone) = [0]> then\n    clear graphic effects\n    set [x# v] to [3]\n    create clone of (_myself_ v)\nend\n\n@boss hp\n\nwhen flag clicked\nset [clone v] to [0]\nclear graphic effects\nhide\n\nwhen I receive [battle begin v]\npoint in direction (90)\nset [fightstart? v] to [1]\ngo to x: (-180) y: (90)\nset size to (250) %\ngo to [front v] layer\nshow\nset [brightness v] effect to (0)\nswitch costume to (hpbar29 v)\nrepeat (28)\n    start sound [Mega Man 5 SFX \(16\) v]\n    switch costume to ((costume [number v]) + (-1))\nend\nbroadcast (@Boss Battle Start v)\n\nwhen I receive [bossdmg v]\nif <(clone) = [0]> then\n    create clone of (_myself_ v)\n    repeat (3)\n        set [brightness v] effect to (60)\n        wait (.1) seconds\n        set [brightness v] effect to (0)\n        wait (.1) seconds\n    end\nend\n\nwhen I receive [bossdmg v]\nif <(clone) = [0]> then\n    next costume\n    if <(costume [number v]) > [27]> then\n        broadcast (BOSSDIE v)\n        wait (5) seconds\n    end\nend\n\nwhen I receive [bossdie v]\nhide\nswitch costume to (hpbar v)\n\nwhen I receive [die v]\nhide\n\nwhen I start as a clone\nset [clone v] to [1]\nset [ghost v] effect to (5)\nswitch costume to (dmg v)\ngo to [front v] layer\nshow\nrepeat (6)\n    go to (boss v)\nend\ndelete this clone\n\nwhen I receive [back to select v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [defeated tank sqaud v]\nhide\n\nwhen I receive [@bosslvl1chargedmg v]\nif <(clone) = [0]> then\n    next costume\n    next costume\n    if <(costume [number v]) > [27]> then\n        broadcast (BOSSDIE v)\n        wait (5) seconds\n    end\nend\n\nwhen I receive [bosslvl2chargedmg v]\nif <(clone) = [0]> then\n    next costume\n    next costume\n    next costume\n    if <(costume [number v]) > [27]> then\n        broadcast (BOSSDIE v)\n        wait (5) seconds\n    end\nend\n\nwhen I receive [@bosslvl1chargedmg v]\nif <(clone) = [0]> then\n    create clone of (_myself_ v)\n    repeat (3)\n        set [brightness v] effect to (60)\n        wait (.1) seconds\n        set [brightness v] effect to (0)\n        wait (.1) seconds\n    end\nend\n\nwhen I receive [bosslvl2chargedmg v]\nif <(clone) = [0]> then\n    create clone of (_myself_ v)\n    repeat (3)\n        set [brightness v] effect to (60)\n        wait (.1) seconds\n        set [brightness v] effect to (0)\n        wait (.1) seconds\n    end\nend\n\n@menu\n\nwhen flag clicked\nset [menu:able to select? v] to [1]\nset [menu:selection v] to [1]\nclear graphic effects\nset size to (100) %\nhide\nswitch costume to (costume1 v)\ncreate clone of (_myself_ v)\nswitch costume to (costume2 v)\nset size to (200) %\nswitch costume to (bg1 v)\ncreate clone of (_myself_ v)\nswitch costume to (bg2 v)\ncreate clone of (_myself_ v)\nrepeat (8)\n    switch costume to (costume3 v)\n    create clone of (_myself_ v)\n    switch costume to (costume3 v)\n    create clone of (_myself_ v)\nend\nswitch costume to (start1 v)\ncreate clone of (_myself_ v)\nswitch costume to (instructions1 v)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(costume [number v]) = [8]> then\n    go to x: (0) y: (0)\n    go to [front v] layer\n    show\n    forever\n        if <(Menu:Selection) = [1]> then\n            switch costume to (start1 v)\n            wait (.1) seconds\n            switch costume to (start2 v)\n            wait (0) seconds\n        else\n            switch costume to (start2 v)\n        end\n    end\nend\nif <(costume [number v]) = [10]> then\n    go to x: (0) y: (-50)\n    go to [front v] layer\n    show\n    forever\n        if <(Menu:Selection) = [2]> then\n            switch costume to (instructions1 v)\n            wait (.1) seconds\n            switch costume to (instructions2 v)\n            wait (0) seconds\n        else\n            switch costume to (instructions2 v)\n        end\n    end\nend\nif <(costume [number v]) = [1]> then\n    go to x: (10) y: (100)\n    repeat (10)\n        go to [front v] layer\n        show\n    end\nend\nif <(costume [number v]) = [2]> then\n    show\n    forever\n        go to x: (0) y: ((-175) + (([sin v] of ((timer) * (50)) ) * (-5)))\n        set [ghost v] effect to (pick random (20) to (30))\n    end\nend\nif <(costume [number v]) = [3]> then\n    show\n    forever\n        go to x: (0) y: ((175) + (([sin v] of ((timer) * (50)) ) * (5)))\n        set [ghost v] effect to (pick random (20) to (30))\n    end\nend\nif <(costume [number v]) = [14]> then\n    go to x: (-55) y: (13)\n    clear graphic effects\n    set [ghost v] effect to (100)\n    go to [front v] layer\n    show\n    repeat (10)\n        wait (.02) seconds\n        change [ghost v] effect by (-10)\n    end\nend\nif <(costume [number v]) = [5]> then\n    go to x: (pick random (-250) to (250)) y: (pick random (-180) to (180))\n    set [color v] effect to (pick random (0) to (555))\n    show\n    forever\n        go to [back v] layer\n        switch costume to (costume3 v)\n        wait (.05) seconds\n        switch costume to (costume4 v)\n        wait (.05) seconds\n        set [ghost v] effect to (pick random (20) to (30))\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Menu:Able to Select?) = [1]> then\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <(Menu:Selection) = [2]>> then\n            start sound [menu_file_cursor_move v]\n            set [menu:selection v] to [1]\n        end\n        if <<<key (down arrow v) pressed?> or <key (s v) pressed?>> and <(Menu:Selection) = [1]>> then\n            start sound [menu_file_cursor_move v]\n            set [menu:selection v] to [2]\n        end\n        if <key (space v) pressed?> then\n            set [menu:able to select? v] to [0]\n            if <(Menu:Selection) = [2]> then\n                start sound [menu_file_cursor_prompt v]\n                broadcast (Show Instructions v)\n                wait (1) seconds\n                wait until <not <key (space v) pressed?>>\n                wait until <key (space v) pressed?>\n                start sound [menu_back v]\n                broadcast (Hide instructions v)\n                broadcast (Delete Text v)\n                wait (1) seconds\n                wait until <not <key (space v) pressed?>>\n                set [menu:able to select? v] to [1]\n            end\n            if <(Menu:Selection) = [1]> then\n                start sound [menu_file_cursor_prompt v]\n                start sound [menu_nameentry_save v]\n                broadcast (MENU START v)\n                set [menu:able to select? v] to [0]\n            end\n        end\n    end\nend\n\nwhen I receive [menu start v]\nrepeat (10)\n    set [brightness v] effect to (50)\n    wait (0) seconds\n    set [brightness v] effect to (100)\n    wait (0) seconds\nend\nwait (1) seconds\nif <not <<(costume [number v]) = [2]> or <(costume [number v]) = [3]>>> then\n    delete this clone\nend\nif <<(costume [number v]) = [2]> or <(costume [number v]) = [3]>> then\n    go to [front v] layer\n    set [brightness v] effect to (0)\n    set [ghost v] effect to (100)\n    show\n    repeat (10)\n        change [ghost v] effect by (-10)\n        go to [front v] layer\n        wait (0) seconds\n    end\nend\nif <not <<(costume [number v]) = [2]> or <(costume [number v]) = [3]>>> then\n    wait (.5) seconds\n    switch costume to (forticon v)\n    create clone of (_myself_ v)\n    clear graphic effects\n    go to x: (143) y: (-24)\n    set [ghost v] effect to (100)\n    go to [front v] layer\n    switch costume to (drphantom1 v)\n    start sound [jingle v]\n    show\n    repeat (10)\n        change [ghost v] effect by (-10)\n        switch costume to ((round (((timer) * (.5)) mod (1))) + (12))\n        wait (0) seconds\n    end\n    repeat (115)\n        switch costume to ((round (((timer) * (.5)) mod (1))) + (12))\n        wait (0) seconds\n    end\n    broadcast (Transition Fade out v)\nend\n\nwhen I receive [transition fade out v]\nwait (2) seconds\nbroadcast (Delete Text v)\nhide\ndelete this clone\n\n@Dialogue\n\nwhen flag clicked\nset size to (150) %\nhide\n\ndefine Write Text (text) (x) (y) (delay) (effect) (color) (brightness)\nset [# v] to [1]\nset [brightness v] effect to (brightness)\nset [color v] effect to (color)\nset [effect v] to (effect)\ngo to x: (x) y: (y)\nrepeat (length of (text))\n    if <not <(letter (#) of (text)) = [ ]>> then\n        if <(letter (#) of (text)) = [@]> then\n            set x to ((x) + (-10))\n            change y by (-15)\n        else\n            switch costume to (letter (#) of (text))\n            start sound [SND_TXT1 v]\n            create clone of (_myself_ v)\n            if <(delay) > [0]> then\n                wait (delay) seconds\n            end\n        end\n    end\n    change x by (10)\n    change [# v] by (1)\nend\n\nwhen I start as a clone\ndelete all of [xy v]\nadd (x position) to [xy v]\nadd (y position) to [xy v]\ngo to [front v] layer\nshow\nif <(Effect) = [shake]> then\n    forever\n        go to x: ((item (1) of [xy v]) + (pick random (-2) to (2))) y: ((item (2) of [xy v]) + (pick random (-2) to (2)))\n    end\nend\n\nwhen I receive [delete text v]\ndelete this clone\n\nbroadcast (Delete Text v)\n\ndefine Instant Text (text) (x) (y) (color) (brightness)\nset [# v] to [1]\nset [brightness v] effect to (brightness)\nset [color v] effect to (color)\nset [effect v] to [0]\ngo to x: (x) y: (y)\nrepeat (length of (text))\n    if <not <(letter (#) of (text)) = [ ]>> then\n        if <(letter (#) of (text)) = [@]> then\n            set x to ((x) + (-10))\n            change y by (-15)\n        else\n            switch costume to (letter (#) of (text))\n            create clone of (_myself_ v)\n        end\n    end\n    change x by (10)\n    change [# v] by (1)\nend\n\nwhen I receive [show instructions v]\nwait (.2) seconds\ngo to [front v] layer\nInstant Text [use arrow@keys or@wasd to@move] [-215] [-25] [] [100]\nInstant Text [press space@to shoot] [-110] [-25] [] [100]\nInstant Text [press down or@s while@running to@slide] [10] [-25] [] [100]\nInstant Text [use up@or w@to climb@ladders] [155] [-25] [] [100]\nInstant Text [press space to exit] [-80] [-150] [] [100]\n\nwhen I receive [menu start v]\nwait (2.5) seconds\nWrite Text [dr. phantom's fortress@stage 4] [-206] [100] [0] [0] [0] [100]\nwait (.2) seconds\nWrite Text [stage boss: bass] [-206] [-40] [0] [0] [0] [100]\nwait (.2) seconds\nWrite Text [difficulty:] [-206] [-55] [0] [0] [0] [100]\nwait (.4) seconds\nWrite Text [pretty hard] [-86] [-55] [0] [0] [0] [100]\n\n@toenail\n\nwhen flag clicked\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\nshow\nforever\n    go to [front v] layer\nend\n\n
★★★★★★★INSTRUCTIONS★★★★★★★\n\n- Arrow keys or WASD to move and jump\n- Space to fire your blaster\n- Press Down while running to perform a Slide\n- Hold Up or W on ladders to climb them\n- Hold Up or W during a jump to stay airborne longer\n\n- Use Arrow Keys / WASD and Space to navigate and select on the Menu screen\n\n★★★★★★★★★★★★★★★★★★★★★★\n\nSTORY: An evil scientist named Dr. Phantom is turning innocent robots into his own war machines in order to rule the world. Mega Man's arch nemesis, Dr. Wily, sends an army of his own powerful robots to fight Dr. Phantom, but they fail and get turned into war machines.\n\nMega Man's creator, Dr. Light sends Mega Man on an adventure to destroy these evil robots and stop Dr. Phantom, once and for all.\n\nThis game includes 1 out of the 4 levels that will be present in the final version of this game.\n\n--\nIf you have a suggestion or see a problem in this game, please contact me on my profile.\n--\n\n★★★★★★★★★CREDITS★★★★★★★★★\n\n-All sprites and all sound effects belong to Capcom,    the original creator of Mega Man, as well as Yacht Club games for Shovel Knight SFX.\n\n- Credit to Spriters Resource, MegaPhilX, RRThiel, Mega Man Y+1, BBLIR, Sprites Inc, Cyber Shadow, and Earthbound\n\n- Credit to Mega Man Maker for the backgrounds and tilesets