Mega Man - Revenge of the Robots    /// Scrolling Platformer #games new
@Stage\n\nwhen flag clicked\nset [music v] to [7]\nset [scroll x v] to [0]\nforever\n    play sound (Music) until done\nend\n\nwhen I receive [die v]\nrepeat (20)\n    change volume by (-5)\nend\nset volume to (0) %\nwait (2) seconds\nbroadcast (Screen Transition v)\nwait (.6) seconds\nchange [mega man extra lives v] by (-1)\nif <(Mega Man Extra lives) < [1]> then\n    set [mega man extra lives v] to [3]\n    broadcast (GAME OVER v)\nelse\n    broadcast (SetUp v)\nend\n\nwhen I receive [ready v]\nif <(Robot Master Stage) = [4]> then\n    if <(checkpoint) = [0]> then\n        set [scroll x min v] to [0]\n        set [scroll x max v] to [1356]\n        set [scroll y max v] to [0]\n        set [scroll y min v] to [0]\n    end\n    if <(checkpoint) = [1]> then\n        set [scroll x min v] to [1370]\n        set [scroll y max v] to [-525]\n        set [scroll y min v] to [-525]\n        set [scroll x max v] to [3752]\n    end\n    if <(checkpoint) = [2]> then\n        set [scroll x min v] to [3752]\n        set [scroll y max v] to [-1050]\n        set [scroll y min v] to [-1050]\n        set [scroll x max v] to [4676]\n    end\n    if <(checkpoint) = [3]> then\n        set [scroll x min v] to [5201]\n        set [scroll y max v] to [-1050]\n        set [scroll y min v] to [-1050]\n        set [scroll x max v] to [5201]\n    end\nend\nif <(Robot Master Stage) = [3]> then\n    if <(checkpoint) = [0]> then\n        set [scroll x min v] to [0]\n        set [scroll x max v] to [4780]\n        set [scroll y max v] to [0]\n        set [scroll y min v] to [0]\n    end\n    if <(checkpoint) = [1]> then\n        set [scroll x min v] to [5305]\n        set [scroll x max v] to [5305]\n        set [scroll y max v] to [0]\n        set [scroll y min v] to [0]\n    end\nend\nif <(Robot Master Stage) = [6]> then\n    if <(checkpoint) = [0]> then\n        set [scroll x min v] to [0]\n        set [scroll x max v] to [0]\n        set [scroll y max v] to [0]\n        set [scroll y min v] to [0]\n    end\n    if <(checkpoint) = [1]> then\n        set [scroll x min v] to [0]\n        set [scroll x max v] to [1730]\n        set [scroll y max v] to [-2100]\n        set [scroll y min v] to [-2100]\n    end\n    if <(checkpoint) = [2]> then\n        set [scroll x min v] to [4252]\n        set [scroll x max v] to [5000]\n        set [scroll y max v] to [-2100]\n        set [scroll y min v] to [-2100]\n    end\n    if <(checkpoint) = [3]> then\n        set [scroll x min v] to [5525]\n        set [scroll x max v] to [5525]\n        set [scroll y max v] to [-2100]\n        set [scroll y min v] to [-2100]\n    end\nend\nif <(Robot Master Stage) = [1]> then\n    if <(checkpoint) = [0]> then\n        set [scroll x min v] to [0]\n        set [scroll x max v] to [1615]\n        set [scroll y max v] to [0]\n        set [scroll y min v] to [0]\n    end\n    if <(checkpoint) = [1]> then\n        set [scroll x min v] to [1615]\n        set [scroll x max v] to [1615]\n        set [scroll y max v] to [0]\n        set [scroll y min v] to [0]\n    end\n    if <(checkpoint) = [2]> then\n        set [scroll x min v] to [1615]\n        set [scroll x max v] to [2435]\n        set [scroll y max v] to [1575]\n        set [scroll y min v] to [1575]\n    end\n    if <(checkpoint) = [3]> then\n        set [scroll x min v] to [2960]\n        set [scroll x max v] to [2960]\n        set [scroll y max v] to [1575]\n        set [scroll y min v] to [1575]\n    end\nend\nif <(Robot Master Stage) = [2]> then\n    if <(checkpoint) = [0]> then\n        set [scroll x min v] to [0]\n        set [scroll x max v] to [0]\n        set [scroll y max v] to [0]\n        set [scroll y min v] to [0]\n    end\n    if <(checkpoint) = [1]> then\n        set [scroll x min v] to [0]\n        set [scroll x max v] to [2613]\n        set [scroll y max v] to [2100]\n        set [scroll y min v] to [2100]\n    end\n    if <(checkpoint) = [2]> then\n        set [scroll x min v] to [3138]\n        set [scroll x max v] to [3138]\n        set [scroll y max v] to [2100]\n        set [scroll y min v] to [2100]\n    end\nend\nif <(Robot Master Stage) = [5]> then\n    if <(checkpoint) = [0]> then\n        set [scroll x min v] to [0]\n        set [scroll x max v] to [5000]\n        set [scroll y max v] to [0]\n        set [scroll y min v] to [0]\n    end\n    if <(checkpoint) = [1]> then\n        set [scroll x min v] to [5525]\n        set [scroll x max v] to [5525]\n        set [scroll y max v] to [0]\n        set [scroll y min v] to [0]\n    end\nend\nif <(Robot Master Stage) = [7]> then\n    if <(checkpoint) = [0]> then\n        set [scroll x min v] to [0]\n        set [scroll x max v] to [4900]\n        set [scroll y max v] to [0]\n        set [scroll y min v] to [0]\n    end\n    if <(checkpoint) = [1]> then\n        set [scroll x min v] to [4900]\n        set [scroll x max v] to [4900]\n        set [scroll y max v] to [0]\n        set [scroll y min v] to [0]\n    end\n    if <(checkpoint) = [2]> then\n        set [scroll x min v] to [5425]\n        set [scroll x max v] to [7250]\n        set [scroll y max v] to [0]\n        set [scroll y min v] to [0]\n    end\n    if <(checkpoint) = [3]> then\n        set [scroll x min v] to [7250]\n        set [scroll x max v] to [7250]\n        set [scroll y max v] to [0]\n        set [scroll y min v] to [0]\n    end\n    if <(checkpoint) = [4]> then\n        set [scroll x min v] to [7250]\n        set [scroll x max v] to [8590]\n        set [scroll y max v] to [1050]\n        set [scroll y min v] to [1050]\n    end\n    if <(checkpoint) = [5]> then\n        set [scroll x min v] to [9610]\n        set [scroll x max v] to [9610]\n        set [scroll y max v] to [1050]\n        set [scroll y min v] to [1050]\n    end\n    if <(checkpoint) = [6]> then\n        set [scroll x min v] to [9610]\n        set [scroll x max v] to [11000]\n        set [scroll y max v] to [2100]\n        set [scroll y min v] to [2100]\n    end\n    if <(checkpoint) = [7]> then\n        set [scroll x min v] to [11525]\n        set [scroll x max v] to [11525]\n        set [scroll y max v] to [2100]\n        set [scroll y min v] to [2100]\n    end\nend\nif <(Robot Master Stage) = [9]> then\n    if <(checkpoint) = [1]> then\n        set [scroll x min v] to [3625]\n        set [scroll x max v] to [3625]\n        set [scroll y max v] to [525]\n        set [scroll y min v] to [525]\n    end\n    if <(checkpoint) = [0]> then\n        set [scroll x min v] to [0]\n        set [scroll x max v] to [0]\n        set [scroll y max v] to [0]\n        set [scroll y min v] to [0]\n    end\nend\nif <(Robot Master Stage) = [10]> then\n    if <(checkpoint) = [0]> then\n        set [scroll x min v] to [0]\n        set [scroll x max v] to [0]\n        set [scroll y max v] to [0]\n        set [scroll y min v] to [0]\n    end\nend\nif <(Robot Master Stage) = [8]> then\n    if <(checkpoint) = [0]> then\n        set [scroll x min v] to [0]\n        set [scroll x max v] to [9000]\n        set [scroll y max v] to [0]\n        set [scroll y min v] to [0]\n    end\n    if <(checkpoint) = [1]> then\n        set [scroll x min v] to [4600]\n        set [scroll x max v] to [9000]\n        set [scroll y max v] to [0]\n        set [scroll y min v] to [0]\n    end\n    if <(checkpoint) = [2]> then\n        set [scroll x min v] to [9525]\n        set [scroll x max v] to [9525]\n        set [scroll y max v] to [0]\n        set [scroll y min v] to [0]\n    end\nend\n\nwhen I receive [transition downwards v]\nrepeat (35)\n    change [scroll y max v] by (-15)\n    change [scroll y min v] by (-15)\nend\nif <(Robot Master Stage) = [4]> then\n    if <(checkpoint) = [0]> then\n        set [checkpoint v] to [1]\n        set [scroll x min v] to [1356]\n        set [scroll x max v] to [3752]\n    else\n        if <(checkpoint) = [1]> then\n            set [checkpoint v] to [2]\n            set [scroll x min v] to [3752]\n            set [scroll x max v] to [4676]\n        end\n    end\nend\nif <(Robot Master Stage) = [6]> then\n    if <<(checkpoint) = [0]> and <(Scroll Y) < [-2000]>> then\n        set [checkpoint v] to [1]\n        set [scroll x min v] to [0]\n        set [scroll x max v] to [1730]\n    else\n        if <<(checkpoint) = [1]> and <(Scroll X) > [4200]>> then\n            set [checkpoint v] to [2]\n            set [scroll x min v] to [4252]\n            set [scroll x max v] to [5000]\n        end\n    end\nend\n\nwhen I receive [bossgatetransition v]\nbroadcast (Transition Right v)\n\nwhen I receive [transition right v]\nset [scroll x min v] to (Scroll X Max)\nrepeat (35)\n    change [scroll x max v] by (15)\n    change [scroll x min v] by (15)\nend\nif <(Robot Master Stage) = [4]> then\n    if <(checkpoint) = [3]> then\n        wait (1) seconds\n        broadcast (Boss Intro v)\n    end\n    if <(checkpoint) = [2]> then\n        set [checkpoint v] to [3]\n        wait (.5) seconds\n        set [scroll x max v] to [5201]\n    end\nend\nif <(Robot Master Stage) = [10]> then\n    if <(checkpoint) = [0]> then\n        wait (1) seconds\n        broadcast (Boss Intro v)\n        set [scroll x max v] to [525]\n    end\nend\nif <(Robot Master Stage) = [3]> then\n    if <(checkpoint) = [1]> then\n        wait (1) seconds\n        broadcast (Boss Intro v)\n    end\n    if <(checkpoint) = [0]> then\n        set [checkpoint v] to [1]\n        wait (.5) seconds\n        set [scroll x max v] to [5305]\n    end\nend\nif <(Robot Master Stage) = [6]> then\n    if <(checkpoint) = [3]> then\n        wait (1) seconds\n        broadcast (Boss Intro v)\n        set [scroll x max v] to [6050]\n    end\n    if <(checkpoint) = [2]> then\n        set [checkpoint v] to [3]\n        wait (.5) seconds\n        set [scroll x max v] to [5525]\n    end\nend\nif <(Robot Master Stage) = [1]> then\n    if <(checkpoint) = [3]> then\n        wait (1) seconds\n        broadcast (Boss Intro v)\n        set [scroll x max v] to [3485]\n    end\n    if <(checkpoint) = [2]> then\n        set [checkpoint v] to [3]\n        wait (.5) seconds\n        set [scroll x max v] to [2960]\n    end\nend\nif <(Robot Master Stage) = [2]> then\n    if <(checkpoint) = [2]> then\n        wait (1) seconds\n        broadcast (Boss Intro v)\n        set [scroll x max v] to [3663]\n    end\n    if <(checkpoint) = [1]> then\n        set [checkpoint v] to [2]\n        wait (.5) seconds\n        set [scroll x max v] to [3138]\n    end\nend\nif <(Robot Master Stage) = [5]> then\n    if <(checkpoint) = [1]> then\n        wait (1) seconds\n        broadcast (Boss Intro v)\n        set [scroll x max v] to [6050]\n    end\n    if <(checkpoint) = [0]> then\n        set [checkpoint v] to [1]\n        wait (.5) seconds\n        set [scroll x max v] to [5525]\n    end\nend\nif <(Robot Master Stage) = [8]> then\n    if <(checkpoint) = [2]> then\n        wait (1) seconds\n        broadcast (Boss Intro v)\n    end\n    if <(checkpoint) = [1]> then\n        set [checkpoint v] to [2]\n        set [scroll x max v] to [9525]\n    end\nend\nif <(Robot Master Stage) = [9]> then\n    if <(checkpoint) = [1]> then\n        wait (1) seconds\n        broadcast (docter wily's intermission v)\n    end\n    if <(checkpoint) = [0]> then\n        wait (1) seconds\n        set [checkpoint v] to [1]\n        set [scroll x max v] to [3625]\n    end\nend\nif <(Robot Master Stage) = [7]> then\n    if <<(checkpoint) = [0]> or <(checkpoint) = [1]>> then\n        wait (1) seconds\n        set [checkpoint v] to [1]\n        set [scroll x max v] to [5425]\n        broadcast (Boss Intro v)\n    end\n    if <(checkpoint) = [4]> then\n        wait (1) seconds\n        broadcast (Boss Intro v)\n    end\n    if <(checkpoint) = [7]> then\n        wait (1) seconds\n        broadcast (Boss Intro v)\n    end\n    if <(checkpoint) = [6]> then\n        wait (1) seconds\n        set [checkpoint v] to [7]\n    end\nend\n\nwhen I receive [boss intro v]\nrepeat (10)\n    change volume by (-10)\nend\nif <(Robot Master Stage) = [9]> then\n    if <(Heard wily's intermission?) = [1]> then\n        set [music v] to [2]\n        repeat (10)\n            change volume by (-10)\n        end\n        stop all sounds\n        set volume to (0) %\n        repeat (10)\n            change volume by (5)\n        end\n        set volume to (100) %\n    end\nelse\n    if <(Robot Master Stage) = [10]> then\n        set [music v] to [16]\n    end\n    if <<<(Robot Master Stage) = [7]> or <(Robot Master Stage) = [8]>> or <(Robot Master Stage) = [9]>> then\n        set [music v] to [19]\n    end\n    if <<(Robot Master Stage) = [1]> or <(Robot Master Stage) = [2]>> then\n        set [music v] to [1]\n    end\n    if <<(Robot Master Stage) = [3]> or <(Robot Master Stage) = [4]>> then\n        set [music v] to [3]\n    end\n    if <<(Robot Master Stage) = [5]> or <(Robot Master Stage) = [6]>> then\n        set [music v] to [2]\n    end\n    stop all sounds\n    set volume to (0) %\n    repeat (10)\n        change volume by (10)\n    end\n    set volume to (100) %\nend\n\nwhen I receive [bossdie v]\nrepeat (10)\n    change volume by (-10)\nend\nset volume to (0) %\n\nwhen I receive [stage select fade v]\nrepeat (20)\n    change volume by (-5)\nend\nset volume to (0) %\n\nwhen I receive [setup v]\nset [scroll x v] to [0]\nif <(Robot Master Stage) = [1]> then\n    set [scroll x max v] to [5000]\n    set [music v] to [11]\n    stop all sounds\nend\nif <(Robot Master Stage) = [4]> then\n    set [scroll x max v] to [5000]\n    set [music v] to [4]\n    stop all sounds\nend\nif <(Robot Master Stage) = [3]> then\n    set [scroll x max v] to [5000]\n    set [music v] to [8]\n    stop all sounds\nend\nif <(Robot Master Stage) = [6]> then\n    set [scroll x max v] to [0]\n    set [music v] to [13]\n    stop all sounds\nend\nif <(Robot Master Stage) = [2]> then\n    set [scroll x max v] to [0]\n    set [music v] to [10]\n    stop all sounds\nend\nif <(Robot Master Stage) = [5]> then\n    set [scroll x max v] to [5000]\n    set [music v] to [12]\n    stop all sounds\nend\nif <(Robot Master Stage) = [7]> then\n    set [scroll x max v] to [5000]\n    set [music v] to [18]\n    stop all sounds\nend\nif <(Robot Master Stage) = [8]> then\n    set [scroll x max v] to [5000]\n    set [music v] to [15]\n    stop all sounds\nend\nif <(Robot Master Stage) = [9]> then\n    set [scroll x max v] to [5000]\n    set [music v] to [20]\n    stop all sounds\nend\nif <(Robot Master Stage) = [10]> then\n    set [scroll x max v] to [5000]\n    set [music v] to [17]\n    stop all sounds\nend\nbroadcast (READY v)\nset volume to (0) %\nrepeat (20)\n    change volume by (5)\nend\nset volume to (100) %\n\nwhen I receive [stage select fade v]\nset [checkpoint v] to [0]\nset [scroll x max v] to [0]\nset [scroll x min v] to [0]\nset [scroll y max v] to [0]\nset [scroll y min v] to [0]\n\nwhen flag clicked\nset [mega man extra lives v] to [3]\nset [mega man costume v] to [1]\ndelete all of [robot master weapons v]\nrepeat (6)\n    add [0] to [robot master weapons v]\nend\n\nwhen I receive [weapon get screen v]\nset [music v] to [9]\nstop all sounds\nrepeat (10)\n    change volume by (10)\nend\nset volume to (100) %\n\nwhen I receive [stage select v]\nrepeat (10)\n    change volume by (-10)\nend\nset [music v] to [5]\nif <not <(Robot Master Weapons) = [111111]>> then\n    stop all sounds\n    repeat (10)\n        change volume by (10)\n    end\n    set volume to (100) %\nend\n\nwhen I receive [stage select v]\nif <(Game Difficulty) = [1]> then\n    if <(Mega Man Extra lives) < [8]> then\n        set [mega man extra lives v] to [8]\n    end\nend\n\nwhen I receive [game over v]\nrepeat (10)\n    change volume by (-10)\nend\nset [music v] to [14]\nstop all sounds\nrepeat (10)\n    change volume by (10)\nend\nset volume to (100) %\n\nwhen I receive [ready v]\nset [mega man special weapon selected v] to [0]\n\nwhen flag clicked\nset [mega man costume v] to [1]\n\ndefine find next weapon (z/x)\nif <(z/x) = [2]> then\n    set [findweaponcounter v] to [1]\n    change [mega man special weapon selected v] by (1)\n    if <(Mega Man Special Weapon Selected) > [6]> then\n        set [mega man special weapon selected v] to [0]\n    end\n    repeat until <<<not <(item (Mega Man Special Weapon Selected) of [robot master weapons v]) = [0]>> and <not <(item (Mega Man Special Weapon Selected) of [robot master weapons v]) = []>>> or <(Mega Man Special Weapon Selected) = [0]>>\n        change [mega man special weapon selected v] by (1)\n        if <(Mega Man Special Weapon Selected) > [6]> then\n            set [mega man special weapon selected v] to [0]\n        end\n    end\nend\nif <(z/x) = [1]> then\n    set [findweaponcounter v] to [1]\n    change [mega man special weapon selected v] by (-1)\n    repeat until <<<not <(item (Mega Man Special Weapon Selected) of [robot master weapons v]) = [0]>> and <not <(item (Mega Man Special Weapon Selected) of [robot master weapons v]) = []>>> or <(Mega Man Special Weapon Selected) = [0]>>\n        change [mega man special weapon selected v] by (-1)\n        if <(Mega Man Special Weapon Selected) < [0]> then\n            set [mega man special weapon selected v] to [6]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Show stage select stars?) = [1]> then\n        set [mega man special weapon selected v] to [0]\n    else\n        if <key (x v) pressed?> then\n            find next weapon [2]\n            wait until <not <key (x v) pressed?>>\n        else\n            if <key (z v) pressed?> then\n                find next weapon [1]\n                wait until <not <key (z v) pressed?>>\n            end\n        end\n    end\nend\n\nwhen I receive [transition up v]\nrepeat (35)\n    change [scroll y max v] by (15)\n    change [scroll y min v] by (15)\nend\nif <(Robot Master Stage) = [6]> then\n    if <(checkpoint) = [1]> then\n        set [checkpoint v] to [1]\n        set [scroll x min v] to [0]\n        set [scroll x max v] to [4252]\n    end\nend\nif <(Robot Master Stage) = [1]> then\n    if <(checkpoint) = [0]> then\n        set [checkpoint v] to [1]\n    else\n        if <<(checkpoint) = [1]> and <(Scroll Y) > [1570]>> then\n            set [checkpoint v] to [2]\n            set [scroll x min v] to [1615]\n            set [scroll x max v] to [2435]\n        end\n    end\nend\nif <(Robot Master Stage) = [2]> then\n    if <<(checkpoint) = [0]> and <(Scroll Y) > [2050]>> then\n        set [checkpoint v] to [1]\n        set [scroll x min v] to [0]\n        set [scroll x max v] to [2613]\n    end\nend\nif <(Robot Master Stage) = [7]> then\n    if <<(checkpoint) = [3]> and <(Scroll Y) > [1000]>> then\n        set [checkpoint v] to [4]\n        set [scroll x min v] to [7250]\n        set [scroll x max v] to [8590]\n    else\n        if <<(checkpoint) = [5]> and <(Scroll Y) > [2000]>> then\n            set [checkpoint v] to [6]\n            set [scroll x min v] to [9610]\n            set [scroll x max v] to [11000]\n        end\n    end\nend\nif <(Robot Master Stage) = [9]> then\n    if <<(checkpoint) = [0]> and <(Scroll Y) > [500]>> then\n        set [scroll x min v] to [0]\n        set [scroll x max v] to [3100]\n    end\nend\n\nwhen I receive [teleportin v]\nif <(Robot Master Stage) = [1]> then\n    if <(checkpoint) = [0]> then\n        wait until <(Scroll X) > [1600]>\n        set [scroll x min v] to [1615]\n        set [scroll x max v] to [1615]\n    end\nend\nif <(Robot Master Stage) = [7]> then\n    if <(checkpoint) < [3]> then\n        wait until <(Scroll X) > [7248]>\n        set [scroll x min v] to [7250]\n        set [scroll x max v] to [7250]\n        set [checkpoint v] to [3]\n    end\n    if <(checkpoint) < [6]> then\n        wait until <(Scroll X) > [9600]>\n        set [scroll x min v] to [9610]\n        set [scroll x max v] to [9610]\n        set [checkpoint v] to [5]\n    end\nend\nif <(Robot Master Stage) = [8]> then\n    if <(checkpoint) = [0]> then\n        wait until <(Scroll X) > [4600]>\n        set [checkpoint v] to [1]\n    end\nend\n\nwhen I receive [ready v]\nset [shadow effect v] to [0]\n\nwhen flag clicked\nset [shadow effect v] to [0]\nforever\n    wait until <(Shadow Effect) = [1]>\n    wait (4) seconds\n    set [shadow effect v] to [0]\nend\n\nwhen I receive [stage resume music v]\nif <(Robot Master Stage) = [7]> then\n    set [music v] to [18]\n    stop all sounds\n    if <(WilyCastleBoss) = [2]> then\n        set [scroll x max v] to [7250]\n    end\n    if <(WilyCastleBoss) = [3]> then\n        set [scroll x max v] to [9610]\n    end\nend\nif <(Robot Master Stage) = [9]> then\n    set [music v] to [20]\n    stop all sounds\nend\nrepeat (10)\n    change volume by (10)\nend\nset volume to (100) %\n\nwhen I receive [wahwee castle map v]\nif <(Game Difficulty) = [1]> then\n    if <(Mega Man Extra lives) < [8]> then\n        set [mega man extra lives v] to [8]\n    end\nend\n\nwhen flag clicked\nset volume to (0) %\nrepeat (10)\n    change volume by (10)\nend\nset volume to (100) %\n\nrepeat (6)\n    add [0] to [robot master weapons v]\nend\n\nwhen I receive [cycle weapon v]\nfind next weapon [2]\n\nwhen I receive [protoman teleport in v]\nrepeat (10)\n    change volume by (-10)\nend\nwait (3) seconds\nset volume to (0) %\nrepeat (10)\n    change volume by (10)\nend\nset volume to (100) %\n\nwhen I receive [docter wily's intermission v]\nif <(Heard wily's intermission?) = [0]> then\n    set [music v] to [5]\n    stop all sounds\n    set volume to (0) %\n    repeat (10)\n        change volume by (5)\n    end\n    set volume to (50) %\nend\n\nwhen I receive [dr wily strikes back v]\nrepeat (20)\n    change volume by (5)\nend\nset volume to (100) %\n\nwhen I receive [you win v]\nset [music v] to [7]\nwait (1) seconds\nrepeat (20)\n    change volume by (-5)\nend\nset volume to (0) %\nstop all sounds\nrepeat (100)\n    change volume by (1)\nend\nset volume to (100) %\n\nwhen I receive [show mind ray v]\nset [music v] to [21]\nwait (.5) seconds\nrepeat (20)\n    change volume by (-5)\nend\nset volume to (0) %\nstop all sounds\nrepeat (20)\n    change volume by (5)\nend\nset volume to (100) %\n\n@Level_Art\n\nwhen I receive [setup v]\nwait (.03) seconds\nhide\nclear graphic effects\ngo to x: (0) y: (0)\nset [level_x v] to [0]\nswitch costume to (str1 v)\nCreate\n\ndefine Create\nif <(Robot Master Stage) = [10]> then\n    switch costume to (what? an even darker background? impossible! v)\n    set size to (250) %\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    repeat (3)\n        create clone of (_myself_ v)\n        change [level_x v] by (635)\n    end\nend\nif <(Robot Master Stage) = [9]> then\n    switch costume to (wily_2 v)\n    set size to (200) %\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    repeat (1)\n        create clone of (_myself_ v)\n        change [level_y v] by (500)\n    end\n    repeat (7)\n        create clone of (_myself_ v)\n        change [level_x v] by (512)\n    end\nend\nif <(Robot Master Stage) = [8]> then\n    switch costume to (bgmm3wily1_2 v)\n    set size to (250) %\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    repeat (15)\n        create clone of (_myself_ v)\n        change [level_x v] by (635)\n    end\n    change [level_x v] by (-5)\n    switch costume to (bgmm9wily2 v)\n    set size to (250) %\n    create clone of (_myself_ v)\nend\nif <(Robot Master Stage) = [7]> then\n    switch costume to (wily2 v)\n    set size to (250) %\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    repeat (9)\n        create clone of (_myself_ v)\n        change [level_x v] by (600)\n    end\n    switch costume to (wily_1_2 v)\n    set size to (250) %\n    repeat (3)\n        create clone of (_myself_ v)\n        change [level_x v] by (600)\n    end\n    repeat (3)\n        create clone of (_myself_ v)\n        change [level_y v] by (500)\n    end\n    switch costume to (wily2 v)\n    set size to (250) %\n    change [level_y v] by (-450)\n    repeat (3)\n        change [level_x v] by (600)\n        create clone of (_myself_ v)\n    end\n    switch costume to (wily_1_3 v)\n    set size to (250) %\n    change [level_x v] by (25)\n    repeat (1)\n        change [level_x v] by (600)\n        create clone of (_myself_ v)\n    end\n    repeat (3)\n        create clone of (_myself_ v)\n        change [level_y v] by (500)\n    end\n    repeat (5)\n        change [level_x v] by (600)\n        create clone of (_myself_ v)\n    end\nend\nif <(Robot Master Stage) = [2]> then\n    switch costume to (elec v)\n    set size to (250) %\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    repeat (4)\n        create clone of (_myself_ v)\n        change [level_y v] by (500)\n    end\n    switch costume to (wily3 v)\n    repeat (6)\n        create clone of (_myself_ v)\n        change [level_x v] by (535)\n    end\n    switch costume to (elec v)\n    repeat (2)\n        create clone of (_myself_ v)\n        change [level_x v] by (535)\n    end\nend\nif <(Robot Master Stage) = [5]> then\n    switch costume to (bgshadow_2 v)\n    set size to (250) %\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    repeat (15)\n        create clone of (_myself_ v)\n        change [level_x v] by (500)\n    end\nend\nif <(Robot Master Stage) = [3]> then\n    switch costume to (background v)\n    set size to (250) %\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    repeat (15)\n        create clone of (_myself_ v)\n        change [level_x v] by (500)\n    end\nend\nif <(Robot Master Stage) = [1]> then\n    switch costume to (cut v)\n    set size to (250) %\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    repeat (4)\n        create clone of (_myself_ v)\n        change [level_x v] by (510)\n    end\n    change [level_x v] by (-500)\n    switch costume to (background v)\n    repeat (3)\n        change [level_y v] by (500)\n        create clone of (_myself_ v)\n    end\n    change [level_y v] by (0)\n    repeat (4)\n        change [level_x v] by (510)\n        create clone of (_myself_ v)\n    end\nend\nif <(Robot Master Stage) = [4]> then\n    switch costume to (metalbg v)\n    set size to (250) %\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    repeat (5)\n        create clone of (_myself_ v)\n        change [level_x v] by (500)\n    end\n    wait (.02) seconds\n    change [level_x v] by (-500)\n    change [level_x v] by (-500)\n    change [level_y v] by (-500)\n    set size to (250) %\n    repeat (6)\n        create clone of (_myself_ v)\n        change [level_x v] by (500)\n    end\n    change [level_x v] by (-500)\n    change [level_x v] by (-500)\n    change [level_y v] by (-500)\n    set size to (250) %\n    repeat (6)\n        create clone of (_myself_ v)\n        change [level_x v] by (500)\n    end\nend\nif <(Robot Master Stage) = [6]> then\n    switch costume to (gemini v)\n    set size to (250) %\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    repeat (4)\n        create clone of (_myself_ v)\n        change [level_y v] by (-500)\n    end\n    repeat (5)\n        create clone of (_myself_ v)\n        change [level_x v] by (500)\n    end\n    change [level_y v] by (500)\n    change [level_x v] by (-500)\n    create clone of (_myself_ v)\n    change [level_x v] by (-500)\n    create clone of (_myself_ v)\n    change [level_x v] by (500)\n    change [level_x v] by (500)\n    repeat (5)\n        create clone of (_myself_ v)\n        change [level_x v] by (500)\n    end\n    change [level_y v] by (-500)\n    change [level_x v] by (-500)\n    create clone of (_myself_ v)\n    change [level_x v] by (-500)\n    create clone of (_myself_ v)\n    change [level_x v] by (500)\n    repeat (5)\n        create clone of (_myself_ v)\n        change [level_x v] by (500)\n    end\nend\n\nwhen I start as a clone\nset [brightness v] effect to (10)\nif <(costume [number v]) = [5]> then\n    forever\n        switch costume to (metalbg v)\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n    end\nend\nif <(costume [number v]) = [11]> then\n    forever\n        switch costume to (bgshadow_2 v)\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n    end\nend\nif <(costume [number v]) = [20]> then\n    forever\n        switch costume to (wily_2 v)\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nforever\n    if <(costume [number v]) = [7]> then\n        set x to (((Level_X) - (Scroll X)) + (([x position v] of [hitbox v]) / (20)))\n    else\n        set x to ((Level_X) - (Scroll X))\n    end\n    set y to ((Level_Y) - (Scroll Y))\n    if <<([abs v] of ((Level_X) - (Scroll X)) ) > [550]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [440]>> 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 receive [game over v]\ndelete this clone\n\nwhen I receive [blink v]\n\nbroadcast (blink v)\n\nwhen I start as a clone\nwait (1) seconds\nforever\n    wait until <(Shadow Effect) = [1]>\n    repeat (10)\n        change [brightness v] effect by (-10)\n    end\n    wait until <(Shadow Effect) = [0]>\n    repeat (10)\n        change [brightness v] effect by (10)\n    end\nend\n\nwhen I receive [screenshake v]\nrepeat (2)\n    change [level_y v] by (15)\n    wait (0) seconds\n    change [level_y v] by (-15)\n    wait (0) seconds\nend\nrepeat (2)\n    change [level_y v] by (10)\n    wait (0) seconds\n    change [level_y v] by (-10)\n    wait (0) seconds\nend\nrepeat (2)\n    change [level_y v] by (5)\n    wait (0) seconds\n    change [level_y v] by (-5)\n    wait (0) seconds\nend\n\nwhen I receive [blink v]\n\nbroadcast (blink v)\n\ndelete this clone\n\ndelete this clone\n\nwhen I receive [earthquake v]\nrepeat (5)\n    repeat (2)\n        change [level_y v] by (15)\n        wait (0) seconds\n        change [level_y v] by (-15)\n        wait (0) seconds\n    end\nend\nrepeat (2)\n    change [level_y v] by (10)\n    wait (0) seconds\n    change [level_y v] by (-10)\n    wait (0) seconds\nend\nrepeat (2)\n    change [level_y v] by (5)\n    wait (0) seconds\n    change [level_y v] by (-5)\n    wait (0) seconds\nend\n\n@ground\n\nwhen I receive [setup v]\nwait (.03) 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\nwhen flag clicked\n\nbroadcast (SetUp v)\n\ndefine Create\nif <(Robot Master Stage) = [10]> then\n    switch costume to (costume139 v)\n    set size to (200) %\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    repeat (2)\n        create clone of (_myself_ v)\n        change [level_x v] by (560)\n        next costume\n    end\nend\nif <(Robot Master Stage) = [9]> then\n    switch costume to (costume128 v)\n    set size to (250) %\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    repeat (1)\n        create clone of (_myself_ v)\n        change [level_y v] by (512)\n        next costume\n    end\n    repeat (15)\n        create clone of (_myself_ v)\n        change [level_x v] by (560)\n        next costume\n    end\n    delete this clone\nend\nif <(Robot Master Stage) = [2]> then\n    switch costume to (costume55 v)\n    set size to (200) %\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    repeat (5)\n        create clone of (_myself_ v)\n        change [level_y v] by (363)\n        next costume\n    end\n    create clone of (_myself_ v)\n    change [level_x v] by (560)\n    next costume\n    change [level_y v] by (150)\n    repeat (7)\n        create clone of (_myself_ v)\n        change [level_x v] by (560)\n        next costume\n    end\nend\nif <(Robot Master Stage) = [7]> then\n    switch costume to (costume73 v)\n    set size to (200) %\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    repeat (14)\n        create clone of (_myself_ v)\n        change [level_x v] by (560)\n        next costume\n    end\n    change [level_x v] by (-560)\n    repeat (2)\n        change [level_y v] by (512)\n        create clone of (_myself_ v)\n        next costume\n    end\n    repeat (4)\n        change [level_x v] by (560)\n        create clone of (_myself_ v)\n        next costume\n    end\n    change [level_x v] by (0)\n    repeat (2)\n        change [level_y v] by (512)\n        create clone of (_myself_ v)\n        next costume\n    end\n    repeat (4)\n        change [level_x v] by (560)\n        create clone of (_myself_ v)\n        next costume\n    end\nend\nif <(Robot Master Stage) = [8]> then\n    switch costume to (costume104 v)\n    set size to (200) %\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    repeat (19)\n        create clone of (_myself_ v)\n        change [level_x v] by (560)\n        next costume\n    end\nend\nif <(Robot Master Stage) = [3]> then\n    switch costume to (costume19 v)\n    set size to (200) %\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    repeat (7)\n        create clone of (_myself_ v)\n        change [level_x v] by (560)\n        next costume\n    end\n    if <(Game Difficulty) = [1]> then\n        switch costume to (costume24 v)\n    else\n        switch costume to (costume2 v)\n    end\n    create clone of (_myself_ v)\n    change [level_x v] by (560)\n    next costume\n    switch costume to (costume23 v)\n    repeat (3)\n        create clone of (_myself_ v)\n        change [level_x v] by (560)\n        next costume\n    end\nend\nif <(Robot Master Stage) = [5]> then\n    switch costume to (costume70 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        change [level_x v] by (560)\n        next costume\n    end\nend\nif <(Robot Master Stage) = [1]> then\n    switch costume to (costume41 v)\n    set size to (200) %\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    repeat (4)\n        create clone of (_myself_ v)\n        change [level_x v] by (560)\n        next costume\n    end\n    change [level_x v] by (-560)\n    wait (.02) seconds\n    repeat (3)\n        change [level_y v] by (512)\n        create clone of (_myself_ v)\n        next costume\n    end\n    repeat (4)\n        change [level_x v] by (560)\n        create clone of (_myself_ v)\n        next costume\n    end\nend\nif <(Robot Master Stage) = [4]> then\n    switch costume to (costume1 v)\n    set size to (200) %\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    repeat (4)\n        create clone of (_myself_ v)\n        change [level_x v] by (560)\n        next costume\n    end\n    wait (.02) seconds\n    change [level_x v] by (-560)\n    repeat (1)\n        change [level_y v] by (-512)\n        create clone of (_myself_ v)\n        next costume\n    end\n    repeat (5)\n        change [level_x v] by (560)\n        create clone of (_myself_ v)\n        next costume\n    end\n    change [level_x v] by (-560)\n    switch costume to (costume9 v)\n    repeat (1)\n        change [level_y v] by (-512)\n        create clone of (_myself_ v)\n        next costume\n    end\n    repeat (5)\n        change [level_x v] by (560)\n        create clone of (_myself_ v)\n        next costume\n    end\nend\nif <(Robot Master Stage) = [6]> then\n    switch costume to (costume20 v)\n    set size to (200) %\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    repeat (5)\n        create clone of (_myself_ v)\n        change [level_y v] by (-512)\n        next costume\n    end\n    change [level_y v] by (512)\n    repeat (3)\n        change [level_x v] by (560)\n        create clone of (_myself_ v)\n        next costume\n    end\n    change [level_y v] by (512)\n    repeat (6)\n        create clone of (_myself_ v)\n        next costume\n        change [level_x v] by (560)\n    end\n    change [level_x v] by (-560)\n    change [level_y v] by (-512)\n    create clone of (_myself_ v)\n    next costume\n    repeat (3)\n        change [level_x v] by (560)\n        create clone of (_myself_ v)\n        next costume\n    end\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)) ) > [750]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [500]>> then\n        hide\n    else\n        if <<(Robot Master Stage) = [8]> and <(Scroll X) > [10049]>> then\n            hide\n        else\n            show\n        end\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 receive [game over v]\ndelete this clone\n\nbroadcast (blink v)\n\nwhen I start as a clone\nwait (1) seconds\nforever\n    wait until <(Shadow Effect) = [1]>\n    repeat (10)\n        change [brightness v] effect by (-10)\n    end\n    wait until <(Shadow Effect) = [0]>\n    repeat (10)\n        change [brightness v] effect by (10)\n    end\nend\n\nwhen I receive [screenshake v]\nrepeat (2)\n    change [level_y v] by (15)\n    wait (0) seconds\n    change [level_y v] by (-15)\n    wait (0) seconds\nend\nrepeat (2)\n    change [level_y v] by (10)\n    wait (0) seconds\n    change [level_y v] by (-10)\n    wait (0) seconds\nend\nrepeat (2)\n    change [level_y v] by (5)\n    wait (0) seconds\n    change [level_y v] by (-5)\n    wait (0) seconds\nend\n\nbroadcast (blink v)\n\nwhen I receive [blink v]\n\ndelete this clone\n\nwhen I receive [earthquake v]\nrepeat (5)\n    repeat (2)\n        change [level_y v] by (15)\n        wait (0) seconds\n        change [level_y v] by (-15)\n        wait (0) seconds\n    end\nend\nrepeat (2)\n    change [level_y v] by (10)\n    wait (0) seconds\n    change [level_y v] by (-10)\n    wait (0) seconds\nend\nrepeat (2)\n    change [level_y v] by (5)\n    wait (0) seconds\n    change [level_y v] by (-5)\n    wait (0) seconds\nend\n\n@mega man\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\nswitch costume to (laser v)\nif <not <(HEALTH) > [14]>> then\n    start sound [Mega Man 5 SFX \(4\)2 v]\nend\nset rotation style [left-right v]\nif <([falling? v] of [hitbox v]) > [2]> then\n    change y by (2)\nelse\n    change y by (-8)\nend\ngo to [front v] layer\nshow\n\nwhen flag clicked\nset [sliding? v] to [0]\nforever\n    if <(HEALTH) < [15]> then\n        if <<(CanMove?) = [1]> and <<<key (space v) pressed?> or <mouse down?>> or <key (c v) pressed?>>> then\n            if <(SLIDING?) = [0]> then\n                if <key (c v) pressed?> then\n                    if <(Mega Man Special Weapon Selected) = [0]> then\n                        create clone of (_myself_ v)\n                    else\n                        broadcast (Fire Special Weapon v)\n                        if <<(Mega Man Special Weapon Selected) < [3]> or <(Mega Man Special Weapon Selected) = [6]>> then\n                            wait (.3) seconds\n                        end\n                    end\n                    wait (.1) seconds\n                else\n                    if <(Mega Man Special Weapon Selected) = [0]> then\n                        create clone of (_myself_ v)\n                    else\n                        broadcast (Fire Special Weapon v)\n                        if <<(Mega Man Special Weapon Selected) < [3]> or <(Mega Man Special Weapon Selected) = [6]>> then\n                            wait (.3) seconds\n                        end\n                    end\n                    wait until <<not <key (space v) pressed?>> and <not <mouse down?>>>\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset rotation style [left-right v]\nset [speed v] to [3]\n\nwhen flag clicked\nforever\n    if <<<key (space v) pressed?> or <mouse down?>> or <key (c v) pressed?>> 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 <(mega_slide) = [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 <(mega_slide) = [0]> then\n                        switch costume to (join [mgunrun] ((Mega Man Costume) + (0)))\n                    end\n                else\n                    if <(mega_slide) = [0]> then\n                        switch costume to (join [mrun] ((Mega Man Costume) + (0)))\n                    end\n                end\n                if <(mega_slide) = [0]> then\n                    wait (.08) 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 <(mega_slide) = [0]> then\n                        switch costume to (join [mgunrun] ((Mega Man Costume) + (1)))\n                    end\n                else\n                    if <(mega_slide) = [0]> then\n                        switch costume to (join [mrun] ((Mega Man Costume) + (1)))\n                    end\n                end\n                if <(mega_slide) = [0]> then\n                    wait (.08) 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 <(mega_slide) = [0]> then\n                        switch costume to (join [mgunrun] ((Mega Man Costume) + (2)))\n                    end\n                else\n                    if <(mega_slide) = [0]> then\n                        switch costume to (join [mrun] ((Mega Man Costume) + (2)))\n                    end\n                end\n                if <(mega_slide) = [0]> then\n                    wait (.08) 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 <(mega_slide) = [0]> then\n                        switch costume to (join [mgunrun] ((Mega Man Costume) + (3)))\n                    end\n                else\n                    if <(mega_slide) = [0]> then\n                        switch costume to (join [mrun] ((Mega Man Costume) + (3)))\n                    end\n                end\n                if <(mega_slide) = [0]> then\n                    wait (.08) 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 <(mega_slide) = [0]> then\n                        switch costume to (join [mgunrun] ((Mega Man Costume) + (4)))\n                    end\n                else\n                    if <(mega_slide) = [0]> then\n                        switch costume to (join [mrun] ((Mega Man Costume) + (4)))\n                    end\n                end\n                if <(mega_slide) = [0]> then\n                    wait (.08) 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 <(mega_slide) = [0]> then\n                        switch costume to (join [mgunrun] ((Mega Man Costume) + (5)))\n                    end\n                else\n                    if <(mega_slide) = [0]> then\n                        switch costume to (join [mrun] ((Mega Man Costume) + (5)))\n                    end\n                end\n                if <(mega_slide) = [0]> then\n                    wait (.08) seconds\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset rotation style [left-right v]\nforever\n    if <(getting ouched ?) = [1]> then\n        switch costume to (join [mouch] ((Mega Man Costume) + (0)))\n        wait (.05) seconds\n        switch costume to (join [mouch] ((Mega Man Costume) + (1)))\n        wait (.05) seconds\n    else\n        if <(SLIDING?) = [1]> then\n            switch costume to (join [mslide] ((Mega Man Costume) + (0)))\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 <(SLIDING?) = [0]> then\n                    else\n                        if <(SLIDING?) = [0]> then\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 <(SLIDING?) = [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 <(SLIDING?) = [0]> then\n                                    switch costume to (join [mgunidle] ((Mega Man Costume) + (0)))\n                                end\n                            else\n                                if <(SLIDING?) = [0]> then\n                                    switch costume to (join [midle] ((Mega Man Costume) + (0)))\n                                end\n                            end\n                        end\n                    end\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        go to [front v] layer\n        move (10) steps\n    end\n    delete this clone\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 [-1]\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\nwait (1) seconds\nswitch costume to (idle v)\n\nwhen I receive [take dmg v]\nstart sound [Mega Man 2 SFX \(5\)2 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    set [mega man costume v] to [1]\n    hide\n    set [canmove? v] to [-1]\n    go to [front v] layer\n    repeat (10)\n        switch costume to (mtele1 v)\n        go to x: (0) y: (899)\n    end\n    wait (1) seconds\n    go to [front v] layer\n    clear graphic effects\n    switch costume to (mtele1 v)\n    show\n    set [y v] to [0]\n    repeat (17)\n        switch costume to (mtele1 v)\n        change y by (y)\n        change [y v] by (-2)\n    end\n    repeat until <<touching (ground v)?> or <touching (misc objects v)?>>\n        change y by (y)\n        change [y v] by (-2)\n    end\n    change y by (-20)\n    getpos\n    repeat (5)\n        wait (.01) seconds\n        change y by (-20)\n        getpos\n        next costume\n    end\n    wait (.01) seconds\n    switch costume to (midle1 v)\n    broadcast (blink v)\n    wait (.4) seconds\n    change [scroll x v] by (0)\n    broadcast (Enable Movement v)\n    set [canmove? v] to [1]\n    start sound [Mega Man 5 SFX \(2\)2 v]\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [teleportin v]\nclear graphic effects\n\nwhen I receive [bossdie v]\nrepeat (30)\n    set [canmove? v] to [-1]\nend\nchange y by (-3)\nif <(HEALTH) < [15]> then\n    if <(Robot Master Stage) = [10]> then\n        switch costume to (mjump1 v)\n        repeat until <touching (ground v)?>\n            if <(x position) > [20]> then\n                change x by (-10)\n            end\n            set [canmove? v] to [-1]\n            change y by (-8)\n        end\n        set y to (-72)\n        broadcast (hitboxsnap v)\n        switch costume to (midle1 v)\n    else\n        if <(Robot Master Stage) = [9]> then\n            switch costume to (mjump1 v)\n            repeat until <<touching (ground v)?> or <touching (misc objects v)?>>\n                set [canmove? v] to [-1]\n                change y by (-8)\n            end\n            change y by (0)\n            getpos\n            switch costume to (midle1 v)\n            wait (2) seconds\n            start sound [Mega Man 2 SFX \(12\) v]\n            point towards (boss v)\n            switch costume to (mslide1 v)\n            glide (.4) secs to x: (77) y: (-110)\n            switch costume to (midle1 v)\n            wait (.5) seconds\n            point in direction (90)\n            broadcast (r u okay v)\n        else\n            if <<(Robot Master Stage) = [7]> and <<(WilyCastleBoss) = [1]> or <(WilyCastleBoss) = [2]>>> then\n                change [wilycastleboss v] by (1)\n                set [canmove? v] to [-1]\n                change y by (-3)\n                wait (3) seconds\n                change [checkpoint v] by (1)\n                broadcast (Stage Resume Music v)\n                broadcast (Enable Movement v)\n            else\n                if <([falling? v] of [hitbox v]) < [3]> then\n                    repeat (10)\n                        switch costume to (midle1 v)\n                    end\n                else\n                    repeat (10)\n                        switch costume to (mjump1 v)\n                    end\n                end\n                if <(HEALTH) < [15]> then\n                    if <(x position) > [180]> then\n                        repeat (4)\n                            change x by (-10)\n                        end\n                    end\n                    if <(x position) < [-180]> then\n                        repeat (4)\n                            change x by (10)\n                        end\n                    end\n                    if <(Robot Master Stage) = [8]> then\n                        switch costume to (mjump1 v)\n                        repeat until <(y position) < [-36]>\n                            set [canmove? v] to [-1]\n                            change y by (-8)\n                        end\n                    else\n                        switch costume to (mjump1 v)\n                        repeat until <<touching (ground v)?> or <touching (misc objects v)?>>\n                            set [canmove? v] to [-1]\n                            change y by (-8)\n                        end\n                    end\n                    change y by (0)\n                    getpos\n                    switch costume to (midle1 v)\n                    wait (1) seconds\n                    switch costume to (midle1 v)\n                    play sound [Mega Man 2 - Stage Clear v] until done\n                    wait (1) seconds\n                end\n                if <(Robot Master Stage) > [6]> then\n                    set [y v] to [15]\n                    switch costume to (mjump1 v)\n                    repeat (20)\n                        change y by (y)\n                        change [y v] by (-1)\n                    end\n                    switch costume to (mtele1 v)\n                    repeat (5)\n                        change y by (y)\n                        change [y v] by (-1)\n                    end\n                    if <(Robot Master Stage) = [8]> then\n                        repeat until <(y position) < [-36]>\n                            set [canmove? v] to [-1]\n                            change y by (-8)\n                        end\n                    else\n                        repeat until <<touching (ground v)?> or <touching (misc objects v)?>>\n                            set [canmove? v] to [-1]\n                            change y by (y)\n                            change [y v] by (-1)\n                        end\n                    end\n                    getpos\n                    switch costume to (mtele6 v)\n                    repeat (5)\n                        wait (.02) seconds\n                        switch costume to ((costume [number v]) + (-1))\n                    end\n                    set [y v] to [0]\n                    start sound [Mega Man 5 SFX \(31\) v]\n                    repeat until <(y position) > [200]>\n                        change y by (y)\n                        change [y v] by (2)\n                    end\n                    hide\n                    change [wily castle level v] by (1)\n                    broadcast (Screen Transition v)\n                    wait (.6) seconds\n                    broadcast (STAGE SELECT v)\n                else\n                    if <(x position) < [0]> then\n                        point in direction (90)\n                        repeat until <(x position) > [-15]>\n                            switch costume to (mrun1 v)\n                            repeat (5)\n                                repeat (2)\n                                    change x by (5)\n                                end\n                                next costume\n                            end\n                            repeat (2)\n                                change x by (5)\n                            end\n                        end\n                    else\n                        point in direction (-90)\n                        repeat until <(x position) < [15]>\n                            switch costume to (mrun1 v)\n                            repeat (5)\n                                repeat (2)\n                                    change x by (-5)\n                                end\n                                next costume\n                            end\n                            repeat (2)\n                                change x by (-5)\n                            end\n                        end\n                    end\n                    set [y v] to [15]\n                    switch costume to (mjump1 v)\n                    repeat (20)\n                        change y by (y)\n                        change [y v] by (-1)\n                    end\n                    broadcast (Weapon Get Effect v)\n                    wait (2.5) seconds\n                    repeat until <<touching (ground v)?> or <touching (misc objects v)?>>\n                        set [canmove? v] to [-1]\n                        change y by (y)\n                        change [y v] by (-1)\n                    end\n                    getpos\n                    switch costume to (mtele6 v)\n                    repeat (5)\n                        wait (.02) seconds\n                        switch costume to ((costume [number v]) + (-1))\n                    end\n                    start sound [Mega Man 5 SFX \(31\) v]\n                    set [y v] to [0]\n                    repeat until <(y position) > [200]>\n                        change y by (y)\n                        change [y v] by (2)\n                    end\n                    hide\n                    broadcast (Screen Transition v)\n                    wait (.6) seconds\n                    broadcast (Weapon Get Screen v)\n                end\n            end\n        end\n    end\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]\nswitch costume to (idle v)\ndelete this clone\n\nwhen flag clicked\nforever\n    if <(CanMove?) = [1]> then\n        if <(Collide with ladder) = [1]> then\n            if <(animations: using gun?2) = [1]> then\n                switch costume to (mmladderfire1 v)\n            else\n                switch costume to (round (Ladder Climb animation))\n            end\n        else\n            if <<([falling? v] of [hitbox v]) > [3]> and <(STAY SLIDING) = [0]>> then\n                if <(animations: using gun?2) = [1]> then\n                    switch costume to (join [mgunjump] (Mega Man Costume))\n                else\n                    switch costume to (join [mjump] (Mega Man Costume))\n                end\n            else\n                if <(SLIDING?) = [1]> then\n                    switch costume to (join [mslide] (Mega Man Costume))\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\ngo to [front v] layer\n\nwhen I start as a clone\nif <(HEALTH) > [14]> then\n    forever\n        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]\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]) + (-2))\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 [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 [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 flag clicked\nforever\n    set [sliding? v] to ([sliding?2 v] of [hitbox v])\nend\n\nwhen I receive [disable movement v]\nset [canmove? v] to [0]\n\nwhen I start as a clone\nwait until <<touching (projectiles v)?> or <touching (enemies v)?>>\nwait (.07) seconds\ndelete this clone\n\ndefine getpos\nrepeat until <<not <touching (misc objects v)?>> and <not <touching (ground v)?>>>\n    change y by (.5)\nend\n\nwhen I receive [teleportin v]\nwait (.04) seconds\ngo to [front v] layer\n\nwhen I receive [teleportin v]\nset [ladder climb animation v] to [28]\nforever\n    if <<mouse down?> or <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<key (down arrow v) pressed?> or <key (s v) pressed?>>>> then\n        change [ladder climb animation v] by (.3)\n        if <(Ladder Climb animation) > [33.4]> then\n            set [ladder climb animation v] to [28]\n        end\n    end\nend\n\nwhen I receive [hyperstorm init battle v]\nset [canmove? v] to [-1]\npoint in direction (90)\nrepeat until <(x position) > [-180]>\n    switch costume to (mrun1 v)\n    repeat (5)\n        repeat (2)\n            change x by (5)\n        end\n        next costume\n    end\n    repeat (2)\n        change x by (5)\n    end\nend\nswitch costume to (midle1 v)\nbroadcast (hitboxsnap v)\n\nwhen I receive [docter wily's intermission v]\nrepeat (10)\n    switch costume to (midle1 v)\nend\n\nwhen I receive [control protoman v]\nset [canmove? v] to [-1]\nrepeat (2)\n    change x by (-9)\nend\nrepeat (1)\n    change x by (-3)\nend\nbroadcast (hitboxsnap v)\n\nwhen I receive [docter wily's intermission v]\nbroadcast (Disable Movement v)\nrepeat (25)\n    if <(x position) < [-130]> then\n        change x by (3)\n    end\n    if <(x position) > [-80]> then\n        change x by (-3)\n    end\n    set [canmove? v] to [-1]\n    set y to (-104)\n    switch costume to (midle1 v)\nend\nwait (.1) seconds\nswitch costume to (midle1 v)\n\nwhen I receive [mega and proto tele out v]\nset y to (-110)\nset [y v] to [0]\nshow\nswitch costume to (midle1 v)\nwait (0) seconds\nswitch costume to (mtele6 v)\nwait (0) seconds\nrepeat (5)\n    switch costume to ((costume [number v]) + (-1))\n    wait (0) seconds\nend\nrepeat (20)\n    change y by (y)\n    change [y v] by (2)\nend\nhide\nbroadcast (Screen Transition v)\nset [wily castle level v] to [4]\nstop all sounds\nwait (.6) seconds\nbroadcast (STAGE SELECT v)\n\nwhen I receive [drwilylose v]\npoint in direction (90)\nrepeat until <(x position) > [0]>\n    switch costume to (mrun1 v)\n    repeat (5)\n        repeat (2)\n            change x by (5)\n        end\n        next costume\n    end\n    repeat (2)\n        change x by (5)\n    end\nend\nswitch costume to (midle1 v)\nset y to (-72)\nbroadcast (wily defeat speech v)\n\nwhen I receive [mega man 180 v]\nturn right (180) degrees\n\nwhen I receive [wily hide v]\nset y to (-72)\nshow\nswitch costume to (mtele6 v)\nrepeat (5)\n    wait (.02) seconds\n    switch costume to ((costume [number v]) + (-1))\nend\nstart sound [Mega Man 5 SFX \(31\) v]\nglide (.5) secs to x: (x position) y: (250)\nhide\nbroadcast (YOU WIN v)\n\nwhen I receive [wily defeat speech v]\nrepeat (15)\n    if <(x position) > [40]> then\n        change x by (-5)\n    end\nend\n\n@hitbox\n\nwhen flag clicked\nforever\n    if <key (space v) pressed?> then\n        set [using gun? v] to [1]\n    else\n        set [using gun? v] to [0]\n    end\nend\n\nwhen I receive [teleportin v]\nset [falling? v] to [0]\nforever\n    wait until <(falling?) > [3]>\n    wait until <(falling?) < [2]>\n    start sound [Mega Man 5 SFX \(5\) v]\nend\n\nwhen I receive [take dmg v]\nstart sound [Mega Man 5 SFX \(6\) v]\nset [takingdmg v] to [1]\nwait (.4) seconds\nset [takingdmg v] to [0]\nif <(HEALTH) < [15]> then\n    set [canmove? v] to [1]\nend\n\nwhen flag clicked\nset [sliding?2 v] to [0]\n\nwhen flag clicked\nforever\n    if <(SLIDING?2) = [1]> then\n        switch costume to (idle4 v)\n    else\n        switch costume to (idle3 v)\n    end\nend\n\nwhen flag clicked\nset [sliding?2 v] to [0]\n\nwhen I receive [slide v]\nif <(falling?) < [3]> then\n    reset timer\n    repeat until <<(timer) > [.5]> and <(STAY SLIDING) = [0]>>\n        set [slide time2 v] to [0]\n        set [sliding?2 v] to [1]\n        if <(direction) = [90]> then\n            if <(falling?) < [3]> then\n                Walk (direction) [4]\n            end\n        else\n            if <(falling?) < [3]> then\n                Walk (direction) [-4]\n            end\n        end\n    end\nend\nset [sliding?2 v] to [0]\nwait (.25) seconds\nset [slide time2 v] to [1]\n\nwhen I receive [die v]\nrepeat (10)\n    set [canmove? v] to [0]\nend\n\nwhen I receive [die v]\nrepeat (10)\n    set [canmove? v] to [0]\nend\n\nwhen I receive [bossdie v]\nset [canmove? v] to [0]\n\nwhen I receive [bossdie v]\nrepeat (50)\n    set [canmove? v] to [0]\nend\n\nwhen flag clicked\nset [slide time2 v] to [1]\n\nwhen flag clicked\nforever\n    wait (1) seconds\n    wait until <(y position) < [-140]>\n    if <<<(Robot Master Stage) = [6]> and <<(Scroll X) > [4200]> and <(Scroll Y) < [-1570]>>> or <<<(Robot Master Stage) = [6]> and <(Scroll X) < [1]>> or <<(Robot Master Stage) = [4]> and <<<(Scroll X) > [1330]> and <(Scroll Y) > [-1]>> or <<(Scroll X) > [3730]> and <(Scroll Y) > [-526]>>>>>> then\n        broadcast (Transition downwards v)\n        broadcast (Transition Effect v)\n        wait (1.5) seconds\n    else\n        if <<(Collide with ladder) = [1]> and <<key (down arrow v) pressed?> or <key (s v) pressed?>>> then\n            broadcast (Transition downwards v)\n            broadcast (Transition Effect v)\n            wait (1.5) seconds\n        else\n            if <(Collide with ladder) = [0]> then\n                set [health v] to [15]\n                set [sliding?2 v] to [0]\n                set [canmove? v] to [0]\n                go to x: (0) y: (0)\n            end\n        end\n    end\nend\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)\nend\nchange y by (2)\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        if <(Collide with ladder) = [0]> then\n            change y by (speed y)\n            if <<(WaterActive?) = [1]> and <(y position) < [0]>> then\n                change [speed y v] by (-.2)\n            else\n                change [speed y v] by (-.5)\n            end\n        else\n            if <<not <key (c v) pressed?>> and <not <key (space v) pressed?>>> then\n                change y by (6)\n            end\n        end\n    else\n        if <(Collide with ladder) = [0]> then\n            change [speed y v] by (-.5)\n            change y by (speed y)\n        end\n    end\n    if <(Collide with ladder) = [0]> then\n        Touch Ground <(speed y) > [0]>\n        if <<> then\n            if <(getting ouched ?) = [0]> then\n                point in direction (-90)\n                Walk (direction) [-6]\n                if <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n                    if <(slide time2) = [1]> then\n                        broadcast (slide v)\n                    end\n                end\n            end\n        end\n        if <>> then\n            if <(getting ouched ?) = [0]> then\n                point in direction (90)\n                Walk (direction) [6]\n                if <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n                    if <(slide time2) = [1]> then\n                        broadcast (slide v)\n                    end\n                end\n            end\n        end\n        set [speed x v] to ((speed x) * (.65))\n        if <(Collide with ladder) = [0]> then\n            change y by (speed y)\n        end\n        if <(Collide with ladder) = [0]> then\n            Touch Ground <(speed y) > [0]>\n        end\n        if <<^> and <(falling?) < [3]>> then\n            if <(getting ouched ?) = [0]> then\n                set [speed y v] to [7]\n            end\n        end\n    end\n    if <<<key (s v) pressed?> or <key (down arrow v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(mouse y) < (y position)>>>> then\n        if <(Collide with ladder) = [0]> then\n            change [speed y v] by (-1)\n        else\n            if <<not <key (c v) pressed?>> and <not <key (space v) pressed?>>> then\n                if <mouse down?> then\n                    change y by (6)\n                else\n                    if <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n                        change y by (-6)\n                    else\n                        change y by (6)\n                    end\n                end\n            end\n        end\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            if <(Collide with ladder) = [0]> then\n                set [speed y v] to [7]\n            end\n        end\n    else\n        if <(Collide with ladder) = [0]> then\n            change [speed y v] by (-.7)\n        end\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)?> and <(Collide with ladder) = [0]>>>>>\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)?> and <(Collide with ladder) = [0]>>>>\n    if <up?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [falling? v] to [0]\n    end\n    set [speed y v] to [0]\nend\n\nwhen I receive [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 x v] to [0]\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\nrepeat (15)\n    change y by (-20)\nend\nrepeat until <<touching (ground v)?> or <touching (misc objects v)?>>\n    change y by (-20)\nend\nset x to (0)\ngetpos\nstart sound [Mega Man 5 SFX \(21\) v]\nset [a v] to [1]\n\nwhen flag clicked\nset [fightstart? v] to [0]\n\nwhen I receive [transition effect v]\nrepeat (15)\n    reset timer\nend\n\nwhen I receive [battle begin v]\nset [canmove? v] to [0]\nwait (2) seconds\nset [canmove? v] to [1]\n\nwhen I receive [ready v]\nset [canmove? v] to [0]\nhide\n\nwhen I receive [back to select v]\nset [canmove? v] to [0]\n\nwhen I receive [bossdie v]\nset [canmove? v] to [0]\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\ngo to [front v] layer\nclear graphic effects\n\nwhen I receive [teleportin v]\nforever\n    set [mega_slide v] to (SLIDING?2)\nend\n\nwhen I receive [slide v]\nif <<(slide time2) = [0]> and <(falling?) < [3]>> then\n    create clone of (hpbar v)\nend\n\nwhen I receive [transition downwards v]\nset [canmove? v] to [0]\nrepeat (30)\n    change y by (15)\nend\nwait (.5) seconds\nset [canmove? v] to [1]\n\nwhen I receive [transition right v]\nset [canmove? v] to [0]\nrepeat (30)\n    change x by (-15)\nend\nwait (.5) seconds\nset [canmove? v] to [1]\n\nchange y by (15)\n\nwhen I receive [disable movement v]\nset [canmove? v] to [0]\n\nwhen I receive [conveyor push back v]\nif <(CanMove?) = [1]> then\n    Walk (direction) (speed)\nend\n\nwhen I receive [conveyor push forward v]\nif <(CanMove?) = [1]> then\n    Walk (direction) ((speed) * (-1))\nend\n\nwhen I receive [ready v]\nset [canmove? v] to [0]\ngo to x: (0) y: (0)\n\nwhen flag clicked\nrepeat (15)\n    set [mega man costume v] to [1]\nend\n\nwhen I receive [transition up v]\nset [canmove? v] to [0]\nrepeat (30)\n    change y by (-15)\nend\nwait (.5) seconds\nset [canmove? v] to [1]\n\nwhen flag clicked\nforever\n    wait (1) seconds\n    wait until <(y position) > [200]>\n    if <(Collide with ladder) = [1]> then\n        broadcast (Transition Up v)\n        broadcast (Transition Effect v)\n        wait (1.5) seconds\n    else\n    end\nend\n\ndefine getpos\nrepeat until <<not <touching (ground v)?>> and <not <touching (misc objects v)?>>>\n    change y by (.2)\nend\n\n@hpbar\n\nwhen flag clicked\nwait (1) seconds\nforever\n    wait until <(HEALTH) > [14]>\n    if <([costume # v] of [boss hp v]) > [28]> then\n        set [health v] to [13]\n    else\n        broadcast (die v)\n        wait (5) seconds\n        set [health v] to [1]\n    end\n    wait (.05) seconds\nend\n\nwhen flag clicked\nhide\nrepeat (10)\n    set [health v] to [1]\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 (90)\ngo to x: (-209) 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 (-40)\nelse\n    change x by (40)\nend\nchange y by (-30)\nshow\nswitch costume to (slide1 v)\nrepeat (2)\n    wait (.05) seconds\n    next costume\nend\nwait (.05) seconds\ndelete this clone\n\nwhen I receive [die v]\ndelete this clone\n\nwhen I receive [teleportin v]\nset [invincibility v] to [0]\n\nwhen I receive [take dmg v]\nset [invincibility v] to [1]\nwait (.8) seconds\nset [invincibility v] to [0]\n\nwhen I receive [battle begin v]\ngo to [front v] layer\n\nwhen I receive [teleportin v]\nrepeat (50)\n    go to [front v] layer\nend\n\nwhen I start as a clone\nforever\n    if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n        change x by (-7)\n    end\n    if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n        change x by (7)\n    end\nend\n\nwhen I receive [teleportin v]\nrepeat (10)\n    set [health v] to [1]\nend\n\nwhen I receive [stage resume music v]\nshow\n\nwhen I receive [dr wily strikes back v]\nshow\n\n@slide checker\n\nwhen flag clicked\nset [ghost v] effect to (99)\nshow\nforever\n    go to (hitbox v)\nend\n\nwhen flag clicked\nforever\n    if <<touching (ground v)?> or <touching (misc objects v)?>> then\n        set [stay sliding v] to [1]\n    else\n        set [stay sliding v] to [0]\n    end\nend\n\n@border\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(Show stage select stars?) = [1]> then\n        hide\n    else\n        if <touching (hitbox v)?> then\n            set [ghost v] effect to (80)\n        else\n            set [ghost v] effect to (0)\n        end\n        show\n    end\n    go to [front v] layer\nend\n\n@boss door\n\nwhen I start as a clone\ngo to [front v] layer\nforever\n    set [ghost v] effect to (0)\n    set x to ((Level_X) - (Scroll X))\n    set y to ((Level_Y) - (Scroll Y))\n    if <<([abs v] of ((Level_X) - (Scroll X)) ) > [250]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [300]>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [teleportin v]\nwait (.03) 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 <(Robot Master Stage) = [10]> then\n    switch costume to (door v)\n    set size to (250) %\n    set [level_y v] to [-50]\n    set [level_x v] to [205]\n    switch costume to (door v)\n    create clone of (_myself_ v)\nend\nif <(Robot Master Stage) = [4]> then\n    switch costume to (door v)\n    set size to (250) %\n    set [level_y v] to [-1035]\n    set [level_x v] to [4885]\n    switch costume to (door v)\n    create clone of (_myself_ v)\n    change [level_x v] by (530)\n    switch costume to (door v)\n    create clone of (_myself_ v)\nend\nif <(Robot Master Stage) = [9]> then\n    switch costume to (door v)\n    set size to (250) %\n    set [level_y v] to [440]\n    set [level_x v] to [3312]\n    switch costume to (door v)\n    create clone of (_myself_ v)\n    change [level_x v] by (530)\n    switch costume to (door v)\n    create clone of (_myself_ v)\nend\nif <(Robot Master Stage) = [8]> then\n    switch costume to (door v)\n    set size to (250) %\n    set [level_y v] to [-14]\n    set [level_x v] to [9200]\n    switch costume to (door v)\n    create clone of (_myself_ v)\n    change [level_x v] by (530)\n    switch costume to (door v)\n    create clone of (_myself_ v)\nend\nif <(Robot Master Stage) = [7]> then\n    switch costume to (door v)\n    set size to (250) %\n    set [level_y v] to [-37]\n    set [level_x v] to [5100]\n    switch costume to (door v)\n    create clone of (_myself_ v)\n    set [level_y v] to [1020]\n    set [level_x v] to [8800]\n    switch costume to (door v)\n    create clone of (_myself_ v)\n    switch costume to (door v)\n    set size to (250) %\n    set [level_y v] to [2042]\n    set [level_x v] to [11200]\n    switch costume to (door v)\n    create clone of (_myself_ v)\n    change [level_x v] by (530)\n    switch costume to (door v)\n    create clone of (_myself_ v)\nend\nif <(Robot Master Stage) = [5]> then\n    switch costume to (door v)\n    set size to (250) %\n    set [level_y v] to [-39]\n    set [level_x v] to [5210]\n    switch costume to (door v)\n    create clone of (_myself_ v)\n    change [level_x v] by (530)\n    switch costume to (door v)\n    create clone of (_myself_ v)\nend\nif <(Robot Master Stage) = [2]> then\n    switch costume to (door v)\n    set size to (250) %\n    set [level_y v] to [2078]\n    set [level_x v] to [2826]\n    switch costume to (door v)\n    create clone of (_myself_ v)\n    change [level_x v] by (530)\n    switch costume to (door v)\n    create clone of (_myself_ v)\nend\nif <(Robot Master Stage) = [3]> then\n    switch costume to (door v)\n    set size to (250) %\n    set [level_y v] to [-23]\n    set [level_x v] to [4980]\n    switch costume to (door v)\n    create clone of (_myself_ v)\n    change [level_x v] by (530)\n    switch costume to (door v)\n    create clone of (_myself_ v)\nend\nif <(Robot Master Stage) = [6]> then\n    switch costume to (door v)\n    set size to (250) %\n    set [level_y v] to [-2170]\n    set [level_x v] to [5210]\n    switch costume to (door v)\n    create clone of (_myself_ v)\n    change [level_x v] by (530)\n    switch costume to (door v)\n    create clone of (_myself_ v)\nend\nif <(Robot Master Stage) = [1]> then\n    switch costume to (door v)\n    set size to (250) %\n    set [level_y v] to [1505]\n    set [level_x v] to [2650]\n    switch costume to (door v)\n    create clone of (_myself_ v)\n    change [level_x v] by (530)\n    switch costume to (door v)\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nwait until <touching (hitbox v)?>\nstart sound [SE \[16\] v]\nbroadcast (bossgatetransition v)\nswitch costume to (door v)\nrepeat (6)\n    wait (.02) seconds\n    next costume\nend\nwait (1) seconds\nrepeat (6)\n    wait (.02) seconds\n    switch costume to ((costume [number v]) + (-1))\nend\n\nwhen I receive [teleportin v]\ndelete this clone\n\nwhen I receive [blink v]\n\nbroadcast (blink v)\n\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]\n\nwhen I receive [die v]\nwait (2.8) seconds\ndelete this clone\n\nwhen I start as a clone\nwait (.3) seconds\nforever\n    wait until <touching (hitbox v)?>\n    if <<not <(costume [number v]) = [2]>> and <not <<<(costume [number v]) = [42]> or <(costume [number v]) = [43]>> and <(y) = [0]>>>> then\n        broadcast (KNOCKBACK v)\n        wait (.1) seconds\n        if <<<(costume [number v]) = [28]> or <(costume [number v]) = [27]>> or <(costume [number v]) = [46]>> then\n            change [health v] by ((Game Difficulty) * (3))\n        else\n            change [health v] by (Game Difficulty)\n        end\n        broadcast (TAKE DMG v)\n        wait (1) seconds\n    end\nend\n\nwhen I receive [teleportin v]\nwait (1) seconds\nif <(Robot Master Stage) = [10]> then\n    Create Enemy [extralife] [-180] [45]\n    wait (.05) seconds\nend\nif <(Robot Master Stage) = [4]> then\n    Create Enemy [extralife] [1900] [-415]\n    wait (.05) seconds\nend\nif <(Robot Master Stage) = [3]> then\n    Create Enemy [fatmegaman] [1700] [0]\n    wait (.05) seconds\n    Create Enemy [extralife] [2100] [-128]\n    wait (.05) seconds\n    Create Enemy [fatmegaman] [2850] [60]\n    wait (.05) seconds\n    Create Enemy [fatmegaman] [3800] [143]\n    wait (.05) seconds\nend\nif <(Robot Master Stage) = [6]> then\n    Create Enemy [extralife] [-178] [52]\n    wait (.05) seconds\n    Create Enemy [float] [-178] [-450]\n    wait (.05) seconds\n    Create Enemy [float] [-178] [-1500]\n    wait (.05) seconds\n    if <(Game Difficulty) = [2]> then\n        Create Enemy [doge] [100] [-2175]\n        wait (.05) seconds\n    end\n    Create Enemy [doge] [1072] [-2090]\n    wait (.05) seconds\n    Create Enemy [doge] [3390] [-1612]\n    wait (.05) seconds\n    Create Enemy [hover] [2300] [-1550]\n    wait (.05) seconds\n    Create Enemy [hover] [2700] [-1465]\n    wait (.05) seconds\n    Create Enemy [hover] [3300] [-1465]\n    wait (.05) seconds\n    Create Enemy [hover] [3900] [-1465]\n    wait (.05) seconds\n    if <(Game Difficulty) = [2]> then\n        Create Enemy [hover] [1720] [-2035]\n        wait (.05) seconds\n        Create Enemy [hover] [4700] [-2150]\n        wait (.05) seconds\n    end\nend\nif <(Robot Master Stage) = [1]> then\n    if <(Game Difficulty) = [2]> then\n        Create Enemy [propel] [300] [120]\n        wait (.05) seconds\n    end\n    if <(Game Difficulty) = [2]> then\n        Create Enemy [bigeye] [750] [-78]\n        wait (.05) seconds\n    end\n    Create Enemy [shooty] [1497] [15]\n    wait (.05) seconds\n    Create Enemy [sprink] [1440] [570]\n    wait (.05) seconds\n    if <(Game Difficulty) = [2]> then\n        Create Enemy [sprink] [1440] [480]\n        wait (.05) seconds\n    end\n    Create Enemy [spri] [1600] [1108]\n    wait (.05) seconds\n    Create Enemy [propel] [1900] [1700]\n    wait (.05) seconds\n    if <(Game Difficulty) = [2]> then\n        Create Enemy [propel] [2000] [1700]\n        wait (.05) seconds\n        Create Enemy [bigeye] [2500] [1486]\n        wait (.05) seconds\n    end\n    if <(Game Difficulty) = [1]> then\n        Create Enemy [extralife] [400] [85]\n        wait (.05) seconds\n    end\nend\nif <(Robot Master Stage) = [2]> then\n    Create Enemy [elecbeam] [140] [505]\n    wait (.05) seconds\n    Create Enemy [elecbeam] [45] [540]\n    wait (.05) seconds\n    if <(Game Difficulty) = [2]> then\n        Create Enemy [floorthing] [75] [1005]\n        wait (.05) seconds\n    end\n    Create Enemy [floorthing] [-177] [1072]\n    wait (.05) seconds\n    if <(Game Difficulty) = [2]> then\n        Create Enemy [floorthing] [5] [1505]\n        wait (.05) seconds\n    end\n    Create Enemy [spri] [-145] [1565]\n    wait (.05) seconds\n    if <(Game Difficulty) = [2]> then\n        Create Enemy [shooty] [175] [100]\n        wait (.05) seconds\n    end\n    if <(Game Difficulty) = [2]> then\n        Create Enemy [propel] [100] [2200]\n        wait (.05) seconds\n    else\n        Create Enemy [spri] [100] [2044]\n        wait (.05) seconds\n    end\n    Create Enemy [elecbeam] [750] [2140]\n    wait (.05) seconds\n    Create Enemy [extralife] [570] [2199]\n    wait (.05) seconds\n    if <(Game Difficulty) = [2]> then\n        Create Enemy [propel] [800] [2225]\n        wait (.05) seconds\n    end\n    Create Enemy [elecbeam] [980] [2000]\n    wait (.05) seconds\n    if <(Game Difficulty) = [2]> then\n        Create Enemy [floorthing] [1150] [2063]\n        wait (.05) seconds\n    end\n    Create Enemy [spri] [1400] [2008]\n    wait (.05) seconds\n    Create Enemy [elecbeam] [1866] [2084]\n    wait (.05) seconds\n    Create Enemy [elecbeam] [1922] [2084]\n    wait (.05) seconds\n    Create Enemy [bigeye] [2500] [2057]\n    wait (.05) seconds\nend\nif <(Robot Master Stage) = [4]> then\n    if <(Game Difficulty) = [2]> then\n        Create Enemy [chain] [1005] [75]\n        wait (.05) seconds\n    end\n    Create Enemy [chain] [3680] [-326]\n    wait (.05) seconds\n    if <(Game Difficulty) = [2]> then\n        Create Enemy [doge] [1584] [-580]\n        wait (.05) seconds\n        Create Enemy [spri] [2265] [-565]\n        wait (.05) seconds\n        Create Enemy [hover] [4050] [-1000]\n        wait (.05) seconds\n    end\n    Create Enemy [gear] [3400] [-450]\n    wait (.05) seconds\n    Create Enemy [chain] [4750] [-930]\n    wait (.05) seconds\nend\nif <(Robot Master Stage) = [5]> then\n    Create Enemy [shadow] [1005] [90]\n    wait (.05) seconds\n    Create Enemy [eye] [750] [-79]\n    wait (.05) seconds\n    if <(Game Difficulty) = [2]> then\n        Create Enemy [hover] [2000] [150]\n        wait (.05) seconds\n    end\n    Create Enemy [extralife] [2560] [-110]\n    wait (.05) seconds\n    if <(Game Difficulty) = [2]> then\n        Create Enemy [shadow] [2500] [25]\n        wait (.05) seconds\n        Create Enemy [sprink] [4228] [-50]\n        wait (.05) seconds\n        Create Enemy [doge] [1098] [-58]\n        wait (.05) seconds\n        Create Enemy [spri] [3180] [-140]\n        wait (.05) seconds\n        Create Enemy [spri] [3312] [-140]\n        wait (.05) seconds\n    end\n    Create Enemy [eye] [1700] [-25]\n    wait (.05) seconds\n    Create Enemy [eye] [2300] [-95]\n    wait (.05) seconds\n    Create Enemy [eye] [3000] [-20]\n    wait (.05) seconds\n    Create Enemy [eye] [3900] [-80]\n    wait (.05) seconds\n    Create Enemy [shadow] [3795] [72]\n    wait (.05) seconds\n    Create Enemy [eye] [4180] [20]\n    wait (.05) seconds\n    Create Enemy [eye] [4652] [-70]\n    wait (.05) seconds\nend\nif <(Robot Master Stage) = [7]> then\n    Create Enemy [wilycannon] [600] [32]\n    wait (.05) seconds\n    Create Enemy [hover] [1200] [50]\n    wait (.05) seconds\n    Create Enemy [wilycannon] [1600] [32]\n    wait (.05) seconds\n    Create Enemy [hover] [1850] [80]\n    wait (.05) seconds\n    Create Enemy [hover] [2200] [80]\n    wait (.05) seconds\n    Create Enemy [hover] [2800] [0]\n    wait (.05) seconds\n    Create Enemy [hover] [3200] [150]\n    wait (.05) seconds\n    Create Enemy [bigeye] [3600] [-67]\n    wait (.05) seconds\n    Create Enemy [wilycannon] [4025] [32]\n    wait (.05) seconds\n    Create Enemy [hover] [4800] [100]\n    wait (.05) seconds\n    if <(Game Difficulty) = [2]> then\n        Create Enemy [wilycannon] [5925] [35]\n        wait (.05) seconds\n        Create Enemy [shooty] [7425] [591]\n        wait (.05) seconds\n        Create Enemy [doge] [6350] [-5]\n        wait (.05) seconds\n    end\n    Create Enemy [wilycannon] [7150] [591]\n    wait (.05) seconds\n    Create Enemy [fatmegaman] [7525] [1020]\n    wait (.05) seconds\n    Create Enemy [sprink] [7494] [1150]\n    wait (.05) seconds\n    Create Enemy [doge] [8161] [992]\n    wait (.05) seconds\n    Create Enemy [wilycannon] [7230] [68]\n    wait (.05) seconds\n    Create Enemy [shadow] [6450] [115]\n    wait (.05) seconds\n    if <(Game Difficulty) = [2]> then\n        Create Enemy [spri] [9760] [1524]\n        wait (.05) seconds\n    else\n        Create Enemy [extralife] [9758] [1521]\n        wait (.05) seconds\n    end\n    Create Enemy [shooty] [9784] [1650]\n    wait (.05) seconds\n    Create Enemy [bigeye] [10400] [2020]\n    wait (.05) seconds\n    Create Enemy [bigeye] [10560] [2073]\n    wait (.05) seconds\nend\nif <(Robot Master Stage) = [9]> then\n    Create Enemy [sprink] [-180] [85]\n    wait (.05) seconds\n    if <(Game Difficulty) = [2]> then\n        Create Enemy [shooty] [186] [85]\n        wait (.05) seconds\n    end\n    Create Enemy [wilycannon] [-160] [615]\n    wait (.05) seconds\n    Create Enemy [hover] [400] [620]\n    wait (.05) seconds\n    Create Enemy [hover] [700] [620]\n    wait (.05) seconds\n    Create Enemy [hover] [1100] [650]\n    wait (.05) seconds\n    Create Enemy [fling] [1460] [508]\n    wait (.05) seconds\n    Create Enemy [propel] [1800] [620]\n    wait (.05) seconds\n    Create Enemy [propel] [2100] [650]\n    wait (.05) seconds\nend\nif <(Robot Master Stage) = [8]> then\n    Create Enemy [fling] [1450] [-50]\n    wait (.05) seconds\n    if <(Game Difficulty) = [2]> then\n        Create Enemy [hover] [500] [50]\n        wait (.05) seconds\n        Create Enemy [hover] [900] [50]\n        wait (.05) seconds\n        Create Enemy [fling] [1900] [36]\n        wait (.05) seconds\n    end\n    Create Enemy [hover] [1800] [100]\n    wait (.05) seconds\n    Create Enemy [hover] [2300] [80]\n    wait (.05) seconds\n    if <(Game Difficulty) = [1]> then\n        Create Enemy [extralife] [2000] [-115]\n        wait (.05) seconds\n    else\n        Create Enemy [spri] [2000] [-109]\n        wait (.05) seconds\n        Create Enemy [fling] [2525] [-106]\n        wait (.05) seconds\n        Create Enemy [fling] [2600] [86]\n        wait (.05) seconds\n        Create Enemy [hover] [3300] [80]\n        wait (.05) seconds\n        Create Enemy [hover] [3600] [80]\n        wait (.05) seconds\n        Create Enemy [hover] [4400] [80]\n        wait (.05) seconds\n        Create Enemy [fling] [4850] [-50]\n        wait (.05) seconds\n        Create Enemy [hover] [7500] [0]\n        wait (.05) seconds\n        Create Enemy [hover] [6000] [120]\n        wait (.05) seconds\n    end\n    Create Enemy [extralife] [4500] [70]\n    wait (.05) seconds\n    Create Enemy [hover] [5500] [120]\n    wait (.05) seconds\n    Create Enemy [hover] [6700] [120]\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    else\n        set [enemy onscreen? v] to [1]\n        show\n    end\nend\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)?>>> and <not <touching (misc collision checker v)?>>> or <<(Specialfire) = [1]> and <touching (special weapons v)?>>>\n    if <<(costume [number v]) = [46]> or <<(costume [number v]) = [49]> or <(costume [number v]) = [50]>>> 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 <<(costume [number v]) = [42]> or <(costume [number v]) = [43]>> then\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [2]> then\n    point in direction (90)\n    set [hp v] to [1]\n    wait until <touching (hitbox v)?>\n    if <(Mega Man Extra lives) < [10]> then\n        change [mega man extra lives v] by (1)\n    end\n    start sound [SE \[15\] v]\n    set [ghost v] effect to (100)\n    wait (1) seconds\n    delete this clone\nend\nif <(costume [number v]) = [49]> then\n    point in direction (90)\n    set [hp v] to [10]\n    forever\n        if <(ENEMY ONSCREEN?) = [1]> then\n            set [shadow effect v] to [1]\n            switch costume to (shadow v)\n            wait (.1) seconds\n            switch costume to (shadowthingy2 v)\n            wait (.1) seconds\n        end\n    end\nend\nif <(costume [number v]) = [3]> then\n    point in direction (90)\n    go [backward v] (5) layers\n    set [hp v] to (Game Difficulty)\n    change [level_y v] by (-25)\n    change [level_x v] by (-70)\n    repeat (8)\n        change [level_x v] by (-3)\n    end\n    repeat (30)\n        change [level_y v] by (15)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [46]> then\n    go [backward v] (50) layers\n    forever\n        wait until <(distance to [hitbox v]) < [150]>\n        repeat (3)\n            change [level_y v] by (-5)\n        end\n        repeat (3)\n            change [level_y v] by (-8)\n        end\n        repeat (3)\n            change [level_y v] by (-15)\n        end\n        start sound [Mega Man 5 SFX \(34\) v]\n        wait (.4) seconds\n        repeat (21)\n            change [level_y v] by (4)\n        end\n    end\nend\nif <(costume [number v]) = [56]> then\n    set [hp v] to ((Game Difficulty) * (4))\n    forever\n        point towards (mega man v)\n        if <(ENEMY ONSCREEN?) = [1]> then\n            switch costume to (wilycannon v)\n            if <(Game Difficulty) = [1]> then\n                wait (2) seconds\n            else\n                wait (.5) seconds\n            end\n            next costume\n            point towards (mega man v)\n            set [projectile name v] to [wilycannonball]\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 (.2) seconds\n            switch costume to (wilycannon v)\n        end\n    end\nend\nif <(costume [number v]) = [60]> then\n    set [hp v] to ((Game Difficulty) * (4))\n    forever\n        if <(ENEMY ONSCREEN?) = [1]> then\n            if <([x position v] of [hitbox v]) < (x position)> then\n                point in direction (-90)\n            else\n                point in direction (90)\n            end\n            if <(Game Difficulty) = [2]> then\n                repeat (3)\n                    switch costume to (fling v)\n                    repeat (3)\n                        wait (.02) seconds\n                        next costume\n                    end\n                    wait (.02) seconds\n                end\n            else\n                repeat (6)\n                    switch costume to (fling v)\n                    repeat (3)\n                        wait (.02) seconds\n                        next costume\n                    end\n                    wait (.02) seconds\n                end\n            end\n            next costume\n            set [projectile name v] to [flingattack]\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 (.5) seconds\n        end\n    end\nend\nif <(costume [number v]) = [27]> then\n    set [hp v] to ((Game Difficulty) * (6))\n    forever\n        if <(ENEMY ONSCREEN?) = [1]> then\n            switch costume to (bigeye 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            if <(pick random (1) to (2)) = [1]> then\n                if <(Game Difficulty) = [2]> then\n                    set [y v] to [12]\n                else\n                    set [y v] to [15]\n                end\n            else\n                set [y v] to [10]\n            end\n            switch costume to (bigeye2 v)\n            repeat (15)\n                change [y v] by (-1)\n                set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (6)))\n                change [level_y v] by (y)\n                if <touching (ground v)?> then\n                    change [level_y v] by (-8)\n                end\n            end\n            repeat until <touching (ground v)?>\n                change [y v] by (-1)\n                set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (6)))\n                change [level_y v] by (y)\n            end\n            start sound [12 - BigEye v]\n            switch costume to (bigeye v)\n            repeat until <not <touching (ground v)?>>\n                change [level_y v] by (3)\n            end\n        end\n    end\nend\nif <(costume [number v]) = [25]> then\n    set [hp v] to (Game Difficulty)\n    set [x v] to (Level_Y)\n    set [y v] to (x)\n    forever\n        if <(ENEMY ONSCREEN?) = [1]> then\n            repeat until <((x position) + (-45)) < ([x position v] of [hitbox v])>\n                go to [front v] layer\n                point in direction (-90)\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            end\n            set [y v] to [0]\n            repeat (10)\n                change [y v] by (-3)\n                set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (3)))\n                change [level_y v] by (y)\n            end\n            repeat (15)\n                change [y v] by (5)\n                set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (3)))\n                change [level_y v] by (y)\n            end\n            set [level_y v] to (x)\n            repeat until <((x position) + (45)) > ([x position v] of [hitbox v])>\n                point in direction (90)\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            end\n            set [y v] to [0]\n            repeat (10)\n                change [y v] by (-3)\n                set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (3)))\n                change [level_y v] by (y)\n            end\n            repeat (15)\n                change [y v] by (5)\n                set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (3)))\n                change [level_y v] by (y)\n            end\n            set [level_y v] to (x)\n        end\n    end\nend\nif <(costume [number v]) = [4]> then\n    point in direction (90)\n    go [backward v] (5) layers\n    set [hp v] to (Game Difficulty)\n    change [level_y v] by (-25)\n    change [level_x v] by (70)\n    repeat (8)\n        change [level_x v] by (3)\n    end\n    repeat (30)\n        change [level_y v] by (15)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [42]> then\n    forever\n        if <(ENEMY ONSCREEN?) = [1]> then\n            set [y v] to [0]\n            set [ghost v] effect to (100)\n            if <(Game Difficulty) = [2]> then\n                wait (.6) seconds\n            else\n                wait (2) seconds\n            end\n            set [ghost v] effect to (0)\n            start sound [17 - Beam v]\n            set [y v] to [1]\n            repeat (5)\n                switch costume to (elecbeam v)\n                wait (.05) seconds\n                next costume\n                wait (.05) seconds\n            end\n        end\n    end\nend\nif <(costume [number v]) = [9]> then\n    set [hp v] to ((Game Difficulty) * (3))\n    forever\n        if <(ENEMY ONSCREEN?) = [1]> then\n            if <([x position v] of [hitbox v]) < (x position)> then\n                broadcast (conveyor push back v)\n                point in direction (-90)\n            else\n                broadcast (conveyor push forward v)\n                point in direction (90)\n            end\n        end\n    end\nend\nif <(costume [number v]) = [18]> then\n    set [hp v] to ((Game Difficulty) * (1))\n    wait until <(ENEMY ONSCREEN?) = [1]>\n    repeat until <((x position) + (-45)) < ([x position v] of [hitbox v])>\n        if <(Game Difficulty) = [1]> then\n            change [level_x v] by (-4)\n        else\n            change [level_x v] by (-10)\n        end\n    end\n    set [projectile name v] to [hpillar]\n    set [proj x v] to (Level_X)\n    set [proj y v] to (Level_Y)\n    set [proj direction v] to ((direction) + (90))\n    broadcast (CREATE PROJECTILE v)\n    wait (.3) seconds\n    repeat (50)\n        if <(Game Difficulty) = [1]> then\n            change [level_x v] by (-8)\n        else\n            change [level_x v] by (-18)\n        end\n    end\n    delete this clone\nend\nif <(costume [number v]) = [12]> then\n    set [hp v] to ((Game Difficulty) * (1))\n    set [ghost v] effect to (100)\n    wait until <(ENEMY ONSCREEN?) = [1]>\n    change [level_x v] by (-200)\n    clear graphic effects\n    repeat until <(x position) > ([x position v] of [hitbox v])>\n        if <(Game Difficulty) = [1]> then\n            change [level_x v] by (4)\n        else\n            change [level_x v] by (10)\n        end\n    end\n    set [projectile name v] to [pillar]\n    set [proj x v] to (Level_X)\n    set [proj y v] to (Level_Y)\n    set [proj direction v] to ((direction) + (90))\n    broadcast (CREATE PROJECTILE v)\n    wait (.3) seconds\n    repeat (50)\n        if <(Game Difficulty) = [1]> then\n            change [level_x v] by (8)\n        else\n            change [level_x v] by (18)\n        end\n    end\n    delete this clone\nend\nif <(costume [number v]) = [20]> then\n    set [hp v] to ((Game Difficulty) * (5))\n    switch costume to (gemi v)\n    wait (.5) seconds\n    forever\n        repeat until <(x position) < [-130]>\n            point in direction (-90)\n            repeat (2)\n                switch costume to (gemirun1 v)\n                repeat (2)\n                    change [level_x v] by (([sin v] of (direction) ) * ((Game Difficulty) * (6)))\n                end\n                repeat (3)\n                    repeat (2)\n                        change [level_x v] by (([sin v] of (direction) ) * ((Game Difficulty) * (6)))\n                    end\n                    next costume\n                end\n            end\n        end\n        repeat until <(Level_X) > [6140]>\n            point in direction (90)\n            repeat (2)\n                switch costume to (gemirun1 v)\n                repeat (2)\n                    change [level_x v] by (([sin v] of (direction) ) * ((Game Difficulty) * (6)))\n                end\n                repeat (3)\n                    repeat (2)\n                        change [level_x v] by (([sin v] of (direction) ) * ((Game Difficulty) * (6)))\n                    end\n                    next costume\n                end\n            end\n        end\n    end\nend\nif <(costume [number v]) = [51]> then\n    set [y v] to [0]\n    set [hp v] to ((Game Difficulty) * (2))\n    forever\n        if <(ENEMY ONSCREEN?) = [1]> then\n            switch costume to (eye v)\n            if <(Game Difficulty) = [1]> then\n                wait (.5) seconds\n            end\n            next costume\n            repeat (3)\n                repeat (2)\n                    if <(x position) > ([x position v] of [hitbox v])> then\n                        point in direction (-90)\n                        change [level_x v] by ((Game Difficulty) * (-2))\n                    else\n                        point in direction (90)\n                        change [level_x v] by ((Game Difficulty) * (2))\n                    end\n                    if <<touching (ground v)?> or <touching (misc objects v)?>> then\n                        change [level_y v] by (2)\n                        set [y v] to [0]\n                    else\n                        change [y v] by (-2)\n                        change [level_y v] by (y)\n                    end\n                end\n                next costume\n            end\n            repeat (2)\n                if <(x position) > ([x position v] of [hitbox v])> then\n                    point in direction (-90)\n                    change [level_x v] by ((Game Difficulty) * (-2))\n                else\n                    point in direction (90)\n                    change [level_x v] by ((Game Difficulty) * (2))\n                end\n                if <<touching (ground v)?> or <touching (misc objects v)?>> then\n                    change [level_y v] by (2)\n                    set [y v] to [0]\n                else\n                    change [y v] by (-2)\n                    change [level_y v] by (y)\n                end\n            end\n        end\n    end\nend\nif <(costume [number v]) = [58]> then\n    set [y v] to [0]\n    set [hp v] to ((Game Difficulty) * (3))\n    if <(ENEMY ONSCREEN?) = [1]> then\n        repeat (100)\n            point in direction (-90)\n            change [level_x v] by ((Game Difficulty) * (-10))\n            change [y v] by (-2)\n            change [level_y v] by (y)\n            if <<touching (ground v)?> or <touching (misc objects v)?>> then\n                set [y v] to (pick random (10) to (25))\n                set y to (-100)\n            end\n        end\n        delete this clone\n    end\nend\nif <(costume [number v]) = [47]> then\n    set [y v] to [0]\n    set [hp v] to ((Game Difficulty) * (3))\n    forever\n        if <(ENEMY ONSCREEN?) = [1]> then\n            if <(x position) > ([x position v] of [hitbox v])> then\n                point in direction (-90)\n                change [level_x v] by ((Game Difficulty) * (-3))\n            else\n                point in direction (90)\n                change [level_x v] by ((Game Difficulty) * (3))\n            end\n            if <<touching (ground v)?> or <touching (misc objects v)?>> then\n                change [level_y v] by (2)\n                set [y v] to [0]\n            else\n                change [y v] by (-2)\n                change [level_y v] by (y)\n            end\n        end\n    end\nend\nif <(costume [number v]) = [44]> then\n    forever\n        point in direction (90)\n        if <(Game Difficulty) = [1]> then\n            repeat (45)\n                change [level_x v] by (2)\n            end\n            repeat (45)\n                change [level_x v] by (-2)\n            end\n        else\n            repeat (9)\n                change [level_x v] by (11)\n            end\n            repeat (9)\n                change [level_x v] by (-11)\n            end\n        end\n    end\nend\nif <(costume [number v]) = [37]> then\n    set [hp v] to ((Game Difficulty) * (2))\n    forever\n        point in direction (90)\n        if <(ENEMY ONSCREEN?) = [1]> then\n            switch costume to (spri v)\n            if <(Game Difficulty) = [1]> then\n                wait (pick random (1.5) to (2)) seconds\n            else\n                wait (pick random (.05) to (.3)) seconds\n            end\n            repeat (2)\n                wait (.1) seconds\n                next costume\n            end\n            repeat (3)\n                set [y v] to [-45]\n                start sound [10 - EnemyShoot v]\n                repeat (3)\n                    set [projectile name v] to [sprinklershot]\n                    set [proj x v] to (Level_X)\n                    set [proj y v] to ((Level_Y) + (0))\n                    set [proj direction v] to (y)\n                    broadcast (CREATE PROJECTILE v)\n                    change [y v] by (45)\n                end\n                switch costume to (spri3 v)\n                repeat (2)\n                    wait (.1) seconds\n                    next costume\n                end\n            end\n            repeat (4)\n                switch costume to ((costume [number v]) + (-1))\n                wait (.1) seconds\n            end\n            switch costume to (spri v)\n        end\n    end\nend\nif <(costume [number v]) = [33]> then\n    set [hp v] to ((Game Difficulty) * (2))\n    forever\n        point in direction (90)\n        if <(ENEMY ONSCREEN?) = [1]> then\n            switch costume to (sprink v)\n            if <(Game Difficulty) = [1]> then\n                wait (pick random (1.8) to (2.5)) seconds\n            else\n                wait (pick random (.5) to (1)) seconds\n            end\n            repeat (3)\n                wait (.1) seconds\n                next costume\n            end\n            set [y v] to [45]\n            repeat (5)\n                start sound [10 - EnemyShoot v]\n                set [projectile name v] to [sprinklershot]\n                set [proj x v] to (Level_X)\n                set [proj y v] to ((Level_Y) + (0))\n                set [proj direction v] to (y)\n                broadcast (CREATE PROJECTILE v)\n                change [y v] by (25)\n                if <(Game Difficulty) = [1]> then\n                    wait (.4) seconds\n                else\n                    wait (.1) seconds\n                end\n            end\n            repeat (3)\n                switch costume to ((costume [number v]) + (-1))\n                wait (.1) seconds\n            end\n            switch costume to (sprink v)\n        end\n    end\nend\nif <(costume [number v]) = [29]> then\n    set [hp v] to ((Game Difficulty) * (2))\n    forever\n        point in direction (-90)\n        if <(ENEMY ONSCREEN?) = [1]> then\n            switch costume to (shooty v)\n            if <(Game Difficulty) = [1]> then\n                wait (pick random (1.4) to (1.9)) seconds\n            else\n                wait (pick random (.1) to (.35)) seconds\n            end\n            repeat (3)\n                wait (.1) seconds\n                next costume\n            end\n            set [y v] to [-45]\n            repeat (5)\n                start sound [10 - EnemyShoot v]\n                set [projectile name v] to [sprinklershot]\n                set [proj x v] to (Level_X)\n                set [proj y v] to ((Level_Y) + (0))\n                set [proj direction v] to (y)\n                broadcast (CREATE PROJECTILE v)\n                change [y v] by (-25)\n                if <(Game Difficulty) = [1]> then\n                    wait (.4) seconds\n                else\n                    wait (.1) seconds\n                end\n            end\n            repeat (3)\n                switch costume to ((costume [number v]) + (-1))\n                wait (.1) seconds\n            end\n            switch costume to (shooty v)\n        end\n    end\nend\nif <(costume [number v]) = [14]> then\n    set [hp v] to ((Game Difficulty) * (4))\n    forever\n        if <(ENEMY ONSCREEN?) = [1]> then\n            point towards (mega man v)\n            switch costume to (doge v)\n            wait (1) seconds\n            repeat (3)\n                wait (.1) seconds\n                next costume\n            end\n            point towards (mega man v)\n            repeat (5)\n                start sound [Mega Man 5 SFX \(34\) v]\n                set [projectile name v] to [dogefire]\n                set [proj x v] to (Level_X)\n                set [proj y v] to ((Level_Y) + (-15))\n                set [proj direction v] to (direction)\n                broadcast (CREATE PROJECTILE v)\n                wait (.03) seconds\n            end\n        end\n    end\nend\n\nwhen I receive [boss intro v]\nif <not <(Robot Master Stage) = [7]>> then\n    delete this clone\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [3]> then\n    forever\n        switch costume to (min v)\n        wait (.1) seconds\n        switch costume to (min v)\n        wait (.1) seconds\n        switch costume to (min v)\n        wait (.1) seconds\n    end\nend\nif <(costume [number v]) = [4]> then\n    wait (.03) seconds\n    forever\n        switch costume to (min v)\n        wait (.1) seconds\n        switch costume to (min v)\n        wait (.1) seconds\n        switch costume to (min v)\n        wait (.1) seconds\n    end\nend\nif <(costume [number v]) = [9]> then\n    forever\n        switch costume to (fatmegaman v)\n        wait (.1) seconds\n        switch costume to (fatmegaman2 v)\n        wait (.1) seconds\n        switch costume to (fatmegaman3 v)\n        wait (.1) seconds\n    end\nend\nif <(costume [number v]) = [44]> then\n    forever\n        switch costume to (floorthing v)\n        wait (.1) seconds\n        switch costume to (floorthing2 v)\n        wait (.1) seconds\n    end\nend\nif <(costume [number v]) = [12]> then\n    forever\n        switch costume to (float v)\n        wait (.1) seconds\n        switch costume to (float2 v)\n        wait (.1) seconds\n    end\nend\nif <(costume [number v]) = [25]> then\n    forever\n        switch costume to (propel v)\n        wait (.1) seconds\n        switch costume to (propel2 v)\n        wait (.1) seconds\n    end\nend\nif <(costume [number v]) = [47]> then\n    forever\n        switch costume to (gear v)\n        wait (.1) seconds\n        switch costume to (gear2 v)\n        wait (.1) seconds\n    end\nend\nif <(costume [number v]) = [58]> then\n    forever\n        switch costume to (hypermet v)\n        wait (.1) seconds\n        switch costume to (hypermet2 v)\n        wait (.1) seconds\n    end\nend\n\nwhen I receive [create minotaurs v]\nif <(clone) = [0]> then\n    Create Enemy [min] (PROJ X) (PROJ Y)\n    wait (.02) seconds\n    Create Enemy [min2] (PROJ X) (PROJ Y)\nend\n\nwhen I receive [create gemini clone v]\nif <(clone) = [0]> then\n    Create Enemy [gemi] (PROJ X) (PROJ Y)\nend\n\nwhen I receive [kill enemies v]\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\ndelete this clone\n\nwhen I receive [create hypermet v]\nif <(clone) = [0]> then\n    Create Enemy [hypermet] (PROJ X) (PROJ Y)\nend\n\nwhen I receive [bossdie v]\nif <(Robot Master Stage) < [7]> then\n    delete this clone\nend\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]\nset rotation style [left-right v]\npoint in direction (PROJ DIRECTION)\ngo to [front v] layer\nif <(costume [number v]) = [59]> then\n    start sound [05 - MegaBuster v]\n    set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (10)))\n    set [y v] to ((Game Difficulty) * (12))\n    repeat (5)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n    end\n    repeat until <touching (_edge_ v)?>\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n    end\n    delete this clone\nend\nif <(costume [number v]) = [60]> then\n    set [y v] to [15]\n    repeat (5)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (15)))\n        change [level_y v] by (y)\n        change [y v] by (-2)\n    end\n    repeat until <(Level_Y) < [-85]>\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (15)))\n        change [level_y v] by (y)\n        change [y v] by (-2)\n    end\n    set [level_y v] to [-93]\n    switch costume to (wilybomb2 v)\n    wait (.2) seconds\n    repeat (3)\n        switch costume to (wilybomb2 v)\n        repeat (2)\n            wait (.05) seconds\n            next costume\n        end\n        wait (.05) seconds\n    end\n    start sound [Mega Man 5 SFX \(11\)2 v]\n    switch costume to (explo1 v)\n    repeat (4)\n        wait (.02) seconds\n        next costume\n    end\n    wait (.02) seconds\n    delete this clone\nend\nif <(costume [number v]) = [57]> then\n    set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (10)))\n    set [y v] to ((Game Difficulty) * (12))\n    repeat (5)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n    end\n    repeat until <touching (_edge_ v)?>\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n    end\n    delete this clone\nend\nif <(costume [number v]) = [19]> then\n    set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (30)))\n    set [y v] to [-10]\n    repeat (5)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (15)))\n        change [level_y v] by (y)\n        change [y v] by (2)\n    end\n    repeat until <touching (_edge_ v)?>\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (15)))\n        change [level_y v] by (y)\n        change [y v] by (2)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [33]> then\n    start sound [18 - RollingCutter v]\n    if <(Game Difficulty) = [1]> then\n        set [y v] to [10]\n    else\n        set [y v] to [20]\n    end\n    forever\n        repeat (35)\n            turn right (4) degrees\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) / (3))))\n        end\n        repeat until <touching (boss v)?>\n            point towards (boss 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        delete this clone\n    end\nend\nif <(costume [number v]) = [64]> then\n    start sound [Mega Man 5 SFX \(11\) v]\n    set rotation style [all around v]\n    if <(Game Difficulty) = [1]> then\n        set [y v] to [15]\n    else\n        set [y v] to [21]\n    end\n    forever\n        repeat (6)\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        repeat (6)\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        end\n        repeat until <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        delete this clone\n    end\nend\nif <(costume [number v]) = [29]> then\n    start sound [Mega Man 5 SFX \(50\) v]\n    set rotation style [all around v]\n    switch costume to (glaser v)\n    if <(Game Difficulty) = [1]> then\n        set [y v] to [15]\n    else\n        set [y v] to [25]\n    end\n    forever\n        repeat (3)\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        repeat until <<touching (_edge_ v)?> or <touching (ground 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 (_edge_ v)?> then\n            delete this clone\n        end\n        switch costume to (glaser2 v)\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n        switch costume to (glaser v)\n        point in direction ((direction) - (135))\n    end\nend\nif <(costume [number v]) = [44]> then\n    start sound [sfx28 v]\n    if <(Game Difficulty) = [1]> then\n        set [y v] to [12]\n    else\n        set [y v] to [25]\n    end\n    repeat (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    end\n    repeat until <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    delete this clone\nend\nif <(costume [number v]) = [37]> then\n    start sound [16 - ThunderBeam v]\n    if <(Game Difficulty) = [1]> then\n        set [y v] to [14]\n    else\n        set [y v] to [25]\n    end\n    repeat (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    end\n    repeat until <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    delete this clone\nend\nif <(costume [number v]) = [52]> then\n    set [y v] to ((Game Difficulty) * (14))\n    start sound [Mega Man 5 SFX \(11\) v]\n    repeat (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    end\n    repeat until <<<touching (misc objects v)?> or <touching (ground 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 (_edge_ v)?> then\n        delete this clone\n    end\n    switch costume to (pick random (53) to (55))\n    wait (0.05) seconds\n    delete this clone\nend\nif <(costume [number v]) = [46]> then\n    set [y v] to [15]\n    start sound [SE \[25\] v]\n    repeat (1)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (10)))\n        change [level_y v] by (y)\n        change [y v] by (-2)\n    end\n    repeat until <<<touching (misc objects v)?> or <touching (ground v)?>> or <touching (_edge_ v)?>>\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (10)))\n        change [level_y v] by (y)\n        change [y v] by (-2)\n    end\n    start sound [Mega Man 5 SFX \(11\)2 v]\n    switch costume to (explo1 v)\n    repeat (4)\n        wait (.02) seconds\n        next costume\n    end\n    wait (.02) seconds\n    delete this clone\nend\nif <(costume [number v]) = [56]> then\n    if <(Game Difficulty) = [1]> then\n        set [y v] to [12]\n    else\n        set [y v] to [25]\n    end\n    repeat (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    end\n    repeat until <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    delete this clone\nend\nif <(costume [number v]) = [32]> then\n    if <(Game Difficulty) = [1]> then\n        set [y v] to [14]\n    else\n        set [y v] to [25]\n    end\n    repeat (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    end\n    repeat until <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    delete this clone\nend\nif <(costume [number v]) = [6]> then\n    start sound [sfx28 v]\n    if <(Game Difficulty) = [1]> then\n        set [y v] to [12]\n    else\n        set [y v] to [20]\n    end\n    repeat (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    end\n    repeat until <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    delete this clone\nend\nif <(costume [number v]) = [28]> then\n    set [y v] to [0]\n    repeat (2)\n        change [level_y v] by (y)\n        change [y v] by (-1)\n    end\n    repeat until <<touching (ground v)?> or <touching (misc objects v)?>>\n        change [level_y v] by (y)\n        change [y v] by (-1)\n    end\n    start sound [Mega Man 6 SRX \(30\) v]\n    switch costume to (hpillar v)\n    repeat (7)\n        wait (.02) seconds\n        switch costume to ((costume [number v]) + (-1))\n    end\n    repeat (7)\n        wait (.02) seconds\n        next costume\n    end\n    wait (.02) seconds\n    delete this clone\nend\nif <(costume [number v]) = [18]> then\n    set [y v] to [0]\n    repeat (2)\n        change [level_y v] by (y)\n        change [y v] by (-1)\n    end\n    repeat until <touching (ground v)?>\n        change [level_y v] by (y)\n        change [y v] by (-1)\n    end\n    start sound [Mega Man 6 SRX \(30\) v]\n    switch costume to (pillar v)\n    repeat (7)\n        wait (.02) seconds\n        switch costume to ((costume [number v]) + (-1))\n    end\n    repeat (7)\n        wait (.02) seconds\n        next costume\n    end\n    wait (.02) seconds\n    delete this clone\nend\nif <(costume [number v]) = [2]> then\n    point in direction (0)\n    set [y v] to [20]\n    repeat (14)\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    point in direction (180)\n    set [ghost v] effect to (100)\n    wait (.2) seconds\n    set [level_x v] to ((Scroll X) + (pick random (-300) to (300)))\n    clear graphic effects\n    set [rotate_axis v] to [0]\n    set [y v] to [15]\n    repeat until <touching (_edge_ v)?>\n        set [level_x v] to (((Level_X) + (([sin v] of (direction) ) * (y))) + (([sin v] of (rotate_axis) ) * (-10)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n        change [rotate_axis v] by (15)\n    end\nend\nif <(costume [number v]) = [1]> then\n    switch costume to (leaf v)\n    point in direction (PROJ DIRECTION)\n    set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (30)))\n    set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (30)))\n    set [rotate_axis v] to [0]\n    set [y v] to [15]\n    repeat until <(EnemyAttackRelease) = [1]>\n        set [level_x v] to ((Level_X) + (([sin v] of (rotate_axis) ) * (-10)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (rotate_axis) ) * (-10)))\n        change [rotate_axis v] by (15)\n    end\n    point in direction (PROJ DIRECTION)\n    repeat until <touching (_edge_ v)?>\n        set [level_x v] to (((Level_X) + (([sin v] of (direction) ) * (y))) + (([sin v] of (rotate_axis) ) * (-10)))\n        set [level_y v] to (((Level_Y) + (([cos v] of (direction) ) * (y))) + (([cos v] of (rotate_axis) ) * (-10)))\n        change [rotate_axis v] by (15)\n    end\nend\nif <(costume [number v]) = [8]> then\n    if <(Game Difficulty) = [1]> then\n        Smooth Glide ((Scroll X) + (pick random (-150) to (150))) (pick random (-120) to (50)) [6]\n    else\n        Smooth Glide ((Scroll X) + (pick random (-150) to (150))) (pick random (-120) to (50)) [4]\n    end\n    wait until <not <(EnemyAttackRelease) = [0]>>\n    set [y v] to [0]\n    if <(EnemyAttackRelease) = [-1]> then\n        repeat until <touching (_edge_ v)?>\n            change [y v] by (-.5)\n            change [level_x v] by (y)\n        end\n    else\n        repeat until <touching (_edge_ v)?>\n            change [y v] by (.5)\n            change [level_x v] by (y)\n        end\n    end\n    delete this clone\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) > [8]>\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 receive [bossdie v]\ndelete this clone\n\nwhen I receive [die v]\ndelete this clone\n\nwhen I start as a clone\nif <(costume [number v]) = [2]> then\n    wait (.1) seconds\n    forever\n        switch costume to (leaf v)\n        repeat (4)\n            wait (.05) seconds\n            next costume\n        end\n        repeat (4)\n            wait (.05) seconds\n            switch costume to ((costume [number v]) + (-1))\n        end\n        wait (.05) seconds\n    end\nend\nif <(costume [number v]) = [64]> then\n    forever\n        switch costume to (wilymissile v)\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n    end\nend\nif <(costume [number v]) = [6]> then\n    forever\n        switch costume to (metal v)\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n    end\nend\nif <(costume [number v]) = [33]> then\n    forever\n        switch costume to (rcutter v)\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n    end\nend\nif <(costume [number v]) = [8]> then\n    forever\n        switch costume to (airshooter v)\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n    end\nend\nif <(costume [number v]) = [19]> then\n    switch costume to (dogefire v)\n    wait (.8) seconds\n    next costume\nend\nif <(costume [number v]) = [37]> then\n    forever\n        switch costume to (elecshot v)\n        repeat (6)\n            wait (.02) seconds\n            next costume\n        end\n        wait (.02) seconds\n    end\nend\nif <(costume [number v]) = [44]> then\n    forever\n        switch costume to (shadowblade v)\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n    end\nend\nif <(costume [number v]) = [57]> then\n    forever\n        switch costume to (flingattack v)\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n    end\nend\n\ndefine Smooth Glide (x) (y) (speed)\nrepeat until <<(round (Level_X)) = (round (x))> and <(round (Level_Y)) = (round (y))>>\n    change [level_x v] by (((round (x)) - (round (Level_X))) / (speed))\n    change [level_y v] by (((round (y)) - (round (Level_Y))) / (speed))\nend\nset [level_x v] to (x)\nset [level_y v] to (y)\n\nwhen I start as a clone\nwait (.02) seconds\nforever\n    if <touching (hitbox v)?> then\n        if <(INVINCIBILITY) = [0]> then\n            if <(Game Difficulty) = [1]> then\n                change [health v] by (1)\n            else\n                change [health v] by (3)\n            end\n            broadcast (KNOCKBACK v)\n            broadcast (TAKE DMG v)\n        end\n        if <<<(costume [number v]) > [45]> and <(costume [number v]) < [52]>> or <(costume [number v]) > [59]>> then\n            wait (.5) seconds\n        else\n            delete this clone\n        end\n    end\nend\n\nwhen I receive [transition effect v]\ndelete this clone\n\n@boss hp\n\nwhen flag clicked\nset [clone v] to [0]\nclear graphic effects\nhide\n\nwhen I receive [battle begin v]\nif <(Robot Master Stage) = [8]> then\n    switch costume to (bosshpbar v)\nelse\n    if <<(WilyCastleBoss) = [3]> and <(Robot Master Stage) = [7]>> then\n        set [hyperstorm hp bar v] to [1]\n        broadcast (setup other hpbar v)\n    else\n        set [hyperstorm hp bar v] to [0]\n    end\n    set [fightstart? v] to [1]\n    go to x: (-180) y: (91)\n    point in direction (90)\n    set size to (250) %\n    go to [front v] layer\n    show\n    set [brightness v] effect to (0)\n    switch costume to (bosshpbar29 v)\n    repeat (28)\n        start sound [Mega Man 5 SFX \(16\) v]\n        switch costume to ((costume [number v]) + (-1))\n        wait (0) seconds\n    end\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 <not <(Robot Master Stage) = [8]>> then\n    if <(Hyperstorm HP Bar) = [0]> then\n        if <(clone) = [0]> then\n            if <(Game Difficulty) = [1]> then\n                next costume\n                next costume\n            else\n                if <(Robot Master Stage) = [10]> then\n                    next costume\n                    next costume\n                else\n                    next costume\n                end\n            end\n            if <(costume [number v]) > [28]> then\n                broadcast (BOSSDIE v)\n                wait (5) seconds\n            end\n        end\n    end\nend\n\nwhen I receive [bossdie v]\nhide\nswitch costume to (bosshpbar32 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)\n    if <<(Robot Master Stage) = [10]> and <(WilyBattlePhase) = [1]>> then\n        change y by (85)\n    end\nend\ndelete this clone\n\nwhen I receive [teleportin v]\nstop [other scripts in sprite v]\nswitch costume to (bosshpbar v)\nhide\ndelete this clone\n\nwhen I receive [bossweakness dmg v]\nif <not <(Robot Master Stage) = [8]>> then\n    if <(Hyperstorm HP Bar) = [0]> then\n        if <(clone) = [0]> then\n            if <(Game Difficulty) = [1]> then\n                next costume\n                next costume\n                next costume\n                next costume\n                next costume\n                next costume\n            else\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\n    end\nend\n\nwhen I receive [stage resume music v]\nswitch costume to (bosshpbar v)\n\n@Boss\n\nwhen flag clicked\nhide\n\nwhen I receive [die v]\nwait (3) seconds\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [bossdie v]\nstop [other scripts in sprite v]\nif <(Robot Master Stage) = [10]> then\n    if <(WilyBattlePhase) = [1]> then\n        set y to (0)\n        broadcast (earthquake v)\n        set [y v] to [10]\n        repeat (25)\n            start sound [expl v]\n            change [y v] by (-2)\n            change y by (y)\n        end\n        set [wilybattlephase v] to [2]\n        hide\n        wait (2) seconds\n        broadcast (Dr wily strikes back v)\n    else\n        switch costume to (drwily1 v)\n        point in direction (-90)\n        clear graphic effects\n        show\n        repeat until <(y position) > [180]>\n            change y by (15)\n        end\n        hide\n        wait (.8) seconds\n        show\n        switch costume to (drwily4 v)\n        go to x: (100) y: (190)\n        glide (.5) secs to x: (100) y: (-86)\n        switch costume to (drwily5 v)\n        wait (2) seconds\n        start sound [64 - Mega Man 3 - All Stages Clear v]\n        repeat (15)\n            switch costume to (drwily2 v)\n            wait (.2) seconds\n            next costume\n            wait (.2) seconds\n        end\n        switch costume to (drwily2 v)\n        broadcast (drwilylose v)\n    end\nelse\n    if <(Robot Master Stage) = [9]> then\n        switch costume to (protoouch1 v)\n        glide (.3) secs to x: (154) y: (-116)\n        clear graphic effects\n        broadcast (screenshake v)\n        start sound [expl v]\n        point in direction (-90)\n        switch costume to (protoouch2 v)\n        clear graphic effects\n    else\n        hide\n    end\nend\n\nwhen I receive [battle begin v]\nwait (1) seconds\nclear graphic effects\nforever\n    if <(Robot Master Stage) = [10]> then\n        if <<<<touching (mega man v)?> and <not <touching (hitbox v)?>>> and <not <touching (misc collision checker v)?>>> or <<touching (special weapons v)?> and <(Specialfire) = [1]>>> then\n            if <<([y position v] of [hitbox v]) > [50]> or <(WilyBattlePhase) = [2]>> then\n                if <(Game Difficulty) = [1]> then\n                    if <<<touching (mega man v)?> and <not <touching (hitbox v)?>>> and <not <touching (misc collision checker v)?>>> then\n                        broadcast (BossDMG v)\n                        create clone of (boss hp v)\n                        repeat (3)\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                    if <<touching (special weapons v)?> and <(Specialfire) = [1]>> then\n                        if <(Mega Man Special Weapon Selected) = [6]> then\n                            broadcast (BossWeakness DMG v)\n                            create clone of (boss hp v)\n                            repeat (3)\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 (3)\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\n                else\n                    if <<<touching (mega man v)?> and <not <touching (hitbox v)?>>> and <not <touching (misc collision checker v)?>>> then\n                        start sound [cling v]\n                        set [brightness v] effect to (50)\n                        wait (.05) seconds\n                        set [brightness v] effect to (0)\n                        wait (.05) seconds\n                    end\n                    if <<touching (special weapons v)?> and <(Specialfire) = [1]>> then\n                        if <(Mega Man Special Weapon Selected) = [6]> then\n                            broadcast (BossDMG v)\n                            create clone of (boss hp v)\n                            repeat (3)\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                            start sound [cling v]\n                            set [brightness v] effect to (50)\n                            wait (.05) seconds\n                            set [brightness v] effect to (0)\n                            wait (.05) seconds\n                        end\n                    end\n                end\n            else\n                start sound [cling v]\n                set [brightness v] effect to (50)\n                wait (.05) seconds\n                set [brightness v] effect to (0)\n                wait (.05) seconds\n            end\n        end\n    else\n        if <<<touching (mega man v)?> and <not <touching (hitbox v)?>>> and <touching color (#e0c040)?>> then\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        if <<touching (special weapons v)?> and <(Specialfire) = [1]>> then\n            if <<<(Mega Man Special Weapon Selected) = [1]> and <(Robot Master Stage) = [9]>> or <<<(Mega Man Special Weapon Selected) = [3]> and <<(Robot Master Stage) = [7]> and <(WilyCastleBoss) = [1]>>> or <<<(Mega Man Special Weapon Selected) = [5]> and <<(Robot Master Stage) = [7]> and <(WilyCastleBoss) = [3]>>> or <<<(Mega Man Special Weapon Selected) = [2]> and <<(Robot Master Stage) = [7]> and <(WilyCastleBoss) = [2]>>> or <<<<(Mega Man Special Weapon Selected) = [4]> and <(Robot Master Stage) = [1]>> or <<<(Mega Man Special Weapon Selected) = [1]> and <(Robot Master Stage) = [2]>> or <<(Mega Man Special Weapon Selected) = [5]> and <(Robot Master Stage) = [3]>>>> or <<<(Mega Man Special Weapon Selected) = [6]> and <(Robot Master Stage) = [4]>> or <<<(Mega Man Special Weapon Selected) = [2]> and <(Robot Master Stage) = [5]>> or <<(Mega Man Special Weapon Selected) = [3]> and <(Robot Master Stage) = [6]>>>>>>>>> then\n                broadcast (BossWeakness DMG v)\n                create clone of (boss hp v)\n                repeat (3)\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        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        change [health v] by ((Game Difficulty) * (2))\n        broadcast (KNOCKBACK v)\n        broadcast (TAKE DMG v)\n        wait (2) seconds\n    end\nend\n\nwhen I receive [battle begin v]\nwait (2) seconds\nbroadcast (Enable Movement v)\nif <(Robot Master Stage) = [8]> then\n    forever\n        if <(Game Difficulty) = [2]> then\n            point towards (hitbox v)\n            switch costume to (quintpogo2 v)\n            wait (.05) seconds\n            switch costume to (quintpogo1 v)\n            start sound [spring v]\n            set [y v] to [10]\n            repeat (3)\n                change [y v] by (-1)\n                point towards (hitbox v)\n                change y by (y)\n                move (15) steps\n            end\n            set [quint break blocks v] to [1]\n            repeat until <<touching (misc objects v)?> or <(y position) < [-200]>>\n                change [y v] by (-1)\n                change y by (y)\n                move (15) steps\n            end\n            set [quint break blocks v] to [0]\n            if <(y position) < [-200]> then\n                if <(HEALTH) < [15]> then\n                    broadcast (BOSSDIE v)\n                    hide\n                end\n            else\n                getpos\n                switch costume to (quintpogo2 v)\n                wait (.05) seconds\n                switch costume to (quintpogo1 v)\n            end\n        else\n            point towards (hitbox v)\n            switch costume to (quintpogo2 v)\n            wait (.2) seconds\n            switch costume to (quintpogo1 v)\n            start sound [spring v]\n            set [y v] to [15]\n            repeat (3)\n                change [y v] by (-1)\n                change y by (y)\n                move (7) steps\n            end\n            set [quint break blocks v] to [1]\n            repeat until <<touching (misc objects v)?> or <(y position) < [-190]>>\n                change [y v] by (-1)\n                change y by (y)\n                move (7) steps\n            end\n            set [quint break blocks v] to [0]\n            if <(y position) < [-190]> then\n                if <(HEALTH) < [15]> then\n                    broadcast (BOSSDIE v)\n                    hide\n                end\n            else\n                getpos\n                switch costume to (quintpogo2 v)\n                wait (.2) seconds\n                switch costume to (quintpogo1 v)\n            end\n        end\n    end\nend\nif <<(Robot Master Stage) = [7]> and <(WilyCastleBoss) = [3]>> then\n    forever\n        switch costume to (hyperstorm1 v)\n        if <(Game Difficulty) = [1]> then\n            wait (.8) seconds\n        else\n            wait (.1) seconds\n        end\n        start sound [SE \[173\] v]\n        switch costume to (hyperstorm3 v)\n        point towards (mega man v)\n        set [proj direction v] to (direction)\n        set [proj x v] to (((Scroll X) + (x position)) + (0))\n        set [proj y v] to (((Scroll Y) + (y position)) + (5))\n        broadcast (Create hypermet v)\n        wait (.5) seconds\n        switch costume to (hyperstorm1 v)\n        wait (.5) seconds\n        switch costume to (hyperstorm3 v)\n        repeat (50)\n            start sound [SE \[173\] v]\n            broadcast (conveyor push back v)\n            create clone of (extra battle effects v)\n        end\n        if <(Game Difficulty) = [1]> then\n            wait (.8) seconds\n        else\n            wait (.1) seconds\n        end\n        switch costume to (hyperstorm1 v)\n    end\nend\nif <<(Robot Master Stage) = [7]> and <(WilyCastleBoss) = [2]>> then\n    forever\n        if <(y position) < [0]> then\n            if <(pick random (1) to (2)) = [1]> then\n                switch costume to (megawatershoot v)\n                repeat (10)\n                    point towards (mega man v)\n                    set [proj direction v] to (direction)\n                    set [proj x v] to (((Scroll X) + (x position)) + (0))\n                    set [proj y v] to (((Scroll Y) + (y position)) + (5))\n                    set [projectile name v] to [water]\n                    broadcast (CREATE PROJECTILE v)\n                    if <(Game Difficulty) = [1]> then\n                        wait (.05) seconds\n                    end\n                end\n                wait (.5) seconds\n                switch costume to (megawater2 v)\n            else\n                if <(pick random (1) to (2)) = [1]> then\n                    point in direction (90)\n                    repeat until <(x position) > [125]>\n                        switch costume to (megawaterrun1 v)\n                        repeat (3)\n                            repeat (2)\n                                change x by (10)\n                            end\n                            next costume\n                        end\n                        repeat (2)\n                            change x by (10)\n                        end\n                    end\n                    point in direction (-90)\n                else\n                    point in direction (-90)\n                    repeat until <(x position) < [-125]>\n                        switch costume to (megawaterrun1 v)\n                        repeat (3)\n                            repeat (2)\n                                change x by (-10)\n                            end\n                            next costume\n                        end\n                        repeat (2)\n                            change x by (-10)\n                        end\n                    end\n                    point in direction (90)\n                end\n                switch costume to (megawaterjump v)\n                set [y v] to [25]\n                repeat (15)\n                    change [y v] by (-2)\n                    change y by (y)\n                    move (9) steps\n                end\n                switch costume to (megawater2 v)\n                set y to (38)\n            end\n        else\n            if <(pick random (1) to (2)) = [1]> then\n                point towards (mega man v)\n                switch costume to (megawatershoot v)\n                start sound [bomb v]\n                set [proj direction v] to (direction)\n                set [proj x v] to (((Scroll X) + (x position)) + (0))\n                set [proj y v] to (((Scroll Y) + (y position)) + (25))\n                set [projectile name v] to [harpoon]\n                broadcast (CREATE PROJECTILE v)\n                wait (.5) seconds\n                switch costume to (megawater2 v)\n            else\n                if <(pick random (1) to (2)) = [1]> then\n                    point in direction (90)\n                    repeat until <(x position) > [30]>\n                        switch costume to (megawaterrun1 v)\n                        repeat (3)\n                            repeat (2)\n                                change x by (10)\n                            end\n                            next costume\n                        end\n                        repeat (2)\n                            change x by (10)\n                        end\n                    end\n                else\n                    point in direction (-90)\n                    repeat until <(x position) < [-50]>\n                        switch costume to (megawaterrun1 v)\n                        repeat (3)\n                            repeat (2)\n                                change x by (-10)\n                            end\n                            next costume\n                        end\n                        repeat (2)\n                            change x by (-10)\n                        end\n                    end\n                end\n                switch costume to (megawaterjump v)\n                set [y v] to [15]\n                repeat (20)\n                    change [y v] by (-2)\n                    change y by (y)\n                    move (5) steps\n                end\n                switch costume to (megawater2 v)\n                set y to (-85)\n            end\n        end\n        if <(Game Difficulty) = [1]> then\n            wait (1) seconds\n        else\n            wait (0) seconds\n        end\n    end\nend\nif <(Robot Master Stage) = [9]> then\n    forever\n        repeat (pick random (2) to (4))\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 [y v] to [20]\n            switch costume to (protojump v)\n            repeat (3)\n                repeat (2)\n                    change [y v] by (-2)\n                    move (5) steps\n                    change y by (y)\n                end\n                change [y v] by (-2)\n                move (5) steps\n                change y by (y)\n                set [proj direction v] to (direction)\n                set [proj x v] to (((Scroll X) + (x position)) + (0))\n                set [proj y v] to (((Scroll Y) + (y position)) + (0))\n                set [projectile name v] to [laser]\n                broadcast (CREATE PROJECTILE v)\n            end\n            repeat until <(y position) < [-109]>\n                change [y v] by (-1)\n                move (5) steps\n                change y by (y)\n            end\n            set y to (-116)\n            switch costume to (proto1 v)\n            if <(Game Difficulty) = [1]> then\n                wait (.4) seconds\n            end\n        end\n        if <([x position v] of [hitbox v]) < (x position)> then\n            point in direction (-90)\n        else\n            point in direction (90)\n        end\n        switch costume to (protorun1 v)\n        repeat (5)\n            repeat (2)\n                move (7) steps\n            end\n            next costume\n        end\n    end\nend\nif <<(Robot Master Stage) = [7]> and <(WilyCastleBoss) = [1]>> then\n    forever\n        if <(distance to [hitbox v]) < [150]> then\n            if <([x position v] of [hitbox v]) < (x position)> then\n                point in direction (-90)\n            else\n                point in direction (90)\n            end\n            switch costume to (busterrod1 v)\n            repeat (6)\n                wait (.02) seconds\n                next costume\n            end\n            start sound [sfx28 v]\n            repeat (2)\n                repeat (2)\n                    move (10) steps\n                end\n                next costume\n            end\n            if <(Game Difficulty) = [2]> then\n                wait (0) seconds\n            else\n                wait (1) seconds\n            end\n        else\n            if <(Game Difficulty) = [2]> then\n                point towards (mega man v)\n                set [y v] to [25]\n                switch costume to (busterrodjump v)\n                repeat (15)\n                    change [y v] by (-2)\n                    move (5) steps\n                    change y by (y)\n                end\n                switch costume to (busterrodairattack1 v)\n                repeat (2)\n                    wait (.02) seconds\n                    next costume\n                end\n                start sound [SE \[107\] v]\n                point towards (mega man v)\n                repeat until <(y position) < [-85]>\n                    change [y v] by (-1)\n                    move (10) steps\n                    change y by (y)\n                end\n                set y to (-91)\n                switch costume to (busterrod1 v)\n            else\n                point towards (mega man v)\n                set [y v] to [25]\n                switch costume to (busterrodjump v)\n                repeat (3)\n                    change [y v] by (-2)\n                    move (5) steps\n                    change y by (y)\n                end\n                repeat until <(y position) < [-85]>\n                    change [y v] by (-2)\n                    move (5) steps\n                    change y by (y)\n                end\n                set y to (-91)\n                switch costume to (busterrod1 v)\n                wait (1) seconds\n            end\n        end\n    end\nend\nif <(Robot Master Stage) = [5]> then\n    forever\n        if <(pick random (1) to (3)) = [1]> then\n            switch costume to (shadowthrow1 v)\n            repeat (4)\n                wait (.05) seconds\n                next costume\n            end\n            wait (.2) seconds\n            next costume\n            if <([x position v] of [hitbox v]) < (x position)> then\n                point in direction (-90)\n                set [proj direction v] to (direction)\n                set [proj x v] to (((Scroll X) + (x position)) + (0))\n                set [proj y v] to (((Scroll Y) + (y position)) + (0))\n                set [projectile name v] to [shadowblade]\n                broadcast (CREATE PROJECTILE v)\n                wait (.02) seconds\n                set [proj direction v] to ((direction) + (25))\n                broadcast (CREATE PROJECTILE v)\n            else\n                point in direction (90)\n                set [proj direction v] to (direction)\n                set [proj x v] to (((Scroll X) + (x position)) + (0))\n                set [proj y v] to (((Scroll Y) + (y position)) + (0))\n                set [projectile name v] to [shadowblade]\n                broadcast (CREATE PROJECTILE v)\n                wait (.02) seconds\n                set [proj direction v] to ((direction) + (-25))\n                broadcast (CREATE PROJECTILE v)\n            end\n            if <(Game Difficulty) = [1]> then\n                wait (1) seconds\n            else\n                wait (0) seconds\n            end\n        else\n            if <(pick random (1) to (2)) = [1]> then\n                point towards (mega man v)\n                set [y v] to [25]\n                switch costume to (shadowjump v)\n                repeat (3)\n                    change [y v] by (-2)\n                    move (3) steps\n                    change y by (y)\n                end\n                repeat until <(y position) < [-55]>\n                    change [y v] by (-2)\n                    move (3) steps\n                    change y by (y)\n                end\n                set y to (-64)\n                switch costume to (shadowman1 v)\n                if <(Game Difficulty) = [1]> then\n                    wait (1) seconds\n                else\n                    wait (0) seconds\n                end\n            else\n                if <([x position v] of [hitbox v]) < (x position)> then\n                    point in direction (-90)\n                    repeat until <(x position) < [-200]>\n                        switch costume to (shadowslide v)\n                        if <(Game Difficulty) = [1]> then\n                            change x by (-10)\n                        else\n                            change x by (-25)\n                        end\n                    end\n                    switch costume to (shadowman1 v)\n                else\n                    point in direction (90)\n                    repeat until <(x position) > [170]>\n                        switch costume to (shadowslide v)\n                        if <(Game Difficulty) = [1]> then\n                            change x by (10)\n                        else\n                            change x by (25)\n                        end\n                    end\n                    switch costume to (shadowman1 v)\n                end\n                if <(Game Difficulty) = [1]> then\n                    wait (.5) seconds\n                end\n                wait (.1) seconds\n            end\n        end\n    end\nend\nif <(Robot Master Stage) = [2]> then\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        repeat (pick random (1) to (4))\n            switch costume to (elecmanrun1 v)\n            repeat (3)\n                repeat (1)\n                    if <(Game Difficulty) = [2]> then\n                        move (15) steps\n                    else\n                        move (8) steps\n                    end\n                end\n                next costume\n            end\n        end\n        switch costume to (elecman1 v)\n        wait (.4) seconds\n        switch costume to (elecmanshoot1 v)\n        wait (.2) seconds\n        next costume\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 [proj direction v] to (direction)\n        set [proj x v] to (((Scroll X) + (x position)) + (0))\n        set [proj y v] to (((Scroll Y) + (y position)) + (0))\n        set [projectile name v] to [elecshot]\n        broadcast (CREATE PROJECTILE v)\n        wait (.5) seconds\n        if <(pick random (1) to (2)) = [1]> then\n            point towards (mega man v)\n            set [y v] to [20]\n            switch costume to (elecmanjump v)\n            repeat (3)\n                change [y v] by (-2)\n                move (5) steps\n                change y by (y)\n            end\n            repeat until <(y position) < [-45]>\n                change [y v] by (-2)\n                move (5) steps\n                change y by (y)\n            end\n        end\n        set y to (-58)\n        switch costume to (elecman1 v)\n        wait (.3) seconds\n    end\nend\nif <(Robot Master Stage) = [6]> then\n    forever\n        if <(x position) < [0]> then\n            repeat until <(x position) > [-50]>\n                point in direction (90)\n                switch costume to (gemirun1 v)\n                repeat (2)\n                    move ((Game Difficulty) * (6)) steps\n                end\n                repeat (3)\n                    next costume\n                    repeat (2)\n                        move ((Game Difficulty) * (6)) steps\n                    end\n                end\n            end\n        else\n            repeat until <(x position) < [50]>\n                point in direction (-90)\n                switch costume to (gemirun1 v)\n                repeat (2)\n                    move ((Game Difficulty) * (6)) steps\n                end\n                repeat (3)\n                    next costume\n                    repeat (2)\n                        move ((Game Difficulty) * (6)) steps\n                    end\n                end\n            end\n        end\n        point towards (mega man v)\n        switch costume to (gemi2 v)\n        set [proj x v] to (((Scroll X) + (x position)) + (0))\n        set [proj y v] to (((Scroll Y) + (y position)) + (0))\n        broadcast (create Gemini Clone v)\n        wait (.5) seconds\n        repeat (2)\n            repeat until <(x position) > [115]>\n                point in direction (90)\n                switch costume to (gemirun1 v)\n                repeat (2)\n                    move ((Game Difficulty) * (6)) steps\n                end\n                repeat (3)\n                    next costume\n                    repeat (2)\n                        move ((Game Difficulty) * (6)) steps\n                    end\n                end\n            end\n            repeat until <(x position) < [-150]>\n                point in direction (-90)\n                switch costume to (gemirun1 v)\n                repeat (2)\n                    move ((Game Difficulty) * (6)) steps\n                end\n                repeat (3)\n                    next costume\n                    repeat (2)\n                        move ((Game Difficulty) * (6)) steps\n                    end\n                end\n            end\n        end\n        broadcast (kill enemies v)\n        switch costume to (gemi1 v)\n        wait (.5) seconds\n        point towards (mega man v)\n        set [y v] to [15]\n        switch costume to (gemijump v)\n        repeat (3)\n            change [y v] by (-1)\n            move (8) steps\n            change y by (y)\n            if <(x position) > [175]> then\n                set x to (175)\n            end\n        end\n        repeat until <(y position) < [-94]>\n            change [y v] by (-1)\n            move (8) steps\n            change y by (y)\n            if <(x position) > [175]> then\n                set x to (175)\n            end\n        end\n        set y to (-101)\n        switch costume to (gemi1 v)\n        point in direction (90)\n        if <(Game Difficulty) = [1]> then\n            point in direction (90)\n            switch costume to (gemishoot v)\n            wait (.1) seconds\n            set [proj direction v] to (direction)\n            set [proj x v] to (((Scroll X) + (x position)) + (0))\n            set [proj y v] to (((Scroll Y) + (y position)) + (0))\n            set [projectile name v] to [glaser]\n            broadcast (CREATE PROJECTILE v)\n            switch costume to (gemifire v)\n            wait (.1) seconds\n        else\n            repeat (3)\n                point in direction (90)\n                switch costume to (gemishoot v)\n                wait (.1) seconds\n                set [proj direction v] to (direction)\n                set [proj x v] to (((Scroll X) + (x position)) + (0))\n                set [proj y v] to (((Scroll Y) + (y position)) + (0))\n                set [projectile name v] to [glaser]\n                broadcast (CREATE PROJECTILE v)\n                switch costume to (gemifire v)\n                wait (.5) seconds\n            end\n        end\n        switch costume to (gemi1 v)\n        wait (.5) seconds\n    end\nend\nif <(Robot Master Stage) = [10]> then\n    if <(WilyBattlePhase) = [2]> then\n        forever\n            repeat (4)\n                change [ghost v] effect by (25)\n            end\n            hide\n            go to x: (pick random (-150) to (150)) y: (pick random (-20) to (80))\n            show\n            repeat (4)\n                change [ghost v] effect by (-25)\n            end\n            if <(pick random (1) to (2)) = [1]> then\n                broadcast (Mind ray v)\n                wait (1.5) seconds\n            else\n                repeat (1)\n                    point towards (mega man v)\n                    start sound [bazooka v]\n                    set [proj direction v] to (direction)\n                    set [proj x v] to (((Scroll X) + (x position)) + (0))\n                    set [proj y v] to (((Scroll Y) + (y position)) + (5))\n                    set [projectile name v] to [wilybomb]\n                    broadcast (CREATE PROJECTILE v)\n                    wait (1.5) seconds\n                end\n                repeat (1)\n                    start sound [bomb v]\n                    set [proj direction v] to [-45]\n                    set [proj x v] to (((Scroll X) + (x position)) + (0))\n                    set [proj y v] to (((Scroll Y) + (y position)) + (-25))\n                    set [projectile name v] to [wilymissile]\n                    broadcast (CREATE PROJECTILE v)\n                    wait (.3) seconds\n                end\n            end\n            wait (.6) seconds\n            if <(Game Difficulty) = [1]> then\n                wait (.6) seconds\n            end\n        end\n    else\n        forever\n            switch costume to (wilyboss8 v)\n            repeat (2)\n                wait (.05) seconds\n                next costume\n            end\n            start sound [bazooka v]\n            set [proj direction v] to [-45]\n            set [proj x v] to (((Scroll X) + (x position)) + (0))\n            set [proj y v] to (((Scroll Y) + (y position)) + (5))\n            set [projectile name v] to [wilybomb]\n            wait (.05) seconds\n            set [proj direction v] to [-90]\n            broadcast (CREATE PROJECTILE v)\n            wait (.05) seconds\n            set [proj direction v] to [-155]\n            broadcast (CREATE PROJECTILE v)\n            repeat (2)\n                wait (.05) seconds\n                switch costume to ((costume [number v]) + (-1))\n            end\n            wait (.3) seconds\n            repeat ((Game Difficulty) * (4))\n                switch costume to (wilybossmissile1 v)\n                wait (.05) seconds\n                next costume\n                wait (.05) seconds\n                next costume\n                start sound [bomb v]\n                set [proj direction v] to [-45]\n                set [proj x v] to (((Scroll X) + (x position)) + (50))\n                set [proj y v] to (((Scroll Y) + (y position)) + (35))\n                set [projectile name v] to [wilymissile]\n                broadcast (CREATE PROJECTILE v)\n                wait (.05) seconds\n                switch costume to ((costume [number v]) + (-1))\n                wait (.05) seconds\n                switch costume to ((costume [number v]) + (-1))\n                wait (.05) seconds\n                switch costume to (wilyboss8 v)\n            end\n            wait (.3) seconds\n            switch costume to (wilybossgrab1 v)\n            wait (.2) seconds\n            next costume\n            broadcast (wilyhand become tangible v)\n            wait (2) seconds\n            start sound [SE \[82\] v]\n            repeat (4)\n                wait (.2) seconds\n                next costume\n            end\n            if <(Game Difficulty) = [1]> then\n                wait (1.8) seconds\n            else\n                wait (.8) seconds\n            end\n            start sound [cutter v]\n            repeat (10)\n                wait (.05) seconds\n                next costume\n            end\n            wait (.05) seconds\n            switch costume to (wilyboss8 v)\n        end\n    end\nend\nif <(Robot Master Stage) = [1]> then\n    forever\n        point towards (hitbox v)\n        switch costume to (cutman1 v)\n        wait (.2) seconds\n        switch costume to (cutthrow1 v)\n        wait (.2) seconds\n        next costume\n        point towards (hitbox v)\n        set [proj direction v] to (direction)\n        set [proj x v] to (((Scroll X) + (x position)) + (0))\n        set [proj y v] to (((Scroll Y) + (y position)) + (0))\n        set [projectile name v] to [rcutter]\n        broadcast (CREATE PROJECTILE v)\n        wait (.2) seconds\n        switch costume to (cutnohat1 v)\n        wait (.2) seconds\n        next costume\n        wait (.2) seconds\n        switch costume to (cutnohatjump v)\n        set [y v] to [15]\n        point towards (mega man v)\n        repeat (15)\n            change [y v] by (-1)\n            move (5) steps\n            change y by (y)\n        end\n        repeat until <(y position) < [-89]>\n            change [y v] by (-1)\n            move (5) steps\n            change y by (y)\n        end\n        set y to (-96)\n        switch costume to (cutnohat1 v)\n        wait (.1) seconds\n        switch costume to (cutman1 v)\n        wait (.2) seconds\n        switch costume to (cutman2 v)\n        wait (.2) seconds\n        repeat (2)\n            if <([x position v] of [hitbox v]) < (x position)> then\n                point in direction (-90)\n            else\n                point in direction (90)\n            end\n            switch costume to (cutwalk1 v)\n            repeat (4)\n                repeat (2)\n                    move (4) steps\n                end\n                next costume\n            end\n            repeat (2)\n                move (4) steps\n            end\n        end\n    end\nend\nif <(Robot Master Stage) = [3]> then\n    point in direction (-90)\n    forever\n        repeat (3)\n            set [enemyattackrelease v] to [0]\n            switch costume to (airmanshoot v)\n            start sound [Mega Man 2 SFX \(11\) v]\n            set [proj direction v] to (direction)\n            set [proj x v] to (((Scroll X) + (x position)) + (0))\n            set [proj y v] to (((Scroll Y) + (y position)) + (0))\n            set [projectile name v] to [airshooter]\n            repeat ((Game Difficulty) * (2))\n                broadcast (CREATE PROJECTILE v)\n            end\n            wait (1) seconds\n            switch costume to (airman1 v)\n            wait (.3) seconds\n            if <(x position) > [0]> then\n                set [enemyattackrelease v] to [-1]\n                repeat (6)\n                    switch costume to (airman2 v)\n                    broadcast (conveyor push back v)\n                    repeat (3)\n                        broadcast (conveyor push back v)\n                    end\n                    next costume\n                    broadcast (conveyor push back v)\n                    repeat (3)\n                        broadcast (conveyor push back v)\n                    end\n                end\n            else\n                set [enemyattackrelease v] to [1]\n                repeat (6)\n                    switch costume to (airman2 v)\n                    broadcast (conveyor push forward v)\n                    repeat (3)\n                        broadcast (conveyor push forward v)\n                    end\n                    next costume\n                    broadcast (conveyor push forward v)\n                    repeat (3)\n                        broadcast (conveyor push forward v)\n                    end\n                end\n            end\n        end\n        switch costume to (airman1 v)\n        wait (.3) seconds\n        if <(x position) > [0]> then\n            switch costume to (airmanjump v)\n            set [y v] to [15]\n            repeat (15)\n                change [y v] by (-1)\n                change x by (-5)\n                change y by (y)\n            end\n            repeat until <(y position) < [-90]>\n                change [y v] by (-1)\n                change x by (-5)\n                change y by (y)\n            end\n            set [y v] to [15]\n            switch costume to (airmanjump v)\n            repeat (15)\n                change [y v] by (-1)\n                change x by (-7)\n                change y by (y)\n            end\n            repeat until <(y position) < [-90]>\n                change [y v] by (-1)\n                change x by (-8)\n                change y by (y)\n            end\n            set y to (-97)\n            switch costume to (airman1 v)\n            point in direction (90)\n        else\n            switch costume to (airmanjump v)\n            set [y v] to [15]\n            repeat (15)\n                change [y v] by (-1)\n                change x by (5)\n                change y by (y)\n            end\n            repeat until <(y position) < [-90]>\n                change [y v] by (-1)\n                change x by (5)\n                change y by (y)\n            end\n            set [y v] to [15]\n            switch costume to (airmanjump v)\n            repeat (15)\n                change [y v] by (-1)\n                change x by (7)\n                change y by (y)\n            end\n            repeat until <(y position) < [-90]>\n                change [y v] by (-1)\n                change x by (8)\n                change y by (y)\n            end\n            set y to (-97)\n            switch costume to (airman1 v)\n            point in direction (-90)\n        end\n        wait (.5) seconds\n    end\nend\nif <(Robot Master Stage) = [4]> then\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 <(Game Difficulty) = [2]> then\n            set [y v] to [15]\n            switch costume to (mtljump v)\n            repeat (15)\n                change [y v] by (-1)\n                change y by (y)\n            end\n            switch costume to (mtlthrow1 v)\n            wait (.2) seconds\n            next costume\n            point towards (hitbox v)\n            set [proj direction v] to (direction)\n            set [proj x v] to (((Scroll X) + (x position)) + (0))\n            set [proj y v] to (((Scroll Y) + (y position)) + (0))\n            set [projectile name v] to [metal]\n            broadcast (CREATE PROJECTILE v)\n            wait (.02) seconds\n            set [proj direction v] to ((direction) + (30))\n            broadcast (CREATE PROJECTILE v)\n            wait (.02) seconds\n            set [proj direction v] to ((direction) + (-30))\n            broadcast (CREATE PROJECTILE v)\n            repeat until <(y position) < [-50]>\n                change [y v] by (-1)\n                change y by (y)\n            end\n            set y to (-60)\n            repeat (2)\n                switch costume to (mtlrun1 v)\n                repeat (3)\n                    wait (.1) seconds\n                    next costume\n                end\n                wait (.1) seconds\n            end\n            if <(pick random (1) to (2)) = [1]> then\n                if <(x position) > [0]> then\n                    go to x: (185) y: (-60)\n                    set [y v] to [17]\n                    switch costume to (mtljump v)\n                    repeat (15)\n                        change [y v] by (-1)\n                        change x by (-11)\n                        change y by (y)\n                    end\n                    switch costume to (mtlthrow1 v)\n                    wait (.2) seconds\n                    next costume\n                    point towards (hitbox v)\n                    set [proj direction v] to (direction)\n                    set [proj x v] to (((Scroll X) + (x position)) + (0))\n                    set [proj y v] to (((Scroll Y) + (y position)) + (0))\n                    set [projectile name v] to [metal]\n                    broadcast (CREATE PROJECTILE v)\n                    wait (.02) seconds\n                    set [proj direction v] to ((direction) + (30))\n                    broadcast (CREATE PROJECTILE v)\n                    wait (.02) seconds\n                    set [proj direction v] to ((direction) + (-30))\n                    broadcast (CREATE PROJECTILE v)\n                    repeat until <(y position) < [-50]>\n                        change [y v] by (-1)\n                        change x by (-11)\n                        change y by (y)\n                    end\n                    set y to (-60)\n                    point in direction (90)\n                    repeat (2)\n                        switch costume to (mtlrun1 v)\n                        repeat (3)\n                            wait (.1) seconds\n                            next costume\n                        end\n                        wait (.1) seconds\n                    end\n                else\n                    go to x: (-178) y: (-60)\n                    set [y v] to [17]\n                    switch costume to (mtljump v)\n                    repeat (15)\n                        change [y v] by (-1)\n                        change x by (11)\n                        change y by (y)\n                    end\n                    switch costume to (mtlthrow1 v)\n                    wait (.2) seconds\n                    next costume\n                    point towards (hitbox v)\n                    set [proj direction v] to (direction)\n                    set [proj x v] to (((Scroll X) + (x position)) + (0))\n                    set [proj y v] to (((Scroll Y) + (y position)) + (0))\n                    set [projectile name v] to [metal]\n                    broadcast (CREATE PROJECTILE v)\n                    wait (.02) seconds\n                    set [proj direction v] to ((direction) + (30))\n                    broadcast (CREATE PROJECTILE v)\n                    wait (.02) seconds\n                    set [proj direction v] to ((direction) + (-30))\n                    broadcast (CREATE PROJECTILE v)\n                    repeat until <(y position) < [-50]>\n                        change [y v] by (-1)\n                        change x by (11)\n                        change y by (y)\n                    end\n                    set y to (-60)\n                    point in direction (-90)\n                    repeat (2)\n                        switch costume to (mtlrun1 v)\n                        repeat (3)\n                            wait (.1) seconds\n                            next costume\n                        end\n                        wait (.1) seconds\n                    end\n                end\n            end\n        else\n            set [y v] to [15]\n            switch costume to (mtljump v)\n            repeat (15)\n                change [y v] by (-1)\n                change y by (y)\n            end\n            switch costume to (mtlthrow1 v)\n            wait (.2) seconds\n            next costume\n            point towards (hitbox v)\n            set [proj direction v] to (direction)\n            set [proj x v] to (((Scroll X) + (x position)) + (0))\n            set [proj y v] to (((Scroll Y) + (y position)) + (0))\n            set [projectile name v] to [metal]\n            broadcast (CREATE PROJECTILE v)\n            repeat until <(y position) < [-50]>\n                change [y v] by (-1)\n                change y by (y)\n            end\n            set y to (-60)\n            repeat (2)\n                switch costume to (mtlrun1 v)\n                repeat (3)\n                    wait (.1) seconds\n                    next costume\n                end\n                wait (.1) seconds\n            end\n        end\n    end\nend\n\nwhen I receive [boss intro v]\nbroadcast (Disable Movement v)\nclear graphic effects\nif <(Robot Master Stage) = [1]> then\n    switch costume to (cutmanjump v)\n    point in direction (-90)\n    go to x: (160) y: (300)\n    go to [front v] layer\n    show\n    glide (.5) secs to x: (160) y: (-96)\n    repeat (4)\n        switch costume to (cutman1 v)\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n    end\n    broadcast (bATTLE begin v)\nend\nif <(Robot Master Stage) = [4]> then\n    switch costume to (mtljump v)\n    point in direction (-90)\n    go to x: (181) y: (300)\n    go to [front v] layer\n    show\n    glide (.5) secs to x: (181) y: (-60)\n    switch costume to (mtl1 v)\n    repeat (2)\n        wait (.3) seconds\n        next costume\n    end\n    broadcast (bATTLE begin v)\nend\nif <(Robot Master Stage) = [10]> then\n    switch costume to (wilyboss v)\n    point in direction (-90)\n    go to [front v] layer\n    go to x: (154) y: (-318)\n    show\n    broadcast (earthquake v)\n    set [y v] to [0]\n    repeat (23)\n        start sound [expl v]\n        change [y v] by (1)\n        change y by (y)\n    end\n    set y to (0)\n    switch costume to (wilyboss v)\n    repeat (6)\n        wait (.02) seconds\n        next costume\n    end\n    broadcast (bATTLE begin v)\nend\nif <(Robot Master Stage) = [3]> then\n    switch costume to (airmanjump v)\n    point in direction (-90)\n    go to x: (181) y: (300)\n    go to [front v] layer\n    show\n    glide (.5) secs to x: (181) y: (-97)\n    switch costume to (airman1 v)\n    wait (.5) seconds\n    repeat (4)\n        switch costume to (airman2 v)\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n    end\n    broadcast (bATTLE begin v)\nend\nif <(Robot Master Stage) = [9]> then\n    if <(Heard wily's intermission?) = [1]> then\n        switch costume to (protojump v)\n        point in direction (90)\n        go to x: (-50) y: (-116)\n        set [y v] to [15]\n        go to [front v] layer\n        show\n        repeat (15)\n            change x by (12)\n            change y by (y)\n            change [y v] by (-2)\n        end\n        switch costume to (proto1 v)\n        go to x: (154) y: (-116)\n        wait (.1) seconds\n        point in direction (-90)\n        wait (.5) seconds\n        broadcast (bATTLE begin v)\n    end\nend\nif <(Robot Master Stage) = [7]> then\n    if <(WilyCastleBoss) = [1]> then\n        switch costume to (busterrodjump v)\n        point in direction (-90)\n        go to x: (152) y: (300)\n        go to [front v] layer\n        show\n        glide (.5) secs to x: (152) y: (-91)\n        switch costume to (busterrod1 v)\n        wait (.5) seconds\n        repeat (6)\n            next costume\n            wait (.05) seconds\n        end\n        broadcast (bATTLE begin v)\n    end\n    if <(WilyCastleBoss) = [2]> then\n        switch costume to (megawaterjump v)\n        point in direction (-90)\n        go to x: (152) y: (300)\n        go to [front v] layer\n        show\n        glide (.5) secs to x: (152) y: (-85)\n        switch costume to (megawater2 v)\n        wait (.5) seconds\n        repeat (4)\n            next costume\n            wait (.1) seconds\n        end\n        broadcast (MegaWater raise water v)\n        wait (2) seconds\n        broadcast (bATTLE begin v)\n    end\n    if <(WilyCastleBoss) = [3]> then\n        switch costume to (hyperstorm2 v)\n        point in direction (-90)\n        go to x: (137) y: (300)\n        go to [front v] layer\n        show\n        glide (.5) secs to x: (137) y: (-57)\n        start sound [expl v]\n        broadcast (screenshake v)\n        switch costume to (hyperstorm1 v)\n        wait (1) seconds\n        switch costume to (hyperstorm3 v)\n        wait (.5) seconds\n        broadcast (hyperstorm init battle v)\n        wait (2) seconds\n        broadcast (bATTLE begin v)\n    end\nend\nif <(Robot Master Stage) = [6]> then\n    switch costume to (gemijump v)\n    point in direction (-90)\n    go to x: (155) y: (300)\n    go to [front v] layer\n    show\n    glide (.5) secs to x: (155) y: (-101)\n    switch costume to (gemi1 v)\n    wait (.5) seconds\n    repeat (5)\n        next costume\n        wait (.05) seconds\n    end\n    broadcast (bATTLE begin v)\nend\nif <(Robot Master Stage) = [2]> then\n    switch costume to (elecmanjump v)\n    point in direction (-90)\n    go to x: (155) y: (300)\n    go to [front v] layer\n    show\n    glide (.5) secs to x: (155) y: (-58)\n    switch costume to (elecman1 v)\n    wait (.5) seconds\n    repeat (2)\n        next costume\n        wait (.2) seconds\n    end\n    broadcast (bATTLE begin v)\nend\nif <(Robot Master Stage) = [5]> then\n    switch costume to (shadowjump v)\n    point in direction (-90)\n    go to x: (155) y: (300)\n    go to [front v] layer\n    show\n    glide (.5) secs to x: (155) y: (-64)\n    switch costume to (shadowman1 v)\n    wait (.5) seconds\n    repeat (3)\n        next costume\n        wait (.1) seconds\n    end\n    broadcast (bATTLE begin v)\nend\nif <(Robot Master Stage) = [8]> then\n    switch costume to (quint1 v)\n    point in direction (-90)\n    go to x: (155) y: (300)\n    go to [front v] layer\n    show\n    glide (.5) secs to x: (155) y: (-42)\n    start sound [04 - MegamanWarp v]\n    repeat (8)\n        next costume\n        wait (.02) seconds\n    end\n    broadcast (Quint get pogo stick v)\n    set y to (-42)\n    switch costume to (quintjump v)\n    set [y v] to [12]\n    repeat (12)\n        change y by (y)\n        change [y v] by (-1)\n    end\n    switch costume to (quintpogo1 v)\n    repeat (12)\n        change y by (y)\n        change [y v] by (-1)\n    end\n    switch costume to (quintpogo2 v)\n    set [y v] to [5]\n    start sound [spring v]\n    wait (.1) seconds\n    switch costume to (quintpogo1 v)\n    repeat (12)\n        change y by (y)\n        change [y v] by (-1)\n    end\n    switch costume to (quintpogo2 v)\n    set y to (-33)\n    wait (.1) seconds\n    switch costume to (quintpogo1 v)\n    wait (1) seconds\n    broadcast (bATTLE begin v)\nend\n\nwhen I receive [stage select fade v]\nwait (1.4) seconds\nclear graphic effects\ngo to [front v] layer\npoint in direction (90)\nif <(Robot Master Stage) = [5]> then\n    switch costume to (shadowman1 v)\n    show\n    set [y v] to [0]\n    go to x: (500) y: (0)\n    repeat (15)\n        change [y v] by (-2)\n        change x by (y)\n    end\n    set x to (0)\n    wait (.5) seconds\n    repeat (2)\n        next costume\n        wait (.1) seconds\n    end\n    wait (.1) seconds\n    next costume\n    wait (.6) seconds\n    set [y v] to [0]\n    repeat (15)\n        change [y v] by (-1)\n        change x by (y)\n    end\nend\nif <(Robot Master Stage) = [2]> then\n    switch costume to (elecman1 v)\n    show\n    set [y v] to [0]\n    go to x: (500) y: (0)\n    repeat (15)\n        change [y v] by (-2)\n        change x by (y)\n    end\n    set x to (0)\n    wait (.5) seconds\n    next costume\n    wait (.2) seconds\n    next costume\n    wait (.6) seconds\n    set [y v] to [0]\n    repeat (15)\n        change [y v] by (-1)\n        change x by (y)\n    end\nend\nif <(Robot Master Stage) = [1]> then\n    switch costume to (cutman1 v)\n    show\n    set [y v] to [0]\n    go to x: (500) y: (0)\n    repeat (15)\n        change [y v] by (-2)\n        change x by (y)\n    end\n    set x to (0)\n    wait (.5) seconds\n    repeat (4)\n        next costume\n        wait (.1) seconds\n        switch costume to (cutman1 v)\n        wait (.1) seconds\n    end\n    wait (.5) seconds\n    set [y v] to [0]\n    repeat (15)\n        change [y v] by (-1)\n        change x by (y)\n    end\nend\nif <(Robot Master Stage) = [4]> then\n    switch costume to (mtl1 v)\n    show\n    set [y v] to [0]\n    go to x: (500) y: (0)\n    repeat (15)\n        change [y v] by (-2)\n        change x by (y)\n    end\n    set x to (0)\n    wait (1) seconds\n    repeat (2)\n        wait (.2) seconds\n        next costume\n    end\n    wait (.5) seconds\n    set [y v] to [0]\n    repeat (15)\n        change [y v] by (-1)\n        change x by (y)\n    end\nend\nif <(Robot Master Stage) = [6]> then\n    switch costume to (gemi1 v)\n    show\n    set [y v] to [0]\n    go to x: (500) y: (0)\n    repeat (15)\n        change [y v] by (-2)\n        change x by (y)\n    end\n    set x to (0)\n    wait (1) seconds\n    repeat (5)\n        next costume\n        wait (.05) seconds\n    end\n    point in direction (90)\n    create clone of (_myself_ v)\n    wait (.5) seconds\n    set [y v] to [0]\n    repeat (15)\n        change [y v] by (-1)\n        change x by (y)\n    end\nend\nif <(Robot Master Stage) = [3]> then\n    switch costume to (airman1 v)\n    show\n    set [y v] to [0]\n    go to x: (500) y: (0)\n    repeat (15)\n        change [y v] by (-2)\n        change x by (y)\n    end\n    set x to (0)\n    wait (1) seconds\n    repeat (3)\n        switch costume to (airman2 v)\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n    end\n    wait (.5) seconds\n    set [y v] to [0]\n    repeat (15)\n        change [y v] by (-1)\n        change x by (y)\n    end\nend\nwait (4) seconds\nbroadcast (Screen Transition v)\nwait (.6) seconds\nset [show stage select stars? v] to [0]\nbroadcast (SetUp v)\n\nwhen I receive [setup v]\nhide\ndelete this clone\n\nwhen I start as a clone\nset [y v] to [0]\nrepeat (10)\n    change [y v] by (1)\n    move (y) steps\nend\nrepeat (10)\n    change [y v] by (-1)\n    move (y) steps\nend\nrepeat (4)\n    hide\n    wait (.05) seconds\n    show\n    wait (.05) seconds\nend\ndelete this clone\n\ndefine getpos\nrepeat until <not <touching (misc objects v)?>>\n    change y by (.5)\nend\n\nwhen I receive [protoman teleport in v]\nhide\nplay sound [Mega Man 3 - Proto Man v] until done\nswitch costume to (prototele1 v)\nclear graphic effects\npoint in direction (90)\ngo to x: (-50) y: (200)\nshow\nset [y v] to [0]\nrepeat (15)\n    change y by (y)\n    change [y v] by (-2)\nend\nset y to (-116)\nstart sound [04 - MegamanWarp v]\nrepeat (7)\n    wait (0) seconds\n    next costume\nend\nwait (0) seconds\nswitch costume to (proto1 v)\nif <(Heard wily's intermission?) = [1]> then\n    broadcast (Boss Intro v)\nelse\n    broadcast (protoman dialogue v)\n    forever\n        switch costume to (proto1 v)\n        wait (.1) seconds\n        switch costume to (proto2 v)\n        wait (.1) seconds\n    end\nend\n\nwhen I receive [protoman 180 v]\nturn right (180) degrees\n\nwhen I receive [protoman fall v]\nstop [other scripts in sprite v]\nswitch costume to (proto2 v)\nrepeat (25)\n    change x by (1)\n    wait (0) seconds\n    change x by (-1)\n    wait (0) seconds\nend\nswitch costume to (protoouch2 v)\nforever\n    change x by (1)\n    wait (0) seconds\n    change x by (-1)\n    wait (0) seconds\nend\n\nwhen I receive [protoman get up v]\nstop [other scripts in sprite v]\nswitch costume to (proto2 v)\nset [heard wily's intermission? v] to [1]\n\nwhen I receive [mega and proto tele out v]\nset y to (-116)\nswitch costume to (proto1 v)\nwait (0) seconds\nswitch costume to (prototele9 v)\nshow\nwait (0) seconds\nrepeat (7)\n    switch costume to ((costume [number v]) + (-1))\n    wait (0) seconds\nend\nstart sound [04 - MegamanWarp v]\nset [y v] to [0]\nrepeat (20)\n    change y by (y)\n    change [y v] by (2)\nend\nhide\n\nwhen I receive [teleportin v]\nset [wilybattlephase v] to [1]\n\nwhen I receive [dr wily strikes back v]\nforever\n    switch costume to (wilycapsule1 v)\n    wait (.1) seconds\n    next costume\n    wait (.1) seconds\nend\n\nwhen I receive [dr wily strikes back v]\nclear graphic effects\ngo to x: (150) y: (-400)\nset [y v] to [0]\nshow\nrepeat (15)\n    change [y v] by (1)\n    change y by (y)\nend\nrepeat (15)\n    change [y v] by (-1)\n    change y by (y)\nend\nbroadcast (bATTLE begin v)\n\nwhen I receive [wily back up v]\ngo to x: (100) y: (-86)\nrepeat (3)\n    repeat (2)\n        change x by (2)\n    end\n    repeat (2)\n        change x by (1)\n    end\n    wait (1) seconds\nend\n\nwhen I receive [dr wily tremble in fear v]\nswitch costume to (drwily5 v)\nforever\n    change x by (1)\n    wait (0) seconds\n    change x by (-1)\n    wait (0) seconds\nend\n\nwhen I receive [wily get up v]\nstop [other scripts in sprite v]\nswitch costume to (wilystand1 v)\n\nwhen I receive [wily hide v]\nhide\n\n@death effect\n\nwhen flag clicked\nhide\n\nwhen I receive [bossdie v]\ngo to (boss v)\nif <(Robot Master Stage) = [9]> then\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 (de1 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\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\nwhen I receive [die v]\ngo to (mega man v)\ndeath\nwait (1) seconds\n\n@Stage Select Stars\n\nwhen flag clicked\nset [show stage select stars? v] to [1]\nhide\nforever\n    if <<(Show stage select stars?) = [1]> and <(AtMenu?) = [0]>> then\n        set size to (pick random (25) to (100)) %\n        go to x: (250) y: (pick random (200) to (-200))\n        create clone of (_myself_ v)\n        wait (.1) seconds\n    end\nend\n\nwhen I start as a clone\ngo to [back v] layer\nshow\nrepeat until <(x position) < [-230]>\n    change x by (((size) / (5)) * (-1))\nend\ndelete this clone\n\nwhen I receive [stage select v]\nset [show stage select stars? v] to [1]\n\n@Stage Select\n\nwhen flag clicked\nset [wily castle level v] to [1]\nhide\n\nwhen I start as a clone\ngo to [front v] layer\nshow\nif <(costume [number v]) < [7]> then\n    if <(item (costume [number v]) of [robot master weapons v]) = [1]> then\n        delete this clone\n    end\n    if <((costume [number v]) mod (3)) = [0]> then\n        glide (1) secs to x: (-179) y: (y position)\n    else\n        if <((costume [number v]) mod (2)) = [0]> then\n            glide (1) secs to x: (0) y: (y position)\n        else\n            glide (1) secs to x: (179) y: (y position)\n        end\n    end\nend\nif <(costume [number v]) = [14]> then\n    go to x: (0) y: (500)\n    glide (.5) secs to x: (0) y: (94)\n    forever\n        switch costume to (costume1 v)\n        wait (.5) seconds\n        next costume\n        wait (.2) seconds\n    end\nend\nif <(costume [number v]) = [16]> then\n    go to x: (500) y: (0)\n    set size to (220) %\n    switch costume to ((Robot Master Stage) + (16))\n    glide (.5) secs to x: (0) y: (0)\nend\nif <(costume [number v]) = [23]> then\n    go to x: (500) y: (0)\n    set size to (220) %\n    glide (.8) secs to x: (-103) y: (0)\n    wait (2) seconds\nend\n\nwhen I start as a clone\nset [costume# v] to (costume [number v])\nif <(costume [number v]) < [7]> then\n    forever\n        wait until <touching (mouse-pointer v)?>\n        switch costume to ((costume#) + (6))\n        start sound [ding v]\n        wait until <not <touching (mouse-pointer v)?>>\n        switch costume to (costume#)\n    end\nend\n\nwhen I start as a clone\nif <(costume#) < [7]> then\n    forever\n        if <<<mouse down?> and <touching (mouse-pointer v)?>> and <(Able to Select) = [1]>> then\n            set [able to select v] to [0]\n            set [robot master stage v] to (costume#)\n            broadcast (Stage Select Fade v)\n        end\n    end\nend\n\nwhen I receive [stage select fade v]\nwait (1) seconds\ndelete this clone\n\nwhen I receive [stage select fade v]\nwait (1.2) seconds\nstart sound [MMX4 stage intro v]\nset size to (200) %\ngo to x: (0) y: (0)\nswitch costume to (robotcutsc2 v)\nshow\nwait (3) seconds\ncreate clone of (_myself_ v)\n\nwhen I receive [setup v]\nhide\ndelete this clone\n\nwhen I receive [weapon get screen v]\nswitch costume to (mm3get2 v)\ncreate clone of (_myself_ v)\nswitch costume to (mm3getweapon v)\ngo to x: (0) y: (0)\nset size to (200) %\nshow\nreplace item (Robot Master Stage) of [robot master weapons v] with [1]\n\nwhen I receive [stage select v]\nif <[1] = [1]> then\n    delete this clone\nend\nset [able to select v] to [1]\nclear graphic effects\npoint in direction (90)\nset volume to (100) %\nset [wilycastleboss v] to [1]\nif <(Robot Master Weapons) = [111111]> then\n    if <(Wily Castle Level) = [1]> then\n        set size to (190) %\n        switch costume to (willytower1 v)\n        go to x: (0) y: (0)\n        go to [front v] layer\n        set [wilytowerscroll v] to [0]\n        create clone of (_myself_ v)\n        next costume\n        create clone of (_myself_ v)\n        go to [front v] layer\n        switch costume to (ufo1 v)\n        create clone of (_myself_ v)\n        set volume to (100) %\n        start sound [make it stop make it stop v]\n    else\n        broadcast (wahwee castle cutscene v)\n    end\nelse\n    set [able to select v] to [1]\n    set size to (185) %\n    hide\n    switch costume to (stagese3 v)\n    repeat (3)\n        go to x: (500) y: (35)\n        create clone of (_myself_ v)\n        next costume\n    end\n    repeat (3)\n        go to x: (500) y: (-95)\n        create clone of (_myself_ v)\n        next costume\n    end\n    switch costume to (costume1 v)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [25]> then\n    forever\n        set y to ((WilyTowerScroll) + (-400))\n        if <([abs v] of (y position) ) > [370]> then\n            hide\n        else\n            show\n        end\n    end\nend\nif <(costume [number v]) = [26]> then\n    forever\n        set y to (WilyTowerScroll)\n        if <([abs v] of (y position) ) > [370]> then\n            hide\n        else\n            show\n        end\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [33]> then\n    repeat (5)\n        switch costume to (ufo1 v)\n        repeat (2)\n            wait (.1) seconds\n            next costume\n        end\n        wait (.1) seconds\n    end\n    switch costume to (wily1 v)\n    create clone of (_myself_ v)\n    switch costume to (ufo3 v)\n    create clone of (_myself_ v)\n    repeat (6)\n        switch costume to (ufo4 v)\n        repeat (2)\n            wait (.1) seconds\n            next costume\n        end\n        wait (.1) seconds\n    end\n    repeat (5)\n        switch costume to (ufo1 v)\n        repeat (2)\n            wait (.1) seconds\n            next costume\n        end\n        wait (.1) seconds\n    end\n    set [y v] to [0]\n    switch costume to (ufo8 v)\n    go to x: (0) y: (0)\n    repeat (2)\n        repeat (49)\n            change [y v] by (-5)\n            set x to (([sin v] of (y) ) * (150))\n            change x by (10)\n            change [wilytowerscroll v] by (3)\n        end\n        next costume\n    end\n    repeat (40)\n        change [y v] by (-5)\n        set x to (([sin v] of (y) ) * (150))\n        change x by (10)\n        change [wilytowerscroll v] by (3)\n    end\n    broadcast (wahwee castle cutscene v)\n    delete this clone\nend\nif <(costume [number v]) = [35]> then\n    switch costume to (ufo7 v)\n    go to [front v] layer\n    change y by (20)\n    repeat (15)\n        change y by (5)\n    end\n    wait (1.84) seconds\n    repeat (12)\n        go to [front v] layer\n        change y by (-5)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [43]> then\n    change y by (10)\n    repeat (9)\n        switch costume to (wily1 v)\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n    end\n    wait (.2) seconds\n    delete this clone\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [33]> then\n    go to x: (0) y: (500)\n    repeat (40)\n        change y by (-5)\n    end\nend\nif <(costume [number v]) = [27]> then\n    forever\n        switch costume to (wilyskull v)\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n    end\nend\nif <(costume [number v]) = [29]> then\n    forever\n        switch costume to (wilypoint v)\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n    end\nend\n\nwhen I receive [wahwee castle map v]\nif <<(costume [number v]) = [25]> or <(costume [number v]) = [26]>> then\n    repeat (2)\n        set [brightness v] effect to (0)\n        repeat (5)\n            change [brightness v] effect by (10)\n        end\n        repeat (5)\n            change [brightness v] effect by (-10)\n        end\n    end\n    set [brightness v] effect to (50)\n    wait (.1) seconds\n    repeat (8)\n        change [brightness v] effect by (-10)\n    end\nend\n\nwhen I receive [wahwee castle cutscene v]\nif <[1] = [1]> then\n    delete this clone\nend\nset [wilycastleboss v] to [1]\nset size to (190) %\nswitch costume to (willytower1 v)\ngo to x: (0) y: (0)\ngo to [front v] layer\nset [wilytowerscroll v] to [414]\ncreate clone of (_myself_ v)\nnext costume\ncreate clone of (_myself_ v)\nstart sound [Mega Man 2 - Wily stage map v]\nwait (6) seconds\nbroadcast (Wahwee castle map v)\nwait (0) seconds\nmake wily castle map\nwait (2) seconds\ndraw castle points\nset [checkpoint v] to [0]\nset [robot master stage v] to ((6) + (Wily Castle Level))\nwait (2) seconds\nbroadcast (Screen Transition v)\nbroadcast (delete stuff v)\nwait (.6) seconds\nset [show stage select stars? v] to [0]\nbroadcast (SetUp v)\n\ndefine make wily castle map\nset rotation style [all around v]\npoint in direction (90)\ngo to [front v] layer\nset [brightness v] effect to (0)\nset size to (250) %\ngo to x: (-163) y: (-150)\nswitch costume to (wilypoint v)\ncreate clone of (_myself_ v)\nif <(Wily Castle Level) > [1]> then\n    go to x: (-163) y: (-150)\n    repeat (3)\n        point in direction (90)\n        move (20) steps\n        switch costume to (wilyroad v)\n        create clone of (_myself_ v)\n    end\n    point in direction (180)\n    change x by (20)\n    change y by (4)\n    switch costume to (wilycurve v)\n    create clone of (_myself_ v)\n    repeat (6)\n        point in direction (0)\n        move (10) steps\n        switch costume to (wilyroad v)\n        create clone of (_myself_ v)\n    end\nend\nif <(Wily Castle Level) > [2]> then\n    go to x: (-83) y: (-78)\n    repeat (3)\n        point in direction (90)\n        move (20) steps\n        switch costume to (wilyroad v)\n        create clone of (_myself_ v)\n    end\n    point in direction (90)\n    change x by (20)\n    switch costume to (wilycurve v)\n    create clone of (_myself_ v)\n    change x by (4)\n    change y by (-10)\n    repeat (2)\n        point in direction (180)\n        move (10) steps\n        switch costume to (wilyroad v)\n        create clone of (_myself_ v)\n    end\n    point in direction (-90)\n    change x by (4)\n    change y by (-15)\n    switch costume to (wilycurve v)\n    create clone of (_myself_ v)\n    repeat (1)\n        point in direction (90)\n        move (10) steps\n        switch costume to (wilyroad v)\n        create clone of (_myself_ v)\n    end\n    point in direction (180)\n    change x by (20)\n    change y by (4)\n    switch costume to (wilycurve v)\n    create clone of (_myself_ v)\n    repeat (6)\n        point in direction (0)\n        move (10) steps\n        switch costume to (wilyroad v)\n        create clone of (_myself_ v)\n    end\nend\nif <(Wily Castle Level) > [3]> then\n    go to x: (35) y: (-49)\n    repeat (2)\n        point in direction (0)\n        move (20) steps\n        switch costume to (wilyroad v)\n        create clone of (_myself_ v)\n    end\n    point in direction (90)\n    change y by (15)\n    change x by (-4)\n    switch costume to (wilycurve v)\n    create clone of (_myself_ v)\n    change x by (-9)\n    repeat (2)\n        point in direction (-90)\n        move (10) steps\n        switch costume to (wilyroad v)\n        create clone of (_myself_ v)\n    end\nend\npoint in direction (90)\ngo to x: (-83) y: (-78)\nswitch costume to (wilypoint v)\ncreate clone of (_myself_ v)\ngo to x: (35) y: (-49)\nswitch costume to (wilypoint v)\ncreate clone of (_myself_ v)\ngo to x: (-8) y: (6)\nswitch costume to (wilypoint v)\ncreate clone of (_myself_ v)\npoint in direction (90)\ngo to x: (-8) y: (126)\nswitch costume to (wilyskull v)\ncreate clone of (_myself_ v)\n\ndefine draw castle points\nclear graphic effects\nif <(Wily Castle Level) = [1]> then\n    go to x: (-163) y: (-150)\n    repeat (3)\n        point in direction (90)\n        move (20) steps\n        switch costume to (wilyroad v)\n        create clone of (_myself_ v)\n        start sound [Mega Man 2 SFX \(18\) v]\n        wait (.02) seconds\n    end\n    point in direction (180)\n    change x by (20)\n    change y by (4)\n    switch costume to (wilycurve v)\n    create clone of (_myself_ v)\n    start sound [Mega Man 2 SFX \(18\) v]\n    wait (.02) seconds\n    repeat (6)\n        point in direction (0)\n        move (10) steps\n        switch costume to (wilyroad v)\n        create clone of (_myself_ v)\n        start sound [Mega Man 2 SFX \(18\) v]\n        wait (.02) seconds\n    end\nend\nif <(Wily Castle Level) = [2]> then\n    go to x: (-83) y: (-78)\n    repeat (3)\n        point in direction (90)\n        move (20) steps\n        switch costume to (wilyroad v)\n        create clone of (_myself_ v)\n        start sound [Mega Man 2 SFX \(18\) v]\n        wait (.02) seconds\n    end\n    point in direction (90)\n    change x by (20)\n    switch costume to (wilycurve v)\n    create clone of (_myself_ v)\n    start sound [Mega Man 2 SFX \(18\) v]\n    wait (.02) seconds\n    change x by (4)\n    change y by (-10)\n    repeat (2)\n        point in direction (180)\n        move (10) steps\n        switch costume to (wilyroad v)\n        create clone of (_myself_ v)\n        start sound [Mega Man 2 SFX \(18\) v]\n        wait (.02) seconds\n    end\n    point in direction (-90)\n    change x by (4)\n    change y by (-15)\n    switch costume to (wilycurve v)\n    create clone of (_myself_ v)\n    start sound [Mega Man 2 SFX \(18\) v]\n    wait (.02) seconds\n    repeat (1)\n        point in direction (90)\n        move (10) steps\n        switch costume to (wilyroad v)\n        create clone of (_myself_ v)\n        start sound [Mega Man 2 SFX \(18\) v]\n        wait (.02) seconds\n    end\n    point in direction (180)\n    change x by (20)\n    change y by (4)\n    switch costume to (wilycurve v)\n    create clone of (_myself_ v)\n    start sound [Mega Man 2 SFX \(18\) v]\n    wait (.02) seconds\n    repeat (6)\n        point in direction (0)\n        move (10) steps\n        switch costume to (wilyroad v)\n        create clone of (_myself_ v)\n        start sound [Mega Man 2 SFX \(18\) v]\n        wait (.02) seconds\n    end\nend\nif <(Wily Castle Level) = [3]> then\n    go to x: (35) y: (-49)\n    repeat (2)\n        point in direction (0)\n        move (20) steps\n        switch costume to (wilyroad v)\n        create clone of (_myself_ v)\n        start sound [Mega Man 2 SFX \(18\) v]\n        wait (.02) seconds\n    end\n    point in direction (90)\n    change y by (15)\n    change x by (-4)\n    switch costume to (wilycurve v)\n    create clone of (_myself_ v)\n    start sound [Mega Man 2 SFX \(18\) v]\n    wait (.02) seconds\n    change x by (-9)\n    repeat (2)\n        point in direction (-90)\n        move (10) steps\n        switch costume to (wilyroad v)\n        create clone of (_myself_ v)\n        start sound [Mega Man 2 SFX \(18\) v]\n        wait (.02) seconds\n    end\nend\nif <(Wily Castle Level) = [4]> then\n    go to x: (-8) y: (6)\n    repeat (6)\n        point in direction (0)\n        move (20) steps\n        switch costume to (wilyroad v)\n        create clone of (_myself_ v)\n        start sound [Mega Man 2 SFX \(18\) v]\n        wait (.02) seconds\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [27]> then\n    forever\n        go to [front v] layer\n    end\nend\nif <(costume [number v]) = [29]> then\n    forever\n        go to [front v] layer\n    end\nend\n\nwhen I receive [delete stuff v]\ndelete this clone\n\n@transition effect\n\nwhen flag clicked\nhide\nwait (.05) seconds\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nset [brightness v] effect to (0)\ngo to [front v] layer\nshow\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (-10)\n    change [brightness v] effect by (25)\nend\nrepeat (30)\n    go to [front v] layer\nend\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [stage select fade v]\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nset [brightness v] effect to (0)\nstart sound [ching v]\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)\nend\nset [brightness v] effect to (0)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (.3) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [screen transition v]\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nset [brightness v] effect to (0)\ngo to [front v] layer\nshow\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (-10)\nend\nwait (.5) seconds\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [gotostageselect v]\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nset [brightness v] effect to (0)\nstart sound [ching v]\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)\nend\nset [brightness v] effect to (0)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (1) seconds\nbroadcast (STAGE SELECT v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [cue the epic music v]\nstart sound [Opening_Title \[MEGA MAN 3\]2 v]\n\n@READY\n\nwhen flag clicked\ngo to x: (0) y: (25)\nhide\n\nwhen I receive [ready v]\nrepeat (4)\n    go to [front v] layer\n    show\n    wait (.2) seconds\n    go to [front v] layer\n    hide\n    wait (.2) seconds\nend\nbroadcast (Teleportin v)\n\n@misc objects\n\nwhen I receive [setup v]\ndelete this clone\n\nwhen I start as a clone\ngo to [front v] layer\ngo to [front v] layer\nforever\n    set [mosaic v] effect to (0)\n    set x to ((Level_X) - (Scroll X))\n    set y to ((Level_Y) - (Scroll Y))\n    if <<touching (misc collision checker v)?> and <(letter (1) of (costume [name v])) = [k]>> then\n        broadcast (conveyor push forward v)\n    end\n    if <<(letter (1) of (costume [name v])) = [k]> or <(letter (1) of (costume [name v])) = [c]>> then\n        set [brightness v] effect to (([sin v] of ((timer) * (500)) ) * (10))\n    end\n    if <<touching (misc collision checker v)?> and <(letter (1) of (costume [name v])) = [c]>> then\n        broadcast (conveyor push back v)\n    end\n    if <<touching (ladder collision checker2 v)?> and <(letter (1) of (costume [name v])) = [l]>> then\n        if <(getting ouched ?) = [0]> then\n            set [collide with ladder v] to [1]\n        end\n    end\n    if <<([abs v] of ((Level_X) - (Scroll X)) ) > [400]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [360]>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [setup v]\nset [quint break blocks v] to [0]\nwait (.03) seconds\nhide\nclear graphic effects\ngo to x: (0) y: (0)\nset [level_x v] to [0]\nswitch costume to (k1 v)\nCreate\n\ndefine Create\nif <(Robot Master Stage) = [10]> then\n    set size to (200) %\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    switch costume to (lwily11 v)\n    create clone of (_myself_ v)\nend\nif <(Robot Master Stage) = [9]> then\n    set size to (250) %\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    switch costume to (k4 v)\n    create clone of (_myself_ v)\n    set size to (200) %\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    switch costume to (lwily9 v)\n    create clone of (_myself_ v)\n    set size to (200) %\n    set [level_y v] to [525]\n    set [level_x v] to [0]\n    switch costume to (lwily10 v)\n    create clone of (_myself_ v)\n    set size to (250) %\n    set [level_y v] to [525]\n    set [level_x v] to [100]\n    switch costume to (c1 v)\n    create clone of (_myself_ v)\n    repeat (7)\n        next costume\n        change [level_x v] by (500)\n        create clone of (_myself_ v)\n    end\nend\nif <(Robot Master Stage) = [8]> then\n    set size to (200) %\n    set [level_y v] to [-50]\n    set [level_x v] to [6950]\n    switch costume to (thingy1 v)\n    create clone of (_myself_ v)\n    set size to (200) %\n    set [level_y v] to [-50]\n    set [level_x v] to [7700]\n    switch costume to (thingy1 v)\n    create clone of (_myself_ v)\n    set size to (200) %\n    set [level_y v] to [-25]\n    set [level_x v] to [8025]\n    switch costume to (thingy1 v)\n    create clone of (_myself_ v)\n    set [level_y v] to [-50]\n    set [level_x v] to [8300]\n    switch costume to (thingy1 v)\n    create clone of (_myself_ v)\n    set size to (200) %\n    set [x v] to [9808]\n    repeat (18)\n        set [level_y v] to [-90]\n        set [level_x v] to (x)\n        switch costume to (brick v)\n        create clone of (_myself_ v)\n        change [x v] by (32)\n    end\n    set [x v] to [9808]\n    repeat (18)\n        set [level_y v] to [-122]\n        set [level_x v] to (x)\n        switch costume to (brick v)\n        create clone of (_myself_ v)\n        change [x v] by (32)\n    end\nend\nif <(Robot Master Stage) = [2]> then\n    set size to (250) %\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    switch costume to (lelec1 v)\n    create clone of (_myself_ v)\n    set size to (250) %\n    set [level_y v] to [500]\n    set [level_x v] to [0]\n    switch costume to (lelec2 v)\n    create clone of (_myself_ v)\n    set [level_y v] to [525]\n    set [level_x v] to [0]\n    switch costume to (lelec3 v)\n    create clone of (_myself_ v)\n    set [level_y v] to [1025]\n    set [level_x v] to [0]\n    switch costume to (lelec4 v)\n    create clone of (_myself_ v)\n    set [level_y v] to [1050]\n    set [level_x v] to [0]\n    switch costume to (lelec5 v)\n    create clone of (_myself_ v)\n    set [level_y v] to [1550]\n    set [level_x v] to [0]\n    switch costume to (lelec6 v)\n    create clone of (_myself_ v)\n    set [level_y v] to [2050]\n    set [level_x v] to [0]\n    switch costume to (lelec7 v)\n    create clone of (_myself_ v)\nend\nif <(Robot Master Stage) = [3]> then\n    set size to (200) %\n    set [level_y v] to [-70]\n    set [level_x v] to [950]\n    switch costume to (thingy1 v)\n    create clone of (_myself_ v)\n    set [level_y v] to [-80]\n    set [level_x v] to [2500]\n    switch costume to (thingy1 v)\n    create clone of (_myself_ v)\n    set [level_y v] to [-70]\n    set [level_x v] to [3200]\n    switch costume to (thingy1 v)\n    create clone of (_myself_ v)\nend\nif <(Robot Master Stage) = [4]> then\n    set size to (250) %\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    switch costume to (k1 v)\n    create clone of (_myself_ v)\n    repeat (2)\n        change [level_x v] by (500)\n        next costume\n        create clone of (_myself_ v)\n    end\n    change [level_y v] by (-400)\n    change [level_x v] by (500)\n    next costume\n    create clone of (_myself_ v)\n    repeat (4)\n        change [level_x v] by (500)\n        next costume\n        create clone of (_myself_ v)\n    end\n    set [level_y v] to [-1050]\n    set [level_x v] to [5726]\n    switch costume to (c2 v)\n    create clone of (_myself_ v)\nend\nif <(Robot Master Stage) = [6]> then\n    set size to (250) %\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    switch costume to (lgem1 v)\n    create clone of (_myself_ v)\n    set [level_y v] to [-2100]\n    set [level_x v] to [1730]\n    switch costume to (lgem2 v)\n    create clone of (_myself_ v)\n    set [level_y v] to [-1575]\n    set [level_x v] to [1730]\n    switch costume to (lgem3 v)\n    create clone of (_myself_ v)\nend\nif <(Robot Master Stage) = [7]> then\n    if <not <(checkpoint) > [1]>> then\n        set size to (200) %\n        set [level_y v] to [0]\n        set [level_x v] to [5425]\n        switch costume to (wilywall1 v)\n        create clone of (_myself_ v)\n    end\n    set [level_y v] to [0]\n    set [level_x v] to [5835]\n    switch costume to (lwily1 v)\n    create clone of (_myself_ v)\n    set [level_y v] to [0]\n    set [level_x v] to [6745]\n    switch costume to (lwily2 v)\n    create clone of (_myself_ v)\n    set [level_y v] to [0]\n    set [level_x v] to [7250]\n    switch costume to (lwily3 v)\n    create clone of (_myself_ v)\n    set [level_y v] to [525]\n    set [level_x v] to [7250]\n    switch costume to (lwily4 v)\n    create clone of (_myself_ v)\n    set [level_y v] to [1050]\n    set [level_x v] to [7250]\n    switch costume to (lwily5 v)\n    create clone of (_myself_ v)\n    if <not <(checkpoint) > [4]>> then\n        set [level_y v] to [1050]\n        set [level_x v] to [9115]\n        switch costume to (wilywall2 v)\n        create clone of (_myself_ v)\n    end\n    set [level_y v] to [1050]\n    set [level_x v] to [9610]\n    switch costume to (lwily6 v)\n    create clone of (_myself_ v)\n    set [level_y v] to [1575]\n    set [level_x v] to [9610]\n    switch costume to (lwily7 v)\n    create clone of (_myself_ v)\n    set [level_y v] to [2100]\n    set [level_x v] to [9610]\n    switch costume to (lwily8 v)\n    create clone of (_myself_ v)\nend\nif <(Robot Master Stage) = [5]> then\n    set size to (250) %\n    set [level_y v] to [0]\n    set [level_x v] to [2326]\n    switch costume to (lshadow1 v)\n    create clone of (_myself_ v)\nend\nif <(Robot Master Stage) = [1]> then\n    set size to (250) %\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    switch costume to (lcut1 v)\n    create clone of (_myself_ v)\n    set [level_y v] to [0]\n    set [level_x v] to [1615]\n    switch costume to (lcut2 v)\n    create clone of (_myself_ v)\n    change [level_y v] by (525)\n    switch costume to (lcut3 v)\n    create clone of (_myself_ v)\n    switch costume to (lcut4 v)\n    create clone of (_myself_ v)\n    change [level_y v] by (525)\n    switch costume to (lcut5 v)\n    create clone of (_myself_ v)\n    switch costume to (lcut6 v)\n    create clone of (_myself_ v)\n    change [level_y v] by (525)\n    switch costume to (lcut7 v)\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nset [clone v] to [0]\nhide\n\ngo [forward v] (5) layers\n\nwhen I receive [weapon get screen v]\ndelete this clone\n\nwhen I receive [game over v]\ndelete this clone\n\nwhen I receive [blink v]\n\nwhen I start as a clone\nif <(costume [number v]) = [11]> then\n    forever\n        if <(Game Difficulty) = [2]> then\n            switch costume to (thingy1 v)\n            wait (.2) seconds\n            switch costume to (thingy2 v)\n            wait (.1) seconds\n            switch costume to (thingy3 v)\n            if <<([abs v] of ((Level_X) - (Scroll X)) ) > [490]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [380]>> then\n            repeat (10)\n                if <<touching (hitbox v)?> and <(INVINCIBILITY) = [0]>> then\n                    change [health v] by (4)\n                    broadcast (KNOCKBACK v)\n                    broadcast (TAKE DMG v)\n                end\n            end\n            switch costume to (thingy3 v)\n            wait (.1) seconds\n            switch costume to (thingy2 v)\n            wait (.1) seconds\n        else\n            switch costume to (thingy1 v)\n            wait (3) seconds\n            switch costume to (thingy2 v)\n            wait (.1) seconds\n            switch costume to (thingy3 v)\n            if <<([abs v] of ((Level_X) - (Scroll X)) ) > [490]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [380]>> then\n            repeat (50)\n                if <<touching (hitbox v)?> and <(INVINCIBILITY) = [0]>> then\n                    change [health v] by (2)\n                    broadcast (KNOCKBACK v)\n                    broadcast (TAKE DMG v)\n                end\n            end\n            switch costume to (thingy3 v)\n            wait (.1) seconds\n            switch costume to (thingy2 v)\n            wait (.1) seconds\n        end\n    end\nend\n\nwhen I receive [stage resume music v]\nif <<(costume [number v]) = [32]> and <(WilyCastleBoss) = [2]>> then\n    repeat (10)\n        change [level_y v] by (15)\n    end\n    delete this clone\nend\nif <<(costume [number v]) = [41]> and <(WilyCastleBoss) = [3]>> then\n    repeat (10)\n        change [level_y v] by (15)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nset [clone v] to [1]\nif <(costume [number v]) = [42]> then\n    wait (1) seconds\n    wait until <<(Quint break blocks) = [1]> and <touching (boss v)?>>\n    wait (.1) seconds\n    set [proj x v] to (x position)\n    set [proj y v] to (y position)\n    create clone of (extra battle effects v)\n    delete this clone\nend\n\nwhen I receive [screenshake v]\nrepeat (2)\n    change [level_y v] by (15)\n    wait (0) seconds\n    change [level_y v] by (-15)\n    wait (0) seconds\nend\nrepeat (2)\n    change [level_y v] by (10)\n    wait (0) seconds\n    change [level_y v] by (-10)\n    wait (0) seconds\nend\nrepeat (2)\n    change [level_y v] by (5)\n    wait (0) seconds\n    change [level_y v] by (-5)\n    wait (0) seconds\nend\n\nbroadcast (blink v)\n\ndelete this clone\n\nwhen I receive [wilyhand become tangible v]\nif <(clone) = [0]> then\n    go to [front v] layer\n    set size to (200) %\n    switch costume to (wilymachinehand v)\n    go to x: (25) y: (-70)\n    show\n    wait (2) seconds\n    glide (1) secs to x: (15) y: (25)\n    if <(Game Difficulty) = [1]> then\n        wait (2) seconds\n    else\n        wait (1) seconds\n    end\n    hide\nend\n\nwhen I receive [bossdie v]\nif <<(clone) = [0]> and <(Robot Master Stage) = [10]>> then\n    if <(WilyBattlePhase) = [1]> then\n        stop [other scripts in sprite v]\n        hide\n    end\nend\n\nwhen I receive [dr wily strikes back v]\nif <<(clone) = [0]> and <(Robot Master Stage) = [10]>> then\n    broadcast (earthquake v)\n    go to x: (417) y: (-500)\n    wait (.3) seconds\n    switch costume to (costume140 v)\n    show\n    glide (.5) secs to x: (417) y: (3)\nend\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [wahwee castle map v]\ndelete this clone\n\n@misc collision checker\n\nwhen flag clicked\nset [ghost v] effect to (100)\nshow\nforever\n    go to (hitbox v)\nend\n\nset [collide with ladder v] to [1]\n\n@Weapon Get\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\ngo to [front v] layer\nshow\nforever\n    wait (.05) seconds\n    next costume\nend\n\nwhen I receive [weapon get effect v]\nrepeat (3)\n    start sound [SE \[32\] v]\n    Effect\n    wait (.6) seconds\nend\n\ndefine Effect\npoint in direction (90)\nrepeat (10)\n    go to (mega man v)\n    move (120) steps\n    create clone of (_myself_ v)\n    move (-120) steps\n    turn right (45) degrees\nend\n\nwhen I start as a clone\nturn left (180) degrees\ngo to [front v] layer\nshow\nrepeat (12)\n    move (10) steps\nend\ndelete this clone\n\n@Text\n\ndefine Type X: (x) Y: (y) Button: (button) Delay: (delay) Message (message)\nif <(Robot Master Stage) > [8]> then\n    set size to (200) %\n    go to x: ((x) - (10)) y: (y)\n    set [var v] to [0]\n    hide\n    repeat (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\n    end\nelse\n    set size to (245) %\n    go to x: ((x) - (10)) y: (y)\n    set [var v] to [0]\n    hide\n    repeat (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 (20)\n        hide\n        if <(delay) = [2]> then\n            wait (.01) seconds\n        end\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: (90) 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\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 flag clicked\nhide\n\nwhen I receive [weapon get screen v]\nset [show stage select stars? v] to [1]\nset [speaker v] to [n]\nwait (1.5) seconds\nType X: (0) Y: (50) Button: (1) Delay: (1) Message [YOU GET]\nwait (1) seconds\nif <(Robot Master Stage) = [1]> then\n    Type X: (-25) Y: (20) Button: (1) Delay: (1) Message [ROLLING CUTTER]\nend\nif <(Robot Master Stage) = [2]> then\n    Type X: (0) Y: (20) Button: (1) Delay: (1) Message [THUNDER BEAM]\nend\nif <(Robot Master Stage) = [3]> then\n    Type X: (0) Y: (20) Button: (1) Delay: (1) Message [AIR SHOOTER]\nend\nif <(Robot Master Stage) = [4]> then\n    Type X: (0) Y: (20) Button: (1) Delay: (1) Message [METAL BLADE]\nend\nif <(Robot Master Stage) = [5]> then\n    Type X: (0) Y: (20) Button: (1) Delay: (1) Message [SHADOW BLADE]\nend\nif <(Robot Master Stage) = [6]> then\n    Type X: (0) Y: (20) Button: (1) Delay: (1) Message [GEMINI LASER]\nend\nwait (4) seconds\nbroadcast (Screen Transition v)\nwait (.7) seconds\nclear\nbroadcast (STAGE SELECT v)\n\nwhen flag clicked\nhide\n\nwhen I receive [game over v]\nset [speaker v] to [n]\nwait (.6) seconds\nType X: (-70) Y: (0) Button: (1) Delay: (1) Message [GAME OVER]\nwait (4) seconds\nbroadcast (Screen Transition v)\nwait (.7) seconds\nclear\nbroadcast (STAGE SELECT v)\n\nwhen I receive [stage select v]\nstop [other scripts in sprite v]\nclear\n\nwhen I receive [docter wily's intermission v]\nset [show stage select stars? v] to [0]\nset [speaker v] to [wily]\nwait (5) seconds\nif <(Heard wily's intermission?) = [0]> then\n    broadcast (textbox show v)\n    wait (.5) seconds\n    Type X: (-100) Y: (150) Button: (1) Delay: (1) Message [WELL WELL WELL. . .]\n    Type X: (-100) Y: (130) Button: (1) Delay: (1) Message [WHAT DO WE HAVE]\n    Type X: (-100) Y: (110) Button: (1) Delay: (1) Message [HERE?]\n    pressspace\n    wait until <<key (space v) pressed?> or <mouse down?>>\n    clear\n    set [speaker v] to [mega]\n    Type X: (-100) Y: (150) Button: (1) Delay: (1) Message [WILY!]\n    Type X: (-100) Y: (130) Button: (1) Delay: (1) Message [YOU AND YOUR EVIL]\n    Type X: (-100) Y: (110) Button: (1) Delay: (1) Message [SCHEMES END HERE AND]\n    Type X: (-100) Y: (90) Button: (1) Delay: (1) Message [NOW!]\n    pressspace\n    wait until <<key (space v) pressed?> or <mouse down?>>\n    clear\n    broadcast (get rid of textbox v)\n    wait (1) seconds\n    broadcast (Protoman teleport in v)\nend\n\nwhen I receive [protoman dialogue v]\nset [show stage select stars? v] to [0]\nset [speaker v] to [wily]\nwait (.5) seconds\nbroadcast (textbox show v)\nwait (.5) seconds\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [PROTO MAN?!]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [WHAT ARE YOU DOING]\nType X: (-100) Y: (110) Button: (1) Delay: (1) Message [HERE?]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nset [speaker v] to [proto]\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [I CAME HERE TO]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [HELP MY LITTLE BROTHER,]\nType X: (-100) Y: (110) Button: (1) Delay: (1) Message [MEGAMAN!]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nset [speaker v] to [proto]\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [AND HE IS RIGHT!]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [THIS MUST STOP!]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nset [speaker v] to [mega]\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [THANKS.. BROTHER.]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nbroadcast (protoman 180 v)\nset [speaker v] to [proto]\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [NO PROBLEM]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nbroadcast (protoman 180 v)\nset [speaker v] to [wily]\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [LOOKS LIKE I HAVE A]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [TEST SUBJECT TO TRY]\nType X: (-100) Y: (110) Button: (1) Delay: (1) Message [MY NEWEST SUPERWEAPON]\nType X: (-100) Y: (90) Button: (1) Delay: (1) Message [ON!]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nbroadcast (get rid of textbox v)\nwait (.5) seconds\nbroadcast (Control protoman v)\n\nwhen I receive [protoman fall v]\nset [show stage select stars? v] to [0]\nset [speaker v] to [megamad]\nwait (.5) seconds\nbroadcast (textbox show v)\nwait (.5) seconds\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [WILY?!]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [WHAT DID YOU DO?!]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nset [speaker v] to [wily]\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [MWAH HA HA!]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [DON'T WORRY! HE WILL]\nType X: (-100) Y: (110) Button: (1) Delay: (1) Message [BE FINE!]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [IN CASE YOU]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [DIDN'T KNOW... THAT IS]\nType X: (-100) Y: (110) Button: (1) Delay: (1) Message [MY MEMORY ZAPPER!]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [IT ALLOWS ME TO]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [REPROGRAM ROBOTS]\nType X: (-100) Y: (110) Button: (1) Delay: (1) Message [TO DO WHAT I WANT!]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [PROTO MAN.. GET UP!]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nbroadcast (get rid of textbox v)\nwait (.2) seconds\nbroadcast (protoman get up v)\nwait (1) seconds\nset [show stage select stars? v] to [0]\nset [speaker v] to [wily]\nwait (.5) seconds\nbroadcast (textbox show v)\nwait (.5) seconds\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [NOW, DESTROY MEGA MAN!]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nset [speaker v] to [proto]\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [YES SIR.]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nset [speaker v] to [wily]\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [MWAH HA HA!]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [HAVE FUN FIGHTING]\nType X: (-100) Y: (110) Button: (1) Delay: (1) Message [YOUR PATHETIC BROTHER,]\nType X: (-100) Y: (90) Button: (1) Delay: (1) Message [MEGA MAN!]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [HA HA HA!]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nbroadcast (get rid of textbox v)\nwait (.5) seconds\nbroadcast (wily capsule head out v)\n\nwhen I receive [r u okay v]\nset [show stage select stars? v] to [0]\nset [speaker v] to [megamad]\nwait (.5) seconds\nbroadcast (textbox show v)\nwait (.5) seconds\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [PROTO MAN. . . ARE YOU]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [OKAY?]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nset [speaker v] to [proto]\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [. . .]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nbroadcast (get rid of textbox v)\nwait (.5) seconds\nbroadcast (protoman get up v)\nset [speaker v] to [proto]\nwait (.5) seconds\nbroadcast (textbox show v)\nwait (.5) seconds\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [MEGA MAN. . . IS THAT]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [YOU?]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nset [speaker v] to [mega]\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [THANK GOODNESS!]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [YOU'RE ALIVE!]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nset [speaker v] to [proto]\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [WHERE IS WILY?]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nset [speaker v] to [mega]\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [HE ESCAPED AND MADE]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [ME FIGHT YOU. ]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nbroadcast (cue the epic music v)\nset [speaker v] to [proto]\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [WELL WHAT ARE WE]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [WAITING FOR?]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [LETS GO TEACH THAT]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [TWISTED MAN A LESSON!]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nbroadcast (get rid of textbox v)\nwait (.5) seconds\nbroadcast (mega and proto tele out v)\n\nwhen I receive [docter wily's intermission v]\nset [show stage select stars? v] to [0]\nset [speaker v] to [wily]\nwait (5) seconds\nif <(Heard wily's intermission?) = [0]> then\n    broadcast (textbox show v)\n    wait (.5) seconds\n    Type X: (-100) Y: (150) Button: (1) Delay: (1) Message [WELL WELL WELL. . .]\n    Type X: (-100) Y: (130) Button: (1) Delay: (1) Message [WHAT DO WE HAVE]\n    Type X: (-100) Y: (110) Button: (1) Delay: (1) Message [HERE?]\n    pressspace\n    wait until <<key (space v) pressed?> or <mouse down?>>\n    clear\n    set [speaker v] to [mega]\n    Type X: (-100) Y: (150) Button: (1) Delay: (1) Message [WILY!]\n    Type X: (-100) Y: (130) Button: (1) Delay: (1) Message [YOU AND YOUR EVIL]\n    Type X: (-100) Y: (110) Button: (1) Delay: (1) Message [SCHEMES END HERE AND]\n    Type X: (-100) Y: (90) Button: (1) Delay: (1) Message [NOW!]\n    pressspace\n    wait until <<key (space v) pressed?> or <mouse down?>>\n    clear\n    broadcast (get rid of textbox v)\n    wait (1) seconds\n    broadcast (Protoman teleport in v)\nend\n\nwhen I receive [wily defeat speech v]\nset [show stage select stars? v] to [0]\nset [speaker v] to [wily2]\nbroadcast (textbox show v)\nwait (.5) seconds\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [. . .]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nset [speaker v] to [wily]\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [WELL WOULD YOU LOOK]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [AT THE TIME. . .]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [I REMEMBER ORDERING]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [PIZZA A FEW HOURS AGO. . .]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nbroadcast (wily back up v)\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [I SHOULD PROBABLY]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [GO PAY THE DELIVERY]\nType X: (-100) Y: (110) Button: (1) Delay: (1) Message [MAN . . .]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nset [speaker v] to [mega]\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [SORRY WILY, BUT YOU'RE]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [GOING NOWHERE. . .]\nType X: (-100) Y: (110) Button: (1) Delay: (1) Message [EXCEPT JAIL!]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nbroadcast (get rid of textbox v)\nwait (.5) seconds\nbroadcast (proto man bring the mind ray v)\n\nwhen I receive [proto man bring the mind ray v]\nwait (4) seconds\nset [show stage select stars? v] to [0]\nset [speaker v] to [proto]\nbroadcast (textbox show v)\nwait (.5) seconds\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [WELL WELL WELL. . .]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [WHAT DO WE HAVE HERE?]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nset [speaker v] to [wily3]\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [PROTO MAN, WHAT ARE]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [YOU DOING WITH MY]\nType X: (-100) Y: (110) Button: (1) Delay: (1) Message [MEMORY ZAPPER?!]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nset [speaker v] to [proto]\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [WELL, WHILE YOU TWO]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [WERE FIGHTING, I]\nType X: (-100) Y: (110) Button: (1) Delay: (1) Message [FIGURED OUT HOW TO]\nType X: (-100) Y: (90) Button: (1) Delay: (1) Message [REPROGRAM THIS THING...]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nset [speaker v] to [proto]\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [AND, I MADE IT]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [CAPABLE OF WORKING ON]\nType X: (-100) Y: (110) Button: (1) Delay: (1) Message [ROBOTS, AS WELL AS]\nType X: (-100) Y: (90) Button: (1) Delay: (1) Message [HUMANS.]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nset [speaker v] to [proto]\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [WOULD YOU LIKE TO]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [TRY IT OUT, WILY?]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nset [speaker v] to [wily]\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [I-I I THINK I'LL]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [PASS. . .]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nset [speaker v] to [proto]\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [SORRY! YOU GOT NO]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [CHOICE!]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nbroadcast (get rid of textbox v)\nwait (.5) seconds\nbroadcast (savage proto man v)\n\nwhen I receive [dr wily tremble in fear v]\nwait (1) seconds\nset [show stage select stars? v] to [0]\nset [speaker v] to [proto]\nbroadcast (textbox show v)\nwait (.5) seconds\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [LET'S SEE IF THIS]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [WORKS... ]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [OKAY WILY, GET UP!]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nbroadcast (get rid of textbox v)\nwait (.5) seconds\nbroadcast (Wily get up v)\nwait (1) seconds\nbroadcast (mega man 180 v)\nset [show stage select stars? v] to [0]\nset [speaker v] to [mega]\nbroadcast (textbox show v)\nwait (.5) seconds\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [SAY. . WHAT SHOULD WE]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [DO WITH HIM...]\nType X: (-100) Y: (110) Button: (1) Delay: (1) Message [NOW THAT HE'S]\nType X: (-100) Y: (90) Button: (1) Delay: (1) Message [MIND CONTROLLED?]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nset [speaker v] to [proto]\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [WE'LL MAKE HIM]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [REBUILD ALL THE]\nType X: (-100) Y: (110) Button: (1) Delay: (1) Message [ROBOTS THAT HE MADE]\nType X: (-100) Y: (90) Button: (1) Delay: (1) Message [YOU DESTROY.]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nbroadcast (mega man 180 v)\nclear\nset [speaker v] to [proto]\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [IS THAT A DEAL,]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [WILY?]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nset [speaker v] to [wily]\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [YES SIR.]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nset [speaker v] to [mega]\nType X: (-100) Y: (150) Button: (1) Delay: (1) Message [ALRIGHT THEN...]\nType X: (-100) Y: (130) Button: (1) Delay: (1) Message [LET'S GO!]\npressspace\nwait until <<key (space v) pressed?> or <mouse down?>>\nclear\nbroadcast (get rid of textbox v)\nwait (.5) seconds\nbroadcast (mega and proto leave with wily v)\n\n@Lives\n\nwhen flag clicked\nhide\n\nwhen I receive [setup v]\ngo to x: (-195) y: (-154)\nset [ghost v] effect to (100)\nswitch costume to (Mega Man Extra lives)\nshow\nrepeat (40)\n    go to [front v] layer\n    change [ghost v] effect by (-10)\nend\nwait (1.6) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Special Weapons\n\nwhen flag clicked\nset size to (200) %\nset rotation style [left-right v]\nset [clone v] to [0]\nhide\n\nwhen I receive [ready v]\nset [specialfire v] to [0]\nforever\n    if <not <(Mega Man Special Weapon Selected) = [0]>> then\n        if <<(HEALTH) < [15]> and <([canmove? v] of [hitbox v]) = [1]>> then\n            go to (mega man v)\n            change x by (pick random (-25) to (25))\n            change y by (-50)\n            if <(Mega Man Special Weapon Selected) = [1]> then\n                switch costume to (rcutter v)\n            end\n            if <(Mega Man Special Weapon Selected) = [2]> then\n                switch costume to (elecshot v)\n            end\n            if <(Mega Man Special Weapon Selected) = [6]> then\n                switch costume to (glaser v)\n            end\n            if <(Mega Man Special Weapon Selected) = [3]> then\n                switch costume to (airshooter v)\n            end\n            if <(Mega Man Special Weapon Selected) = [4]> then\n                switch costume to (metal v)\n            end\n            if <(Mega Man Special Weapon Selected) = [5]> then\n                switch costume to (shadowblade v)\n            end\n            if <(Specialfire) = [0]> then\n                create clone of (_myself_ v)\n                wait (.2) seconds\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [1]> then\n    forever\n        switch costume to (metal v)\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n    end\nend\nif <(costume [number v]) = [3]> then\n    forever\n        switch costume to (airshooter v)\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n    end\nend\nif <(costume [number v]) = [9]> then\n    forever\n        switch costume to (rcutter v)\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n    end\nend\nif <(costume [number v]) = [20]> then\n    forever\n        switch costume to (shadowblade v)\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n    end\nend\nif <<<(costume [number v]) = [13]> or <(costume [number v]) = [14]>> or <(costume [number v]) = [15]>> then\n    wait (.05) seconds\n    forever\n        switch costume to (elecshot v)\n        wait (.02) seconds\n        next costume\n        wait (.02) seconds\n        next costume\n        wait (.02) seconds\n        next costume\n        wait (.02) seconds\n        next costume\n        wait (.02) seconds\n        next costume\n        wait (.02) seconds\n        next costume\n        wait (.02) seconds\n    end\nend\n\nwhen I start as a clone\nset [clone v] to [1]\ngo to [front v] layer\nclear graphic effects\nshow\nif <(Specialfire) = [0]> then\n    set [ghost v] effect to (5)\n    repeat (20)\n        change size by (-10)\n        change y by (5)\n    end\n    delete this clone\nelse\n    if <(Specialfire) = [1]> then\n        if <(costume [number v]) = [13]> then\n            go to (hitbox v)\n            start sound [16 - ThunderBeam v]\n            point in direction ([direction v] of [mega man v])\n            change y by (0)\n            repeat until <touching (_edge_ v)?>\n                move (15) steps\n            end\n            delete this clone\n        end\n        if <(costume [number v]) = [15]> then\n            set rotation style [all around v]\n            go to (hitbox v)\n            point in direction ([direction v] of [mega man v])\n            turn right (90) degrees\n            start sound [16 - ThunderBeam v]\n            change y by (0)\n            repeat until <touching (_edge_ v)?>\n                move (15) steps\n            end\n            delete this clone\n        end\n        if <(costume [number v]) = [14]> then\n            set rotation style [all around v]\n            go to (hitbox v)\n            point in direction ([direction v] of [mega man v])\n            turn right (-90) degrees\n            start sound [16 - ThunderBeam v]\n            change y by (0)\n            repeat until <touching (_edge_ v)?>\n                move (15) steps\n            end\n            delete this clone\n        end\n        if <(costume [number v]) = [9]> then\n            go to (hitbox v)\n            start sound [18 - RollingCutter v]\n            point in direction ([direction v] of [mega man v])\n            change y by (0)\n            repeat (15)\n                move (15) steps\n                turn right (-4) degrees\n            end\n            point towards (hitbox v)\n            repeat (15)\n                move (15) steps\n            end\n            delete this clone\n        end\n        if <(costume [number v]) = [6]> then\n            set [level_x v] to (([x position v] of [hitbox v]) + (Scroll X))\n            set [level_y v] to ((([y position v] of [hitbox v]) + (Scroll Y)) + (-9))\n            set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (20)))\n            start sound [Mega Man 5 SFX \(50\) v]\n            set rotation style [all around v]\n            point in direction ([direction v] of [mega man v])\n            switch costume to (glaser v)\n            set [y v] to [20]\n            forever\n                repeat (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                end\n                repeat until <<<touching (_edge_ v)?> or <touching (ground v)?>> or <touching (misc objects 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 (_edge_ v)?> then\n                    delete this clone\n                end\n                switch costume to (glaser2 v)\n                wait (.05) seconds\n                next costume\n                wait (.05) seconds\n                switch costume to (glaser v)\n                point in direction ((direction) - (135))\n            end\n        end\n        if <(costume [number v]) = [3]> then\n            go to (mega man v)\n            start sound [Mega Man 2 SFX \(11\) v]\n            change y by (-10)\n            point in direction ([direction v] of [mega man v])\n            move (25) steps\n            set [x v] to [0]\n            set [y v] to [0]\n            repeat until <touching (_edge_ v)?>\n                change [y v] by (.5)\n                change y by (y)\n                change x by (x)\n                if <(direction) = [90]> then\n                    change [x v] by (pick random (0) to (2))\n                else\n                    change [x v] by (pick random (-2) to (0))\n                end\n            end\n            delete this clone\n        end\n        if <(costume [number v]) = [20]> then\n            go to (mega man v)\n            start sound [sfx28 v]\n            change y by (-10)\n            if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n                    point in direction (45)\n                else\n                    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n                        point in direction (-45)\n                    else\n                        point in direction (0)\n                    end\n                end\n            else\n                if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n                    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n                        point in direction (135)\n                    else\n                        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n                            point in direction (-135)\n                        else\n                            point in direction (180)\n                        end\n                    end\n                else\n                    point in direction ([direction v] of [mega man v])\n                end\n            end\n            move (25) steps\n            repeat (10)\n                move (15) steps\n            end\n            repeat (12)\n                point towards (mega man v)\n                move (15) steps\n            end\n            delete this clone\n        end\n        if <(costume [number v]) = [1]> then\n            go to (mega man v)\n            start sound [sfx28 v]\n            change y by (-10)\n            if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n                    point in direction (45)\n                else\n                    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n                        point in direction (-45)\n                    else\n                        point in direction (0)\n                    end\n                end\n            else\n                if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n                    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n                        point in direction (135)\n                    else\n                        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n                            point in direction (-135)\n                        else\n                            point in direction (180)\n                        end\n                    end\n                else\n                    point in direction ([direction v] of [mega man v])\n                end\n            end\n            move (25) steps\n            repeat until <touching (_edge_ v)?>\n                move (15) steps\n            end\n            delete this clone\n        end\n    end\nend\n\nwhen I receive [fire special weapon v]\nif <(clone) = [0]> then\n    set [specialfire v] to [1]\n    if <(Mega Man Special Weapon Selected) = [3]> then\n        switch costume to (airshooter v)\n    end\n    if <(Mega Man Special Weapon Selected) = [4]> then\n        switch costume to (metal v)\n    end\n    if <(Mega Man Special Weapon Selected) = [6]> then\n        switch costume to (glaser v)\n    end\n    if <(Mega Man Special Weapon Selected) = [1]> then\n        switch costume to (rcutter v)\n    end\n    if <(Mega Man Special Weapon Selected) = [5]> then\n        switch costume to (shadowblade v)\n    end\n    if <(Mega Man Special Weapon Selected) = [2]> then\n        switch costume to (elecshot v)\n        next costume\n        create clone of (_myself_ v)\n        next costume\n        create clone of (_myself_ v)\n        switch costume to (elecshot v)\n    end\n    create clone of (_myself_ v)\n    wait (1) seconds\n    if <(Mega Man Special Weapon Selected) = [6]> then\n        wait (3) seconds\n    end\n    set [specialfire v] to [0]\nend\n\nwhen I start as a clone\nif <(Mega Man Special Weapon Selected) = [6]> then\n    wait (4) seconds\nelse\n    wait (1) seconds\nend\ndelete this clone\n\nwhen I receive [stage select v]\nset [mega man special weapon selected v] to [1]\n\nwhen I start as a clone\nforever\n    if <(costume [number v]) = [6]> then\n        if <(Specialfire) = [1]> then\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\n        end\n    end\nend\n\n@ladder collision checker2\n\nwhen flag clicked\nset [ghost v] effect to (100)\nshow\nforever\n    go to (hitbox v)\nend\n\nwhen flag clicked\nforever\n    if <(getting ouched ?) = [1]> then\n        set [collide with ladder v] to [0]\n    else\n        if <touching (misc objects v)?> then\n    end\nend\n\n@toenail\n\nwhen I receive [you win v]\nwait (2) seconds\nset [show stage select stars? v] to [1]\ngo to [front v] layer\nshow\nset [ghost v] effect to (100)\nswitch costume to (costume2 v)\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\n\nwhen flag clicked\nswitch costume to (costume3 v)\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nshow\nforever\n    go to [front v] layer\nend\n\n@Water\n\nwhen flag clicked\nset [wateractive? v] to [0]\nhide\n\nwhen I start as a clone\ngo to [front v] layer\nshow\nforever\n    switch costume to (toadwater v)\n    repeat (2)\n        wait (.05) seconds\n        next costume\n    end\n    wait (.05) seconds\nend\n\ndefine Make Water\ngo to x: (-230) y: (-250)\nrepeat (16)\n    create clone of (_myself_ v)\n    change x by (30)\nend\n\nwhen I receive [die v]\nset [wateractive? v] to [0]\nrepeat (30)\n    change y by (-5)\nend\ndelete this clone\n\nwhen I receive [bossdie v]\nset [wateractive? v] to [0]\nrepeat (30)\n    change y by (-5)\nend\ndelete this clone\n\nwhen I start as a clone\nrepeat (25)\n    change y by (5)\nend\nset y to (-49)\n\nwhen I receive [megawater raise water v]\nstart sound [SE \[73\] v]\nset [wateractive? v] to [1]\nMake Water\n\nset [wateractive? v] to [0]\n\nwhen flag clicked\nwait (1) seconds\nforever\n    if <<(WaterActive?) = [1]> and <<([y position v] of [hitbox v]) > [-10]> and <([y position v] of [hitbox v]) < [10]>>> then\n        go to (mega man v)\n        set y to (-14)\n        start sound [SE \[19\] v]\n        switch costume to (waterjump1 v)\n        show\n        repeat (3)\n            wait (.05) seconds\n            next costume\n        end\n        wait (.05) seconds\n        hide\n    end\nend\n\n@Extra battle effects\n\nwhen flag clicked\nhide\n\nwhen I receive [bossdie v]\nhide\ndelete this clone\n\nwhen I receive [die v]\nwait (2.5) seconds\nhide\ndelete this clone\n\nwhen I receive [hyperstorm init battle v]\nwait (1) seconds\ngo to x: (-205) y: (500)\nstart sound [SE \[16\] v]\nswitch costume to (ouchyspikes v)\nshow\nglide (.5) secs to x: (-205) y: (90)\nwait until <touching (hitbox v)?>\nif <(HEALTH) < [15]> then\n    broadcast (die v)\nend\n\nwhen I start as a clone\nif <(Robot Master Stage) = [8]> then\n    start sound [SE \[62\] v]\n    switch costume to (brickbreak v)\n    go to [front v] layer\n    go to x: (PROJ X) y: (PROJ Y)\n    point in direction (pick random (-45) to (45))\n    show\n    set [y v] to (pick random (2) to (8))\n    repeat until <touching (_edge_ v)?>\n        move (10) steps\n        change y by (y)\n        change [y v] by (-2)\n    end\n    delete this clone\nelse\n    switch costume to (hyperburp1 v)\n    go to (boss v)\n    change x by (-25)\n    point in direction (pick random (-120) to (-60))\n    repeat (25)\n        move (15) steps\n    end\n    delete this clone\nend\n\nwhen I receive [quint get pogo stick v]\nstop [other scripts in sprite v]\nswitch costume to (quintpogo3 v)\npoint in direction (90)\nset size to (200) %\ngo to x: (152) y: (152)\nshow\nglide (.5) secs to x: (152) y: (0)\nhide\n\n@boss hp2\n\nwhen flag clicked\nset [clone v] to [0]\nclear graphic effects\nhide\n\nwhen I receive [setup other hpbar v]\ngo to x: (-160) y: (91)\npoint in direction (90)\nset size to (250) %\ngo to [front v] layer\nshow\nset [brightness v] effect to (0)\nswitch costume to (bosshpbar29 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 <(Hyperstorm HP Bar) = [1]> then\n    if <(clone) = [0]> then\n        if <(Game Difficulty) = [1]> then\n            next costume\n            next costume\n        else\n            next costume\n        end\n        if <(costume [number v]) > [28]> then\n            set [hyperstorm hp bar v] to [0]\n        end\n    end\nend\n\nwhen I receive [bossdie v]\nhide\nswitch costume to (bosshpbar32 v)\n\nwhen I receive [die v]\nhide\n\nwhen I receive [teleportin v]\nstop [other scripts in sprite v]\nswitch costume to (bosshpbar v)\nhide\ndelete this clone\n\nwhen I receive [bossweakness dmg v]\nif <(Hyperstorm HP Bar) = [1]> then\n    if <(clone) = [0]> then\n        if <(Game Difficulty) = [1]> then\n            next costume\n            next costume\n            next costume\n            next costume\n            next costume\n            next costume\n        else\n            next costume\n            next costume\n            next costume\n        end\n        if <(costume [number v]) > [28]> then\n            set [hyperstorm hp bar v] to [0]\n        end\n    end\nend\n\nwhen I receive [stage resume music v]\nswitch costume to (bosshpbar v)\n\n@HP drops\n\nwhen flag clicked\nclear graphic effects\nhide\n\nwhen I start as a clone\npoint in direction (90)\nset [level_x v] to (PROJ X)\nset [level_y v] to (PROJ Y)\nif <(PROJECTILE NAME) = [health3]> then\n    switch costume to (health3 v)\nelse\n    switch costume to (health1 v)\nend\ngo to [front v] layer\nshow\nif <(costume [number v]) = [1]> then\n    forever\n        switch costume to (health1 v)\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n    end\nend\nif <(costume [number v]) = [3]> then\n    forever\n        switch costume to (health3 v)\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n    end\nend\n\nwhen I start as a clone\nwait (2) seconds\nrepeat (3)\n    clear graphic effects\n    wait (.1) seconds\n    set [ghost v] effect to (100)\n    wait (.1) seconds\nend\ndelete this clone\n\nwhen I start as a clone\nforever\n    set x to ((Level_X) - (Scroll X))\n    set y to ((Level_Y) - (Scroll Y))\n    if <<([abs v] of ((Level_X) - (Scroll X)) ) > [250]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [200]>> then\n        hide\n        delete this clone\n    else\n        show\n    end\nend\n\nwhen I start as a clone\nwait (.1) seconds\nwait until <touching (hitbox v)?>\nif <(costume [number v]) < [3]> then\n    repeat (1)\n        if <(HEALTH) > [1]> then\n            broadcast (Heal v)\n            change [health v] by (-1)\n        end\n    end\nelse\n    repeat (3)\n        if <(HEALTH) > [1]> then\n            broadcast (Heal v)\n            change [health v] by (-1)\n        end\n    end\nend\ndelete this clone\n\nwhen I start as a clone\nset [y v] to [0]\nrepeat until <<touching (ground v)?> or <touching (misc objects v)?>>\n    change [level_y v] by (y)\n    change [y v] by (-2)\nend\nrepeat until <<not <touching (ground v)?>> and <not <touching (misc objects v)?>>>\n    change [level_y v] by (3)\nend\n\nwhen I start as a clone\nwait until <(HEALTH) > [14]>\ndelete this clone\n\n@Rain Effect\n\nwhen flag clicked\nset size to (200) %\nset [y v] to [0]\nhide\nforever\n    if <<<not <(Robot Master Stage) = [8]>> and <not <(Robot Master Stage) = [10]>>> or <(Show stage select stars?) = [1]>> then\n        hide\n    end\n    if <<(Show stage select stars?) = [0]> and <(Robot Master Stage) = [10]>> then\n        go to [front v] layer\n        switch costume to (costume2 v)\n        if <((y) mod (3000)) = [0]> then\n            set [brightness v] effect to (100)\n            start sound [thunder v]\n            wait (.1) seconds\n        else\n            set [ghost v] effect to (([sin v] of (y) ) * (15))\n            set [brightness v] effect to (0)\n        end\n        go to x: (0) y: (([sin v] of (y) ) * (30))\n        change [y v] by (10)\n        show\n    end\n    if <<(Show stage select stars?) = [0]> and <(Robot Master Stage) = [8]>> then\n        if <not <(Scroll X) > [9000]>> then\n            go to [front v] layer\n            switch costume to (costume2 v)\n            if <((y) mod (500)) = [0]> then\n                set [brightness v] effect to (100)\n                start sound [thunder v]\n                wait (.1) seconds\n            else\n                set [ghost v] effect to (([sin v] of (y) ) * (15))\n                set [brightness v] effect to (0)\n            end\n            go to x: (0) y: (([sin v] of (y) ) * (30))\n            change [y v] by (5)\n            show\n        else\n            hide\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Show stage select stars?) = [0]> and <(Robot Master Stage) = [10]>> then\n        if <not <(Scroll X) > [9000]>> then\n            create clone of (_myself_ v)\n            wait (.01) seconds\n        end\n    end\n    if <<(Show stage select stars?) = [0]> and <(Robot Master Stage) = [8]>> then\n        if <not <(Scroll X) > [9000]>> then\n            create clone of (_myself_ v)\n            wait (.01) seconds\n        end\n    end\nend\n\nwhen I start as a clone\nif <(Robot Master Stage) = [10]> then\n    point in direction (90)\n    set [level_x v] to ((Scroll X) + (pick random (-400) to (200)))\n    set [level_y v] to [150]\n    switch costume to (costume5 v)\n    set size to (pick random (100) to (300)) %\n    go to [front v] layer\n    show\n    repeat (1)\n        change [level_x v] by (2)\n        change [level_y v] by (-20)\n    end\n    repeat until <<touching (misc objects v)?> or <touching (ground v)?>>\n        change [level_x v] by (2)\n        change [level_y v] by (-20)\n    end\n    change [level_y v] by (5)\n    switch costume to (costume3 v)\n    wait (.05) seconds\n    next costume\n    wait (.05) seconds\n    delete this clone\nelse\n    point in direction (90)\n    set [level_x v] to ((Scroll X) + (pick random (-400) to (200)))\n    set [level_y v] to [150]\n    switch costume to (costume1 v)\n    set size to (pick random (100) to (300)) %\n    go to [front v] layer\n    show\n    repeat (3)\n        change [level_x v] by (10)\n        change [level_y v] by (-10)\n    end\n    repeat until <touching (ground v)?>\n        change [level_x v] by (10)\n        change [level_y v] by (-10)\n    end\n    switch costume to (costume3 v)\n    wait (.05) seconds\n    next costume\n    wait (.05) seconds\n    delete this clone\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    else\n        show\n    end\nend\n\nwhen I start as a clone\nwait (2) seconds\ndelete this clone\n\nwhen flag clicked\nforever\n    if <<(Show stage select stars?) = [0]> and <(Robot Master Stage) = [8]>> then\n        if <not <(Scroll X) > [9000]>> then\n            broadcast (conveyor push forward v)\n        end\n    end\nend\n\nwhen I receive [wily defeat speech v]\nstop [other scripts in sprite v]\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\ndelete this clone\n\n@Menu\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\nif <(costume [number v]) = [9]> then\n    go to [back v] layer\n    set size to (250) %\n    point in direction (90)\n    repeat (130)\n        move (8) steps\n    end\n    delete this clone\nend\ngo to x: (0) y: (500)\nif <(costume [number v]) = [1]> then\n    repeat (6)\n        go to [front v] layer\n        change y by (-10)\n    end\n    repeat (1)\n        change y by (-3)\n    end\n    set y to (110)\nend\nif <(costume [number v]) = [2]> then\n    repeat (12)\n        go to [front v] layer\n        change y by (-10)\n    end\n    repeat (7)\n        change y by (-3)\n    end\n    set y to (95)\nend\nif <(costume [number v]) = [4]> 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)) + (50))\n    go to x: (0) y: (((costume [number v]) * (-50)) + (50))\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]) = [5]> 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)) + (160))\n    repeat (1)\n        go to x: (0) y: (((costume [number v]) * (-50)) + (160))\n    end\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]) = [3]> 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)) + (120))\n    go to x: (0) y: (((costume [number v]) * (-50)) + (120))\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]) = [10]> then\n    hide\n    wait (.2) seconds\n    set size to (80) %\n    go to x: (170) y: (250)\n    show\n    glide (.3) secs to x: (170) y: (-149)\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]> then\n    hide\n    wait (.2) seconds\n    set size to (80) %\n    go to x: (-170) y: (250)\n    show\n    glide (.3) secs to x: (-170) y: (-149)\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]) = [6]> then\n    set size to (100) %\n    go to x: (0) y: (0)\n    show\nend\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.5) 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 flag clicked\nset [atmenu? v] to [1]\nset [game difficulty v] to [1]\nset [able to select? v] to [1]\nset [how to play screen v] to [0]\nswitch costume to (revenge v)\nset size to (100) %\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)\nset size to (400) %\nswitch costume to (border v)\ncreate clone of (_myself_ v)\nswitch costume to (costume6 v)\ncreate clone of (_myself_ v)\nswitch costume to (costume1 v)\ncreate clone of (_myself_ v)\nwait (.2) seconds\nswitch costume to (costume2 v)\nrepeat (3)\n    create clone of (_myself_ v)\n    next costume\n    wait (.1) seconds\nend\n\nwhen I receive [stage fade v]\nwait (1.5) seconds\ndelete this clone\n\nwhen I receive [setup v]\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        if <(Able to Select?) = [1]> then\n            if <(how to play screen) = [0]> then\n                if <(costume [number v]) = [3]> then\n                    start sound [ching v]\n                    set [able to select? v] to [0]\n                    broadcast (gotostageselect v)\n                end\n                if <(costume [number v]) = [4]> then\n                    start sound [Mouse Click - Sound Effect \(HD\)2 v]\n                    broadcast (How to Play v)\n                end\n                if <(costume [number v]) = [5]> then\n                    start sound [Mouse Click - Sound Effect \(HD\)2 v]\n                    broadcast (Story v)\n                end\n                if <(costume [number v]) = [10]> then\n                    start sound [Mouse Click - Sound Effect \(HD\)2 v]\n                    switch costume to (costume7 v)\n                    set [mobile mode? v] to [1]\n                    wait until <not <mouse down?>>\n                else\n                    if <(costume [number v]) = [11]> then\n                        start sound [Mouse Click - Sound Effect \(HD\)2 v]\n                        switch costume to (costume6 v)\n                        set [mobile mode? v] to [0]\n                        wait until <not <mouse down?>>\n                    end\n                end\n                if <(costume [number v]) = [7]> then\n                    start sound [Mouse Click - Sound Effect \(HD\)2 v]\n                    switch costume to (costume4 v)\n                    set [game difficulty v] to [2]\n                    wait until <not <mouse down?>>\n                else\n                    if <(costume [number v]) = [8]> then\n                        start sound [Mouse Click - Sound Effect \(HD\)2 v]\n                        switch costume to (costume1 v)\n                        set [game difficulty v] to [1]\n                        wait until <not <mouse down?>>\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nwait (1.5) seconds\nswitch costume to (background v)\ngo to x: (0) y: (0)\ncreate clone of (_myself_ v)\nforever\n    go to x: (-500) y: (0)\n    switch costume to (background v)\n    create clone of (_myself_ v)\n    wait (1.7) seconds\nend\n\nwhen I receive [stage select v]\nstop [other scripts in sprite v]\nwait (0) seconds\nhide\ndelete this clone\n\nwhen I receive [gotostageselect v]\nset [atmenu? v] to [0]\n\n@Dr wahwee's intermission\n\nwhen flag clicked\nset [heard wily's intermission? v] to [0]\nhide\n\nwhen I receive [docter wily's intermission v]\nwait (1) seconds\nif <(Heard wily's intermission?) = [1]> then\n    broadcast (Protoman teleport in v)\nelse\n    show\n    point in direction (90)\n    go to x: (128) y: (250)\n    set size to (200) %\n    repeat (8)\n        switch costume to (ufo1 v)\n        repeat (2)\n            repeat (2)\n                change y by (-5)\n            end\n            next costume\n        end\n        repeat (2)\n            change y by (-5)\n        end\n    end\n    create clone of (_myself_ v)\n    switch costume to (ufo4 v)\n    create clone of (_myself_ v)\n    repeat (6)\n        switch costume to (ufo4 v)\n        wait (.05) seconds\n        repeat (2)\n            next costume\n            wait (.05) seconds\n        end\n    end\nend\n\nwhen I receive [wily capsule head out v]\nif <(costume [number v]) = [9]> then\n    switch costume to (ufo7 v)\n    repeat (10)\n        go to [front v] layer\n        change y by (-8)\n    end\n    delete this clone\nend\nif <<(costume [number v]) = [8]> or <(costume [number v]) = [7]>> then\n    wait (1.2) seconds\n    delete this clone\nend\nwait (.3) seconds\nrepeat (6)\n    switch costume to (ufo1 v)\n    wait (.05) seconds\n    repeat (2)\n        next costume\n        wait (.05) seconds\n    end\nend\nrepeat (8)\n    switch costume to (ufo1 v)\n    repeat (2)\n        repeat (2)\n            change y by (5)\n        end\n        next costume\n    end\n    repeat (2)\n        change y by (5)\n    end\nend\nhide\nbroadcast (Boss Intro v)\n\nwhen I start as a clone\nif <(costume [number v]) = [3]> then\n    change y by (20)\n    switch costume to (ufo7 v)\n    repeat (10)\n        go to [front v] layer\n        change y by (10)\n    end\nend\nif <(costume [number v]) = [4]> then\n    forever\n        go to x: (128) y: (-28)\n        switch costume to (wily1 v)\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n    end\nend\n\nwhen I receive [proto man bring the mind ray v]\nplay sound [Mega Man 3 - Proto Man v] until done\nswitch costume to (prototele1 v)\nshow\ngo to x: (-45) y: (201)\npoint in direction (90)\nglide (.5) secs to x: (x position) y: (-83)\nstart sound [04 - MegamanWarp v]\nrepeat (8)\n    wait (.02) seconds\n    next costume\nend\nbroadcast (show mind ray v)\nforever\n    switch costume to (proto2 v)\n    wait (.1) seconds\n    next costume\n    wait (.1) seconds\nend\n\nwhen I receive [mega and proto leave with wily v]\nstop [other scripts in sprite v]\nset rotation style [left-right v]\ngo to x: (-45) y: (-83)\nswitch costume to (protojump v)\npoint in direction (90)\nset [y v] to [15]\nshow\nrepeat (15)\n    change x by (9)\n    change y by (y)\n    change [y v] by (-2)\nend\ngo to x: (90) y: (-84)\nswitch costume to (proto1 v)\nwait (.2) seconds\npoint in direction (-90)\nswitch costume to (proto1 v)\nstart sound [04 - MegamanWarp v]\nrepeat (9)\n    wait (.02) seconds\n    switch costume to ((costume [number v]) + (-1))\nend\nbroadcast (wily hide v)\nglide (.8) secs to x: (77) y: (500)\nhide\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 (0)\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]\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\ndelete this clone\n\n@light\n\nwhen flag clicked\nset [y v] to [0]\nforever\n    set [ghost v] effect to ((([sin v] of (y) ) * (4)) + (60))\n    go to (mega man v)\n    change [y v] by (2)\n    if <<<(HEALTH) < [15]> and <(Show stage select stars?) = [0]>> and <([canmove? v] of [hitbox v]) = [1]>> then\n        show\n    else\n        hide\n    end\nend\n\n@weapon select\n\nwhen flag clicked\nset [mobile mode? v] to [0]\nhide\n\nwhen flag clicked\nset [y v] to [0]\nforever\n    go to [front v] layer\n    if <(Mobile Mode?) = [1]> then\n        clear graphic effects\n        go to x: (20) y: (0)\n        change [y v] by (2)\n        if <<<(HEALTH) < [15]> and <(Show stage select stars?) = [0]>> and <<([canmove? v] of [hitbox v]) = [1]> and <not <(Robot Master Weapons) = [000000]>>>> then\n            switch costume to (costume1 v)\n            show\n        else\n            hide\n        end\n    else\n        change [y v] by (2)\n        if <<<(HEALTH) < [15]> and <(Show stage select stars?) = [0]>> and <<([canmove? v] of [hitbox v]) = [1]> and <not <(Robot Master Weapons) = [000000]>>>> then\n            if <not <(Mega Man Special Weapon Selected) = [0]>> then\n                if <touching (mega man v)?> then\n                    set [ghost v] effect to (75)\n                else\n                    clear graphic effects\n                end\n                show\n            end\n        else\n            hide\n        end\n    end\nend\n\nwhen I receive [teleportin v]\nforever\n    go to [front v] layer\n    if <(Mobile Mode?) = [0]> then\n        go to x: (20) y: (-500)\n        hide\n        wait until <<not <(Mega Man Special Weapon Selected) = [0]>> and <([canmove? v] of [hitbox v]) = [1]>>\n        switch costume to ((Mega Man Special Weapon Selected) + (1))\n        show\n        glide (.5) secs to x: (20) y: (0)\n        repeat until <(Mega Man Special Weapon Selected) = [0]>\n            switch costume to ((Mega Man Special Weapon Selected) + (1))\n        end\n        glide (.2) secs to x: (20) y: (-100)\n        hide\n    end\nend\n\nwhen this sprite clicked\nif <(Mobile Mode?) = [1]> then\n    broadcast (Cycle weapon v)\n    wait until <not <mouse down?>>\nend\n\n@mind ray\n\nwhen flag clicked\nhide\n\nwhen I receive [control protoman v]\nswitch costume to (mind v)\ngo to x: (126) y: (-88)\ngo to [back v] layer\nshow\nstart sound [SE \[141\] v]\nglide (.2) secs to x: (126) y: (-121)\nglide (.4) secs to x: (-48) y: (-98)\ngo to [front v] layer\nstart sound [SE \[56\] v]\nrepeat (3)\n    switch costume to (mind1 v)\n    repeat (2)\n        wait (0) seconds\n        next costume\n    end\n    wait (0) seconds\nend\nswitch costume to (mind v)\nwait (.4) seconds\nbroadcast (protoman fall v)\nglide (.5) secs to x: (-48) y: (500)\nhide\n\nwhen I receive [bossdie v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [mind ray v]\nswitch costume to (mind v)\ngo to (boss v)\nchange y by (-45)\ngo to [front v] layer\nshow\nstart sound [SE \[141\] v]\nrepeat (5)\n    change y by (-10)\nend\nif <(Game Difficulty) = [1]> then\n    glide (.7) secs to x: ([x position v] of [hitbox v]) y: ([y position v] of [hitbox v])\nelse\n    glide (.3) secs to x: ([x position v] of [hitbox v]) y: ([y position v] of [hitbox v])\nend\nif <(distance to [hitbox v]) < [35]> then\n    glide (.05) secs to x: ([x position v] of [hitbox v]) y: ([y position v] of [hitbox v])\n    start sound [SE \[56\] v]\n    repeat (3)\n        change [health v] by (Game Difficulty)\n        broadcast (TAKE DMG v)\n        switch costume to (mind1 v)\n        repeat (2)\n            wait (0) seconds\n            next costume\n        end\n        wait (0) seconds\n    end\n    switch costume to (mind v)\n    wait (.2) seconds\nend\nwait (.2) seconds\nglide (.5) secs to (boss v)\nhide\n\nwhen I receive [show mind ray v]\nswitch costume to (mind v)\ngo to x: (-99) y: (-95)\nclear graphic effects\nshow\n\nwhen I receive [savage proto man v]\nswitch costume to (mind v)\ngo to x: (-99) y: (-95)\ngo to [front v] layer\nshow\nglide (.5) secs to x: (-99) y: (-14)\nglide (1) secs to x: (110) y: (-14)\nglide (.5) secs to x: (110) y: (-64)\nstart sound [SE \[56\] v]\nrepeat (3)\n    switch costume to (mind1 v)\n    repeat (2)\n        wait (0) seconds\n        next costume\n    end\n    wait (0) seconds\nend\nswitch costume to (mind v)\nwait (.2) seconds\nbroadcast (dr wily tremble in fear v)\nglide (1) secs to x: (110) y: (500)\nhide\n\n@how to play/story\n\nwhen flag clicked\nset [how to play screen v] to [0]\nhide\n\nwhen I receive [how to play v]\ngo to x: (0) y: (0)\nclear graphic effects\nset [ghost v] effect to (100)\nif <(Mobile Mode?) = [1]> then\n    switch costume to (costume1 v)\nelse\n    switch costume to (costume2 v)\nend\ngo to [front v] layer\nshow\nset [how to play screen v] to [1]\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\nset [how to play screen v] to [0]\nhide\n\nwhen I receive [story v]\ngo to x: (0) y: (0)\nclear graphic effects\nset [ghost v] effect to (100)\nswitch costume to (costume3 v)\ngo to [front v] layer\nshow\nset [how to play screen v] to [1]\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nrepeat (10)\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\nend\nwait until <<key (space v) pressed?> or <mouse down?>>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [how to play screen v] to [0]\nhide\n\n
★★★★★★★INSTRUCTIONS★★★★★★★\n\n- Arrow keys or WASD to move and jump\n- Space to fire your blaster\n- Hold down C for Rapid fire\n- Press Down while running to perform a slide\n- Press Z or X to switch Special Weapons (if you have any)\n- Hold Up or W on ladders to climb them\n\n- Mobile supported as well\n\n★★★★★★★★★★★★★★★★★★★★★★\n\nAfter over 4 months, 96 clocked hours of work, I finally finished my biggest Scratch project yet. I hope you enjoy.\n\nSTORY: Dr. Light, Mega Man's creator, has recently finished rebuilding 6 Robot Masters, which had previously been destroyed. The evil Dr. Wily, who wants world domination, is tired of his schemes being stopped by Mega Man, and is looking for revenge. Wily hears about Dr. Light's Robots, and decides to test out his newest weapon, the "Memory Zapper" on these newly built Robots. The Robots become mind-controlled and go violent and berserk. It is up to the hero, Mega Man, to destroy the brainwashed Robots, and stop Dr. Wily from mind-controlling even more Robots, or ultimately, Humans.\n\n\nFace off against 6 unique Robot Masters. Defeat them to get their signature weapon, which you can use to fight the other Robot Masters.\n\n\n\n★★★★★★★★★CREDITS★★★★★★★★★\n\n-All sprites and all sound effects belong to Capcom and Sega, the original creators of Mega Man: The Wily Wars.\n\n- Credit to Spriters Resource and Sprites Inc for additional sprites\n\n- Huge credit to all the users on Soundcloud and Khinsider who composed all the songs used.\n\n- Credit to Mega Man Maker for the backgrounds