Mega Man - Revenge of Plant Man -- PLATFORMER

Instructions: ★★★★★★★INSTRUCTIONS★★★★★★★\n\n- Arrow keys or WASD to move and jump\n\n- Space to fire your blaster\n\n- Mobile Supported\n\n★★★★★★★★★★★★★★★★★★★★★★\n\nFight enemies with your blaster and make your way to the end, with a boss battle against Plant Man, a robot master with a Plant Barrier to protect him from damage.\n\n-Plant Man can't be damaged when he puts up his\n  PLANT BARRIER.\n\n\n\n\n★★★★★★★★★CREDITS★★★★★★★★★\n\n-All sprites and all sound effects belong to Capcom,    the original creator of Mega Man 6.\n\n- Title screen music is We're the Robots remix, stage\n  music is Plant Man Stage, and end music is from\n  Mega Man Star Force.\n\n- Intro music is Take on Me by a-ha\n\n- Super Mario World for some sound effects.\n\n\n

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nset [brightness v] effect to (-100)\nrepeat (10)\n    change [brightness v] effect by (10)\nend\nwait (4) seconds\nswitch backdrop to (backdrop3 v)\nset [brightness v] effect to (-100)\nset volume to (0) %\nstart sound [Mega Man 9 - Were the Robots \[SNES - MM7 style\] v]\nrepeat (20)\n    change [brightness v] effect by (5)\n    change volume by (5)\nend\nrepeat until <(START) = [1]>\nrepeat (10)\n    change [brightness v] effect by (-10)\n    change volume by (-10)\nend\nstop all sounds\nset [yeet v] to [0]\nrepeat (10)\n    change volume by (10)\nend\nforever\n    if <(yeet) = [1]> then\n        play sound [Mega Man Star Force 3 - Rocket Emergency! \(FM\) v] until done\n    else\n        if <([costume # v] of [background v]) > [21]> then\n            wait (1) seconds\n            wait until <(TRANSITION) = [0]>\n            play sound [Mega Man 5 Boss Music \(Arranged\) v] until done\n        else\n            play sound [Megaman 6 - Plant Man Stage v] until done\n        end\n    end\nend\n\nwhen I receive [darkmanfight v]\nwait (1) seconds\nstop all sounds\n\nwhen I receive [bossdie v]\nrepeat (10)\n    change volume by (-10)\nend\nwait (3.5) seconds\nset [yeet v] to [1]\nstop all sounds\n\nwhen I receive [die v]\nset volume to (0) %\nwait (2) seconds\nstop all sounds\nset volume to (100) %\n\nforever\n\nwhen I receive [end v]\nstop all sounds\nrepeat (20)\n    change volume by (5)\nend\n\nwait (1) seconds\n\n@Sprite1\n\nwhen flag clicked\n\ngo to x: (0) y: (0)\nshow\nforever\n    go to [front v] layer\nend\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nset [start v] to [0]\nwait until <<key (any v) pressed?> or <mouse down?>>\nset [start v] to [1]\nstart sound [Mega Man 5 SFX \(5\) v]\n\n@SFX\n\nwhen flag clicked\nhide\n\nwhen I receive [player start v]\ngo to x: (0) y: (0)\ngo to [front v] layer\nrepeat (2)\n    wait (.2) seconds\n    show\n    wait (.2) seconds\n    hide\nend\n\n@ground\n\nwhen I receive [player start v]\nswitch costume to (costume1 v)\n\nwhen flag clicked\nset [checkpoint # v] to [0]\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nclear graphic effects\nhide\n\nwhen I receive [nextsectiom v]\nnext costume\n\nwhen I receive [die v]\nif <(CHECKPOINT #) = [0]> then\n    switch costume to (costume1 v)\nend\nif <(CHECKPOINT #) = [1]> then\n    switch costume to (costume8 v)\nend\nif <(CHECKPOINT #) = [2]> then\n    switch costume to (costume13 v)\nend\n\nwhen flag clicked\nforever\n    wait until <(costume [number v]) = [16]>\n    broadcast (BOSSFIGHT v)\n    wait until <not <(costume [number v]) = [16]>>\nend\n\nwhen I receive [gemini die v]\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [teleportin v]\ngo to [front v] layer\nset [ghost v] effect to (100)\nshow\n\nwhen I receive [teleportin v]\nif <(CHECKPOINT #) = [0]> then\n    switch costume to (costume1 v)\nend\nif <(CHECKPOINT #) = [1]> then\n    switch costume to (costume8 v)\nend\nif <(CHECKPOINT #) = [2]> then\n    switch costume to (costume13 v)\nend\n\nwhen I receive [sectionup v]\nnext costume\n\nwhen I receive [sectiondown v]\nswitch costume to ((costume [number v]) + (-1))\n\nwhen I receive [sectiondownprogress v]\nnext costume\n\nwhen I receive [darkmanfight v]\nstart sound [Mega Man 5 SFX \(15\) v]\nswitch costume to (costume21 v)\n\nbroadcast (NextSectiom v)\n\nset [checkpoint # v] to [2]\n\n@teleport\n\nwhen flag clicked\nhide\n\nwhen I receive [teleportin v]\nswitch costume to (sheor v)\ngo to x: (-210) y: (300)\nset size to (200) %\nrepeat (1)\n    create clone of (_myself_ v)\nend\nwait (.5) seconds\ngo to x: (-210) y: (-120)\nstart sound [Mega Man 5 SFX \(2\) v]\nswitch costume to (pwor v)\ncreate clone of (_myself_ v)\nswitch costume to (pwoer v)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\ngo to [front v] layer\nshow\nif <(costume [number v]) = [1]> then\n    repeat (14)\n        change y by (-20)\n    end\n    delete this clone\nelse\n    if <(costume [number v]) = [2]> then\n        repeat (7)\n            change size by (30)\n        end\n        delete this clone\n    else\n        repeat (7)\n            change size by (20)\n        end\n        delete this clone\n    end\nend\n\nwhen I receive [bossdie v]\nwait (3) seconds\nstart sound [Mega Man 5 SFX \(31\) v]\nswitch costume to (sheor v)\nset size to (200) %\ngo to (animations v)\nshow\nrepeat (18)\n    change y by (20)\nend\nhide\n\n@hitbox\n\ndefine Walk (direction) (speed)\nif <(CanMove?) = [1]> then\n    point in direction (direction)\n    change x by ((0) - (speed))\n    set [slope v] to [0]\n    repeat until <<(slope) = [8]> or <<not <touching (ground v)?>> and <not <<touching (rush coil v)?> and <(ON RUSH) = [1]>>>>>\n        change y by (1)\n        change [slope v] by (1)\n    end\n    if <(slope) = [8]> then\n        change x by (speed)\n        change y by ((0) - (slope))\n    end\nend\n\nwhen flag clicked\nwait until <(Health) < [1]>\nstop [other scripts in sprite v]\nbroadcast (game over v)\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 [holding? v] to [0]\nset [inshell? 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 <(TRANSITION) = [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 I receive [jumpup v]\nchange [speed y v] by (30)\n\nwhen I receive [jumphigh v]\nchange [speed y v] by (50)\n\nwhen flag clicked\nset volume to (60) %\nset [frame v] to [0]\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 flag clicked\nset rotation style [left-right v]\nif <(editmode>) = [1]> then\n    set [speed v] to [28]\nelse\n    set [speed v] to [3]\nend\n\nwhen flag clicked\n\nchange [scroll x v] by (10)\n\nwhen I receive [teleportin v]\ngo to x: (-210) y: (-78)\nset [ghost v] effect to (100)\nshow\nset [canmove? v] to [0]\nset [scroll x v] to [0]\nwait (1) seconds\nset [canmove? v] to [1]\nstart sound [Mega Man 5 SFX \(2\) v]\n\nwhen flag clicked\nset [canmove? v] to [0]\n\nforever\n    if <key (r v) pressed?> then\n        go to x: (0) y: (-120)\n        set [speed y v] to [0]\n        broadcast (Teleportin v)\n        wait (10) seconds\n    end\nend\n\nwhen flag clicked\nset size to (150) %\nset [speed v] to [1]\nforever\n    if <key (left arrow v) pressed?> then\n        set [speed v] to [-4]\n    end\n    if <key (right arrow v) pressed?> then\n        set [speed v] to [-4]\n    end\nend\n\nwhen I receive [die v]\nset [ghost v] effect to (100)\nset [speed v] to [1]\nwait (1) seconds\nset [ghost v] effect to (99)\n\nforever\n    if <(slope) = [8]> then\n        change [scroll x v] by ((0) - ((speed) * (2)))\n        change y by (((0) - (slope)) * (2))\n        set [slope v] to [0]\n    end\nend\n\nwhen I receive [teleportin v]\nset [scroll stop v] to [-1079]\n\ndefine Tick <<> <^> <>>\nif <(CanMove?) = [1]> then\n    if <(CLIMBING ON LADDER) = [0]> then\n        change [speed y v] by (-1)\n        change y by (speed y)\n    end\n    Touch Ground <(speed y) > [0]>\n    if <<> then\n        point in direction (-90)\n        change [speed x v] by (-3)\n    end\n    if <>> then\n        point in direction (90)\n        change [speed x v] by (3)\n    end\n    set [speed x v] to ((speed x) * (0.7))\n    Walk (direction) ((speed x) * (-1))\n    if <<^> and <(falling?) < [3]>> then\n        set [speed y v] to [13]\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 <(CLIMBING ON LADDER) = [0]> then\n            change [speed y v] by (-1)\n        end\n        if <(CLIMBING ON LADDER) = [1]> then\n            change y by (-6)\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 <(CLIMBING ON LADDER) = [1]> then\n            change y by (6)\n        end\n    end\nend\n\ndefine Touch Ground <up?>\nchange [falling? v] by (1)\nrepeat until <<not <touching (ground v)?>> and <not <<touching (rush coil v)?> and <(ON RUSH) = [1]>>>>\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\nchange [falling? v] by (1)\nrepeat until <not <touching (ground v)?>>\n    if <up?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [falling? v] to [0]\n    end\n    set [speed y v] to [0]\nend\n\nset y to (0)\n\nwhen I receive [die v]\nset [canmove? v] to [0]\n\nwait (4) seconds\nset [canmove? v] to [1]\nstart sound [Mega Man 5 SFX \(2\) v]\n\ndefine Do (what?)\n\nif <(CanMove?) = [1]> then\n    if <(what?) = [Walk]> then\n        if <not <(dead:) = [1]>> then\n            switch costume to (run1 v)\n            wait (0.1) seconds\n            switch costume to (run2 v)\n            wait (0.1) seconds\n            switch costume to (run3 v)\n            wait (0.1) seconds\n            switch costume to (run4 v)\n            wait (0.1) seconds\n        end\n    end\n    if <(what?) = [GunRun]> then\n        if <not <(dead:) = [1]>> then\n            switch costume to (gunrun1 v)\n            wait (0.1) seconds\n            switch costume to (gunrun2 v)\n            wait (0.1) seconds\n            switch costume to (gunrun3 v)\n            wait (0.1) seconds\n            switch costume to (gunrun4 v)\n            wait (0.1) seconds\n        end\n    end\nend\n\ndefine Touch Ground <up?>\n\ngo to x: (-172) y: (-81)\n\nchange x by (1)\n\nwhen flag clicked\n\nforever\n    if <<<key (down arrow v) pressed?> and <(falling?) < [1]>> and <<not <key (right arrow v) pressed?>> and <not <key (left arrow v) pressed?>>>> then\n        repeat (5)\n            move (5) steps\n        end\n        wait (.2) seconds\n    end\nend\n\nwhen flag clicked\nwait (1) seconds\nforever\n    wait until <<(x position) > [238]> and <not <([costume # v] of [ground v]) > [19]>>>\n    broadcast (NextSectiom v)\n    set x to (-220)\nend\n\nwhen flag clicked\n\nwhen I receive [knockback v]\nrepeat (3)\n    Walk [90] [15]\nend\nrepeat (3)\n    Walk [90] [8]\nend\n\nwhen flag clicked\nwait (1) seconds\nforever\n    wait until <(y position) < [-166]>\n    if <<([costume # v] of [background v]) = [8]> or <([costume # v] of [background v]) = [9]>> then\n        broadcast (sectiondownprogress v)\n        set y to (140)\n    else\n        if <<([costume # v] of [background v]) = [6]> or <([costume # v] of [background v]) = [7]>> then\n            broadcast (sectiondown v)\n            set y to (140)\n        else\n            broadcast (die v)\n            wait (5) seconds\n        end\n    end\nend\n\nTick <<<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\nwhen I receive [gemini die v]\nset [canmove? v] to [0]\n\nbroadcast (NextSectiom v)\nset y to (166)\nset x to (-220)\n\nwhen flag clicked\nforever\n    if <touching (ladder v)?> then\n        set [climbing on ladder v] to [1]\n    else\n        set [climbing on ladder v] to [0]\n    end\nend\n\nwhen flag clicked\nwait (1) seconds\nforever\n    wait until <(y position) > [173]>\n    if <<([costume # v] of [background v]) = [5]> or <<([costume # v] of [background v]) = [6]> or <([costume # v] of [background v]) = [7]>>> then\n        broadcast (sectionup v)\n        set y to (-140)\n    end\nend\n\nwhen I receive [teleportin v]\nforever\n    wait until <(falling?) > [0]>\n    wait until <(falling?) < [1]>\n    start sound [Mega Man 5 SFX \(5\) v]\nend\n\nwhen I receive [rushjump v]\nset [speed y v] to [25]\n\nwhen I receive [take dmg v]\nstart sound [Mega Man 5 SFX \(6\) v]\nset [takingdmg v] to [1]\nset [canmove? v] to [0]\nwait (.4) seconds\nset [canmove? v] to [1]\nset [takingdmg v] to [0]\n\nwhen flag clicked\n\nwait (1) seconds\nforever\n    if <<(x position) < [-178]> and <([costume # v] of [background v]) > [22]>> then\n        set x to (-135)\n    end\nend\n\nwhen I receive [bossdie v]\nwait (1) seconds\nstop [other scripts in sprite v]\nwait (2) seconds\nhide\n\n@hpbar\n\nwhen flag clicked\nwait (1) seconds\nforever\n    wait until <(HEALTH) > [14]>\n    broadcast (die v)\n    wait (1) seconds\n    broadcast (1stHalf v)\n    set [health v] to [1]\nend\n\nbroadcast (die v)\n\nwhen flag clicked\nrepeat (10)\n    set [health v] to [1]\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [player start v]\nshow\n\nwhen I receive [take dmg v]\nrepeat (3)\n    set [brightness v] effect to (100)\n    wait (.2) seconds\n    clear graphic effects\n    wait (.2) seconds\nend\n\nwhen I receive [gemini die v]\nwait (1) seconds\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [teleportin v]\npoint in direction (0)\ngo to x: (-209) y: (91)\nclear graphic effects\nset size to (200) %\nshow\nrepeat (10)\n    go to [front v] layer\nend\nforever\n    switch costume to (HEALTH)\nend\n\nwhen I receive [bossdie v]\nstop [other scripts in sprite v]\nwait (4) seconds\nshow\nrepeat (20)\n    change [ghost v] effect by (5)\nend\n\nwhen I receive [player start v]\nwait (2.5) seconds\nhide\nwait (18) seconds\nshow\n\n@background\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nclear graphic effects\nset size to (100) %\ngo to [back v] layer\nset [brightness v] effect to (-100)\nshow\nrepeat (20)\n    change [brightness v] effect by (5)\nend\nwait (0) seconds\nrepeat until <(START) = [1]>\n    wait (.4) seconds\n    switch costume to (costume2 v)\n    wait (.4) seconds\n    switch costume to (costume1 v)\nend\nrepeat (10)\n    change [brightness v] effect by (-10)\n    change volume by (-10)\nend\nswitch costume to (s1 v)\nset size to (150) %\nstop all sounds\nrepeat (10)\n    change [brightness v] effect by (10)\nend\nbroadcast (player start v)\nwait (1) seconds\nbroadcast (Teleportin v)\n\nwhen I receive [nextsectiom v]\nset [sectiondirecˇion v] to [r]\nset [transition v] to [1]\ncreate clone of (_myself_ v)\nchange x by (999)\nnext costume\nrepeat (10)\n    change x by (-40)\nend\nset x to (0)\nwait (.19) seconds\nif <(costume [number v]) = [22]> then\n    switch costume to (bossroom2 v)\n    broadcast (DARKMANFIGHT v)\nend\nset [transition v] to [0]\n\nwhen I start as a clone\nif <(SECTIONDIRECˇION) = [r]> then\n    repeat (10)\n        change x by (-40)\n    end\n    delete this clone\nelse\n    if <(SECTIONDIRECˇION) = [u]> then\n        repeat (8)\n            change y by (-40)\n        end\n        delete this clone\n    else\n        repeat (8)\n            change y by (40)\n        end\n        delete this clone\n    end\nend\n\nwhen flag clicked\nset [transition v] to [0]\n\nwhen I receive [teleportin v]\nif <(CHECKPOINT #) = [0]> then\n    switch costume to (s1 v)\nend\nif <(CHECKPOINT #) = [1]> then\n    switch costume to (s10 v)\nend\nif <(CHECKPOINT #) = [2]> then\n    switch costume to (s15 v)\nend\n\nwhen I receive [sectionup v]\nset [sectiondirecˇion v] to [u]\nset [transition v] to [1]\ncreate clone of (_myself_ v)\nchange y by (999)\nnext costume\nrepeat (8)\n    change y by (-40)\nend\nset y to (0)\nset [transition v] to [0]\n\nwhen I receive [sectiondown v]\nset [sectiondirecˇion v] to [d]\nset [transition v] to [1]\ncreate clone of (_myself_ v)\nchange y by (-999)\nswitch costume to ((costume [number v]) + (-1))\nrepeat (8)\n    change y by (40)\nend\nset [transition v] to [0]\nset y to (0)\n\nwhen I receive [sectiondownprogress v]\nset [sectiondirecˇion v] to [d]\nset [transition v] to [1]\ncreate clone of (_myself_ v)\nchange y by (-999)\nnext costume\nrepeat (8)\n    change y by (40)\nend\nset y to (0)\nset [transition v] to [0]\n\nwhen I receive [bossdie v]\nstop [other scripts in sprite v]\nwait (4) seconds\nshow\nrepeat (20)\n    change [ghost v] effect by (5)\nend\n\nwhen I receive [smash v]\nrepeat (3)\n    change y by (5)\n    wait (0) seconds\n    change y by (-5)\n    wait (0) seconds\nend\nrepeat (3)\n    change y by (2)\n    wait (0) seconds\n    change y by (-2)\n    wait (0) seconds\nend\n\n@animations\n\nwhen flag clicked\nset volume to (100) %\nswitch costume to (idle v)\nset size to (200) %\nset size to (150) %\nclear graphic effects\nset [falling v] to [0]\nset [speed y v] to [0]\nset [canmove? v] to [0]\nset [holding? v] to [0]\nset [inshell? 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) %\nhide\n\nwhen I receive [die v]\nwait (0) seconds\nhide\nset [canmove? v] to [0]\ndeath\nswitch costume to (idle v)\nbroadcast (Teleportin v)\n\nwhen I receive [jumpup v]\nchange [speed y v] by (30)\n\nwhen I receive [jumphigh v]\nchange [speed y v] by (50)\n\nwhen flag clicked\nset rotation style [left-right v]\nforever\n    if <(CanMove?) = [1]> then\n        if <(CLIMBING ON LADDER) = [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                switch costume to (climb2 v)\n                wait (.1) seconds\n                switch costume to (climb1 v)\n                wait (.1) seconds\n            else\n                switch costume to (climb1 v)\n            end\n        else\n            if <([falling? v] of [hitbox v]) > [0]> then\n                if <(using gun?) = [1]> then\n                    switch costume to (jumpgun v)\n                else\n                    switch costume to (jump v)\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 <(using gun?) = [1]> then\n                        Do [GunRun]\n                    else\n                        Do [Walk]\n                    end\n                end\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 <(using gun?) = [1]> then\n                        switch costume to (idlegun v)\n                    else\n                        if <<key (down arrow v) pressed?> and <not <(Scroll X) < (SCROLL STOP)>>> then\n                            switch costume to (swipe v)\n                            if <(direction) = [-90]> then\n                                repeat (3)\n                                    change [scroll x v] by ((speed) / (-3))\n                                end\n                                repeat (3)\n                                    change [scroll x v] by ((speed) / (-5))\n                                end\n                                repeat (2)\n                                    change [scroll x v] by ((speed) / (-8))\n                                end\n                            else\n                                repeat (3)\n                                    change [scroll x v] by ((speed) / (3))\n                                end\n                                repeat (3)\n                                    change [scroll x v] by ((speed) / (5))\n                                end\n                                repeat (2)\n                                    change [scroll x v] by ((speed) / (8))\n                                end\n                            end\n                            switch costume to (idle v)\n                            wait (.2) seconds\n                        else\n                            switch costume to (idle v)\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Do (what?)\nif <(CanMove?) = [1]> then\n    if <(what?) = [Walk]> then\n        if <not <(dead:) = [1]>> then\n            switch costume to (run1 v)\n            wait (0.1) seconds\n            switch costume to (run2 v)\n            wait (0.1) seconds\n            switch costume to (run3 v)\n            wait (0.1) seconds\n            switch costume to (run4 v)\n            wait (0.1) seconds\n        end\n    end\n    if <(what?) = [GunRun]> then\n        if <not <(dead:) = [1]>> then\n            switch costume to (gunrun1 v)\n            wait (0.1) seconds\n            switch costume to (gunrun2 v)\n            wait (0.1) seconds\n            switch costume to (gunrun3 v)\n            wait (0.1) seconds\n            switch costume to (gunrun4 v)\n            wait (0.1) seconds\n        end\n    end\nend\n\nwhen flag clicked\nset volume to (60) %\nset [frame v] to [0]\n\nwhen flag clicked\nforever\n    if <<key (space v) pressed?> or <mouse down?>> then\n        set [using gun? v] to [1]\n    else\n        set [using gun? v] to [0]\n    end\nend\n\nwhen flag clicked\nset rotation style [left-right v]\nif <(editmode>) = [1]> then\n    set [speed v] to [28]\nelse\n    set [speed v] to [3]\nend\n\nwhen flag clicked\n\nforever\n    if <(slope) = [8]> then\n        change [scroll x v] by ((0) - ((speed) * (2)))\n        change y by (((0) - (slope)) * (2))\n        set [slope v] to [0]\n    end\nend\n\nchange [scroll x v] by (10)\n\nwhen I receive [teleportin v]\nif <not <(Health) > [15]>> then\n    set [health v] to [1]\n    go to x: (0) y: (-120)\n    hide\n    set [canmove? v] to [0]\n    set [scroll x v] to [0]\n    wait (1) seconds\n    set [canmove? v] to [1]\n    set [ghost v] effect to (100)\n    show\n    start sound [Mega Man 5 SFX \(4\) v]\n    repeat (3)\n        wait (.05) seconds\n        clear graphic effects\n        wait (.05) seconds\n        set [ghost v] effect to (100)\n    end\n    wait (.2) seconds\n    clear graphic effects\nend\n\nwhen flag clicked\n\nforever\n    if <key (r v) pressed?> then\n        go to x: (0) y: (-120)\n        set [speed y v] to [0]\n        broadcast (Teleportin v)\n        wait (10) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<<(CanMove?) = [1]> and <(TRANSITION) = [0]>> and <(CLIMBING ON LADDER) = [0]>> and <<key (space v) pressed?> or <mouse down?>>> then\n        set [hold v] to [0]\n        create clone of (_myself_ v)\n        start sound [Mega Man 5 SFX \(20\) v]\n        repeat until <<(hold) > [19]> or <<not <key (space v) pressed?>> and <not <mouse down?>>>>\n            change [hold v] by (1)\n        end\n        if <(hold) > [19]> then\n            repeat until <<not <key (space v) pressed?>> and <not <mouse down?>>>\n                set [brightness v] effect to (100)\n                wait (.1) seconds\n                set [brightness v] effect to (0)\n                wait (.1) seconds\n            end\n            set [hold v] to [40]\n            create clone of (_myself_ v)\n            start sound [Mega Man 5 SFX \(21\) v]\n            wait (.02) seconds\n        else\n            wait until <<not <key (space v) pressed?>> and <not <mouse down?>>>\n        end\n    end\nend\n\nwhen I start as a clone\nif <not <(costume [number v]) = [18]>> then\n    if <(hold) = [40]> then\n        set [x v] to [5]\n        switch costume to (shot1 v)\n        repeat (10)\n            repeat (3)\n                change [x v] by (1)\n                next costume\n                move (x) steps\n            end\n            switch costume to (shot1 v)\n        end\n        delete this clone\n    end\n    switch costume to (laser v)\n    repeat (12)\n        move (20) steps\n    end\n    delete this clone\nend\n\nwhen flag clicked\nset size to (150) %\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 [die v]\nset [speed v] to [1]\n\nwhen flag clicked\nforever\n    go to x: ([x position v] of [hitbox v]) y: (([y position v] of [hitbox v]) + (-12))\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [18]> then\n    go to [front v] layer\n    show\n    repeat (10)\n        move (5) steps\n    end\n    repeat (5)\n        move (3) steps\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [18]> then\n    forever\n        set [brightness v] effect to (100)\n        wait (.1) seconds\n        clear graphic effects\n        wait (.1) seconds\n    end\nend\n\ndefine death\nstart sound [Mega Man 5 SFX \(7\) v]\nswitch costume to (death v)\npoint in direction (0)\ncreate clone of (_myself_ v)\nturn right (45) degrees\ncreate clone of (_myself_ v)\nturn right (45) degrees\ncreate clone of (_myself_ v)\nturn right (45) degrees\ncreate clone of (_myself_ v)\nturn right (45) degrees\ncreate clone of (_myself_ v)\nturn right (45) degrees\ncreate clone of (_myself_ v)\nturn right (45) degrees\ncreate clone of (_myself_ v)\nturn right (45) degrees\ncreate clone of (_myself_ v)\nturn right (45) degrees\npoint in direction (90)\nwait (2) seconds\n\nwhen I start as a clone\nwait until <touching (_edge_ v)?>\ndelete this clone\n\nchange [color v] effect by (25)\n\nwhen I receive [take dmg v]\nstart sound [Mega Man 5 SFX \(6\) v]\nset [takingdmg v] to [1]\nset [canmove? v] to [0]\nrepeat (1)\n    set [brightness v] effect to (50)\n    wait (.2) seconds\n    clear graphic effects\n    wait (.2) seconds\nend\nset [canmove? v] to [1]\nset [takingdmg v] to [0]\n\nwhen flag clicked\nforever\n\nwhen I receive [blink v]\nrepeat (3)\n    set [brightness v] effect to (100)\n    wait (.05) seconds\n    clear graphic effects\n    wait (.05) seconds\nend\n\nwhen flag clicked\nset [section at v] to [1]\n\nwhen I receive [intro over v]\nrepeat (10)\n    show\nend\n\nif <not <(Health) > [15]>> then\n\nif <(CanMove?) = [1]> then\n\nwhen I start as a clone\nforever\n    show\nend\n\nwhen flag clicked\nset [takingdmg v] to [0]\nforever\n\nbroadcast (TAKE DMG v)\n\nwhen I receive [take dmg v]\nif <(costume [number v]) < [14]> then\n    repeat (10)\n        switch costume to (takedmg v)\n    end\nend\n\nwhen I receive [bossdie v]\nwait (1) seconds\nstop [other scripts in sprite v]\nwait (2) seconds\nhide\n\nbroadcast (die v)\n\n@ladder\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nclear graphic effects\nhide\n\nwhen I receive [teleportin v]\ngo to [front v] layer\nset [ghost v] effect to (100)\nshow\n\nwhen I receive [nextsectiom v]\nnext costume\n\nwhen I receive [sectionup v]\nnext costume\n\nwhen I receive [sectiondown v]\nswitch costume to ((costume [number v]) + (-1))\n\nwhen I receive [sectiondownprogress v]\nnext costume\n\nwhen I receive [teleportin v]\nif <(CHECKPOINT #) = [0]> then\n    switch costume to (costume1 v)\nend\nif <(CHECKPOINT #) = [1]> then\n    switch costume to (costume8 v)\nend\nif <(CHECKPOINT #) = [2]> then\n    switch costume to (costume13 v)\nend\n\n@effects\n\nwhen flag clicked\ngo to x: (0) y: (-100)\ngo to [back v] layer\nswitch costume to (costume1 v)\nhide\nwait (0) seconds\nshow\nforever\n    go to [back v] layer\n    repeat (5)\n        change y by (10)\n    end\n    repeat (5)\n        change y by (6)\n    end\n    repeat (5)\n        change y by (3)\n    end\n    repeat (5)\n        change y by (-3)\n    end\n    repeat (5)\n        change y by (-6)\n    end\n    repeat (5)\n        change y by (-10)\n    end\nend\n\nwhen I receive [player start v]\nhide\ndelete this clone\n\nwhen I start as a clone\nswitch costume to (costume2 v)\ngo to (random position v)\nset y to (-999)\nrepeat (10)\n    change y by (10)\n    turn right (15) degrees\nend\nrepeat (10)\n    change y by (10)\n    change [ghost v] effect by (10)\n    turn right (15) degrees\nend\ndelete this clone\n\nwhen flag clicked\nwait (.02) seconds\nrepeat until <(START) = [1]>\n    wait (.05) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nforever\n    repeat (2)\n        change x by (5)\n    end\n    repeat (2)\n        change x by (3)\n    end\n    repeat (2)\n        change x by (-3)\n    end\n    repeat (2)\n        change x by (-5)\n    end\n    repeat (2)\n        change x by (-3)\n    end\n    repeat (2)\n        change x by (-5)\n    end\n    repeat (2)\n        change x by (5)\n    end\n    repeat (2)\n        change x by (3)\n    end\nend\n\nwhen I receive [bossdie v]\nstop [other scripts in sprite v]\nwait (4) seconds\ngo to x: (0) y: (0)\nswitch costume to (costume3 v)\nset [ghost v] effect to (100)\nshow\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\n\ngo [backward v] (55) layers\n\n@deathtrap\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nclear graphic effects\nhide\n\nwhen I receive [teleportin v]\n\ngo to [front v] layer\nset [ghost v] effect to (100)\nshow\nwait (1) seconds\nforever\n    wait until <touching (hitbox v)?>\n    broadcast (die v)\n    wait (10) seconds\nend\n\nwhen I receive [teleportin v]\nswitch costume to (costume1 v)\n\nwhen I receive [sectiondown v]\nswitch costume to ((costume [number v]) + (-1))\n\nwhen I receive [sectiondownprogress v]\nnext costume\n\nwhen I receive [sectionup v]\nnext costume\n\nwhen I receive [nextsectiom v]\nnext costume\n\n@Plant Man\n\nwhen flag clicked\nset [barrierup? v] to [0]\nhide\nwait (1) seconds\n\nwhen I receive [darkmanfight v]\ngo to x: (130) y: (-79)\nswitch costume to (plant1 v)\npoint in direction (90)\nset rotation style [left-right v]\nshow\nwait (.5) seconds\nset [transition v] to [1]\nbroadcast (ret###ded speech v)\nrepeat until <(TRANSITION) = [0]>\n    switch costume to (plant1 v)\n    wait (.2) seconds\n    switch costume to (plant3 v)\n    wait (.2) seconds\nend\nrepeat until <([costume # v] of [boss hp v]) > [14]>\n    switch costume to (plant2 v)\n    set [barrierup? v] to [1]\n    repeat (4)\n        set [proj x v] to (x position)\n        set [proj y v] to ((y position) + (32))\n        set [proj direction v] to [0]\n        set [projectile name v] to [plant]\n        broadcast (CREATE PROJECTILE v)\n        wait (.15) seconds\n    end\n    wait (.8) seconds\n    start sound [Mega Man 6 SRX \(63\) v]\n    switch costume to (plant4 v)\n    set [barrierup? v] to [0]\n    wait (.5) seconds\n    switch costume to (jump v)\n    set [y v] to [0]\n    repeat (12)\n        change y by (y)\n        change [y v] by (1)\n    end\n    repeat until <(y position) < [-79]>\n        change y by (y)\n        change [y v] by (-2)\n    end\n    set y to (-79)\n    start sound [Mega Man 5 SFX \(2\) v]\n    switch costume to (plant2 v)\n    wait (.1) seconds\n    switch costume to (plant1 v)\n    repeat (8)\n        switch costume to (plant7 v)\n        move (-15) steps\n        wait (.1) seconds\n        move (-15) steps\n        switch costume to (plant6 v)\n        wait (.1) seconds\n    end\n    turn right (180) degrees\nend\n\nwhen I receive [darkmanfight v]\nwait (3) seconds\nwait until <([costume # v] of [boss hp v]) > [14]>\nbroadcast (BOSSDIE v)\nstop [other scripts in sprite v]\nhide\ndeath\nwait (4) seconds\n\nwhen I receive [darkmanfight v]\nwait (2) seconds\nforever\n    if <<(BARRIERUP?) = [0]> and <touching color (#fcd8a8)?>> then\n        broadcast (BossDMG v)\n        set [brightness v] effect to (50)\n        wait (.2) seconds\n        clear graphic effects\n        wait (.2) seconds\n    end\nend\n\ndefine death\nstart sound [Mega Man 5 SFX \(7\) v]\npoint in direction (0)\nrepeat (3)\n    switch costume to (death v)\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)\n    wait (.4) seconds\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [9]> then\n    go to [front v] layer\n    show\n    repeat (40)\n        move (5) steps\n    end\n    repeat (25)\n        move (3) steps\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [9]> then\n    repeat (10)\n        wait (.2) seconds\n        switch costume to (death2 v)\n        wait (.2) seconds\n        switch costume to (death v)\n    end\nend\n\nwhen I receive [die v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [darkmanfight v]\nwait (1) seconds\nforever\n    wait until <touching (hitbox v)?>\n    broadcast (KNOCKBACK v)\n    wait (.3) seconds\n    change [health v] by (1)\n    broadcast (TAKE DMG v)\n    wait (.5) seconds\nend\n\nset [barrierup? v] to [0]\n\n@Sprite2\n\nwhen I receive [take dmg v]\ngo to [front v] layer\nset size to (150) %\ngo to (animations v)\nshow\nrepeat (2)\n    wait (.1) seconds\n    set [ghost v] effect to (30)\n    wait (.1) seconds\n    set [ghost v] effect to (100)\nend\nhide\n\nwhen flag clicked\nhide\n\nbroadcast (TAKE DMG v)\n\nwhen I receive [bossdmg v]\ngo to [front v] layer\nset size to (200) %\ngo to (plant man v)\nshow\nrepeat (2)\n    wait (.1) seconds\n    set [ghost v] effect to (20)\n    wait (.1) seconds\n    set [ghost v] effect to (100)\nend\nhide\n\n@boss hp\n\nwhen flag clicked\nclear graphic effects\nhide\n\nwhen I receive [darkmanfight v]\nwait (1) seconds\ngo to x: (-150) y: (91)\nshow\nset [color v] effect to (80)\nset [brightness v] effect to (0)\nswitch costume to (hpbar15 v)\nrepeat (14)\n    start sound [Mega Man 5 SFX \(16\) v]\n    switch costume to ((costume [number v]) + (-1))\nend\n\nwhen I receive [bossdmg v]\nrepeat (3)\n    set [brightness v] effect to (100)\n    wait (.1) seconds\n    set [color v] effect to (80)\n    set [brightness v] effect to (0)\n    wait (.1) seconds\nend\n\nwhen I receive [bossdmg v]\nnext costume\n\nwhen I receive [die v]\nhide\n\nwhen I receive [bossdie v]\nstop [other scripts in sprite v]\nwait (4) seconds\nshow\nrepeat (20)\n    change [ghost v] effect by (5)\nend\n\n@Projectiles\n\nwhen flag clicked\nset size to (150) %\nhide\n\nwhen I receive [create projectile v]\nif <(clone) = [0]> then\n    switch costume to (PROJECTILE NAME)\n    go to x: (PROJ X) y: (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\nif <(costume [number v]) = [13]> then\n    point in direction (90)\n    set rotation style [left-right v]\n    glide (1) secs to x: (-211) y: (169)\n    delete this clone\nend\nif <(costume [number v]) = [15]> then\n    point in direction (PROJ DIRECTION)\n    set rotation style [all around v]\n    repeat until <<touching (_edge_ v)?> or <touching (hitbox v)?>>\n        move (10) steps\n    end\n    if <touching (hitbox v)?> then\n        change [health v] by (2)\n        broadcast (TAKE DMG v)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [12]> then\n    point in direction (PROJ DIRECTION)\n    set rotation style [all around v]\n    start sound [Mega Man 5 SFX \(50\) v]\n    repeat until <<touching (_edge_ v)?> or <touching (hitbox v)?>>\n        move (5) steps\n    end\n    if <touching (hitbox v)?> then\n        change [health v] by (2)\n        broadcast (TAKE DMG v)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [8]> then\n    set [y v] to [0]\n    point in direction (90)\n    repeat until <<touching (ground v)?> or <touching (hitbox v)?>>\n        change y by (Y)\n        change [y v] by (-.4)\n    end\n    start sound [Mega Man 5 SFX \(11\) v]\n    switch costume to (expl1 v)\n    repeat (2)\n        if <touching (hitbox v)?> then\n            change [health v] by (1)\n            broadcast (TAKE DMG v)\n        end\n        wait (.1) seconds\n        next costume\n    end\n    wait (.1) seconds\n    delete this clone\nend\nif <(costume [number v]) = [3]> then\n    point in direction (PROJ DIRECTION)\n    set rotation style [left-right v]\n    repeat until <<touching (_edge_ v)?> or <touching (hitbox v)?>>\n        move (10) steps\n    end\n    if <touching (hitbox v)?> then\n        change [health v] by (2)\n        broadcast (TAKE DMG v)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [7]> then\n    point in direction (PROJ DIRECTION)\n    set rotation style [left-right v]\n    repeat until <<touching (_edge_ v)?> or <touching (hitbox v)?>>\n        move (10) steps\n    end\n    if <touching (hitbox v)?> then\n        change [health v] by (4)\n        broadcast (TAKE DMG v)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [14]> then\n    set rotation style [left-right v]\n    start sound [Mega Man 6 SRX \(63\) v]\n    repeat (48)\n        turn right (15) degrees\n        move (10) steps\n    end\n    point towards (animations v)\n    repeat until <<touching (_edge_ v)?> or <touching (hitbox v)?>>\n        move (10) steps\n    end\n    if <touching (hitbox v)?> then\n        change [health v] by (1)\n        broadcast (TAKE DMG v)\n    end\n    delete this clone\nend\n\n@enemies\n\nwhen flag clicked\nhide\n\nwhen I receive [nextsectiom v]\nwait (.05) seconds\nif <([costume # v] of [ground v]) = [2]> then\n    Create Enemy [fly] [131] [15]\nend\nif <([costume # v] of [ground v]) = [9]> then\n    Create Enemy [colton] [77] [-61]\n    wait (.02) seconds\n    Create Enemy [colton] [184] [-13]\nend\nif <([costume # v] of [ground v]) = [10]> then\n    Create Enemy [fly] [42] [135]\nend\nif <([costume # v] of [ground v]) = [11]> then\n    Create Enemy [colton] [57] [36]\nend\nif <([costume # v] of [ground v]) = [12]> then\n    Create Enemy [colton] [24] [37]\n    wait (.02) seconds\n    Create Enemy [slam] [186] [-77]\nend\nif <([costume # v] of [ground v]) = [13]> then\n    Create Enemy [fly] [-73] [112]\n    wait (.02) seconds\n    Create Enemy [fly] [73] [112]\nend\nif <([costume # v] of [ground v]) = [14]> then\n    Create Enemy [colton] [37] [10]\nend\nif <([costume # v] of [ground v]) = [15]> then\n    Create Enemy [slam] [64] [-74]\nend\nif <([costume # v] of [ground v]) = [18]> then\n    Create Enemy [slam] [110] [-52]\n    wait (.02) seconds\n    Create Enemy [fly] [85] [115]\nend\n\ndefine Create Enemy (what enemy ) (x) (y)\nset size to (150) %\nset rotation style [left-right v]\nswitch costume to (what enemy )\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [nextsectiom v]\ndelete this clone\n\nwhen I start as a clone\nshow\nif <(costume [number v]) = [1]> then\n    forever\n        point towards (animations v)\n    end\nend\nif <(costume [number v]) = [11]> then\n    forever\n        if <(x position) < ([x position v] of [animations v])> then\n            point in direction (90)\n        else\n            point in direction (-90)\n        end\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [1]> then\n    set [hp v] to [8]\n    forever\n        repeat (3)\n            switch costume to (joe v)\n            repeat (3)\n                wait (.1) seconds\n                next costume\n            end\n            wait (.1) seconds\n        end\n        set [projectile name v] to [chain]\n        set [proj x v] to (x position)\n        set [proj y v] to (y position)\n        set [proj direction v] to (direction)\n        broadcast (CREATE PROJECTILE v)\n        switch costume to (joe5 v)\n        repeat (2)\n            wait (.1) seconds\n            next costume\n        end\n        wait (1) seconds\n    end\nend\nif <(costume [number v]) = [46]> then\n    set [hp v] to [8]\n    forever\n        switch costume to (fat2 v)\n        wait (2) seconds\n        switch costume to (slam v)\n        wait (1) seconds\n        start sound [spring v]\n        switch costume to (fat3 v)\n        repeat (10)\n            change y by (25)\n        end\n        hide\n        wait (2) seconds\n        switch costume to (slam v)\n        show\n        repeat (5)\n            change y by (-50)\n        end\n        broadcast (smash v)\n        switch costume to (fat2 v)\n        start sound [super-stomp v]\n    end\nend\nif <(costume [number v]) = [42]> then\n    set [hp v] to [3]\n    forever\n        switch costume to (colton v)\n        wait (1) seconds\n        start sound [shot v]\n        set [projectile name v] to [colt]\n        set [proj x v] to (x position)\n        set [proj y v] to (y position)\n        set [proj direction v] to (direction)\n        broadcast (CREATE PROJECTILE v)\n        repeat (3)\n            next costume\n            wait (.2) seconds\n        end\n    end\nend\nif <(costume [number v]) = [11]> then\n    set [hp v] to [2]\n    forever\n        switch costume to (met v)\n        wait (2) seconds\n        repeat (2)\n            wait (.1) seconds\n            change y by (2)\n            next costume\n        end\n        repeat (3)\n            start sound [Mega Man 5 SFX \(9\) v]\n            set [projectile name v] to [bullet]\n            set [proj x v] to (x position)\n            set [proj y v] to (y position)\n            set [proj direction v] to (direction)\n            broadcast (CREATE PROJECTILE v)\n            wait (.1) seconds\n        end\n        switch costume to (met3 v)\n        repeat (2)\n            wait (.1) seconds\n            move (2) steps\n            next costume\n        end\n        wait (.1) seconds\n        switch costume to (met3 v)\n        repeat (2)\n            wait (.1) seconds\n            move (2) steps\n            next costume\n        end\n        wait (.1) seconds\n        switch costume to (met3 v)\n        repeat (2)\n            wait (.1) seconds\n            move (-2) steps\n            next costume\n        end\n        wait (.1) seconds\n        switch costume to (met3 v)\n        repeat (2)\n            wait (.1) seconds\n            move (-2) steps\n            next costume\n        end\n        wait (.1) seconds\n        switch costume to (met2 v)\n        change y by (-2)\n        wait (.1) seconds\n        change y by (-2)\n    end\nend\nif <(costume [number v]) = [16]> then\n    set [hp v] to [3]\n    forever\n        switch costume to (bow v)\n        wait (.1) seconds\n        switch costume to (bow2 v)\n        wait (.1) seconds\n    end\nend\nif <(costume [number v]) = [35]> then\n    set [hp v] to [6]\n    forever\n        point in direction (90)\n        switch costume to (atst2 v)\n        repeat (3)\n            wait (.1) seconds\n            next costume\n            change x by (-10)\n        end\n        repeat (3)\n            switch costume to (atst2 v)\n            repeat (3)\n                wait (.1) seconds\n                next costume\n                change x by (10)\n            end\n        end\n        switch costume to (atst v)\n        set [projectile name v] to [atst]\n        set [proj x v] to (x position)\n        set [proj y v] to (y position)\n        set [proj direction v] to (((direction) * (-1)) + (25))\n        broadcast (CREATE PROJECTILE v)\n        wait (.3) seconds\n        set [projectile name v] to [atst]\n        set [proj x v] to (x position)\n        set [proj y v] to (y position)\n        set [proj direction v] to (((direction) * (-1)) + (5))\n        broadcast (CREATE PROJECTILE v)\n        wait (.3) seconds\n        set [projectile name v] to [atst]\n        set [proj x v] to (x position)\n        set [proj y v] to (y position)\n        set [proj direction v] to (((direction) * (-1)) + (0))\n        broadcast (CREATE PROJECTILE v)\n        wait (.3) seconds\n        set [projectile name v] to [atst]\n        set [proj x v] to (x position)\n        set [proj y v] to (y position)\n        set [proj direction v] to (((direction) * (-1)) + (-25))\n        broadcast (CREATE PROJECTILE v)\n        wait (.8) seconds\n        switch costume to (atst2 v)\n        repeat (3)\n            wait (.1) seconds\n            next costume\n            change x by (-10)\n        end\n        switch costume to (atst2 v)\n        repeat (3)\n            wait (.1) seconds\n            next costume\n            change x by (-10)\n        end\n    end\nend\nif <(costume [number v]) = [18]> then\n    point in direction (90)\n    set [hp v] to [3]\n    wait until <touching (hitbox v)?>\n    wait (.2) seconds\n    switch costume to (trap2 v)\n    start sound [Mega Man 5 SFX \(34\) v]\n    if <touching (hitbox v)?> then\n        change [health v] by (3)\n        broadcast (TAKE DMG v)\n    end\nend\nif <(costume [number v]) = [20]> then\n    point in direction (90)\n    set [hp v] to [3]\n    wait (1) seconds\n    repeat (3)\n        repeat (3)\n            switch costume to (t3 v)\n            change y by (15)\n            change x by (-15)\n        end\n        repeat (3)\n            switch costume to (t3 v)\n            change y by (13)\n            change x by (-10)\n        end\n        repeat (3)\n            switch costume to (t4 v)\n            change y by (2)\n            change x by (-6)\n        end\n        repeat until <touching (ground v)?>\n            switch costume to (t4 v)\n            change y by (-7)\n            change x by (-3)\n        end\n        switch costume to (t5 v)\n        wait (.5) seconds\n    end\nend\nif <(costume [number v]) = [40]> then\n    set rotation style [left-right v]\n    point in direction (90)\n    set [hp v] to [5]\n    glide (1) secs to x: ([x position v] of [hitbox v]) y: (([y position v] of [hitbox v]) + (35))\n    set [x v] to [-2]\n    set [y v] to [4]\n    repeat (4)\n        change [x v] by (-1)\n        change [y v] by (-1)\n        change x by (x)\n        change y by (y)\n    end\n    repeat (8)\n        change [x v] by (0)\n        change [y v] by (-1)\n        change x by (x)\n        change y by (y)\n    end\n    repeat (5)\n        change [x v] by (1)\n        change [y v] by (1)\n        change x by (x)\n        change y by (y)\n    end\n    repeat (10)\n        change [x v] by (1)\n        change [y v] by (0)\n        change x by (x)\n        change y by (y)\n    end\n    repeat (6)\n        change [x v] by (0)\n        change [y v] by (1)\n        change x by (x)\n        change y by (y)\n    end\n    repeat (6)\n        change [x v] by (1)\n        change [y v] by (1)\n        change x by (x)\n        change y by (y)\n    end\n    repeat (6)\n        change [x v] by (-1)\n        change [y v] by (1)\n        change x by (x)\n        change y by (y)\n    end\n    repeat (25)\n        change [x v] by (1)\n        change [y v] by (1)\n        change x by (x)\n        change y by (y)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [30]> then\n    set rotation style [left-right v]\n    point in direction (90)\n    go to x: (-75) y: (-28)\n    set [hp v] to [1]\n    forever\n        glide (.5) secs to x: (-12) y: (-28)\n        glide (.2) secs to x: (-12) y: (-66)\n        glide (.5) secs to x: (-71) y: (-66)\n        glide (.2) secs to x: (-75) y: (-28)\n    end\nend\nif <(costume [number v]) = [33]> then\n    set rotation style [left-right v]\n    point in direction (90)\n    set [hp v] to [1]\n    repeat until <(([x position v] of [hitbox v]) + (65)) > (x position)>\n        change x by (-5)\n    end\n    repeat (3)\n        repeat (3)\n            change x by (-5)\n        end\n        set [projectile name v] to [missile]\n        set [proj x v] to (x position)\n        set [proj y v] to (y position)\n        set [proj direction v] to (direction)\n        broadcast (CREATE PROJECTILE v)\n        wait (.02) seconds\n    end\n    repeat until <(x position) < [-230]>\n        change x by (-5)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [28]> then\n    set rotation style [left-right v]\n    point in direction (90)\n    set [hp v] to [1]\n    wait until <([x position v] of [hitbox v]) < (x position)>\n    start sound [Mega Man 5 SFX \(34\) v]\n    switch costume to (cling2 v)\n    repeat (25)\n        change y by (-15)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [25]> then\n    set rotation style [left-right v]\n    point towards (hitbox v)\n    set [hp v] to [1]\n    forever\n        repeat (3)\n            repeat (2)\n                switch costume to (fly v)\n                repeat (2)\n                    change x by (-2)\n                    next costume\n                end\n            end\n            repeat (4)\n                switch costume to (fly v)\n                repeat (2)\n                    change x by (2)\n                    next costume\n                end\n            end\n            repeat (2)\n                switch costume to (fly v)\n                repeat (2)\n                    change x by (-2)\n                    next costume\n                end\n            end\n        end\n        set rotation style [left-right v]\n        point towards (hitbox v)\n        start sound [Mega Man 5 SFX \(9\) v]\n        set [projectile name v] to [bullet]\n        set [proj x v] to (x position)\n        set [proj y v] to (y position)\n        set [proj direction v] to ((direction) + (0))\n        broadcast (CREATE PROJECTILE v)\n        wait (.02) seconds\n        set [projectile name v] to [bullet]\n        set [proj x v] to (x position)\n        set [proj y v] to (y position)\n        set [proj direction v] to ((direction) + (25))\n        broadcast (CREATE PROJECTILE v)\n        wait (.02) seconds\n    end\nend\n\nwhen I receive [die v]\ndelete this clone\n\nwhen I start as a clone\nforever\n    wait until <touching color (#fcd8a8)?>\n    if <<(costume [number v]) > [34]> and <(costume [number v]) < [40]>> then\n        if <color (#ff8785) is touching (#fcd8a8)?> then\n            change [hp v] by (-1)\n            if <(HP) < [1]> then\n                stop [other scripts in sprite v]\n                start sound [Mega Man 5 SFX \(6\) v]\n                switch costume to (expl1 v)\n                repeat (2)\n                    wait (.1) seconds\n                    next costume\n                end\n                wait (.2) seconds\n                delete this clone\n            else\n                start sound [Mega Man 5 SFX \(9\) v]\n                set [brightness v] effect to (100)\n                wait (.1) seconds\n                clear graphic effects\n                wait (.1) seconds\n            end\n        else\n            start sound [Mega Man 5 SFX \(8\) v]\n            set [projectile name v] to [nicetry]\n            set [proj x v] to (x position)\n            set [proj y v] to ((y position) + (30))\n            set [proj direction v] to ((direction) + (0))\n            broadcast (CREATE PROJECTILE v)\n            wait (.5) seconds\n        end\n    else\n        if <<(costume [number v]) > [29]> and <(costume [number v]) < [33]>> then\n            play sound [Mega Man 5 SFX \(8\) v] until done\n        else\n            if <<not <(costume [number v]) = [11]>> and <not <(costume [number v]) = [12]>>> then\n                change [hp v] by (-1)\n            end\n            if <(HP) < [1]> then\n                stop [other scripts in sprite v]\n                start sound [Mega Man 5 SFX \(6\) v]\n                switch costume to (expl1 v)\n                repeat (2)\n                    wait (.1) seconds\n                    next costume\n                end\n                wait (.2) seconds\n                delete this clone\n            else\n                start sound [Mega Man 5 SFX \(2\) v]\n                set [brightness v] effect to (100)\n                wait (.1) seconds\n                clear graphic effects\n                wait (.1) seconds\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [16]> then\n    set [x v] to [0]\n    set [y v] to [0]\n    repeat (15)\n        change x by (x)\n        change y by (y)\n        change [y v] by (-.2)\n        change [x v] by (-.5)\n    end\n    repeat (15)\n        change x by (x)\n        change y by (y)\n        change [y v] by (.2)\n        change [x v] by (-.2)\n    end\n    repeat until <(x position) < [-245]>\n        change x by (x)\n        change y by (y)\n        change [y v] by (.2)\n        change [x v] by (-.2)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [16]> then\n    wait (.3) seconds\n    repeat (5)\n        start sound [Mega Man 5 SFX \(9\) v]\n        set [projectile name v] to [drop]\n        set [proj x v] to (x position)\n        set [proj y v] to (y position)\n        set [proj direction v] to (direction)\n        broadcast (CREATE PROJECTILE v)\n        wait (.3) seconds\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(costume [number v]) = [11]> then\n        forever\n            wait until <touching (hitbox v)?>\n            broadcast (KNOCKBACK v)\n            wait (.3) seconds\n            change [health v] by (2)\n            broadcast (TAKE DMG v)\n        end\n    end\n    if <(costume [number v]) = [16]> then\n        forever\n            wait until <touching (hitbox v)?>\n            broadcast (KNOCKBACK v)\n            wait (.3) seconds\n            change [health v] by (3)\n            broadcast (TAKE DMG v)\n        end\n    end\n    if <(costume [number v]) = [20]> then\n        forever\n            wait until <touching (hitbox v)?>\n            broadcast (KNOCKBACK v)\n            wait (.3) seconds\n            change [health v] by (3)\n            broadcast (TAKE DMG v)\n        end\n    end\n    if <(costume [number v]) = [30]> then\n        forever\n            wait until <touching (hitbox v)?>\n            broadcast (KNOCKBACK v)\n            wait (.3) seconds\n            change [health v] by (3)\n            broadcast (TAKE DMG v)\n        end\n    end\n    if <(costume [number v]) = [28]> then\n        forever\n            wait until <touching (hitbox v)?>\n            broadcast (KNOCKBACK v)\n            wait (.3) seconds\n            change [health v] by (1)\n            broadcast (TAKE DMG v)\n        end\n    end\n    if <(costume [number v]) = [33]> then\n        forever\n            wait until <touching (hitbox v)?>\n            broadcast (KNOCKBACK v)\n            wait (.3) seconds\n            change [health v] by (2)\n            broadcast (TAKE DMG v)\n        end\n    end\n    if <(costume [number v]) = [35]> then\n        forever\n            wait until <touching (hitbox v)?>\n            broadcast (KNOCKBACK v)\n            wait (.3) seconds\n            change [health v] by (4)\n            broadcast (TAKE DMG v)\n        end\n    end\n    if <(costume [number v]) = [40]> then\n        forever\n            wait until <touching (hitbox v)?>\n            broadcast (KNOCKBACK v)\n            wait (.3) seconds\n            change [health v] by (1)\n            broadcast (TAKE DMG v)\n        end\n    end\n    if <(costume [number v]) = [46]> then\n        forever\n            wait until <touching (hitbox v)?>\n            broadcast (KNOCKBACK v)\n            wait (.3) seconds\n            change [health v] by (3)\n            broadcast (TAKE DMG v)\n        end\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [20]> then\n    wait (1) seconds\n    wait until <(x position) < [-231]>\n    delete this clone\nend\n\nwait (.02) seconds\n\nwhen I start as a clone\nif <(costume [number v]) = [30]> then\n    forever\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n        switch costume to (spike v)\n    end\nend\nif <(costume [number v]) = [33]> then\n    forever\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n        switch costume to (aerial v)\n    end\nend\nif <(costume [number v]) = [40]> then\n    forever\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n        switch costume to (rounder v)\n    end\nend\n\nwhen I receive [sectiondown v]\ndelete this clone\n\nwhen I receive [sectiondownprogress v]\ndelete this clone\n\nwhen I receive [sectionup v]\ndelete this clone\n\nwhen I receive [sectiondownprogress v]\nif <([costume # v] of [ground v]) = [8]> then\n    Create Enemy [slam] [178] [-77]\nend\n\n@toenail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nswitch costume to (costume1 v)\nshow\nforever\n    go to [front v] layer\nend\n\nwhen I receive [end v]\nswitch costume to (costume2 v)\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\ngo to [front v] layer\nshow\nforever\n    go to x: ((mouse x) / (30)) y: ((mouse y) / (30))\nend\n\n@text\n\nwhen flag clicked\nset [already heard plant mans ridiculous speech that is not funny in any way shape or fomr v] to [0]\nhide\n\nwhen I start as a clone\nset size to (105) %\nswitch costume to (trans1 v)\nchange x by (5)\nrepeat (25)\n    wait (.01) seconds\n    next costume\n    go to [front v] layer\nend\ndelete this clone\n\nwhen I receive [ret###ded speech v]\nif <(already heard plant mans ridiculous speech that is not funny in any way shape or fomr) = [1]> then\n    go to x: (-550) y: (121)\n    go to [front v] layer\n    switch costume to (plantman1 v)\n    show\n    repeat (10)\n        change x by (50)\n    end\n    switch costume to (plantman7 v)\n    create clone of (_myself_ v)\n    repeat (5)\n        wait (.02) seconds\n        start sound [voice v]\n    end\n    wait until <<key (space v) pressed?> or <mouse down?>>\nelse\n    go to x: (-550) y: (121)\n    go to [front v] layer\n    switch costume to (plantman1 v)\n    show\n    repeat (10)\n        change x by (50)\n    end\n    switch costume to (plantman6 v)\n    create clone of (_myself_ v)\n    repeat (5)\n        wait (.02) seconds\n        start sound [voice v]\n    end\n    wait (.2) seconds\n    repeat (5)\n        wait (.02) seconds\n        start sound [voice v]\n    end\n    repeat (2)\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        create clone of (_myself_ v)\n        next costume\n        repeat (15)\n            wait (.02) seconds\n            start sound [Mega Man 6 SRX \(40\)2 v]\n        end\n    end\n    wait until <<key (space v) pressed?> or <mouse down?>>\n    create clone of (_myself_ v)\n    next costume\n    repeat (15)\n        wait (.02) seconds\n        start sound [voice v]\n    end\n    wait until <<key (space v) pressed?> or <mouse down?>>\n    create clone of (_myself_ v)\n    next costume\n    repeat (15)\n        wait (.02) seconds\n        start sound [Mega Man 6 SRX \(40\)2 v]\n    end\nend\nwait until <<key (space v) pressed?> or <mouse down?>>\nset [already heard plant mans ridiculous speech that is not funny in any way shape or fomr v] to [1]\nset [transition v] to [0]\nrepeat (10)\n    change x by (-50)\nend\nhide\n\nwhen I receive [player start v]\nwait (2.5) seconds\nset [ghost v] effect to (15)\ngo to x: (-550) y: (121)\ngo to [front v] layer\nswitch costume to (opening speech v)\nshow\nrepeat (10)\n    change x by (50)\nend\nrepeat (4)\n    next costume\n    create clone of (_myself_ v)\n    repeat (15)\n        wait (.02) seconds\n        start sound [light v]\n    end\n    wait (2) seconds\nend\nnext costume\ncreate clone of (_myself_ v)\nrepeat (8)\n    wait (.02) seconds\n    start sound [Mega Man 6 SRX \(40\)2 v]\nend\nwait (2) seconds\nnext costume\ncreate clone of (_myself_ v)\nrepeat (15)\n    wait (.02) seconds\n    start sound [light v]\nend\nwait (2) seconds\nrepeat (10)\n    change x by (-50)\nend\nhide\n\nwhen I receive [bossdie v]\nwait (6) seconds\ngo to x: (-550) y: (121)\ngo to [front v] layer\nswitch costume to (ending3 v)\nshow\nrepeat (10)\n    change x by (50)\nend\nswitch costume to (ending v)\ncreate clone of (_myself_ v)\nrepeat (15)\n    wait (.02) seconds\n    start sound [Mega Man 6 SRX \(40\)2 v]\nend\nwait until <<key (space v) pressed?> or <mouse down?>>\ncreate clone of (_myself_ v)\nnext costume\nrepeat (13)\n    wait (.02) seconds\n    start sound [light v]\nend\nwait until <<key (space v) pressed?> or <mouse down?>>\ncreate clone of (_myself_ v)\nnext costume\nrepeat (15)\n    wait (.02) seconds\n    start sound [Mega Man 6 SRX \(40\)2 v]\nend\nwait until <<key (space v) pressed?> or <mouse down?>>\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\nbroadcast (END v)\n\n@border\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (costume2 v)\ngo to [front v] layer\nclear graphic effects\nshow\n\nwhen I receive [intro v]\nrepeat (10)\n    change [brightness v] effect by (-10)\nend\nclear graphic effects\nhide\n\nwhen I receive [intro v]\nset [brightness v] effect to (-100)\ngo to [front v] layer\nshow\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nclear graphic effects\n\n@vile\n\nwhen flag clicked\nset volume to (100) %\nstart sound [a-ha-take-on-me-cut-mp3_rnSXv7Z v]\nswitch costume to (vile3 v)\nset size to (250) %\ngo to x: (-225) y: (-43)\npoint in direction (90)\nset rotation style [left-right v]\ngo to [front v] layer\nshow\nrepeat (10)\n    go to [front v] layer\n    change x by (30)\nend\nrepeat (6)\n    change x by (15)\nend\nrepeat (4)\n    change x by (5)\nend\nswitch costume to (vile1 v)\nstart sound [Mega Man 5 SFX \(21\)3 v]\nwait (.2) seconds\nstart sound [Mega Man 5 SFX \(21\)3 v]\nswitch costume to (vile2 v)\npoint in direction (-90)\ncreate clone of (_myself_ v)\nwait (2) seconds\nswitch costume to (vile3 v)\nrepeat (12)\n    go to [front v] layer\n    change x by (-30)\nend\nrepeat (8)\n    change x by (-15)\nend\nrepeat (5)\n    change x by (-5)\nend\nhide\nrepeat (10)\n    change volume by (-10)\nend\nbroadcast (INTRO v)\n\nwhen flag clicked\nstart sound [Mega Man 5 SFX \(42\) v]\n\nwhen I start as a clone\nswitch costume to (reee v)\npoint in direction (90)\nset size to (100) %\ngo to x: (12) y: (999)\nrepeat (3)\n    change y by (-40)\nend\nrepeat (2)\n    change y by (-30)\nend\nrepeat (2)\n    change y by (-20)\nend\nrepeat (2)\n    change y by (-10)\nend\nstart sound [mario_coin_sound v]\nrepeat (3)\n    show\n    wait (.5) seconds\n    hide\n    wait (.2) seconds\nend\ndelete this clone\n\n@well you guys wanted checkpoints so\n\nwhen flag clicked\nset [checkpoint # v] to [0]\nhide\nwait (1) seconds\nwait until <([costume # v] of [background v]) = [10]>\nswitch costume to (costume1 v)\ngo to x: (0) y: (7)\nset [checkpoint # v] to [1]\ngo to [front v] layer\nclear graphic effects\nstart sound [Mega Man 6 SRX \(18\) v]\nshow\nrepeat (5)\n    set [ghost v] effect to (100)\n    wait (.1) seconds\n    clear graphic effects\n    wait (.1) seconds\nend\nwait (.1) seconds\nhide\nwait until <([costume # v] of [background v]) = [15]>\nswitch costume to (costume2 v)\ngo to x: (0) y: (7)\nset [checkpoint # v] to [2]\ngo to [front v] layer\nclear graphic effects\nstart sound [Mega Man 6 SRX \(18\) v]\nshow\nrepeat (5)\n    set [ghost v] effect to (100)\n    wait (.1) seconds\n    clear graphic effects\n    wait (.1) seconds\nend\nwait (.1) seconds\nhide\n\n