Mega Man - War of the Robots   /// Scrolling Platformer #games

Instructions: ★★★★★★★INSTRUCTIONS★★★★★★★\n\n- Arrow keys or WASD to move and jump\n- Space to fire your blaster\n- Press C to dash\n- Press Up or W when in the air to Double Jump\n- Press Z or X to switch Special Weapons (if you have any)\n\n- Mobile supported as well\n\n\n★★★★★★★★★★★★★★★★★★★★★★\n\nMega Man's creator, Dr. Light, has recently finished building his newest robot, which he calls Ultrabot. The evil Dr. Wily hears about this, and sends 3 of his  Robot Masters to go steal Ultrabot's parts. It is up to Mega Man to save Ultrabot before Dr. Wily turns it into an evil war machine.\n\nFight against Bright Man, Napalm Man, and Search Man in 3 unique levels. Defeat them to take their Special Weapon, which you can use in battle against the other Robot Masters.\n\n\n- Ultrabot and all the levels used were completely made by me\n\n★★★★★★★★★CREDITS★★★★★★★★★\n\n-All sprites and all sound effects belong to Capcom,    the original creator of Mega Man.\n\n- Music used is from Mega man 11, Mega Man 8, and Mega Man 10.\n\n- End music is Thriller or Axel F, depending on which ending you get.\n\n- Credit to Mega Man Maker for the backgrounds and tilesets

@Stage\n\nwhen flag clicked\nset [dash enabled? v] to [1]\nset [speed boots enabled? v] to [0]\nset [double jump enabled? v] to [1]\nset [area at v] to [hub]\nset [music v] to [1]\nset volume to (100) %\nforever\n    play sound (Music) until done\nend\n\nwhen I receive [setup v]\nif <(AREA AT) = [hub]> then\n    set [scroll x max v] to [2280]\nend\n\nwhen I receive [slide v]\nrepeat (5)\n    set [particle_to_create v] to [dash]\n    set [particle_x v] to ((Scroll X) + ([x position v] of [mega man v]))\n    set [particle_y v] to ((Scroll Y) + ([y position v] of [mega man v]))\n    create clone of (particles v)\nend\n\nwhen I receive [double jump v]\nset [particle_to_create v] to [jump]\nset [particle_x v] to ((Scroll X) + ([x position v] of [mega man v]))\nset [particle_y v] to ((Scroll Y) + ([y position v] of [mega man v]))\ncreate clone of (particles v)\nwait (.02) seconds\nset [particle_to_create v] to [jump2]\nset [particle_x v] to ((Scroll X) + ([x position v] of [mega man v]))\nset [particle_y v] to ((Scroll Y) + ([y position v] of [mega man v]))\ncreate clone of (particles v)\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [menu screen v]\nhide variable [☁ bright man stage v]\nhide variable [☁ napalm man stage v]\nhide variable [☁ search man stage v]\n\nwhen I receive [highscores v]\nshow variable [☁ bright man stage v]\nshow variable [☁ napalm man stage v]\nshow variable [☁ search man stage v]\n\nwhen I receive [stage fade v]\nrepeat (50)\n    change volume by (-2)\nend\nset volume to (0) %\n\nwhen I receive [robots screen v]\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [stage fade v]\nwait (1.5) seconds\nswitch backdrop to (backdrop2 v)\nset [scroll x min v] to [0]\nset [scroll x v] to [0]\n\nwhen I receive [get ready v]\nset [megaman costume v] to [1]\nset [area at v] to (Stage Selected)\nbroadcast (SetUp v)\nbroadcast (Teleportin v)\nif <(AREA AT) = [1]> then\n    set volume to (0) %\n    set [music v] to [3]\n    stop all sounds\n    repeat (10)\n        change volume by (10)\n    end\nelse\n    if <(AREA AT) = [2]> then\n        set volume to (0) %\n        set [music v] to [4]\n        stop all sounds\n        repeat (10)\n            change volume by (10)\n        end\n    else\n        set volume to (0) %\n        set [music v] to [2]\n        stop all sounds\n        repeat (10)\n            change volume by (10)\n        end\n    end\nend\n\nwhen I receive [die v]\nbroadcast (Transition Effect v)\nwait (.5) seconds\nset [scroll x v] to [0]\nif <(Boss Checkpoint?) = [1]> then\n    if <(AREA AT) = [8]> then\n        repeat (10)\n            set [scroll x v] to [7700]\n            set [scroll x min v] to [7700]\n        end\n        broadcast (Teleportin v)\n        broadcast (load enemies v)\n    else\n        if <(AREA AT) = [9]> then\n            set [area at v] to [2]\n            set [scroll x v] to [9000]\n            set [scroll x min v] to [9000]\n            broadcast (get ready v)\n        else\n            if <(AREA AT) = [3]> then\n                set [area at v] to [3]\n                set [scroll x v] to [7400]\n                set [scroll x min v] to [7400]\n                broadcast (Teleportin v)\n            end\n        end\n    end\nelse\n    set [scroll x min v] to [0]\n    broadcast (Teleportin v)\n    broadcast (load enemies v)\nend\n\nwhen I receive [teleportin v]\nset [megaman costume v] to [1]\nbroadcast (load enemies v)\nif <(Stage Selected) = [1]> then\n    wait (4) seconds\n    wait until <<(AREA AT) = [8]> and <(Scroll X) > [8799]>>\n    set [scroll x min v] to [8800]\n    set [scroll x max v] to [8800]\n    broadcast (Disable Movement v)\n    wait (.5) seconds\n    broadcast (Boss Intro v)\nend\nif <(Stage Selected) = [3]> then\n    wait (4) seconds\n    wait until <(Scroll X) > [8878]>\n    set [scroll x min v] to [8900]\n    set [scroll x max v] to [8900]\n    broadcast (Disable Movement v)\n    wait (.5) seconds\n    broadcast (Boss Intro v)\nend\n\nwhen I receive [boss intro v]\nrepeat (10)\n    change volume by (-10)\nend\nset volume to (0) %\nset [music v] to [5]\nstop all sounds\nrepeat (10)\n    change volume by (10)\nend\n\nwhen I receive [die v]\nif <(Boss Checkpoint?) = [1]> then\n    if <<(AREA AT) = [8]> or <(AREA AT) = [1]>> then\n        set volume to (0) %\n        set [music v] to [3]\n        stop all sounds\n        repeat (10)\n            change volume by (10)\n        end\n    else\n        if <<(AREA AT) = [2]> or <(AREA AT) = [9]>> then\n            set volume to (0) %\n            set [music v] to [4]\n            stop all sounds\n            repeat (10)\n                change volume by (10)\n            end\n        else\n            set volume to (0) %\n            set [music v] to [2]\n            stop all sounds\n            repeat (10)\n                change volume by (10)\n            end\n        end\n    end\nend\n\nset [boss checkpoint? v] to [1]\nbroadcast (die v)\n\nwhen flag clicked\ndelete all of [mega man costumes v]\nadd [1] to [mega man costumes v]\nadd [0] to [mega man costumes v]\nadd [0] to [mega man costumes v]\nadd [0] to [mega man costumes v]\n\nadd [1] to [mega man costumes v]\nadd [1] to [mega man costumes v]\nadd [1] to [mega man costumes v]\nadd [1] to [mega man costumes v]\n\nwhen I receive [teleportin v]\nforever\n    if <not <(Mega Man Costumes) = [1000]>> then\n        if <key (x v) pressed?> then\n            broadcast (Change Special Weapon v)\n            change [megaman costume v] by (1)\n            if <(item (Megaman Costume) of [mega man costumes v]) = [0]> then\n                repeat until <<(Megaman Costume) = [5]> or <(item (Megaman Costume) of [mega man costumes v]) = [1]>>\n                    change [megaman costume v] by (1)\n                end\n            end\n            wait until <not <key (x v) pressed?>>\n        end\n        if <key (z v) pressed?> then\n            broadcast (Change Special Weapon v)\n            change [megaman costume v] by (-1)\n            if <(item (Megaman Costume) of [mega man costumes v]) = [0]> then\n                repeat until <<(Megaman Costume) = [0]> or <(item (Megaman Costume) of [mega man costumes v]) = [1]>>\n                    change [megaman costume v] by (-1)\n                end\n            end\n            wait until <not <key (z v) pressed?>>\n        end\n    end\nend\n\nwhen I receive [teleportin v]\nforever\n    if <(Megaman Costume) = [5]> then\n        set [megaman costume v] to [1]\n    end\n    if <(Megaman Costume) = [0]> then\n        set [megaman costume v] to [4]\n        repeat until <<(Megaman Costume) = [1]> or <(item (Megaman Costume) of [mega man costumes v]) = [1]>>\n            change [megaman costume v] by (-1)\n        end\n    end\nend\n\nwhen I receive [bossdie v]\nrepeat (50)\n    change volume by (-2)\nend\nset volume to (0) %\n\nwhen I receive [weapon get screen v]\nset volume to (0) %\nset [music v] to [6]\nstop all sounds\nrepeat (10)\n    change volume by (10)\nend\n\nwhen I receive [title music v]\nrepeat (10)\n    change volume by (-10)\nend\nswitch backdrop to (backdrop1 v)\nset volume to (0) %\nset [music v] to [1]\nstop all sounds\nrepeat (10)\n    change volume by (10)\nend\n\ndelete all of [mega man costumes v]\n\nwhen I receive [get ready v]\nset [za warudo v] to [0]\nset [time v] to [0]\nrepeat until <(za warudo) = [1]>\n    wait (1) seconds\n    change [time v] by (1)\nend\nif <(Stage Selected) = [1]> then\n    if <(TIME) < (☁ Bright Man Stage)> then\n        set [☁ bright man stage v] to (TIME)\n        set [za warudo v] to [2]\n    end\nelse\n    if <(Stage Selected) = [2]> then\n        if <(TIME) < (☁ Napalm Man Stage)> then\n            set [☁ napalm man stage v] to (TIME)\n            set [za warudo v] to [2]\n        end\n    else\n        if <(TIME) < (☁ Search Man Stage)> then\n            set [☁ search man stage v] to (TIME)\n            set [za warudo v] to [2]\n        end\n    end\nend\n\nset [☁ bright man stage v] to [1500]\nset [☁ search man stage v] to [1500]\nset [☁ napalm man stage v] to [1500]\n\nwhen I receive [play ending v]\n\nwhen I receive [play ending v]\nrepeat (10)\n    change volume by (-10)\nend\nset volume to (0) %\nset [music v] to [8]\nstop all sounds\nrepeat (10)\n    change volume by (10)\nend\n\nwhen I receive [ultrabot play muisc v]\nrepeat (10)\n    change volume by (-10)\nend\nset volume to (0) %\nif <(special song if bright man was killed first) = [1]> then\n    set [music v] to [7]\nelse\n    set [music v] to [9]\nend\nstop all sounds\nrepeat (10)\n    change volume by (10)\nend\n\nset [☁ napalm man stage v] to [1200]\n\n@ground\n\nwhen I receive [setup v]\nwait (.02) seconds\nhide\nclear graphic effects\ngo to x: (0) y: (0)\nset [level_x v] to [0]\nswitch costume to (vc_1 v)\nCreate\nhide\n\ndefine Create\nif <(AREA AT) = [3]> then\n    switch costume to (search1 v)\n    set size to (200) %\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    repeat (15)\n        create clone of (_myself_ v)\n        next costume\n        change [level_x v] by (635)\n    end\nend\nif <(AREA AT) = [1]> then\n    switch costume to (bright1 v)\n    set size to (200) %\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    repeat (6)\n        create clone of (_myself_ v)\n        next costume\n        change [level_x v] by (635)\n    end\nend\nif <(AREA AT) = [8]> then\n    switch costume to (bright8 v)\n    set size to (200) %\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    repeat (15)\n        create clone of (_myself_ v)\n        next costume\n        change [level_x v] by (635)\n    end\nend\nif <(AREA AT) = [2]> then\n    switch costume to (napalm1 v)\n    set size to (200) %\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    repeat (30)\n        create clone of (_myself_ v)\n        next costume\n        change [level_x v] by (635)\n    end\nend\nif <(AREA AT) = [9]> then\n    switch costume to (napalm boss v)\n    set size to (200) %\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nhide\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)) ) > [540]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [300]>> then\n        hide\n    else\n        show\n    end\nend\n\nbroadcast (get ready v)\n\nwhen I receive [setup v]\ndelete this clone\n\nwhen I receive [screenshake v]\nrepeat (8)\n    change [level_y v] by (20)\n    wait (0) seconds\n    change [level_y v] by (-20)\n    wait (0) seconds\n    change [level_y v] by (-20)\n    wait (0) seconds\n    change [level_y v] by (20)\nend\nset [level_y v] to [0]\n\nbroadcast (ScreenShake v)\n\nwhen I receive [weapon get screen v]\ndelete this clone\n\nwhen I receive [get ready v]\ndelete this clone\n\n@mega man\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 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 <not <(HEALTH) > [14]>> then\n    if <(hold) = [42]> then\n        turn left (10) degrees\n    else\n        if <(hold) = [41]> then\n            turn right (10) degrees\n        end\n    end\n    if <(hold) = [60]> then\n        forever\n            switch costume to (shot1 v)\n            wait (.05) seconds\n            next costume\n            wait (.05) seconds\n            next costume\n            wait (.05) seconds\n            next costume\n            wait (.05) seconds\n        end\n    else\n        start sound [Mega Man 5 SFX \(4\) v]\n        switch costume to (laser v)\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 <<key (space v) pressed?> or <mouse down?>> then\n        set [animations: using gun?2 v] to [1]\n    else\n        set [animations: using gun?2 v] to [0]\n    end\nend\n\ndefine Do (what?)\nif <<(CanMove?) = [1]> and <(Dashing?) = [0]>> then\n    if <(what?) = [Walk]> then\n        if <not <(dead:) = [1]>> then\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 <(Dashing?) = [0]> then\n                        switch costume to (join [gunrun] (((Megaman Costume) * (4)) + (-3)))\n                    end\n                else\n                    if <(Dashing?) = [0]> then\n                        switch costume to (join [run] (((Megaman Costume) * (4)) + (-3)))\n                    end\n                end\n                if <(Dashing?) = [0]> then\n                    wait (.1) seconds\n                end\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)>>>> 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 <(Dashing?) = [0]> then\n                        switch costume to (join [gunrun] (((Megaman Costume) * (4)) + (-2)))\n                    end\n                else\n                    if <(Dashing?) = [0]> then\n                        switch costume to (join [run] (((Megaman Costume) * (4)) + (-2)))\n                    end\n                end\n                if <(Dashing?) = [0]> then\n                    wait (.1) seconds\n                end\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)>>>> 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 <(Dashing?) = [0]> then\n                        switch costume to (join [gunrun] (((Megaman Costume) * (4)) + (-1)))\n                    end\n                else\n                    if <(Dashing?) = [0]> then\n                        switch costume to (join [run] (((Megaman Costume) * (4)) + (-1)))\n                    end\n                end\n                if <(Dashing?) = [0]> then\n                    wait (.1) seconds\n                end\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)>>>> 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 <(Dashing?) = [0]> then\n                        switch costume to (join [gunrun] (((Megaman Costume) * (4)) + (0)))\n                    end\n                else\n                    if <(Dashing?) = [0]> then\n                        switch costume to (join [run] (((Megaman Costume) * (4)) + (0)))\n                    end\n                end\n                if <(Dashing?) = [0]> then\n                    wait (.1) seconds\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <not <(HEALTH) > [14]>> then\n    move (20) steps\n    repeat until <<(x position) < [-230]> or <(x position) > [230]>>\n        move (20) steps\n    end\n    delete this clone\nend\nif <(HEALTH) > [14]> then\n    set size to (100) %\n    repeat until <touching (_edge_ v)?>\n        move (10) 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) %\nswitch costume to (idle v)\nset size to (200) %\nclear graphic effects\nset [falling v] to [0]\nset [speed y v] to [0]\nset [canmove? v] to [0]\nset [holding? 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\nset [megaman costume v] to [1]\nwait (1) seconds\nswitch costume to (idle v)\n\nwhen I receive [take dmg v]\nstart sound [Mega Man 5 SFX \(6\) v]\nset [takingdmg v] to [1]\nset [canmove? v] to [0]\nset [getting ouched ? v] to [1]\nrepeat (4)\n    set [ghost v] effect to (100)\n    wait (.05) seconds\n    set [ghost v] effect to (0)\n    wait (.05) seconds\nend\nset [getting ouched ? v] to [0]\nset [canmove? v] to [1]\nset [takingdmg v] to [0]\nrepeat (4)\n    set [ghost v] effect to (100)\n    wait (.05) seconds\n    set [ghost v] effect to (0)\n    wait (.05) seconds\nend\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 [0]\n    go to [front v] layer\n    switch costume to (break v)\n    go to x: (0) y: (899)\n    wait (1) seconds\n    switch costume to (break v)\n    show\n    repeat (10)\n        switch costume to (break v)\n        change y by (-35)\n    end\n    repeat until <touching (ground v)?>\n        change y by (-35)\n    end\n    start sound [Mega Man 5 SFX \(2\)2 v]\n    switch costume to (tele2 v)\nend\nwait (.1) seconds\nset [canmove? v] to [1]\n\nwhen flag clicked\nhide\n\nwhen I receive [teleportin v]\nclear graphic effects\n\nwhen I receive [bossdie v]\nset [canmove? v] to [-1]\nchange y by (-3)\nif <([falling? v] of [hitbox v]) < [3]> then\n    repeat (10)\n        if <(Megaman Costume) = [1]> then\n            switch costume to (idle v)\n        else\n            switch costume to (join [idle] (Megaman Costume))\n        end\n    end\nelse\n    repeat (10)\n        if <(Megaman Costume) = [1]> then\n            switch costume to (jump v)\n        else\n            switch costume to (join [jump] (Megaman Costume))\n        end\n    end\nend\nrepeat until <touching (ground v)?>\n    change y by (-8)\nend\nchange y by (-6)\nif <(Megaman Costume) = [1]> then\n    switch costume to (idle v)\nelse\n    switch costume to (join [idle] (Megaman Costume))\nend\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 I receive [kill v]\nset [canmove? v] to [0]\nif <(Megaman Costume) = [1]> then\n    switch costume to (idle v)\nelse\n    switch costume to (join [idle] (Megaman Costume))\nend\ndelete this clone\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        switch costume to (death v)\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 receive [bossgate #1 v]\nif <(FIGHTSTART?) = [0]> then\n    repeat (100)\n        set [canmove? v] to [0]\n    end\nend\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 (15)\n    set [canmove? v] to [0]\nend\n\nwhen I receive [bossdie v]\nset [canmove? v] to [0]\n\nwhen I receive [bossdie v]\ndelete this clone\n\nwhen I receive [teleportin v]\nset size to (200) %\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]) y: (([y position v] of [hitbox v]) + (-9))\n    end\nend\n\nwhen I receive [stunned 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        wait (0) seconds\n    end\n    change x by (5)\n    wait (0) seconds\nend\nset [canmove? v] to [1]\n\nwhen I start as a clone\nwait until <<touching (enemies v)?> or <touching (boss v)?>>\nif <not <(HEALTH) > [14]>> then\n    wait (.05) seconds\n    delete this clone\nend\n\nwhen I receive [battle begin v]\nset [canmove? v] to [0]\nwait (2.2) seconds\nset [canmove? v] to [1]\n\nwhen I receive [ready v]\nset [canmove? v] to [0]\nhide\n\nwhen I receive [back to select v]\nswitch costume to (break2 v)\nrepeat until <(y position) > [178]>\n    set [canmove? v] to [-1]\n    change y by (20)\nend\nhide\n\nwhen I receive [teleportin v]\ndelete this clone\n\nwhen I receive [back to select 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 [enable movement v]\nset [canmove? v] to [1]\n\nwhen I receive [bossdie v]\nset [za warudo v] to [1]\nif <(Megaman Costume) = [1]> then\n    switch costume to (idle v)\nelse\n    if <(Megaman Costume) = [2]> then\n        switch costume to (join [idle] [2])\n    else\n        if <(Megaman Costume) = [3]> then\n            switch costume to (join [idle] [3])\n        else\n            switch costume to (join [idle] [4])\n        end\n    end\nend\nshow\nset [canmove? v] to [-1]\nwait (1) seconds\nstop [other scripts in sprite v]\nchange y by (5)\nstart sound [Mega Man II - Victory v]\nwait (7) seconds\nset [y v] to [25]\nif <(Megaman Costume) = [1]> then\n    switch costume to (jump v)\nelse\n    if <(Megaman Costume) = [2]> then\n        switch costume to (jump2 v)\n    else\n        if <(Megaman Costume) = [3]> then\n            switch costume to (jump3 v)\n        else\n            switch costume to (jump4 v)\n        end\n    end\nend\nglide (.6) secs to x: (0) y: (50)\nbroadcast (Get Weapon v)\nrepeat (3)\n    start sound [SE \[32\] v]\n    wait (.6) seconds\nend\nwait (.5) seconds\nstart sound [Mega Man 5 SFX \(31\) v]\nset [y v] to [0]\nwait (.1) seconds\nswitch costume to (tele2 v)\nwait (.1) seconds\nrepeat until <(y position) > [170]>\n    switch costume to (break v)\n    change [y v] by (5)\n    change y by (y)\nend\nhide\nbroadcast (Transition Effect v)\nwait (.5) seconds\nbroadcast (Weapon get screen v)\n\nwhen I receive [teleportin v]\nforever\n    set [universal hold v] to (hold)\nend\n\nwhen I start as a clone\nwait until <touching (boss v)?>\nif <not <(HEALTH) > [14]>> then\n    wait (.05) seconds\n    delete this clone\nend\n\nwhen I receive [disable movement v]\nset [canmove? v] to [0]\n\nwhen I receive [weapon get screen v]\nset [canmove? v] to [-1]\nwait (.4) seconds\ngo to x: (0) y: (500)\ngo to [front v] layer\nswitch costume to (break v)\nset size to (250) %\nshow\nrepeat (7)\n    change y by (-30)\nend\nstart sound [Mega Man 5 SFX \(2\)2 v]\nset y to (-18)\nswitch costume to (tele2 v)\nwait (.1) seconds\nswitch costume to (idle v)\nwait (.5) seconds\nset [brightness v] effect to (50)\nrepeat (2)\n    switch costume to (idle v)\n    wait (.1) seconds\n    if <(Stage Selected) = [1]> then\n        switch costume to (join [idle] [2])\n    else\n        if <(Stage Selected) = [2]> then\n            switch costume to (join [idle] [3])\n        else\n            switch costume to (join [idle] [4])\n        end\n    end\n    wait (.1) seconds\nend\nstart sound [Mega Man 5 SFX \(21\)2 v]\nclear graphic effects\n\nwhen I receive [teleportin v]\nset size to (200) %\n\nwhen I receive [robots screen v]\nset size to (200) %\n\nwhen I receive [robots screen v]\nhide\n\nwhen I receive [teleportin v]\ngo to [front v] layer\n\nwhen I receive [teleportin v]\nset rotation style [left-right v]\nforever\n    if <(getting ouched ?) = [1]> then\n        if <(Megaman Costume) = [1]> then\n            switch costume to (takedmg v)\n        else\n            switch costume to (join [takedmg] (Megaman Costume))\n        end\n    else\n        if <(Dashing?) = [1]> then\n            if <(Megaman Costume) = [1]> then\n                switch costume to (swipe v)\n            else\n                switch costume to (join [swipe] ((Megaman Costume) * (3)))\n            end\n        else\n            if <(CanMove?) = [1]> then\n                if <([falling? v] of [hitbox v]) > [1]> then\n                    if <(animations: using gun?2) = [1]> then\n                        if <(Dashing?) = [0]> then\n                            if <(Megaman Costume) = [1]> then\n                                switch costume to (jumpgun v)\n                            else\n                                switch costume to (join [jumpgun] (Megaman Costume))\n                            end\n                        end\n                    else\n                        if <(Dashing?) = [0]> then\n                            if <(Megaman Costume) = [1]> then\n                                switch costume to (jump v)\n                            else\n                                switch costume to (join [jump] (Megaman Costume))\n                            end\n                        end\n                    end\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 <(Dashing?) = [0]> then\n                            Do [Walk]\n                        end\n                    else\n                        if <<not <<<<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)>>>> or <key (up arrow v) pressed?>>>> and <(Holding?) = [0]>> then\n                            if <(animations: using gun?2) = [1]> then\n                                if <(Dashing?) = [0]> then\n                                    if <(Megaman Costume) = [1]> then\n                                        switch costume to (idlegun v)\n                                    else\n                                        switch costume to (join [idlegun] (Megaman Costume))\n                                    end\n                                end\n                            else\n                                if <(Dashing?) = [0]> then\n                                    if <(Megaman Costume) = [1]> then\n                                        switch costume to (idle v)\n                                    else\n                                        switch costume to (join [idle] (Megaman Costume))\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [teleportin v]\nset [dashing? v] to [0]\nforever\n    if <(Megaman Costume) = [1]> then\n        if <<(CanMove?) = [1]> and <<key (space v) pressed?> or <mouse down?>>> then\n            if <(Megaman Costume) = [1]> then\n                set [hold v] to [0]\n                create clone of (_myself_ v)\n                repeat until <<(hold) > [39]> or <<not <key (space v) pressed?>> and <not <mouse down?>>>>\n                    change [hold v] by (1)\n                end\n                if <(hold) > [39]> then\n                    repeat until <<not <key (space v) pressed?>> and <not <mouse down?>>>\n                        start sound [Mega Man 5 SFX \(12\) v]\n                        set [brightness v] effect to (80)\n                        wait (.1) seconds\n                        set [brightness v] effect to (0)\n                        wait (.1) seconds\n                    end\n                    set [hold v] to [60]\n                    if <not <(HEALTH) > [14]>> then\n                        if <(Megaman Costume) = [1]> then\n                            if <(CanMove?) = [1]> then\n                                create clone of (_myself_ v)\n                                start sound [Mega Man 5 SFX \(21\) v]\n                            end\n                        end\n                    end\n                else\n                    wait until <<not <key (space v) pressed?>> and <not <mouse down?>>>\n                end\n            end\n        end\n    else\n        if <<(CanMove?) = [1]> and <<key (space v) pressed?> or <mouse down?>>> then\n            broadcast (Fire Special Weapon v)\n            wait until <<not <key (space v) pressed?>> and <not <mouse down?>>>\n        end\n    end\nend\n\nwhen I receive [teleportin v]\nforever\n    set [dashing? v] to ([sliding?2 v] of [hitbox v])\nend\n\nwhen I receive [teleportin v]\nforever\n    if <(CanMove?) = [1]> then\n        if <(Dashing?) = [1]> then\n            if <(animations: using gun?2) = [1]> then\n                if <(Megaman Costume) = [1]> then\n                    switch costume to (megamandash2 v)\n                else\n                    switch costume to (join [megamandash] (((Megaman Costume) * (2)) + (-1)))\n                end\n            else\n                if <(Megaman Costume) = [1]> then\n                    switch costume to (megamandash1 v)\n                else\n                    switch costume to (join [megamandash] (((Megaman Costume) * (2)) + (0)))\n                end\n            end\n        else\n            if <([falling? v] of [hitbox v]) > [2]> then\n                if <(animations: using gun?2) = [1]> then\n                    if <(Megaman Costume) = [1]> then\n                        switch costume to (jumpgun v)\n                    else\n                        switch costume to (join [jumpgun] (Megaman Costume))\n                    end\n                else\n                    if <(Megaman Costume) = [1]> then\n                        switch costume to (jump v)\n                    else\n                        switch costume to (join [jump] (Megaman Costume))\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [teleportin v]\nforever\n    if <<key (space v) pressed?> or <mouse down?>> then\n        set [animations: using gun?2 v] to [1]\n    else\n        set [animations: using gun?2 v] to [0]\n    end\nend\n\nwhen I receive [play ending v]\nhide\ndelete this clone\n\nwhen I receive [brighten stop time v]\nset [canmove? v] to [0]\nwait (1) seconds\nset [canmove? v] to [1]\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]\nset [canmove? v] to [0]\nwait (.4) seconds\nset [canmove? v] to [1]\nset [takingdmg v] to [0]\n\nwhen flag clicked\nset [sliding?2 v] to [0]\n\nwhen flag clicked\nswitch costume to (idle3 v)\n\nwhen flag clicked\nset [sliding?2 v] to [0]\n\nwhen I receive [kill v]\nset [canmove? v] to [0]\n\nwhen I receive [slide v]\nreset timer\nrepeat until <<(timer) > [.1]> and <(STAY SLIDING) = [0]>>\n    set [dash cooldown v] to [0]\n    set [sliding?2 v] to [1]\n    start sound [SE \[95\] v]\n    repeat (15)\n        if <(direction) = [90]> then\n            Walk (direction) [10]\n        else\n            Walk (direction) [-10]\n        end\n    end\nend\nset [sliding?2 v] to [0]\nwait (.25) seconds\nset [dash cooldown 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 [dash cooldown 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]\nrepeat (3)\n    go to (mega man v)\n    change y by (10)\nend\n\ndefine Tick <<> <^> <>>\nif <(CanMove?) = [1]> 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 [speed y v] by (-.5)\n        change y by (speed y)\n    else\n        change [speed y v] by (-.5)\n        change y by (speed y)\n    end\n    Touch Ground <(speed y) > [0]>\n    if <<key (c v) pressed?> and <(Dash Enabled?) = [1]>> then\n        if <(dash cooldown) = [1]> then\n            broadcast (slide v)\n        end\n    end\n    if <<> then\n        point in direction (-90)\n        if <(Speed Boots Enabled?) = [1]> then\n            Walk (direction) [-10]\n        else\n            Walk (direction) [-7]\n        end\n    end\n    if <>> then\n        point in direction (90)\n        if <(Speed Boots Enabled?) = [1]> then\n            Walk (direction) [10]\n        else\n            Walk (direction) [7]\n        end\n    end\n    set [speed x v] to ((speed x) * (.65))\n    change y by (speed y)\n    Touch Ground <(speed y) > [0]>\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        change [speed y v] by (-1)\n    end\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 <(falling?) < [3]> then\n            set [speed y v] to [7]\n        end\n    else\n        change [speed y v] by (-.7)\n    end\nend\n\ndefine Walk (direction) (speed)\npoint in direction (direction)\nchange x by (speed)\nset [slope v] to [0]\nrepeat until <<(slope) = [8]> or <<not <touching (ground v)?>> and <not <touching (misc objects v)?>>>>\n    change [slope v] by (1)\n    change y by (1)\nend\nif <(slope) = [8]> then\n    change x by ((0) - (speed))\n    change y by ((0) - (slope))\nend\n\nwhen flag clicked\nswitch costume to (idle v)\nset size to (200) %\nset size to (100) %\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)>>>> <<<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)>>>> <<<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)>>>>\n    end\nend\n\nwhen flag clicked\nset volume to (60) %\nset [canmove? v] to [0]\nset [frame 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 (200) %\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 (1)\nrepeat until <<not <touching (ground v)?>> and <not <touching (misc objects v)?>>>\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 [15]\nif <(direction) = [90]> then\n    repeat (6)\n        change [knock v] by (-2.5)\n        Walk [90] ((knock) * (-1))\n    end\nelse\n    repeat (6)\n        change [knock v] by (-2.5)\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\nwait (.1) seconds\nset [scroll y v] to [0]\nset [speed y v] to [1]\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) = ((LevelLength2) + (-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 (30)\nstart sound [Mega Man 5 SFX \(21\) v]\nset [a v] to [1]\nset [canmove? v] to [1]\n\nwhen flag clicked\nset [checkpoint # v] to [0]\nset [fightstart? v] to [0]\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 [bossdie v]\nset [canmove? v] to [0]\n\nwhen I receive [teleportin v]\n\nforever\n    if <(x position) < [-195]> then\n        set x to (-195)\n    end\nend\n\nwhen I receive [enable movement v]\nset [canmove? v] to [1]\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (99)\n    show\nend\n\nwhen flag clicked\nforever\n    if <(falling?) < [3]> then\n        set [jump_counter v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    wait until <<<(falling?) > [5]> and <(Double Jump Enabled?) = [1]>> and <(Jump_counter) = [0]>>\n    wait until <not <<<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)>>>>>\n    wait until <<<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)>>>>\n    if <<(falling?) > [5]> and <<(Jump_counter) = [0]> and <(CanMove?) = [1]>>> then\n        broadcast (Double Jump v)\n        set [speed y v] to [9]\n        set [jump_counter v] to [1]\n        start sound [Mega Man 6 SRX \(9\) v]\n    end\nend\n\nwhen I receive [teleportin v]\nforever\n    wait (1) seconds\n    wait until <(y position) < [-155]>\n    if <<(Scroll X) > [9220]> and <(AREA AT) = [2]>> then\n        broadcast (Transition Effect v)\n        broadcast (Disable Movement v)\n        wait (.5) seconds\n        set [area at v] to [9]\n        set [scroll x v] to [0]\n        broadcast (SetUp v)\n        broadcast (Enable Movement v)\n        change y by (999)\n        set [scroll x min v] to [0]\n        set [scroll x max v] to [0]\n        wait (1) seconds\n        broadcast (Boss Intro v)\n    else\n        if <<(Scroll X) > [3000]> and <(AREA AT) = [1]>> then\n            broadcast (Transition Effect v)\n            broadcast (Disable Movement v)\n            wait (.5) seconds\n            set [area at v] to [8]\n            set [scroll x v] to [0]\n            broadcast (SetUp v)\n            broadcast (Enable Movement v)\n            broadcast (load enemies v)\n            change y by (999)\n        else\n            set [health v] to [15]\n            set [sliding?2 v] to [0]\n        end\n    end\nend\n\nwhen I receive [disable movement v]\nset [canmove? v] to [0]\n\nwhen I receive [megaman move w/ platform v]\nWalk (direction) [5]\n\nwhen I receive [brighten stop time v]\nset [canmove? v] to [0]\nwait (1) seconds\nset [canmove? v] to [1]\n\n@background\n\nwhen I receive [setup v]\nwait (.02) seconds\nhide\nclear graphic effects\ngo to x: (0) y: (0)\nset [level_x v] to [0]\nswitch costume to (vc_1 v)\nCreate\n\ndefine Create\nif <(AREA AT) = [9]> then\n    switch costume to (bgdive v)\n    set size to (200) %\n    set [able to select? v] to [0]\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    set [scroll x max v] to [0]\n    create clone of (_myself_ v)\nend\nif <(AREA AT) = [3]> then\n    set size to (200) %\n    set [able to select? v] to [0]\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    repeat (5)\n        switch costume to (bgsearch v)\n        create clone of (_myself_ v)\n        change [level_x v] by (493)\n        set [scroll x max v] to [8900]\n    end\n    repeat (1)\n        switch costume to (bgsearch2 v)\n        create clone of (_myself_ v)\n        change [level_x v] by (493)\n    end\n    repeat (4)\n        switch costume to (cloudbg v)\n        create clone of (_myself_ v)\n        change [level_x v] by (493)\n    end\n    repeat (1)\n        switch costume to (bgsearch3 v)\n        create clone of (_myself_ v)\n        change [level_x v] by (493)\n    end\n    repeat (15)\n        switch costume to (bgsearch v)\n        create clone of (_myself_ v)\n        change [level_x v] by (493)\n    end\nend\nif <(AREA AT) = [1]> then\n    switch costume to (nitro_1 v)\n    set size to (200) %\n    set [able to select? v] to [0]\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    repeat (10)\n        create clone of (_myself_ v)\n        set [scroll x max v] to [3200]\n        change [level_x v] by (493)\n    end\nend\nif <(AREA AT) = [8]> then\n    switch costume to (cult v)\n    set size to (200) %\n    set [able to select? v] to [0]\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    repeat (20)\n        create clone of (_myself_ v)\n        change [level_x v] by (493)\n        set [scroll x max v] to [8800]\n    end\nend\nif <(AREA AT) = [2]> then\n    set size to (200) %\n    set [able to select? v] to [0]\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    repeat (1)\n        switch costume to (windbg2 v)\n        create clone of (_myself_ v)\n        change [level_x v] by (548)\n        set [scroll x max v] to [9260]\n    end\n    repeat (5)\n        switch costume to (bgneedle4 v)\n        create clone of (_myself_ v)\n        change [level_x v] by (548)\n    end\n    repeat (3)\n        switch costume to (windbg2 v)\n        create clone of (_myself_ v)\n        change [level_x v] by (548)\n    end\n    repeat (3)\n        switch costume to (bgneedle4 v)\n        create clone of (_myself_ v)\n        change [level_x v] by (548)\n    end\n    repeat (3)\n        switch costume to (windbg2 v)\n        create clone of (_myself_ v)\n        change [level_x v] by (548)\n    end\n    repeat (2)\n        switch costume to (bgneedle4 v)\n        create clone of (_myself_ v)\n        change [level_x v] by (548)\n    end\n    repeat (3)\n        switch costume to (windbg2 v)\n        create clone of (_myself_ v)\n        change [level_x v] by (548)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nforever\n    go to [back v] layer\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)) ) > [490]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [300]>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [setup v]\ndelete this clone\n\nwhen I receive [weapon get screen v]\ndelete this clone\n\nwhen I start as a clone\nset [z v] to [0]\nforever\n    if <<(AREA AT) = [2]> or <(AREA AT) = [9]>> then\n        set size to (215) %\n        set [level_y v] to ([sin v] of ((z) * (8)) )\n        change [z v] by (2)\n    end\nend\n\nbroadcast (get ready v)\n\nwhen I receive [get ready v]\ndelete this clone\n\nwhen I start as a clone\nif <(costume [number v]) = [9]> then\n    forever\n        switch costume to (cloudbg v)\n        repeat (3)\n            wait (.05) seconds\n            next costume\n        end\n        wait (.05) seconds\n    end\nend\nif <(costume [number v]) = [14]> then\n    forever\n        switch costume to (nitro_1 v)\n        repeat (3)\n            wait (.05) seconds\n            next costume\n        end\n        wait (.05) seconds\n    end\nend\n\nswitch costume to (bgmrx1alt2 v)\n\n@Particles\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nswitch costume to (particle_to_create)\n\nwhen I start as a clone\nset [scr_x v] to (particle_x)\nset [scr_y v] to (particle_y)\nshow\nforever\n    go to x: ((scr_x) - (Scroll X)) y: ((scr_y) - (Scroll Y))\n    if <(x position) < [-180]> then\n        delete this clone\n    end\nend\n\nwhen I start as a clone\ngo to [front v] layer\nclear graphic effects\nswitch costume to (particle_to_create)\nshow\n\nwhen I start as a clone\nset [y v] to [0]\nif <(costume [number v]) = [1]> then\n    if <(Megaman Costume) = [1]> then\n    set rotation style [left-right v]\n    point in direction ([direction v] of [mega man v])\n    go [backward v] (15) layers\n    set size to (200) %\n    repeat (8)\n        change [ghost v] effect by (15)\n        change size by (-5)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [2]> then\n    set rotation style [left-right v]\n    go [backward v] (15) layers\n    set size to (200) %\n    repeat (8)\n        change [y v] by (-1)\n        change [scr_y v] by (y)\n        change [scr_x v] by (7)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [5]> then\n    set rotation style [left-right v]\n    go [backward v] (15) layers\n    set size to (200) %\n    repeat (8)\n        change [y v] by (-1)\n        change [scr_y v] by (y)\n        change [scr_x v] by (-7)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [2]> then\n    switch costume to (jump v)\n    repeat (2)\n        wait (.1) seconds\n        next costume\n    end\n    wait (.1) seconds\n    delete this clone\nend\nif <(costume [number v]) = [5]> then\n    switch costume to (jump2 v)\n    wait (.1) seconds\n    switch costume to (slide2 v)\n    repeat (1)\n        wait (.1) seconds\n        next costume\n    end\n    wait (.1) seconds\n    delete this clone\nend\n\nwhen I receive [weapon get screen v]\n\n@Projectiles\n\nwhen flag clicked\nset size to (200) %\nhide\n\nwhen I receive [create projectile v]\nif <(clone) = [0]> then\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)\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]\npoint in direction (PROJ DIRECTION)\ngo to [front v] layer\nshow\nif <(costume [number v]) = [4]> then\n    set rotation style [left-right v]\n    set [y v] to [10]\n    repeat until <<touching (hitbox v)?> or <touching (_edge_ v)?>>\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    end\n    if <touching (hitbox v)?> then\n        if <(INVINCIBILITY) = [0]> then\n            change [health v] by (1)\n            broadcast (TAKE DMG v)\n        end\n        delete this clone\n    else\n        delete this clone\n    end\nend\nif <(costume [number v]) = [3]> then\n    start sound [Mega Man 5 SFX \(11\) v]\n    set rotation style [left-right v]\n    set [y v] to [5]\n    repeat (2)\n        point towards (hitbox v)\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    end\n    repeat until <<touching (hitbox v)?> or <touching (_edge_ v)?>>\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 (2)\n    end\n    if <touching (hitbox v)?> then\n        if <(INVINCIBILITY) = [0]> then\n            change [health v] by (1)\n            broadcast (TAKE DMG v)\n        end\n        delete this clone\n    else\n        delete this clone\n    end\nend\nif <(costume [number v]) = [59]> then\n    start sound [Mega Man 6 SRX \(28\) v]\n    set rotation style [left-right v]\n    switch costume to (searchblade v)\n    point in direction (PROJ DIRECTION)\n    set [y v] to [0]\n    repeat until <<touching (hitbox v)?> or <<touching (_edge_ v)?> or <touching (ground v)?>>>\n        switch costume to (searchblade v)\n        change [y v] by (1)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (12)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (12)))\n        wait (0) seconds\n        change [y v] by (1)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (12)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (12)))\n        switch costume to (searchblade2 v)\n        wait (0) seconds\n    end\n    if <touching (hitbox v)?> then\n        if <(INVINCIBILITY) = [0]> then\n            change [health v] by (2)\n            broadcast (TAKE DMG v)\n        end\n        start sound [SE \[83\] v]\n        switch costume to (explo1 v)\n        repeat (4)\n            wait (.05) seconds\n            next costume\n        end\n        delete this clone\n    else\n        start sound [SE \[83\] v]\n        switch costume to (explo1 v)\n        repeat (4)\n            wait (.05) seconds\n            next costume\n        end\n        delete this clone\n    end\nend\nif <(costume [number v]) = [62]> then\n    start sound [missile v]\n    set rotation style [left-right v]\n    switch costume to (napalm v)\n    point in direction (PROJ DIRECTION)\n    set [y v] to [0]\n    repeat until <<touching (hitbox v)?> or <<touching (_edge_ v)?> or <touching (ground v)?>>>\n        change [y v] by (1)\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        wait (0) seconds\n        change [y v] by (1)\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        wait (0) seconds\n    end\n    if <touching (hitbox v)?> then\n        if <(INVINCIBILITY) = [0]> then\n            change [health v] by (2)\n            broadcast (TAKE DMG v)\n        end\n        start sound [SE \[83\] v]\n        switch costume to (explo1 v)\n        repeat (4)\n            wait (.05) seconds\n            next costume\n        end\n        delete this clone\n    else\n        start sound [SE \[83\] v]\n        switch costume to (explo1 v)\n        repeat (4)\n            wait (.05) seconds\n            next costume\n        end\n        delete this clone\n    end\nend\nif <(costume [number v]) = [57]> then\n    start sound [missile v]\n    set rotation style [all around v]\n    switch costume to (searchmissile v)\n    point in direction (PROJ DIRECTION)\n    set [y v] to [0]\n    repeat (11)\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 (mega man v)\n    end\n    repeat until <<touching (hitbox v)?> or <<touching (_edge_ v)?> or <touching (ground v)?>>>\n        switch costume to (searchmissile v)\n        change [y v] by (1)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (12)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (12)))\n        wait (0) seconds\n        change [y v] by (1)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (12)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (12)))\n        switch costume to (searchmissile2 v)\n        wait (0) seconds\n    end\n    if <touching (hitbox v)?> then\n        if <(INVINCIBILITY) = [0]> then\n            change [health v] by (2)\n            broadcast (TAKE DMG v)\n        end\n        start sound [SE \[83\] v]\n        switch costume to (explo1 v)\n        repeat (4)\n            wait (.05) seconds\n            next costume\n        end\n        delete this clone\n    else\n        start sound [SE \[83\] v]\n        switch costume to (explo1 v)\n        repeat (4)\n            wait (.05) seconds\n            next costume\n        end\n        delete this clone\n    end\nend\nif <(costume [number v]) = [45]> then\n    start sound [SE \[67\] v]\n    set rotation style [left-right v]\n    switch costume to (rocket v)\n    point in direction (PROJ DIRECTION)\n    set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (12)))\n    set [y v] to (pick random (1) to (10))\n    set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (12)))\n    repeat until <<touching (hitbox v)?> or <<touching (_edge_ v)?> or <(y) > [25]>>>\n        switch costume to (rocket v)\n        change [y v] by (1)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (12)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (12)))\n        wait (0) seconds\n        change [y v] by (1)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (12)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (12)))\n        switch costume to (bomb2 v)\n        wait (0) seconds\n    end\n    if <touching (hitbox v)?> then\n        if <(INVINCIBILITY) = [0]> then\n            change [health v] by (2)\n            broadcast (TAKE DMG v)\n        end\n        start sound [SE \[83\] v]\n        switch costume to (explo1 v)\n        repeat (4)\n            wait (.05) seconds\n            next costume\n        end\n        delete this clone\n    else\n        switch costume to (explo1 v)\n        start sound [SE \[83\] v]\n        turn right (-90) degrees\n        set [proj direction v] to (direction)\n        create clone of (_myself_ v)\n        wait (.02) seconds\n        turn right (-180) degrees\n        set [proj direction v] to (direction)\n        create clone of (_myself_ v)\n        repeat (4)\n            wait (.05) seconds\n            next costume\n        end\n        delete this clone\n    end\nend\nif <(costume [number v]) = [27]> then\n    point in direction (PROJ DIRECTION)\n    set rotation style [left-right v]\n    set [y v] to [12]\n    repeat until <<touching (hitbox v)?> or <(y position) < [-80]>>\n        switch costume to (p2 v)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (20)))\n        change [level_y v] by (y)\n        change [y v] by (-2)\n        repeat (3)\n            wait (0) seconds\n            set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (20)))\n            change [level_y v] by (y)\n            change [y v] by (-2)\n            next costume\n            next costume\n        end\n        wait (0) seconds\n    end\n    if <touching (hitbox v)?> then\n        if <(INVINCIBILITY) = [0]> then\n            change [health v] by (1)\n            broadcast (TAKE DMG v)\n        end\n        start sound [SE \[83\] v]\n        switch costume to (explo1 v)\n        repeat (4)\n            wait (.05) seconds\n            next costume\n        end\n        delete this clone\n    else\n        start sound [SE \[83\] v]\n        switch costume to (explo1 v)\n        repeat (4)\n            wait (.05) seconds\n            next costume\n        end\n        delete this clone\n    end\nend\nif <(costume [number v]) = [43]> then\n    start sound [Mega Man 5 SFX \(11\) v]\n    set rotation style [left-right v]\n    set [y v] to [2]\n    set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (90)))\n    set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (90)))\n    repeat until <<touching (hitbox v)?> or <touching (_edge_ v)?>>\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (8)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (8)))\n        change [y v] by (1)\n    end\n    if <touching (hitbox v)?> then\n        if <(INVINCIBILITY) = [0]> then\n            change [health v] by (2)\n            broadcast (TAKE DMG v)\n        end\n        delete this clone\n    else\n        delete this clone\n    end\nend\nif <(costume [number v]) = [53]> then\n    point in direction (PROJ DIRECTION)\n    start sound [pistol_fire3 v]\n    set rotation style [left-right v]\n    set [y v] to [2]\n    set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (25)))\n    set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (25)))\n    repeat until <<touching (hitbox v)?> or <touching (_edge_ v)?>>\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (12)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (12)))\n        change [y v] by (1)\n    end\n    if <touching (hitbox v)?> then\n        if <(INVINCIBILITY) = [0]> then\n            change [health v] by (2)\n            broadcast (TAKE DMG v)\n        end\n        delete this clone\n    else\n        delete this clone\n    end\nend\nif <(costume [number v]) = [48]> then\n    switch costume to (shock v)\n    set rotation style [all around 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    repeat until <<touching (hitbox v)?> or <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    if <touching (hitbox v)?> then\n        if <(INVINCIBILITY) = [0]> then\n            change [health v] by (1)\n            broadcast (TAKE DMG v)\n        end\n        delete this clone\n    else\n        delete this clone\n    end\nend\nif <(costume [number v]) = [54]> then\n    point in direction (PROJ DIRECTION)\n    start sound [pistol_fire3 v]\n    set rotation style [left-right v]\n    set [y v] to [2]\n    set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (3)))\n    set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (3)))\n    repeat until <<touching (hitbox v)?> or <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        change [y v] by (1)\n    end\n    if <touching (hitbox v)?> then\n        if <(INVINCIBILITY) = [0]> then\n            change [health v] by (1)\n            broadcast (TAKE DMG v)\n        end\n        delete this clone\n    else\n        delete this clone\n    end\nend\nif <(costume [number v]) = [55]> then\n    point in direction (PROJ DIRECTION)\n    start sound [Mega Man 5 SFX \(11\) v]\n    set rotation style [left-right v]\n    set [y v] to [2]\n    set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (3)))\n    set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (3)))\n    repeat until <<touching (hitbox v)?> or <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        change [y v] by (1)\n    end\n    if <touching (hitbox v)?> then\n        if <(INVINCIBILITY) = [0]> then\n            change [health v] by (2)\n            broadcast (TAKE DMG v)\n        end\n        delete this clone\n    else\n        delete this clone\n    end\nend\nif <(costume [number v]) = [56]> then\n    point in direction (PROJ DIRECTION)\n    start sound [Mega Man 5 SFX \(11\)2 v]\n    set rotation style [left-right v]\n    set [y v] to [2]\n    set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (3)))\n    set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (3)))\n    repeat until <<touching (hitbox v)?> or <touching (_edge_ v)?>>\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (16)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (16)))\n        change [y v] by (1)\n    end\n    if <touching (hitbox v)?> then\n        if <(INVINCIBILITY) = [0]> then\n            change [health v] by (1)\n            broadcast (TAKE DMG v)\n        end\n        delete this clone\n    else\n        delete this clone\n    end\nend\nif <(costume [number v]) = [61]> then\n    point in direction (PROJ DIRECTION)\n    start sound [Mega Man 5 SFX \(11\) v]\n    set rotation style [left-right v]\n    set [y v] to [2]\n    set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (3)))\n    set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (3)))\n    repeat until <<touching (hitbox v)?> or <touching (_edge_ v)?>>\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (12)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (12)))\n        change [y v] by (1)\n    end\n    if <touching (hitbox v)?> then\n        if <(INVINCIBILITY) = [0]> then\n            change [health v] by (1)\n            broadcast (TAKE DMG v)\n        end\n        delete this clone\n    else\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)) ) > [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\nset [internal timer v] to [0]\nrepeat until <(internal timer) > [1]>\n    wait (1) seconds\n    change [internal timer v] by (1)\nend\ndelete this clone\n\nwhen I receive [teleportin v]\ndelete this clone\n\nwhen I start as a clone\nif <(costume [number v]) = [43]> then\n    forever\n        switch costume to (geo v)\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n    end\nend\n\nwhen I receive [bossdie v]\ndelete this clone\n\nwhen I receive [die v]\ndelete this clone\n\nwhen I receive [geodragon die v]\ndelete this clone\n\nwhen I receive [bossdie v]\ndelete this clone\n\n@enemies\n\nwhen flag clicked\nhide\n\ndefine Create Enemy (what enemy ) (x) (y)\ngo to [front v] layer\nset size to (200) %\nset rotation style [left-right v]\nswitch costume to (what enemy )\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]\nif <(costume [number v]) = [26]> then\n    forever\n        wait (.1) seconds\n        switch costume to (heli v)\n        wait (.1) seconds\n        next costume\n    end\nelse\n    if <(costume [number v]) = [12]> then\nend\n\nwhen I receive [die v]\ndelete this clone\n\nwhen I start as a clone\nif <(costume [number v]) = [9]> then\n    set [hp v] to [2]\n    forever\n        set rotation style [all around v]\n        set [my variable v] to [0]\n        forever\n            change [my variable v] by (3)\n            point in direction ((90) + (([sin v] of (my variable) ) * (5)))\n            set [level_y v] to ((([sin v] of (my variable) ) * (50)) + (70))\n            set [ghost v] effect to (([sin v] of (my variable) ) * (25))\n        end\n    end\nend\nif <(costume [number v]) = [26]> then\n    set [hp v] to [2]\n    forever\n        point in direction (-90)\n        if <(ENEMY ONSCREEN?) = [1]> then\n            set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (10)))\n            set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (10)))\n        end\n    end\nend\nif <(costume [number v]) = [10]> then\n    set [hp v] to [2]\n    forever\n        point in direction (-90)\n        if <(ENEMY ONSCREEN?) = [1]> then\n            set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (8)))\n            set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (8)))\n        end\n    end\nend\nif <(costume [number v]) = [12]> then\n    set [hp v] to [2]\n    point in direction (-90)\n    forever\n        if <(ENEMY ONSCREEN?) = [1]> then\n            repeat (10)\n                switch costume to (shielder v)\n                set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (8)))\n                set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (8)))\n                wait (0) seconds\n                set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (8)))\n                set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (8)))\n                next costume\n                wait (0) seconds\n            end\n            switch costume to (shielder3 v)\n            repeat (2)\n                wait (.05) seconds\n                next costume\n            end\n            wait (.05) seconds\n            turn right (180) degrees\n        end\n    end\nend\nif <(costume [number v]) = [23]> then\n    set [hp v] to [2]\n    forever\n        switch costume to (cannon v)\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        if <(ENEMY ONSCREEN?) = [1]> then\n            switch costume to (cannon2 v)\n            wait (.9) seconds\n            set [projectile name v] to [cannonball]\n            set [proj x v] to (Level_X)\n            set [proj y v] to (Level_Y)\n            set [proj direction v] to (direction)\n            broadcast (CREATE PROJECTILE v)\n            wait (.1) seconds\n            switch costume to (cannon3 v)\n            wait (.3) seconds\n            switch costume to (cannon v)\n        end\n    end\nend\nif <(costume [number v]) = [21]> then\n    set [hp v] to [3]\n    forever\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        if <(ENEMY ONSCREEN?) = [1]> then\n            switch costume to (joeturret v)\n            wait (1) seconds\n            repeat (3)\n                set [projectile name v] to [turret]\n                set [proj x v] to (Level_X)\n                set [proj y v] to ((Level_Y) + (5))\n                set [proj direction v] to (direction)\n                broadcast (CREATE PROJECTILE v)\n                switch costume to (joeturret2 v)\n                wait (.1) seconds\n                switch costume to (joeturret v)\n            end\n        end\n    end\nend\nif <(costume [number v]) = [28]> then\n    set [hp v] to [2]\n    point in direction (90)\n    forever\n        if <(ENEMY ONSCREEN?) = [1]> then\n            switch costume to (crawl v)\n            wait (.5) seconds\n            switch costume to (crawl2 v)\n            wait (.1) seconds\n            switch costume to (crawl v)\n            wait (.1) seconds\n        end\n        if <(ENEMY ONSCREEN?) = [1]> then\n            repeat (5)\n                switch costume to (crawl3 v)\n                repeat (2)\n                    wait (.05) seconds\n                    set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (11)))\n                    set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (11)))\n                    next costume\n                end\n                wait (.05) seconds\n            end\n            turn right (180) degrees\n        end\n    end\nend\nif <(costume [number v]) = [17]> then\n    set [hp v] to [2]\n    forever\n        if <(ENEMY ONSCREEN?) = [1]> then\n            switch costume to (colt v)\n            wait (1) seconds\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            set [projectile name v] to [colt]\n            set [proj x v] to (Level_X)\n            set [proj y v] to (Level_Y)\n            set [proj direction v] to (direction)\n            broadcast (CREATE PROJECTILE v)\n            repeat (3)\n                wait (.05) seconds\n                next costume\n            end\n            wait (.3) seconds\n            switch costume to (colt v)\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    wait until <touching (hitbox v)?>\n    broadcast (KNOCKBACK v)\n    wait (.1) seconds\n    change [health v] by (1)\n    broadcast (TAKE DMG v)\n    wait (1) seconds\nend\n\nwhen I start as a clone\nwait (1) seconds\nwait until <(x position) < [-231]>\ndelete this clone\n\nwhen I receive [load enemies v]\nwait (1) seconds\nif <(AREA AT) = [1]> then\n    Create Enemy [crawl] [1000] [-90]\n    wait (.05) seconds\n    Create Enemy [crawl] [1800] [-60]\n    wait (.05) seconds\n    Create Enemy [crawl] [2500] [-60]\n    wait (.05) seconds\n    Create Enemy [crawl] [2900] [-90]\n    wait (.05) seconds\nend\nif <(AREA AT) = [8]> then\n    Create Enemy [cultspike] [4000] [0]\n    wait (.05) seconds\n    Create Enemy [cultspike] [3800] [0]\n    wait (.05) seconds\n    Create Enemy [cultspike] [7000] [0]\n    wait (.05) seconds\n    Create Enemy [cultspike] [7300] [0]\n    wait (.05) seconds\nend\nif <(AREA AT) = [3]> then\n    Create Enemy [beetle] [2100] [50]\n    wait (.05) seconds\n    Create Enemy [beetle] [3500] [100]\n    wait (.05) seconds\n    Create Enemy [beetle] [4000] [90]\n    wait (.05) seconds\n    Create Enemy [shielder] [7800] [-70]\n    wait (.05) seconds\n    Create Enemy [shielder] [6670] [0]\n    wait (.05) seconds\n    Create Enemy [shielder] [6030] [-70]\n    wait (.05) seconds\n    Create Enemy [shielder] [6200] [-70]\n    wait (.05) seconds\n    Create Enemy [shielder] [6300] [-70]\n    wait (.05) seconds\n    Create Enemy [colt] [2050] [-50]\n    wait (.05) seconds\n    Create Enemy [colt] [2600] [15]\n    wait (.05) seconds\n    Create Enemy [colt] [1400] [37]\n    wait (.05) seconds\nend\nif <(AREA AT) = [2]> then\n    Create Enemy [cannon] [550] [-25]\n    wait (.05) seconds\n    Create Enemy [heli] [1800] [100]\n    wait (.05) seconds\n    Create Enemy [heli] [1900] [100]\n    wait (.05) seconds\n    Create Enemy [heli] [2000] [100]\n    wait (.05) seconds\n    Create Enemy [joeturret] [2300] [5]\n    wait (.05) seconds\n    Create Enemy [heli] [3000] [100]\n    wait (.05) seconds\n    Create Enemy [heli] [3100] [100]\n    wait (.05) seconds\n    Create Enemy [heli] [3200] [100]\n    wait (.05) seconds\n    Create Enemy [cannon] [4600] [5]\n    wait (.05) seconds\n    Create Enemy [cannon] [5500] [5]\n    wait (.05) seconds\n    Create Enemy [heli] [6400] [100]\n    wait (.05) seconds\n    Create Enemy [heli] [6500] [100]\n    wait (.05) seconds\n    Create Enemy [heli] [6600] [100]\n    wait (.05) seconds\n    Create Enemy [joeturret] [7200] [-48]\n    wait (.05) seconds\n    Create Enemy [cannon] [8000] [5]\n    wait (.05) seconds\n    Create Enemy [heli] [8700] [100]\n    wait (.05) seconds\n    Create Enemy [heli] [8800] [100]\n    wait (.05) seconds\n    Create Enemy [heli] [8900] [100]\n    wait (.05) 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)) ) > [260]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [200]>> then\n        set [enemy onscreen? v] to [0]\n        hide\n        if <((Level_X) - (Scroll X)) < [-500]> then\n            delete this clone\n        end\n    else\n        set [enemy onscreen? v] to [1]\n        show\n    end\nend\n\nwhen I receive [blink v]\ndelete this clone\n\nwhen I receive [teleportin v]\ndelete this clone\n\nwhen I receive [teleportin v]\ndelete this clone\n\nwhen I start as a clone\nforever\n    wait until <<<touching (mega man v)?> and <not <touching (hitbox v)?>>> or <touching (special weapons v)?>>\n    if <<(costume [number v]) = [9]> or <<<(costume [number v]) > [11]> and <(costume [number v]) < [17]>> and <not <([direction v] of [mega man v]) = (direction)>>>> then\n        start sound [cling v]\n        set [brightness v] effect to (50)\n        wait (.1) seconds\n        clear graphic effects\n        wait (.1) seconds\n    else\n        if <touching (special weapons v)?> then\n            change [hp v] by (-2)\n        else\n            if <(Universal Hold) > [20]> then\n                change [hp v] by (-3)\n            else\n                change [hp v] by (-1)\n            end\n        end\n        if <(HP) < [1]> then\n            stop [other scripts in sprite v]\n            start sound [Mega Man 5 SFX \(11\)2 v]\n            switch costume to (expl1 v)\n            repeat (2)\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 [SE \[11\] v]\n            set [ghost v] effect to (100)\n            wait (.1) seconds\n            clear graphic effects\n            wait (.1) seconds\n        end\n    end\nend\n\nforever\n    point towards (mega man v)\nend\n\nif <(costume [number v]) = [9]> then\n    set [hp v] to [2]\n    set [level_y v] to [150]\n    wait (.02) seconds\n    wait until <(ENEMY ONSCREEN?) = [1]>\n    repeat until <(Level_X) < (Scroll X)>\n        point in direction (-90)\n        change [level_x v] by (-10)\n    end\n    repeat until <(y position) < ([y position v] of [hitbox v])>\n        point in direction (90)\n        change [level_y v] by (-15)\n    end\n    repeat until <touching (_edge_ v)?>\n        point in direction (90)\n        change [level_x v] by (15)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [11]> then\n    set [hp v] to [3]\n    forever\n        wait until <(distance to [hitbox v]) < [150]>\n        if <(ENEMY ONSCREEN?) = [1]> then\n            switch costume to (joe9 v)\n            start sound [Mega Man 5 SFX \(9\) v]\n            point towards (hitbox v)\n            set [projectile name v] to [bullet]\n            set [proj x v] to (Level_X)\n            set [proj y v] to (Level_Y)\n            set [proj direction v] to (direction)\n            broadcast (CREATE PROJECTILE v)\n            wait (1) seconds\n            switch costume to (sniper v)\n            wait (1) seconds\n        end\n    end\nend\n\nwhen I receive [za wario v]\nif <(ENEMY ONSCREEN?) = [1]> then\n    stop [other scripts in sprite v]\n    repeat (10)\n        set x to ((Level_X) - (Scroll X))\n        set y to ((Level_Y) - (Scroll Y))\n    end\n    start sound [Mega Man 5 SFX \(11\)2 v]\n    switch costume to (expl1 v)\n    repeat (2)\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\nend\n\n@Boss\n\nwhen flag clicked\nhide\n\nwhen I receive [stage fade v]\nclear graphic effects\nwait (3) seconds\nset [boss checkpoint? v] to [0]\npoint in direction (90)\nif <(Stage Selected) = [3]> then\n    set size to (300) %\n    switch costume to (searchjump1 v)\n    go to [front v] layer\n    show\n    set [y v] to [0]\n    go to x: (0) y: (999)\n    repeat (13)\n        change [y v] by (-2)\n        change y by (y)\n    end\n    go to x: (0) y: (0)\n    switch costume to (search1 v)\n    wait (1) seconds\n    repeat (2)\n        wait (.1) seconds\n        next costume\n    end\nend\nif <(Stage Selected) = [1]> then\n    set size to (300) %\n    switch costume to (brightjump v)\n    go to [front v] layer\n    show\n    set [y v] to [0]\n    go to x: (0) y: (999)\n    repeat (12)\n        change [y v] by (-2)\n        change y by (y)\n    end\n    go to x: (0) y: (15)\n    switch costume to (bright1 v)\n    wait (1) seconds\n    repeat (5)\n        wait (.1) seconds\n        next costume\n    end\n    wait (.1) seconds\n    switch costume to (brightflash1 v)\nend\nif <(Stage Selected) = [2]> then\n    set size to (300) %\n    switch costume to (nap3 v)\n    go to [front v] layer\n    show\n    set [y v] to [0]\n    go to x: (0) y: (999)\n    repeat (12)\n        change [y v] by (-2)\n        change y by (y)\n    end\n    go to x: (0) y: (20)\n    switch costume to (nap1 v)\n    wait (.1) seconds\n    next costume\n    wait (1) seconds\n    change y by (2)\n    switch costume to (nap11 v)\n    wait (.3) seconds\n    next costume\nend\n\nwhen I receive [transition effect v]\nset [boss_invincible v] to [1]\nwait (.5) seconds\nhide\n\nwhen I receive [battle begin v]\nset [ded v] to [0]\nwait (2) seconds\nset [boss_invincible v] to [0]\nclear graphic effects\nforever\n    if <<<touching (mega man v)?> and <touching color (#fae0c1)?>> or <touching (special weapons v)?>> then\n        if <touching (special weapons v)?> then\n            if <<<(AREA AT) = [8]> and <(Megaman Costume) = [4]>> or <<<(AREA AT) = [9]> and <(Megaman Costume) = [2]>> or <<(AREA AT) = [3]> and <(Megaman Costume) = [3]>>>> then\n                broadcast (bossweakness DMG v)\n                create clone of (boss hp v)\n                repeat (2)\n                    set [ghost v] effect to (90)\n                    wait (.05) seconds\n                    set [ghost v] effect to (0)\n                    wait (.1) seconds\n                end\n            else\n                broadcast (BossDMG v)\n                create clone of (boss hp v)\n                repeat (2)\n                    set [ghost v] effect to (90)\n                    wait (.05) seconds\n                    set [ghost v] effect to (0)\n                    wait (.1) seconds\n                end\n            end\n        else\n            broadcast (BossDMG v)\n            create clone of (boss hp v)\n            repeat (2)\n                set [ghost v] effect to (90)\n                wait (.05) seconds\n                set [ghost v] effect to (0)\n                wait (.1) seconds\n            end\n        end\n    end\nend\n\nwhen I receive [battle begin v]\nwait (1) seconds\nclear graphic effects\nforever\n    if <touching (hitbox v)?> then\n        if <(INVINCIBILITY) = [0]> then\n            change [health v] by (1)\n            broadcast (KNOCKBACK v)\n            broadcast (TAKE DMG v)\n            wait (1) seconds\n        end\n    end\nend\n\nwhen I receive [die v]\nwait (1) seconds\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [boss intro v]\nset [boss_invincible v] to [1]\nbroadcast (Disable Movement v)\nset [boss checkpoint? v] to [1]\nset rotation style [left-right v]\nclear graphic effects\nset size to (250) %\nif <(Stage Selected) = [3]> then\n    point in direction (-90)\n    set size to (220) %\n    switch costume to (searchjump1 v)\n    go to [front v] layer\n    show\n    set [y v] to [0]\n    go to x: (148) y: (999)\n    repeat (17)\n        change [y v] by (-2)\n        change y by (y)\n    end\n    go to x: (148) y: (-103)\n    switch costume to (search1 v)\n    wait (.5) seconds\n    next costume\n    broadcast (bATTLE begin v)\nend\nif <(Stage Selected) = [2]> then\n    point in direction (-90)\n    set size to (200) %\n    switch costume to (nap3 v)\n    go to [front v] layer\n    show\n    set [y v] to [0]\n    go to x: (148) y: (999)\n    repeat (17)\n        change [y v] by (-2)\n        change y by (y)\n    end\n    switch costume to (nap1 v)\n    go to x: (148) y: (-107)\n    wait (.1) seconds\n    next costume\n    wait (.3) seconds\n    switch costume to (nap11 v)\n    wait (.1) seconds\n    next costume\n    broadcast (bATTLE begin v)\nend\nif <(Stage Selected) = [1]> then\n    point in direction (-90)\n    set size to (200) %\n    switch costume to (brightjump v)\n    go to [front v] layer\n    show\n    set [y v] to [0]\n    go to x: (148) y: (999)\n    repeat (17)\n        change [y v] by (-2)\n        change y by (y)\n    end\n    switch costume to (bright1 v)\n    go to x: (148) y: (-103)\n    repeat (5)\n        wait (.1) seconds\n        next costume\n    end\n    broadcast (bATTLE begin v)\nend\n\nwhen I receive [bossdie v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nbroadcast (get ready v)\n\nwhen I receive [battle begin v]\nwait (2) seconds\nif <(Stage Selected) = [3]> then\n    forever\n        switch costume to (searchland v)\n        wait (.5) seconds\n        switch costume to (searchjump1 v)\n        set [y v] to [25]\n        point towards (hitbox v)\n        repeat (10)\n            move (5) steps\n            change y by (y)\n            change [y v] by (-2)\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\n        if <(pick random (1) to (2)) = [1]> then\n            point towards (mega man v)\n            switch costume to (searchblade v)\n            set [proj direction v] to (direction)\n            set [projectile name v] to [searchblade]\n            set [proj x v] to ((Scroll X) + (x position))\n            set [proj y v] to ((y position) + (0))\n            broadcast (CREATE PROJECTILE v)\n            wait (1) seconds\n        else\n            point towards (mega man v)\n            switch costume to (searchjump2 v)\n            repeat (2)\n                wait (.1) seconds\n                next costume\n            end\n            repeat (3)\n                set [proj direction v] to (direction)\n                set [projectile name v] to [searchmissile]\n                set [proj x v] to ((Scroll X) + (x position))\n                set [proj y v] to ((y position) + (0))\n                broadcast (CREATE PROJECTILE v)\n                wait (.2) seconds\n            end\n        end\n        switch costume to (searchjump1 v)\n        repeat until <(y position) < [-90]>\n            move (5) steps\n            change y by (y)\n            change [y v] by (-2)\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\n        set y to (-103)\n        switch costume to (search1 v)\n    end\nend\nif <(Stage Selected) = [1]> then\n    forever\n        switch costume to (bright1 v)\n        if <(x position) < ([x position v] of [mega man v])> then\n            point in direction (90)\n        else\n            point in direction (-90)\n        end\n        wait (.5) seconds\n        broadcast (brighten stop time v)\n        repeat (2)\n            switch costume to (brightflash1 v)\n            wait (.1) seconds\n            next costume\n            wait (.1) seconds\n        end\n        if <(x position) < ([x position v] of [mega man v])> then\n            point in direction (90)\n        else\n            point in direction (-90)\n        end\n        repeat (3)\n            wait (.5) seconds\n            switch costume to (brightfire v)\n            set [proj direction v] to ((direction) + (pick random (-15) to (15)))\n            set [projectile name v] to [brightbullet]\n            set [proj x v] to ((Scroll X) + (x position))\n            set [proj y v] to ((y position) + (-14))\n            broadcast (CREATE PROJECTILE v)\n            wait (.05) seconds\n            next costume\n        end\n        switch costume to (bright1 v)\n        wait (.5) seconds\n        switch costume to (brightjump v)\n        set [y v] to [20]\n        point towards (hitbox v)\n        repeat (10)\n            move (5) steps\n            change y by (y)\n            change [y v] by (-2)\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\n        repeat until <(y position) < [-90]>\n            move (5) steps\n            change y by (y)\n            change [y v] by (-2)\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\n        switch costume to (bright1 v)\n        set y to (-103)\n        wait (.5) seconds\n    end\nend\nif <(Stage Selected) = [2]> then\n    forever\n        switch costume to (nap1 v)\n        if <(x position) < ([x position v] of [mega man v])> then\n            point in direction (90)\n        else\n            point in direction (-90)\n        end\n        wait (.5) seconds\n        repeat (3)\n            switch costume to (nap7 v)\n            set [proj direction v] to (direction)\n            set [projectile name v] to [napalm]\n            set [proj x v] to ((Scroll X) + (x position))\n            set [proj y v] to ((y position) + (15))\n            broadcast (CREATE PROJECTILE v)\n            repeat (2)\n                wait (.05) seconds\n                next costume\n            end\n            wait (.05) seconds\n            switch costume to (nap7 v)\n            wait (.7) seconds\n        end\n        switch costume to (nap3 v)\n        set [y v] to [20]\n        point towards (hitbox v)\n        repeat (10)\n            move (5) steps\n            change y by (y)\n            change [y v] by (-2)\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\n        repeat until <(y position) < [-90]>\n            move (5) steps\n            change y by (y)\n            change [y v] by (-2)\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\n        switch costume to (nap1 v)\n        set y to (-107)\n        wait (.1) seconds\n        switch costume to (nap v)\n        wait (.5) seconds\n    end\nend\n\nwhen I receive [za wario v]\nif <<(ded) = [0]> and <(BOSS_INVINCIBLE) = [0]>> then\n    if <<(AREA AT) = [9]> and <(Megaman Costume) = [2]>> then\n        broadcast (bossweakness DMG v)\n        create clone of (boss hp v)\n        repeat (2)\n            set [ghost v] effect to (90)\n            wait (.05) seconds\n            set [ghost v] effect to (0)\n            wait (.1) seconds\n        end\n    end\nend\n\n@Menu\n\nwhen flag clicked\nbroadcast (Menu Screen v)\nhide\n\nwhen I receive [menu screen v]\nset [able to select? v] to [1]\nset [area at v] to [hub]\nwait (.02) seconds\ngo to [front v] layer\nswitch costume to (costume1 v)\nrepeat (2)\n    go to x: (-53) y: (-237)\nend\npoint in direction (0)\ncreate clone of (_myself_ v)\nswitch costume to (costume1 v)\nrepeat (2)\n    go to x: (53) y: (237)\nend\npoint in direction (180)\ncreate clone of (_myself_ v)\npoint in direction (90)\nswitch costume to (war-of-the v)\nset size to (150) %\ngo to x: (0) y: (300)\ncreate clone of (_myself_ v)\nswitch costume to (robots v)\nset size to (100) %\ngo to x: (0) y: (300)\ncreate clone of (_myself_ v)\nswitch costume to (costume2 v)\nrepeat (4)\n    create clone of (_myself_ v)\n    next costume\nend\n\nwhen I receive [menu screen v]\ndelete this clone\n\nwhen I start as a clone\nshow\nif <(costume [number v]) = [1]> then\n    if <(direction) = [180]> then\n        set y to (280)\n    else\n        set y to (-280)\n    end\n    forever\n        repeat (10)\n            move (.5) steps\n        end\n        repeat (10)\n            move (-.5) steps\n        end\n    end\nend\nif <(costume [number v]) = [2]> then\n    repeat (5)\n        change y by (-10)\n    end\n    repeat (3)\n        change y by (-3)\n    end\nend\nif <(costume [number v]) = [13]> then\n    go to x: (-166) y: (148)\n    set size to (80) %\n    go to [front v] layer\n    show\n    forever\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (25)\n        else\n            set [brightness v] effect to (0)\n        end\n    end\nend\nif <<(costume [number v]) = [11]> or <(costume [number v]) = [12]>> then\n    go to x: (999) y: (0)\n    hide\n    wait (.1) seconds\n    show\n    go to [back v] layer\n    repeat (4)\n        change x by (-60)\n    end\n    repeat (5)\n        change x by (-40)\n    end\n    repeat (3)\n        change x by (-20)\n    end\nend\nif <(costume [number v]) = [3]> then\n    hide\n    wait (.2) seconds\n    show\n    repeat (4)\n        change y by (-20)\n    end\n    repeat (5)\n        change y by (-10)\n    end\n    repeat (3)\n        change y by (-3)\n    end\nend\nif <<(costume [number v]) > [3]> and <(costume [number v]) < [8]>> then\n    hide\n    wait (.2) seconds\n    set size to (80) %\n    go to x: (0) y: (250)\n    show\n    glide (.3) secs to x: (0) y: (((costume [number v]) * (-50)) + (200))\n    forever\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (25)\n        else\n            set [brightness v] effect to (0)\n        end\n    end\nend\nif <<(costume [number v]) > [7]> and <(costume [number v]) < [11]>> then\n    hide\n    wait (.2) seconds\n    set size to (80) %\n    go to x: (-300) y: (((costume [number v]) * (-120)) + (1080))\n    show\n    glide ((costume [number v]) * (.05)) secs to x: (50) y: (((costume [number v]) * (-120)) + (1080))\n    forever\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (25)\n        else\n            if <(item ((costume [number v]) + (-6)) of [mega man costumes v]) = [1]> then\n                set [brightness v] effect to (-50)\n            else\n                set [brightness v] effect to (0)\n            end\n        end\n    end\nend\n\nwhen this sprite clicked\nif <(Able to Select?) = [1]> then\n    if <(costume [number v]) = [4]> then\n        start sound [Mouse Click - Sound Effect \(HD\)2 v]\n        broadcast (Robots Screen v)\n    end\n    if <(costume [number v]) = [5]> then\n        start sound [Mouse Click - Sound Effect \(HD\)2 v]\n        broadcast (Highscores v)\n    end\n    if <(costume [number v]) = [6]> then\n        start sound [Mouse Click - Sound Effect \(HD\)2 v]\n        broadcast (Show Story v)\n    end\n    if <(costume [number v]) = [7]> then\n        start sound [Mouse Click - Sound Effect \(HD\)2 v]\n        broadcast (how to play v)\n    end\n    if <(costume [number v]) = [13]> then\n        start sound [Mouse Click - Sound Effect \(HD\)2 v]\n        broadcast (Menu Screen v)\n    end\n    if <<(costume [number v]) > [7]> and <(costume [number v]) < [11]>> then\n        set [able to select? v] to [0]\n        set [stage selected v] to ((costume [number v]) + (-7))\n        start sound [ching v]\n        broadcast (Stage Fade v)\n    end\nend\n\nwhen I receive [robots screen v]\nset [area at v] to [hub]\ndelete this clone\n\nwhen I receive [robots screen v]\nwait (.02) seconds\ngo to [front v] layer\nswitch costume to (bright v)\nrepeat (4)\n    create clone of (_myself_ v)\n    next costume\nend\nswitch costume to (costume8 v)\ncreate clone of (_myself_ v)\n\nwhen I receive [highscores v]\nset [area at v] to [hub]\ndelete this clone\n\nwhen I receive [highscores v]\nwait (.02) seconds\ngo to [front v] layer\nswitch costume to (costume7 v)\ncreate clone of (_myself_ v)\nswitch costume to (costume8 v)\ncreate clone of (_myself_ v)\n\nwhen I receive [stage fade v]\nwait (1.5) seconds\ndelete this clone\n\nwhen I receive [get ready v]\ndelete this clone\n\nwhen I receive [setup v]\ndelete this clone\n\nwhen I start as a clone\nwait (1) seconds\nset [origin_y v] to (y position)\nforever\n    change [my variable v] by (1)\n    set y to ((origin_y) + ([sin v] of (my variable) ))\nend\n\nwhen I receive [robots screen v]\nset [able to select? v] to [1]\n\n@Transition effect\n\nwhen flag clicked\nset [ending already played? v] to [0]\nset [special song if bright man was killed first v] to [0]\ngo to x: (0) y: (0)\nhide\nwait (.05) seconds\nswitch costume to (costume1 v)\nclear graphic effects\nset [ghost v] effect to (100)\ngo to [front v] layer\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\n    change [brightness v] effect by (25)\nend\nrepeat (10)\n    change [ghost v] effect by (10)\n    change [brightness v] effect by (-25)\nend\nhide\n\nwhen I receive [stage fade v]\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nclear graphic effects\nset [ghost v] effect to (100)\ngo to [front v] layer\nshow\nrepeat (8)\n    change [ghost v] effect by (-10)\n    change [brightness v] effect by (25)\nend\nrepeat (8)\n    change [ghost v] effect by (10)\n    change [brightness v] effect by (25)\nend\nhide\nwait (.5) seconds\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\n    change [brightness v] effect by (-10)\nend\nwait (.2) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [stage fade v]\nwait (2.5) seconds\nstart sound [Stage Start v]\nhide\ncreate clone of (_myself_ v)\nwait (3) seconds\nswitch costume to ((Stage Selected) + (3))\ngo to x: (-4) y: (-999)\nclear graphic effects\ngo to [front v] layer\nshow\nrepeat (4)\n    change y by (15)\nend\nrepeat (5)\n    change y by (8)\nend\nrepeat (4)\n    change y by (5)\nend\nwait (4) seconds\nbroadcast (Transition Effect v)\nwait (.4) seconds\nbroadcast (get ready v)\n\nwhen I start as a clone\nswitch costume to (costume3 v)\nclear graphic effects\ngo to x: (0) y: (999)\nshow\nrepeat (6)\n    change y by (-25)\nend\nrepeat (6)\n    change y by (-12)\nend\nrepeat (3)\n    change y by (-8)\nend\ngo to x: (0) y: (0)\n\nwhen I receive [transition effect v]\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nclear graphic effects\nset [ghost v] effect to (100)\ngo to [front v] layer\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\n    go to [front v] layer\nend\nwait (.2) seconds\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (10)\nend\nhide\ndelete this clone\n\nwhen I receive [teleportin v]\ndelete this clone\n\nwhen I receive [weapon get screen v]\ncreate clone of (_myself_ v)\n\nwhen I receive [robots screen v]\ndelete this clone\n\nwhen I receive [menu screen v]\ndelete this clone\n\nwhen I receive [weapon get screen v]\nif <(special song if bright man was killed first) = [0]> then\n    if <<(Stage Selected) = [1]> and <(special song if bright man was killed first) = [0]>> then\n        set [special song if bright man was killed first v] to [1]\n    else\n        set [special song if bright man was killed first v] to [2]\n    end\nend\nwait (4) seconds\nif <(item ((Stage Selected) + (1)) of [mega man costumes v]) = [1]> then\n    go to x: (-4) y: (-999)\n    clear graphic effects\n    go to [front v] layer\n    hide\n    repeat (4)\n        change y by (15)\n    end\n    repeat (5)\n        change y by (8)\n    end\n    repeat (2)\n        change y by (5)\n    end\nelse\n    switch costume to ((Stage Selected) + (6))\n    go to x: (-4) y: (-999)\n    clear graphic effects\n    go to [front v] layer\n    replace item ((Stage Selected) + (1)) of [mega man costumes v] with [1]\n    show\n    repeat (4)\n        change y by (15)\n    end\n    repeat (5)\n        change y by (8)\n    end\n    repeat (2)\n        change y by (5)\n    end\n    wait (4) seconds\nend\nif <(za warudo) = [2]> then\n    switch costume to (costume10 v)\n    start sound [10 Victory! v]\n    go to [front v] layer\n    clear graphic effects\n    go to x: (-4) y: (-45)\n    show\n    repeat (4)\n        set [ghost v] effect to (100)\n        wait (.2) seconds\n        clear graphic effects\n        wait (.2) seconds\n    end\n    wait (4) seconds\nend\nif <<(Mega Man Costumes) = [1111]> and <(ending already played?) = [0]>> then\n    set [ending already played? v] to [1]\n    broadcast (Play Ending v)\nelse\n    broadcast (Transition Effect v)\n    broadcast (title music v)\n    wait (.5) seconds\n    broadcast (Robots Screen v)\nend\n\nwhen I receive [play ending v]\nhide\ndelete this clone\n\n@hpbar\n\nwhen flag clicked\ngo to [front v] layer\nhide\nwait (1) seconds\nrepeat (10)\n    set [health v] to [1]\nend\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 I receive [teleportin v]\nset [health v] to [1]\npoint in direction (0)\ngo to x: (-200) y: (91)\nclear graphic effects\nset size to (250) %\nshow\nforever\n    switch costume to (HEALTH)\nend\n\nwhen I receive [bossdie v]\nhide\ndelete this clone\n\nwhen I receive [heal v]\nstart sound [Mega Man 5 SFX \(16\) v]\nrepeat (2)\n    set [brightness v] effect to (50)\n    wait (.1) seconds\n    clear graphic effects\n    wait (.1) seconds\nend\n\nwhen I receive [you win v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [die v]\nhide\nwait (6) seconds\nset [health v] to [1]\n\nwhen I start as a clone\nclear graphic effects\ngo to [front v] layer\nset size to (200) %\nstart sound [Mega Man 2 SFX \(12\) v]\ngo to (mega man v)\nif <([direction v] of [hitbox v]) = [90]> then\n    change x by (-15)\nelse\n    change x by (15)\nend\nchange y by (-20)\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]\ngo to [front v] layer\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 [teleportin v]\nrepeat (10)\n    set [health v] to [1]\nend\nshow\n\nwhen I receive [teleportin v]\nrepeat (10)\n    go to [front v] layer\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]\nset [fightstart? v] to [1]\ngo to x: (-180) y: (91)\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))\n    wait (0) seconds\nend\n\nwhen I receive [bossdmg v]\nif <(clone) = [0]> then\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    if <(BOSS_INVINCIBLE) = [0]> then\n        next costume\n        if <<(Universal Hold) > [40]> and <(Megaman Costume) = [1]>> then\n            next costume\n            next costume\n            next costume\n        end\n        if <(costume [number v]) > [28]> then\n            broadcast (BOSSDIE v)\n            wait (5) seconds\n        end\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\nstart sound [sfx6 v]\nrepeat (6)\n    go to (boss v)\nend\ndelete this clone\n\nwhen I receive [bossweakness dmg v]\nif <(clone) = [0]> then\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 [bossweakness dmg v]\nif <(clone) = [0]> then\n    if <(BOSS_INVINCIBLE) = [0]> then\n        next costume\n        next costume\n        next costume\n        next costume\n        next costume\n        if <(costume [number v]) > [28]> then\n            broadcast (BOSSDIE v)\n            wait (5) seconds\n        end\n    end\nend\n\n@boss die\n\nwhen flag clicked\nhide\n\nwhen I receive [bossdie v]\ngo to (boss v)\ndeath\nwait (1) seconds\n\ndefine death\nif <(clone) = [0]> then\n    set size to (150) %\n    start sound [Mega Man 5 SFX \(7\)2 v]\n    switch costume to (death v)\n    point in direction (0)\n    create clone of (_myself_ v)\n    turn right (90) degrees\n    create clone of (_myself_ v)\n    turn right (90) degrees\n    create clone of (_myself_ v)\n    turn right (90) degrees\n    create clone of (_myself_ v)\n    point in direction (45)\n    create clone of (_myself_ v)\n    turn right (90) degrees\n    create clone of (_myself_ v)\n    turn right (90) degrees\n    create clone of (_myself_ v)\n    turn right (90) degrees\n    create clone of (_myself_ v)\n    point in direction (90)\nend\n\nwhen I start as a clone\nset [clone v] to [1]\n\nwhen I start as a clone\nshow\nforever\n    wait (.05) seconds\n    go to [front v] layer\n    next costume\nend\n\nwhen I start as a clone\nrepeat until <touching (_edge_ v)?>\n    move (4) steps\nend\ndelete this clone\n\n@menu thingy\n\nwhen flag clicked\nhide\nforever\n    if <<(AREA AT) = [hub]> or <(AREA AT) = [8]>> then\n        wait (.2) seconds\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\nif <(AREA AT) = [8]> then\n    switch costume to (costume3 v)\n    go to x: (300) y: (pick random (-200) to (200))\n    set size to (200) %\n    set [ghost v] effect to (80)\n    show\n    repeat (15)\n        turn left (15) degrees\n        change x by (-15)\n    end\n    repeat (5)\n        turn left (15) degrees\n        change x by (-15)\n        change [ghost v] effect by (-5)\n        change size by (15)\n    end\n    switch costume to (costume2 v)\n    repeat (2)\n        turn left (15) degrees\n        change x by (-15)\n        change size by (-15)\n    end\n    repeat (10)\n        turn left (15) degrees\n        change x by (-15)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nelse\n    go to x: (300) y: (pick random (-200) to (200))\n    go to [back v] layer\n    switch costume to (costume1 v)\n    set size to (pick random (50) to (100)) %\n    set [ghost v] effect to (50)\n    show\n    repeat (30)\n        turn left (15) degrees\n        change x by (-15)\n    end\n    delete this clone\nend\n\nwhen I receive [get ready v]\ndelete this clone\n\nwhen I receive [weapon get screen v]\nset [area at v] to [hub]\n\n@Special Weapons\n\nwhen flag clicked\nset [clone v] to [0]\nhide\n\nwhen I receive [fire special weapon v]\nif <(clone) = [0]> then\n    go to (mega man v)\n    if <(Megaman Costume) = [2]> then\n        if <(cooldown) = [0]> then\n            set [cooldown v] to [1]\n            broadcast (za wario v)\n        end\n    end\n    if <(Megaman Costume) = [3]> then\n        if <(cooldown) = [0]> then\n            set [cooldown v] to [1]\n            set rotation style [left-right v]\n            point in direction ([direction v] of [mega man v])\n            switch costume to (missile v)\n            create clone of (_myself_ v)\n            change y by (50)\n            create clone of (_myself_ v)\n            change y by (-100)\n            create clone of (_myself_ v)\n            wait (.1) seconds\n        end\n    end\n    if <(Megaman Costume) = [4]> then\n        if <(cooldown) = [0]> then\n            set [cooldown v] to [1]\n            set rotation style [left-right v]\n            point in direction ([direction v] of [mega man v])\n            switch costume to (searchblade1 v)\n            create clone of (_myself_ v)\n            wait (.1) seconds\n        end\n    end\nend\n\nwhen I start as a clone\nset [clone v] to [1]\nif <(costume [number v]) = [6]> then\n    forever\n        switch costume to (searchblade1 v)\n        wait (.1) seconds\n        switch costume to (searchblade2 v)\n        wait (.1) seconds\n    end\nend\n\nwhen I start as a clone\ngo to [front v] layer\nshow\nif <(costume [number v]) = [6]> then\n    start sound [Mega Man 6 SRX \(28\) v]\n    set [y v] to [0]\n    set rotation style [left-right v]\n    repeat until <<touching (_edge_ v)?> or <(y) > [4]>>\n        repeat until <<touching (ground v)?> or <touching (_edge_ v)?>>\n            move (25) steps\n        end\n        if <<touching (_edge_ v)?> or <(y) > [4]>> then\n            delete this clone\n        else\n            change [y v] by (1)\n            move (-50) steps\n            point in direction ((direction) - (-140))\n            start sound [SE \[67\] v]\n        end\n    end\n    delete this clone\nend\nif <(costume [number v]) = [1]> then\n    set [y v] to [0]\n    set [x v] to [30]\n    repeat (pick random (30) to (80))\n        go to (mega man v)\n        change x by (([sin v] of (y) ) * (x))\n        change y by (([cos v] of (y) ) * (x))\n        change [y v] by (15)\n        change [x v] by (1)\n        turn right (45) degrees\n    end\n    repeat (10)\n        go to (mega man v)\n        change x by (([sin v] of (y) ) * (x))\n        change y by (([cos v] of (y) ) * (x))\n        change [y v] by (20)\n        change [x v] by (10)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [6]> then\nif <(costume [number v]) = [8]> then\n    set [ghost v] effect to (100)\n    set rotation style [all around v]\n    repeat (12)\n        turn right (30) degrees\n        change [ghost v] effect by (-10)\n    end\n    start sound [missile v]\n    set [y v] to [0]\n    repeat (3)\n        switch costume to (bomb1 v)\n        move (y) steps\n        switch costume to (bomb2 v)\n        move (y) steps\n        change [y v] by (1)\n    end\n    repeat until <<(y) > [15]> or <<touching (_edge_ v)?> or <touching (ground v)?>>>\n        switch costume to (bomb1 v)\n        move (10) steps\n        switch costume to (bomb2 v)\n        move (10) steps\n        change [y v] by (1)\n    end\n    turn left (-90) degrees\n    start sound [SE \[83\] v]\n    switch costume to (explo1 v)\n    repeat (3)\n        wait (.02) seconds\n        next costume\n    end\n    wait (.02) seconds\n    delete this clone\nend\n\nwhen I receive [change special weapon v]\nset [cooldown v] to [0]\ndelete this clone\n\nwhen I receive [teleportin v]\nforever\n    if <(cooldown) = [1]> then\n        if <(Megaman Costume) = [2]> then\n            wait (4) seconds\n        else\n            if <(Megaman Costume) = [3]> then\n                wait (1) seconds\n            else\n                wait (.2) seconds\n            end\n        end\n        set [cooldown v] to [0]\n    end\nend\n\nwhen I start as a clone\nwait (5) seconds\ndelete this clone\n\n@weapon get\n\nwhen flag clicked\nhide\n\nwhen I receive [get weapon v]\nrepeat (3)\n    go to (mega man v)\n    get weapon\n    wait (.6) seconds\nend\n\ndefine get weapon\nif <(clone) = [0]> then\n    set size to (150) %\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\nset [clone v] to [1]\n\nwhen I start as a clone\nswitch costume to (death v)\ngo to [front v] layer\nshow\n\nwhen I start as a clone\nmove (-120) steps\nrepeat (12)\n    move (10) steps\nend\ndelete this clone\n\n@border\n\nwhen I receive [robots screen v]\nhide\n\nwhen flag clicked\nhide\nforever\n    go to [front v] layer\nend\n\nwhen I receive [teleportin v]\nshow\n\n@stage_object\n\nwhen flag clicked\ngo to [front v] layer\nset [z v] to [0]\nhide\nforever\n    if <(AREA AT) = [3]> then\n        go to (misc objects v)\n        if <([abs v] of (x position) ) > [250]> then\n            hide\n        else\n            go to [front v] layer\n            clear graphic effects\n            show\n        end\n    else\n        if <(AREA AT) = [2]> then\n            set x to (0)\n            set y to ((([sin v] of (z) ) * (15)) + (-50))\n            change [z v] by (8)\n            set [ghost v] effect to (5)\n            show\n        else\n            hide\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(AREA AT) = [2]> then\n        switch costume to (costume1 v)\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n    else\n        switch costume to (chain v)\n    end\nend\n\nwhen I receive [teleportin v]\nrepeat (50)\n    go to [front v] layer\nend\n\n@nav\n\nwhen flag clicked\nhide\n\nwhen I receive [get ready v]\nwait (3) seconds\nif <(Boss Checkpoint?) = [0]> then\n    switch costume to (Stage Selected)\n    go to [front v] layer\n    clear graphic effects\n    go to x: (-120) y: (-300)\n    show\n    repeat (3)\n        change y by (10)\n        set [ghost v] effect to (pick random (0) to (25))\n        set [pixelate v] effect to (pick random (0) to (15))\n    end\n    repeat (4)\n        change y by (5)\n        set [ghost v] effect to (pick random (0) to (25))\n        set [pixelate v] effect to (pick random (0) to (15))\n    end\n    repeat (3)\n        change y by (2)\n        set [ghost v] effect to (pick random (0) to (25))\n        set [pixelate v] effect to (pick random (0) to (15))\n    end\n    repeat (3)\n        change y by (1)\n        set [ghost v] effect to (pick random (0) to (25))\n        set [pixelate v] effect to (pick random (0) to (15))\n    end\n    repeat (60)\n        set [ghost v] effect to (pick random (0) to (30))\n        set [pixelate v] effect to (pick random (0) to (5))\n    end\n    repeat (3)\n        change y by (-1)\n        set [ghost v] effect to (pick random (0) to (25))\n        set [pixelate v] effect to (pick random (0) to (15))\n    end\n    repeat (3)\n        change y by (-2)\n        set [ghost v] effect to (pick random (0) to (25))\n        set [pixelate v] effect to (pick random (0) to (15))\n    end\n    repeat (4)\n        change y by (-5)\n        set [ghost v] effect to (pick random (0) to (25))\n        set [pixelate v] effect to (pick random (0) to (15))\n    end\n    repeat (3)\n        change y by (-10)\n        set [ghost v] effect to (pick random (0) to (25))\n        set [pixelate v] effect to (pick random (0) to (15))\n    end\n    hide\nend\n\nwhen I receive [show story v]\ngo to x: (0) y: (0)\nclear graphic effects\nset [ghost v] effect to (100)\nswitch costume to (story1 v)\ngo to [front v] layer\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nrepeat (4)\n    wait until <<key (space v) pressed?> or <mouse down?>>\n    repeat (10)\n        change [brightness v] effect by (-10)\n    end\n    next costume\n    repeat (10)\n        change [brightness v] effect by (10)\n    end\n    set [brightness v] effect to (0)\nend\nwait until <<key (space v) pressed?> or <mouse down?>>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [how to play v]\ngo to x: (0) y: (0)\nclear graphic effects\nset [ghost v] effect to (100)\nswitch costume to (howtoplay v)\ngo to [front v] layer\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait until <<key (space v) pressed?> or <mouse down?>>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@misc objects\n\nwhen flag clicked\nhide\n\nwhen I receive [teleportin v]\nwait (.02) seconds\nstop [other scripts in sprite v]\nset [clone v] to [0]\nset y to (-50)\nset [yoku_block_timer v] to [1]\nset [level_x v] to [5450]\ncreate clone of (_myself_ v)\nset y to (-10)\nset [yoku_block_timer v] to [3]\nset [level_x v] to [5550]\ncreate clone of (_myself_ v)\nset [level_x v] to [2800]\nset y to (-20)\nset [yoku_block_timer v] to [1]\nset [level_x v] to [5890]\ncreate clone of (_myself_ v)\nset y to (0)\nset [yoku_block_timer v] to [1.5]\nset [level_x v] to [5990]\ncreate clone of (_myself_ v)\nset [level_x v] to [2800]\nset y to (15)\nset [yoku_block_timer v] to [2]\nset [level_x v] to [6100]\ncreate clone of (_myself_ v)\nset [level_x v] to [2800]\nset y to (30)\nset [yoku_block_timer v] to [2.5]\nset [level_x v] to [6200]\ncreate clone of (_myself_ v)\nset [level_x v] to [2800]\nset y to (40)\nset [yoku_block_timer v] to [2.5]\nset [level_x v] to [6300]\ncreate clone of (_myself_ v)\nset [level_x v] to [2800]\nset y to (-60)\nset [level_x v] to [2800]\nif <(Stage Selected) = [3]> then\n    broadcast (snipe platform check v)\nend\nforever\n    if <(Stage Selected) = [3]> then\n        set x to ((Level_X) - (Scroll X))\n        if <([abs v] of (x position) ) > [250]> then\n            hide\n        else\n            show\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [snipe platform check v]\nforever\n    if <(clone) = [0]> then\n        switch costume to (flyingthing1 v)\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n    end\nend\n\nwhen I receive [teleportin v]\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <(Stage Selected) = [3]> then\n        set x to ((Level_X) - (Scroll X))\n        if <([abs v] of (x position) ) > [200]> then\n            set [yoku_onscreen v] to [0]\n            hide\n        else\n            set [yoku_onscreen v] to [1]\n            show\n        end\n    else\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nset [clone v] to [1]\nset size to (200) %\nset [yoku_onscreen v] to [0]\nforever\n    switch costume to (yoku v)\n    wait (yoku_block_timer) seconds\n    go to [front v] layer\n    switch costume to (yoku1 v)\n    if <(yoku_onscreen) = [1]> then\n        start sound [SE \[8\] v]\n    end\n    repeat (4)\n        wait (.02) seconds\n        next costume\n    end\n    wait ([abs v] of ((yoku_block_timer) + (-4)) ) seconds\nend\n\nwhen I receive [snipe platform check v]\nwait (2) seconds\nwait until <(distance to [hitbox v]) < [70]>\nif <(Stage Selected) = [3]> then\n    if <(clone) = [0]> then\n        set [level_x v] to [2800]\n        start sound [SE \[93\] v]\n        repeat (5)\n            change y by (1)\n            wait (.05) seconds\n            change y by (-1)\n            wait (.05) seconds\n        end\n        set [z v] to [0]\n        start sound [SE \[88\] v]\n        repeat (300)\n            change [level_x v] by (5)\n            set y to ((([sin v] of (z) ) * (50)) + (-60))\n            change [z v] by (1)\n            if <<(distance to [hitbox v]) < [70]> and <<not <([abs v] of (x position) ) > [250]>> and <(Stage Selected) = [3]>>> then\n                broadcast (megaman move w/ platform v)\n            end\n        end\n    end\nend\n\nwhen I receive [blink v]\ndelete this clone\n\nbroadcast (blink v)\n\n@ending cutscene\n\nwhen flag clicked\nset [formation_set v] to [0]\nhide\n\nwhen I receive [play ending v]\nset [formation_set v] to [0]\nclear graphic effects\nset rotation style [left-right v]\nbroadcast (Transition Effect v)\ngo to [front v] layer\npoint in direction (90)\ngo to x: (-50) y: (30)\nwait (.5) seconds\nswitch costume to (mm10_lightslab_exterior v)\nset size to (300) %\ncreate clone of (_myself_ v)\nswitch costume to (costume2 v)\ncreate clone of (_myself_ v)\nswitch costume to (proidle v)\ncreate clone of (_myself_ v)\nswitch costume to (bass2 v)\ncreate clone of (_myself_ v)\nswitch costume to (light1 v)\ncreate clone of (_myself_ v)\nwait (1) seconds\nswitch costume to (break v)\ncreate clone of (_myself_ v)\nswitch costume to (mm10_lightslab_exterior v)\n\nwhen I start as a clone\ngo to [front v] layer\nshow\nif <(costume [number v]) = [33]> then\n    point in direction (90)\n    switch costume to (bass2 v)\n    go to x: (-220) y: (-116)\n    hide\nend\nif <(costume [number v]) = [23]> then\n    point in direction (90)\n    switch costume to (proidle v)\n    go to x: (-220) y: (-118)\n    hide\nend\nif <(costume [number v]) = [2]> then\n    point in direction (-90)\n    switch costume to (costume2 v)\n    go to x: (220) y: (-118)\n    hide\nend\nif <(costume [number v]) = [17]> then\n    point in direction (90)\n    switch costume to (break v)\n    go to x: (-124) y: (300)\n    set size to (280) %\n    glide (.5) secs to x: (-124) y: (-117)\n    switch costume to (tele2 v)\n    start sound [Mega Man 5 SFX \(2\)2 v]\n    wait (.2) seconds\n    switch costume to (idle v)\nend\nif <(costume [number v]) = [19]> then\n    go to x: (140) y: (-118)\n    point in direction (90)\n    repeat (2)\n        switch costume to (light3 v)\n        wait (.1) seconds\n        switch costume to (light1 v)\n        wait (1) seconds\n    end\n    wait (1) seconds\n    point in direction (-90)\nend\n\nwhen I receive [light talk v]\nif <<(costume [number v]) = [19]> or <(costume [number v]) = [20]>> then\n    repeat (5)\n        switch costume to (light2 v)\n        wait (.1) seconds\n        switch costume to (light1 v)\n        wait (.1) seconds\n    end\nend\n\nwhen I receive [light turn around v]\nif <<(costume [number v]) = [19]> or <(costume [number v]) = [20]>> then\n    turn right (180) degrees\nend\n\nwhen I receive [ultrabot: ah here we go again v]\nif <(costume [number v]) = [2]> then\n    point in direction (-90)\n    set size to (280) %\n    switch costume to (costume2 v)\n    go to x: (220) y: (-118)\n    go to [front v] layer\n    show\n    repeat (4)\n        switch costume to (run1 v)\n        repeat (3)\n            wait (.1) seconds\n            change x by (-13)\n            next costume\n        end\n        wait (.1) seconds\n        change x by (-13)\n    end\n    switch costume to (costume2 v)\nend\n\nwhen I receive [protoman and bass head in v]\nif <(costume [number v]) = [23]> then\n    point in direction (90)\n    switch costume to (proidle v)\n    go to x: (-220) y: (-118)\n    show\n    repeat (1)\n        switch costume to (prorun1 v)\n        repeat (3)\n            wait (.1) seconds\n            change x by (10)\n            next costume\n        end\n        wait (.1) seconds\n        change x by (10)\n    end\n    switch costume to (proidle v)\nend\nif <(costume [number v]) = [33]> then\n    wait (.5) seconds\n    point in direction (90)\n    switch costume to (bass2 v)\n    go to [front v] layer\n    go to x: (-220) y: (-116)\n    show\n    repeat (4)\n        switch costume to (bass3 v)\n        repeat (3)\n            wait (.1) seconds\n            change x by (10)\n            next costume\n        end\n        wait (.1) seconds\n        change x by (10)\n    end\n    switch costume to (bass2 v)\n    clear graphic effects\nend\n\nwhen I receive [bass: oh yeah v]\nif <(costume [number v]) = [33]> then\n    switch costume to (bassgrin v)\nend\n\nwhen I receive [dance off v]\nif <(costume [number v]) = [1]> then\n    set [z v] to [0]\n    wait until <(formation_set) = [1]>\n    forever\n        change [z v] by (2)\n        set [brightness v] effect to (([sin v] of (z) ) * (45))\n        set [fisheye v] effect to (([sin v] of (z) ) * (25))\n        set [whirl v] effect to (([sin v] of (z) ) * (5))\n    end\nend\nif <(costume [number v]) = [2]> then\n    wait (1) seconds\n    wait until <(formation_set) = [1]>\n    forever\n        switch costume to (run1 v)\n        repeat (3)\n            wait (.2) seconds\n            change x by (5)\n            next costume\n        end\n        wait (.2) seconds\n        change x by (5)\n        switch costume to (run1 v)\n        repeat (3)\n            wait (.2) seconds\n            change x by (-5)\n            next costume\n        end\n        wait (.2) seconds\n        change x by (-5)\n        repeat (3)\n            wait (.6) seconds\n            turn right (180) degrees\n            switch costume to (run1 v)\n        end\n        switch costume to (run1 v)\n        repeat (3)\n            wait (.2) seconds\n            change x by (5)\n            next costume\n        end\n        wait (.2) seconds\n        change x by (5)\n        switch costume to (run1 v)\n        repeat (3)\n            wait (.2) seconds\n            change x by (-5)\n            next costume\n        end\n        wait (.2) seconds\n        change x by (-5)\n        repeat (3)\n            wait (.6) seconds\n            turn right (180) degrees\n            switch costume to (costume2 v)\n        end\n    end\nend\n\nwhen I receive [dance off v]\nif <(costume [number v]) = [7]> then\n    repeat (2)\n        change x by (-10)\n    end\n    repeat (2)\n        change x by (-6)\n    end\n    repeat (2)\n        change x by (-4)\n    end\n    wait (.5) seconds\n    wait until <(formation_set) = [1]>\n    forever\n        switch costume to (run4 v)\n        repeat (3)\n            wait (.2) seconds\n            change x by (5)\n            next costume\n        end\n        wait (.2) seconds\n        change x by (5)\n        switch costume to (run4 v)\n        repeat (3)\n            wait (.2) seconds\n            change x by (-5)\n            next costume\n        end\n        wait (.2) seconds\n        change x by (-5)\n        repeat (3)\n            wait (.6) seconds\n            turn right (180) degrees\n            switch costume to (gunrun1 v)\n        end\n        switch costume to (gunrun1 v)\n        repeat (3)\n            wait (.2) seconds\n            change x by (5)\n            next costume\n        end\n        wait (.2) seconds\n        change x by (5)\n        switch costume to (gunrun1 v)\n        repeat (3)\n            wait (.2) seconds\n            change x by (-5)\n            next costume\n        end\n        wait (.2) seconds\n        change x by (-5)\n        repeat (3)\n            wait (.6) seconds\n            turn right (180) degrees\n            switch costume to (idlegun v)\n        end\n    end\nend\nif <(costume [number v]) = [19]> then\n    go to x: (140) y: (-118)\n    repeat (3)\n        change x by (15)\n    end\n    repeat (2)\n        change x by (8)\n    end\n    repeat (2)\n        change x by (4)\n    end\n    wait (.5) seconds\n    wait until <(formation_set) = [1]>\n    forever\n        switch costume to (light1 v)\n        wait (.2) seconds\n        switch costume to (light5 v)\n        wait (.3) seconds\n    end\nend\nif <(costume [number v]) = [23]> then\n    point in direction (90)\n    switch costume to (proidle v)\n    go to x: (-180) y: (-118)\n    show\n    repeat (3)\n        switch costume to (prorun1 v)\n        repeat (3)\n            wait (.1) seconds\n            change x by (10)\n            next costume\n        end\n        wait (.1) seconds\n        change x by (10)\n    end\n    switch costume to (proidle v)\n    wait until <(formation_set) = [1]>\n    forever\n        switch costume to (prorun1 v)\n        repeat (3)\n            wait (.2) seconds\n            change x by (5)\n            next costume\n        end\n        wait (.2) seconds\n        change x by (5)\n        switch costume to (prorun1 v)\n        repeat (3)\n            wait (.2) seconds\n            change x by (-5)\n            next costume\n        end\n        wait (.2) seconds\n        change x by (-5)\n        repeat (3)\n            wait (.6) seconds\n            turn right (180) degrees\n            switch costume to (proidlegun v)\n        end\n        switch costume to (prorungun1 v)\n        repeat (3)\n            wait (.2) seconds\n            change x by (5)\n            next costume\n        end\n        wait (.2) seconds\n        change x by (5)\n        switch costume to (prorungun1 v)\n        repeat (3)\n            wait (.2) seconds\n            change x by (-5)\n            next costume\n        end\n        wait (.2) seconds\n        change x by (-5)\n        repeat (3)\n            wait (.6) seconds\n            turn right (180) degrees\n            switch costume to (proidlegun v)\n        end\n    end\nend\nif <(costume [number v]) = [38]> then\n    point in direction (90)\n    switch costume to (bass2 v)\n    go to [front v] layer\n    go to x: (-60) y: (-116)\n    show\n    repeat (4)\n        switch costume to (bass3 v)\n        repeat (3)\n            wait (.1) seconds\n            change x by (10)\n            next costume\n        end\n        wait (.1) seconds\n        change x by (10)\n    end\n    switch costume to (bass2 v)\n    wait until <(formation_set) = [1]>\n    forever\n        switch costume to (bass2 v)\n        repeat (3)\n            wait (.2) seconds\n            change x by (5)\n            next costume\n        end\n        wait (.2) seconds\n        change x by (5)\n        switch costume to (bass2 v)\n        repeat (3)\n            wait (.2) seconds\n            change x by (-5)\n            next costume\n        end\n        wait (.2) seconds\n        change x by (-5)\n        repeat (3)\n            wait (.6) seconds\n            turn right (180) degrees\n            switch costume to (bassidlegun v)\n        end\n        switch costume to (bassgun1 v)\n        repeat (3)\n            wait (.2) seconds\n            change x by (5)\n            next costume\n        end\n        wait (.2) seconds\n        change x by (5)\n        switch costume to (bassgun1 v)\n        repeat (3)\n            wait (.2) seconds\n            change x by (-5)\n            next costume\n        end\n        wait (.2) seconds\n        change x by (-5)\n        repeat (3)\n            wait (.6) seconds\n            turn right (180) degrees\n            switch costume to (bassidlegun v)\n        end\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [1]> then\n\nwhen I receive [menu screen v]\nwait (.3) seconds\ndelete this clone\n\n@Text\n\ndefine Type X: (x) Y: (y) Button: (button) Delay: (delay) Message (message)\nset size to (200) %\ngo to x: ((x) - (10)) y: (y)\nset [var v] to [0]\nhide\nrepeat (length of (message))\n    start sound (Speaker)\n    show\n    change [var v] by (1)\n    if <(letter (Var) of (message)) = [ ]> then\n    change x by (15)\n    hide\n    if <(delay) = [2]> then\n        wait (.01) seconds\n    end\nend\n\nwhen I start as a clone\ngo to [front v] layer\nshow\nif <(size) = [250]> then\n    forever\n        show\n        wait (.6) seconds\n        hide\n        wait (.2) seconds\n    end\nend\n\nwhen I receive [text_foreground_clear v]\ndelete this clone\n\nwhen flag clicked\nerase all\nhide\n\ndefine clear\nbroadcast (text_foreground_clear v)\n\ndefine pressspace\nset size to (150) %\ngo to x: (100) y: (50)\nset [var v] to [0]\nhide\nrepeat (length of [PRESS SPACE])\n    show\n    change [var v] by (1)\n    if <(letter (Var) of [PRESS SPACE]) = [ ]> then\n    change x by (12)\n    hide\nend\n\nwhen I receive [play ending v]\nwait (5) seconds\nset [speaker v] to [light]\nbroadcast (textbox show v)\nwait (.6) seconds\nbroadcast (light talk v)\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [HELLO MEGA MAN!]\npressspace\nwait until <key (space v) pressed?>\nclear\nbroadcast (light talk v)\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [I CAN'T THANK YOU]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [ENOUGH FOR SAVING MY]\nType X: (-100) Y: (110) Button: (1) Delay: (1) Message [ROBOT FROM THE HANDS]\nType X: (-100) Y: (90) Button: (1) Delay: (1) Message [OF DR. WILY!]\npressspace\nwait until <key (space v) pressed?>\nset [speaker v] to [mega]\nclear\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [NO PROBLEM, DR LIGHT!]\npressspace\nwait until <key (space v) pressed?>\nset [speaker v] to [mega]\nclear\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [SAY. WHAT DOES]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [ULTRABOT DO ANYWAY?]\npressspace\nwait until <key (space v) pressed?>\nset [speaker v] to [light]\nclear\nbroadcast (light talk v)\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [I'M GLAD YOU ASKED!]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [LET ME SHOW YOU!]\npressspace\nwait until <key (space v) pressed?>\nset [speaker v] to [light]\nclear\nbroadcast (light turn around v)\nbroadcast (light talk v)\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [COME ON OUT]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [ULTRABOT!]\npressspace\nwait until <key (space v) pressed?>\nset [speaker v] to [light]\nclear\nbroadcast (get rid of textbox v)\nbroadcast (ultrabot: ah here we go again v)\nwait (.5) seconds\nbroadcast (light turn around v)\nwait (2) seconds\nbroadcast (textbox show v)\nwait (.8) seconds\nbroadcast (light talk v)\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [IT'S A PROTOTYPE RIGHT]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [NOW. . .]\nwait until <key (space v) pressed?>\nset [speaker v] to [light]\nbroadcast (light talk v)\nclear\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [SO IT ONLY HAS]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [ONE FUNCTION. . .]\nType X: (-100) Y: (110) Button: (1) Delay: (1) Message [AND THAT IS TO PLAY]\nType X: (-100) Y: (90) Button: (1) Delay: (1) Message [MUSIC!]\npressspace\nwait until <key (space v) pressed?>\nclear\nbroadcast (get rid of textbox v)\nwait (.5) seconds\nset [speaker v] to [light]\nbroadcast (ultrabot play muisc v)\nwait (2) seconds\nbroadcast (protoman and bass head in v)\nwait (5) seconds\nbroadcast (textbox show v)\nset [speaker v] to [proto]\nwait (.8) seconds\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [YO DR LIGHT, DO]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [YOU MIND IF WE JOIN]\nType X: (-100) Y: (110) Button: (1) Delay: (1) Message [IN?]\npressspace\nwait until <key (space v) pressed?>\nset [speaker v] to [light]\nbroadcast (light talk v)\nclear\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [NOT AT ALL!]\npressspace\nwait until <key (space v) pressed?>\nclear\nset [speaker v] to [bass]\nbroadcast (bass: oh yeah v)\nclear\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [SWEET!]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [I LOVE THIS SONG!]\npressspace\nwait until <key (space v) pressed?>\nclear\nset [formation_set v] to [0]\nbroadcast (get rid of textbox v)\nwait (.5) seconds\nbroadcast (dance off v)\nwait (3) seconds\nset [formation_set v] to [1]\n\ndefine Insanely fast text (x) (y) (text) (size)\nset size to (size) %\ngo to x: ((x) - (10)) y: (y)\nset [var v] to [0]\nhide\nrepeat (length of (text))\n    show\n    change [var v] by (1)\n    if <(letter (Var) of (text)) = [ ]> then\n    change x by ((size) / (13))\n    hide\nend\n\nwhen I receive [game start fade v]\ndelete this clone\n\nwhen flag clicked\nhide\n\npressspace\nwait until <key (space v) pressed?>\nclear\n\n@Textbox/Icons\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nswitch costume to (textbox v)\nset [ghost v] effect to (10)\ngo to x: (16) y: (300)\ngo to [front v] layer\nshow\nrepeat (5)\n    change y by (-25)\nend\ngo to x: (16) y: (112)\n\nwhen I receive [blink v]\ndelete this clone\n\nbroadcast (blink v)\n\nwhen I receive [get rid of textbox v]\nrepeat (5)\n    change y by (25)\nend\nhide\ndelete this clone\n\nwhen I receive [textbox show v]\nswitch costume to (Speaker)\ncreate clone of (_myself_ v)\nset [ghost v] effect to (100)\ngo to x: (-154) y: (127)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\ngo to [front v] layer\nforever\n    switch costume to (Speaker)\nend\n\n@ultrabot music\n\nwhen flag clicked\nhide\n\nwhen I receive [menu screen v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [ultrabot play muisc v]\nforever\n    wait (.4) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nset size to (300) %\nclear graphic effects\ngo to x: ((36) + (pick random (-15) to (15))) y: (-100)\nswitch costume to (pick random (1) to (2))\ngo to [front v] layer\nset [z v] to (x position)\nset [x v] to (pick random (-1000) to (1000))\nshow\nrepeat (30)\n    set x to ((z) + (([sin v] of (x) ) * (30)))\n    change [x v] by (10)\n    change y by (3)\nend\ndelete this clone\n\nwhen I receive [ultrabot play muisc v]\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (25)\n    else\n        clear graphic effects\n    end\nend\n\nwhen I receive [ultrabot play muisc v]\ngo to x: (-162) y: (999)\nset size to (100) %\nswitch costume to (costume8 v)\ngo to [front v] layer\nshow\nrepeat (5)\n    change y by (-10)\nend\nrepeat (5)\n    change y by (-3)\nend\n\nwhen this sprite clicked\nif <(costume [number v]) = [3]> then\n    broadcast (Transition Effect v)\n    broadcast (title music v)\n    wait (.5) seconds\n    broadcast (Menu Screen v)\nend\n\n@toenail\n\nwhen flag clicked\nswitch costume to (costume2 v)\nset [brightness v] effect to (4)\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\nshow\nforever\n    go to [front v] layer\nend\n\n@flash stopper\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [za wario v]\nstart sound [Mega Man 6 SRX \(67\) v]\ngo to [front v] layer\nshow\nrepeat (2)\n    clear graphic effects\n    wait (.1) seconds\n    set [ghost v] effect to (50)\n    wait (.1) seconds\nend\nhide\n\nwhen I receive [brighten stop time v]\nstart sound [Mega Man 6 SRX \(51\) v]\ngo to [front v] layer\nshow\nrepeat (2)\n    clear graphic effects\n    wait (.1) seconds\n    set [ghost v] effect to (50)\n    wait (.1) seconds\nend\nhide\n\n