Mega Man Showdown - [SCROLLING 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\nMega Man's creator, DR. LIGHT has been awoken by a loud noise of some ROBOT MASTERS partying. Dr. Light sends Mega Man to crash it.\n\n- Fight against Magnet Man, Needle Man, Hard Man, and Spark Man in a Tag-Team-Dance-Fight.\n\n\n\n\n★★★★★★★★★CREDITS★★★★★★★★★\n\n-All sprites and all sound effects belong to Capcom,    the original creator of Mega Man\n\n- Music is In the Hall of the Mountain King, Axel-F, and Ring Man Stage\n\n- Intro music is Take on Me by a-ha\n\n- Super Mario World for some sound effects.\n\n

@Stage\n\nwhen flag clicked\nwait (4) seconds\nset volume to (100) %\nforever\n    play sound [In the Hall of the Mountain King Grieg - Mega Man Style \[0CC FamiTracker\] v] until done\nend\n\nwhen I receive [bossgate #1 v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change volume by (-10)\nend\nstop all sounds\nstart sound [Axel F v]\nrepeat (10)\n    change volume by (10)\nend\n\nbroadcast (BOSSGATE #1 v)\n\nwhen I receive [battle begin v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change volume by (-10)\nend\nstop all sounds\nrepeat (10)\n    change volume by (10)\nend\nforever\n    play sound [Mega Man IV - Ring Man v] until done\nend\n\nwhen I receive [you win v]\nrepeat (10)\n    change volume by (-10)\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nstop all sounds\nrepeat (10)\n    change volume by (10)\nend\nforever\n    play sound [Axel F v] until done\nend\n\n@Level_Art\n\nwhen I receive [setup v]\nshow\ngo to x: (0) y: (0)\nset [level_x v] to [0]\nswitch costume to (grenade v)\nCreate\nhide\n\ndefine Create\nset [brightness v] effect to (15)\nset size to (200) %\nswitch costume to (nee1 v)\nset [level_y v] to [0]\nset [level_x v] to [0]\nrepeat (8)\n    create clone of (_myself_ v)\n    change [level_x v] by (542)\n    next costume\nend\n\ndefine Find Costume Number\nset [level costumes v] to [1]\nswitch costume to ((1) / (1))\nnext costume\nrepeat until <(costume [number v]) = [1]>\n    change [level costumes v] by (1)\n    next costume\nend\n\nwhen I receive [level loop v]\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)) ) > [520]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [400]>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    broadcast (Level Loop v)\nend\n\nchange [level_x v] by (480)\n\nchange [level_x v] by (480)\n\nset [level_y v] to [-150]\n\nchange [level_x v] by (540)\n\nchange [level_y v] by (-448)\n\nwhen I start as a clone\nset [brightness v] effect to (10)\n\nwait (.5) seconds\nset [brightness v] effect to (20)\nwait (.5) seconds\n\nwhen flag clicked\nbroadcast (SetUp v)\nset [scroll x min v] to [0]\nset [scroll x max v] to [3810]\nforever\n    broadcast (Level Loop v)\nend\n\nbroadcast (Teleportin v)\n\nrepeat (40)\n    change [brightness v] effect by (.2)\nend\nrepeat (40)\n    change [brightness v] effect by (-.2)\nend\n\nforever\n\nwhen flag clicked\nwait (1) seconds\nwait until <(Scroll X) > [3809]>\nbroadcast (BOSSGATE #1 v)\nrepeat (100)\n    set [scroll x min v] to [3810]\nend\n\nwhen I receive [bossgate #1 v]\nif <(costume [number v]) = [8]> then\n    switch costume to (nee7 v)\nend\n\nwhen I receive [bossgate #1 v]\nrepeat (10)\n    change [brightness v] effect by (-5)\nend\nset [scroll x min v] to [2731]\n\nwhen I receive [battle begin v]\nwait (1) seconds\nrepeat (10)\n    change [brightness v] effect by (5)\nend\n\nwhen I receive [ground shake v]\nchange [level_y v] by (5)\nwait (0) seconds\nchange [level_y v] by (-5)\nwait (0) seconds\nchange [level_y v] by (3)\nwait (0) seconds\nchange [level_y v] by (-3)\nwait (0) seconds\nchange [level_y v] by (1)\nwait (0) seconds\nchange [level_y v] by (-1)\nwait (0) seconds\n\n@ground\n\nwhen I receive [setup v]\nshow\nset size to (200) %\nclear graphic effects\ngo to x: (0) y: (0)\nset [level_x v] to [0]\nswitch costume to (costume1 v)\nCreate\nhide\n\nwhen I receive [level loop v]\nforever\n    set [ghost v] effect to (99)\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)) ) > [600]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [475]>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [setup v]\nbroadcast (GAME START v)\nforever\n    broadcast (Level Loop v)\nend\n\nrepeat (3)\n    change [level_y v] by (-416)\n    create clone of (_myself_ v)\n    next costume\nend\nswitch costume to (costume7 v)\nset [level_x v] to [1440]\nset [level_y v] to [-965]\nrepeat (4)\n    create clone of (_myself_ v)\n    next costume\n    change [level_x v] by (480)\nend\nswitch costume to (costume11 v)\nrepeat (4)\n    create clone of (_myself_ v)\n    next costume\n    change [level_y v] by (416)\nend\nchange [level_y v] by (-416)\nrepeat (9)\n    change [level_x v] by (480)\n    create clone of (_myself_ v)\n    next costume\nend\nswitch costume to (costume23 v)\nchange [level_y v] by (-416)\nchange [level_x v] by (-480)\ncreate clone of (_myself_ v)\nnext costume\nchange [level_x v] by (-480)\ncreate clone of (_myself_ v)\nnext costume\nchange [level_x v] by (480)\nset [level_y v] to [-190]\nrepeat (18)\n    change [level_x v] by (480)\n    create clone of (_myself_ v)\n    next costume\nend\nchange [level_x v] by (480)\n\nwhen I start as a clone\ngo to [front v] layer\n\nwhen I receive [fortressdoorexplosion\ v]\nif <(costume [number v]) = [8]> then\n    switch costume to (costume9 v)\nend\n\nwhen I receive [bossgate #1 v]\nif <(costume [number v]) = [8]> then\n    start sound [Mega Man 5 SFX \(15\) v]\n    switch costume to (nee7 v)\nend\n\nwhen I receive [teleportin v]\nif <(costume [number v]) = [13]> then\n    switch costume to (costume10 v)\nend\nif <(costume [number v]) = [14]> then\n    switch costume to (costume11 v)\nend\n\nwhen I receive [grenade man run v]\nif <(costume [number v]) = [13]> then\n    start sound [Mega Man 5 SFX \(15\) v]\n    switch costume to (costume10 v)\nend\nif <(costume [number v]) = [14]> then\n    switch costume to (costume11 v)\nend\n\ndefine Create\nset [brightness v] effect to (15)\nset size to (200) %\nswitch costume to (costume1 v)\nset [level_y v] to [0]\nset [level_x v] to [0]\nrepeat (8)\n    create clone of (_myself_ v)\n    change [level_x v] by (542)\n    next costume\nend\n\nwhen I receive [bossgate #1 v]\nif <(costume [number v]) = [6]> then\n    switch costume to (nee7 v)\nend\n\n@mega man\n\nwhen flag clicked\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 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 receive [die v]\nset [speed v] to [1]\n\nwhen I start as a clone\nset rotation style [left-right v]\ngo to [front v] layer\nshow\nif <(hold) = [42]> then\n    turn left (10) degrees\nelse\n    if <(hold) = [41]> then\n        turn right (10) degrees\n    end\nend\nif <(hold) = [40]> then\n    forever\n        switch costume to (shot1 v)\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n    end\nelse\n    start sound [Mega Man 5 SFX \(4\) v]\n    switch costume to (laser v)\nend\n\nwhen flag clicked\nset [sliding? v] to [0]\nset [flame sword? v] to [0]\nforever\n    if <<<(CanMove?) = [1]> and <(CLIMBING ON LADDER) = [0]>> and <<key (space v) pressed?> or <mouse down?>>> then\n        if <(SLIDING?) = [0]> then\n            if <(BLADE ?) = [1]> then\n                start sound [Mega Man 6 SRX \(55\) v]\n                if <([falling? v] of [hitbox v]) > [1]> then\n                    broadcast (BLADE ATTACK MIDAIR v)\n                else\n                    broadcast (BLADE ATTACK v)\n                end\n                wait (.5) seconds\n            else\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                        start sound [Mega Man 5 SFX \(12\) v]\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                    if <(SLIDING?) = [0]> then\n                        create clone of (_myself_ v)\n                        start sound [Mega Man 5 SFX \(21\) v]\n                    end\n                else\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]\nif <(animations: editmode>2) = [1]> then\n    set [speed v] to [28]\nelse\n    set [speed v] to [3]\nend\n\nwhen flag clicked\nforever\n    if <<key (space v) pressed?> or <mouse down?>> then\n        set [animations: using gun?2 v] to [1]\n    else\n        set [animations: using gun?2 v] to [0]\n    end\nend\n\ndefine Do (what?)\nif <<(CanMove?) = [1]> and <(SLIDING?) = [0]>> then\n    if <(BLADE ?) = [1]> then\n        if <(what?) = [Walk]> then\n            if <not <(dead:) = [1]>> then\n                if <(SLIDING?) = [0]> then\n                    switch costume to (costume11 v)\n                end\n                repeat (3)\n                    if <([falling? v] of [hitbox v]) > [1]> then\n                        if <(animations: using gun?2) = [1]> then\n                            if <(SLIDING?) = [0]> then\n                                switch costume to (costume4 v)\n                            end\n                        else\n                            if <(SLIDING?) = [0]> then\n                                switch costume to (costume9 v)\n                            end\n                        end\n                    else\n                        wait (.1) seconds\n                        if <(SLIDING?) = [0]> then\n                            next costume\n                        end\n                    end\n                end\n                wait (.1) seconds\n            end\n        end\n        if <(what?) = [GunRun]> then\n            if <not <(dead:) = [1]>> then\n                if <(SLIDING?) = [0]> then\n                    switch costume to (costume2 v)\n                end\n                repeat (3)\n                    if <([falling? v] of [hitbox v]) > [1]> then\n                        if <(animations: using gun?2) = [1]> then\n                            if <(SLIDING?) = [0]> then\n                                switch costume to (costume4 v)\n                            end\n                        else\n                            if <(SLIDING?) = [0]> then\n                                switch costume to (costume9 v)\n                            end\n                        end\n                    else\n                        wait (.1) seconds\n                        if <(SLIDING?) = [0]> then\n                            next costume\n                        end\n                    end\n                end\n                wait (.1) seconds\n            end\n        end\n    else\n        if <(what?) = [Walk]> then\n            if <not <(dead:) = [1]>> then\n                if <(SLIDING?) = [0]> then\n                    switch costume to (run1 v)\n                end\n                repeat (3)\n                    if <([falling? v] of [hitbox v]) > [1]> then\n                        if <(animations: using gun?2) = [1]> then\n                            if <(SLIDING?) = [0]> then\n                                switch costume to (jumpgun v)\n                            end\n                        else\n                            if <(SLIDING?) = [0]> then\n                                switch costume to (jump v)\n                            end\n                        end\n                    else\n                        wait (.1) seconds\n                        if <(SLIDING?) = [0]> then\n                            next costume\n                        end\n                    end\n                end\n                wait (.1) seconds\n            end\n        end\n        if <(what?) = [GunRun]> then\n            if <not <(dead:) = [1]>> then\n                if <(SLIDING?) = [0]> then\n                    switch costume to (gunrun1 v)\n                end\n                repeat (3)\n                    if <([falling? v] of [hitbox v]) > [1]> then\n                        if <(animations: using gun?2) = [1]> then\n                            if <(SLIDING?) = [0]> then\n                                switch costume to (j2 v)\n                            end\n                        else\n                            if <(SLIDING?) = [0]> then\n                                switch costume to (j v)\n                            end\n                        end\n                    else\n                        wait (.1) seconds\n                        if <(SLIDING?) = [0]> then\n                            next costume\n                        end\n                    end\n                end\n                wait (.1) seconds\n            end\n        end\n    end\nend\n\nwhen I start as a clone\n\nwhen flag clicked\nset rotation style [left-right v]\nforever\n    if <(getting ouched ?) = [1]> then\n        if <(BLADE ?) = [1]> then\n            switch costume to (costume8 v)\n        else\n            switch costume to (takedmg v)\n        end\n    else\n        if <(SLIDING?) = [1]> then\n            if <(BLADE ?) = [1]> then\n                switch costume to (costume14 v)\n            else\n                switch costume to (swipe v)\n            end\n        else\n            if <(CanMove?) = [1]> then\n                if <([falling? v] of [hitbox v]) > [1]> then\n                    if <(animations: using gun?2) = [1]> then\n                        if <(SLIDING?) = [0]> then\n                            if <(BLADE ?) = [1]> then\n                                switch costume to (costume4 v)\n                            else\n                                switch costume to (jumpgun v)\n                            end\n                        end\n                    else\n                        if <(SLIDING?) = [0]> then\n                            if <(BLADE ?) = [1]> then\n                                switch costume to (costume9 v)\n                            else\n                                switch costume to (jump v)\n                            end\n                        end\n                    end\n                else\n                    if <<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(x position) < (mouse x)>>>> or <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(mouse x) < (x position)>>>>> then\n                        if <(animations: using gun?2) = [1]> then\n                            if <(SLIDING?) = [0]> then\n                                Do [GunRun]\n                            end\n                        else\n                            if <(SLIDING?) = [0]> then\n                                Do [Walk]\n                            end\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                                    if <(BLADE ?) = [1]> then\n                                        switch costume to (costume7 v)\n                                    else\n                                        switch costume to (idlegun v)\n                                    end\n                                end\n                            else\n                                if <(SLIDING?) = [0]> then\n                                    if <(BLADE ?) = [1]> then\n                                        switch costume to (costume1 v)\n                                    else\n                                        switch costume to (idle v)\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nswitch costume to (jumpgun v)\n\nwhen I receive [jumphigh v]\nchange [speed y v] by (50)\n\nwhen I receive [intro over v]\nrepeat (10)\n    show\nend\n\nwhen I receive [jumpup v]\nchange [speed y v] by (30)\n\nwhen I start as a clone\nif <not <(costume [number v]) = [24]>> then\n    repeat until <touching (_edge_ v)?>\n        move (20) steps\n    end\n    delete this clone\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)\n\nwhen flag clicked\nset [section at v] to [1]\n\nwhen I start as a clone\nforever\n    show\nend\n\nwhen flag clicked\nset volume to (100) %\nswitch costume to (idle v)\nset size to (200) %\nclear graphic effects\nset [falling v] to [0]\nset [speed y v] to [0]\nset [canmove? v] to [0]\nset [holding? v] to [0]\nset [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) %\n\nwhen I receive [die v]\nset [canmove? v] to [0]\nhide\ndeath\nwait (1) seconds\nswitch costume to (idle v)\nbroadcast (Teleportin v)\n\nwhen I start as a clone\nwait until <touching (_edge_ v)?>\ndelete this clone\n\nwhen I receive [take dmg v]\nstart sound [Mega Man 5 SFX \(6\) v]\nset [takingdmg v] to [1]\nset [canmove? v] to [0]\nset [getting ouched ? v] to [1]\nrepeat (4)\n    set [ghost v] effect to (100)\n    wait (.05) seconds\n    if <touching (ghost wall v)?> then\n        set [ghost v] effect to (50)\n    else\n        set [ghost mode? v] to [0]\n        set [ghost v] effect to (0)\n    end\n    wait (.05) seconds\nend\nset [getting ouched ? v] to [0]\nset [canmove? v] to [1]\nset [takingdmg v] to [0]\n\nwhen flag clicked\nset [getting ouched ? v] to [0]\nset [takingdmg v] to [0]\n\nwhen I receive [blink v]\nrepeat (3)\n    set [ghost v] effect to (100)\n    wait (.05) seconds\n    if <<touching (ghost wall v)?> and <(GHOST MODE?) = [1]>> then\n        set [ghost v] effect to (50)\n    else\n        set [ghost mode? v] to [0]\n        set [ghost v] effect to (0)\n    end\n    wait (.05) seconds\nend\n\nwhen I receive [teleportin v]\nhide\nwait (.1) seconds\nset [canmove? v] to [0]\ngo to [front v] layer\nswitch costume to (break v)\nchange y by (200)\nshow\nrepeat (20)\n    change y by (-10)\nend\nbroadcast (blink v)\nset [canmove? v] to [1]\nstart sound [Mega Man 5 SFX \(2\)2 v]\nchange [scroll x v] by (-15)\n\nmove (10) steps\n\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\nwhen I receive [teleportin v]\nshow\n\nwhen flag clicked\nhide\n\nwhen I receive [heal v]\nrepeat (3)\n    set [ghost v] effect to (100)\n    wait (.1) seconds\n    set [ghost v] effect to (0)\n    wait (.1) seconds\nend\n\nwhen I receive [teleportin v]\nclear graphic effects\n\nwhen I receive [bossgate #1 v]\nset [canmove? v] to [0]\nrepeat (10)\n    switch costume to (idle v)\nend\n\nwhen I receive [grenade man flee v]\nset [canmove? v] to [1]\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 [ghost man fight v]\nset [canmove? v] to [0]\n\nwhen I receive [battle begin v]\nset [canmove? v] to [1]\n\nwhen I receive [kill v]\nset [canmove? v] to [0]\n\nwhen I receive [kill v]\nwait (1) seconds\nstop [other scripts in sprite v]\nwait (3) seconds\nswitch costume to (jump v)\nglide (.25) secs to x: (0) y: (50)\nrepeat until <touching (ground v)?>\n    change y by (-10)\nend\nstart sound [Mega Man II - Victory v]\nswitch costume to (idle v)\nset y to (-87)\nwait (7) seconds\nswitch costume to (jump v)\nglide (.25) secs to x: (0) y: (50)\nwait (.5) seconds\nswitch costume to (break v)\nstart sound [Mega Man 5 SFX \(31\) v]\nrepeat until <touching (_edge_ v)?>\n    change y by (10)\nend\nbroadcast (yay v)\nhide\n\nwhen flag clicked\nset [flame sword? v] to [0]\n\nwhen flag clicked\nforever\n    if <(SLIDING?) = [1]> then\n        if <(BLADE ?) = [1]> then\n            switch costume to (costume14 v)\n        else\n            switch costume to (swipe v)\n        end\n    end\nend\n\ncreate clone of (_myself_ v)\n\nwhen I receive [bossgate #1 v]\nwait (1) seconds\npoint in direction (90)\nswitch costume to (idlegun v)\nrepeat (3)\n    wait (.25) seconds\n    point in direction (-90)\n    wait (.25) seconds\n    point in direction (90)\nend\n\nwhen I receive [you win v]\nstop [other scripts in sprite v]\nglide (.5) secs to x: (x position) y: (-121)\nwait (1) seconds\nswitch costume to (idle v)\nstart sound [Mega Man II - Victory v]\ndelete this clone\n\nwhen flag clicked\nset [health v] to [1]\nset [health v] to [1]\n\n@hitbox\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)?> or <<touching (ghost wall v)?> and <(GHOST MODE?) = [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\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 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 [-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]\ngo to x: (-999) y: (-999)\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\ndefine Tick <<> <^> <>>\nif <(CanMove?) = [1]> then\n    if <(CLIMBING ON LADDER) = [0]> then\n        if <<(Flying Hacks?) = [1]> and <<<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 <not <(speed y) > [3]>> then\n                change [speed y v] by (-.1)\n            end\n            change y by (speed y)\n        else\n            if <(FLAME SWORD?) = [0]> then\n                change [speed y v] by (-1.5)\n                change y by (speed y)\n            end\n        end\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    if <(FLAME SWORD?) = [0]> then\n        Walk (direction) ((speed x) * (1))\n    end\n    if <(FLAME SWORD?) = [0]> then\n        change y by (speed y)\n    end\n    Touch Ground <(speed y) > [0]>\n    if <<^> and <(falling?) < [3]>> then\n        if <(FLAME SWORD?) = [0]> then\n            set [speed y v] to [10]\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 <(CLIMBING ON LADDER) = [0]> then\n            change [speed y v] by (-2)\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 <(FLAME SWORD?) = [0]> then\n            if <(falling?) < [3]> then\n                set [speed y v] to [13]\n            end\n        else\n            set [speed y v] to [0]\n        end\n    else\n        if <(FLAME SWORD?) = [0]> then\n            change [speed y v] by (-2)\n        end\n    end\nend\n\ndefine Touch Ground <up?>\nchange [falling? v] by (1)\nrepeat until <not <<touching (ground v)?> or <<touching (ghost wall v)?> and <(GHOST MODE?) = [0]>>>>\n    if <up?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [falling? v] to [0]\n    end\n    set [speed y v] to [0]\nend\n\nwhen I receive [die v]\nset [canmove? v] to [0]\n\ndefine Touch Ground <up?>\n\ngo to x: (-172) y: (-81)\n\nchange x by (1)\n\nwhen flag clicked\n\nwhen flag clicked\n\nwhen I receive [knockback v]\nif <(direction) = [90]> then\n    repeat (3)\n        Walk [90] [-15]\n    end\n    repeat (3)\n        Walk [90] [-8]\n    end\nelse\n    repeat (3)\n        Walk [90] [15]\n    end\n    repeat (3)\n        Walk [90] [8]\n    end\nend\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 I receive [teleportin v]\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 [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\nbroadcast (Teleportin v)\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]\nhide\nwait (.1) seconds\nif <(CHECKPOINT #) = [1]> then\n    set [scroll y v] to [-920]\nelse\n    if <(FIGHTSTART?) = [1]> then\n        set [scroll y v] to [3810]\n    else\n        set [scroll y v] to [0]\n    end\nend\nset [speed y v] to [10]\nrepeat (5)\n    if <(FIGHTSTART?) = [1]> then\n        set [scroll x v] to [3810]\n    else\n        set [scroll x v] to [0]\n    end\nend\nset [canmove? v] to [0]\ngo to [front v] layer\nchange y by (300)\nset [ghost v] effect to (100)\nshow\nrepeat (1)\n    change y by (-20)\nend\nrepeat until <<touching (ground v)?> or <touching (ghost wall v)?>>\n    change y by (-15)\nend\nset x to (0)\nchange y by (0)\nset y to (10)\nstart sound [Mega Man 5 SFX \(21\) v]\nwait (.1) seconds\nset [canmove? v] to [1]\n\nbroadcast (Teleportin v)\n\nbroadcast (Teleportin v)\n\nwhen flag clicked\nset [sliding? v] to [0]\n\nwhen flag clicked\nforever\n    if <(SLIDING?) = [1]> then\n        switch costume to (idle2 v)\n    else\n        switch costume to (idle v)\n    end\nend\n\nwhen flag clicked\nset [sliding? v] to [0]\nset [slide time v] to [0]\nforever\n    if <(slide time) > [13]> then\n        set [sliding? v] to [0]\n    end\n    if <not <<<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 <(slide time) > [0]> then\n            change [slide time v] by (-1)\n            set [sliding? v] to [0]\n        end\n    end\nend\n\nwhen I receive [bossgate #1 v]\nset [canmove? v] to [0]\nset y to (-109)\n\nwhen I receive [grenade man flee v]\nset [canmove? v] to [1]\n\nwhen I receive [moveplatform v]\nchange x by (5)\n\nwhen I receive [moveplatformup v]\nchange y by (5)\n\nwhen I receive [battle begin v]\nset [canmove? v] to [1]\n\nwhen I receive [ghost man fight v]\nset [canmove? v] to [0]\n\nwhen I receive [kill v]\nset [canmove? v] to [0]\n\nset [speed y v] to [5]\n\nset [speed y v] to [10]\n\nwhen flag clicked\nset [fightstart? v] to [0]\n\nwait (1) seconds\nforever\n    wait until <(FLAME SWORD?) = [1]>\n    set [canmove? v] to [0]\n    wait until <(FLAME SWORD?) = [0]>\n    set [canmove? v] to [1]\nend\n\nif <(CHECKPOINT #) = [2]> then\n    set [scroll x v] to [5100]\nelse\n    if <(CHECKPOINT #) = [1]> then\n        set [scroll x v] to [4100]\n        set [scroll y v] to [-2300]\n    end\nend\n\nwhen I receive [slide v]\nif <(falling?) < [3]> then\n    start sound [Mega Man 6 SRX \(9\) v]\n    repeat (10)\n        set [canmove? v] to [0]\n        set [sliding? v] to [1]\n        if <(direction) = [90]> then\n            Walk (direction) [15]\n        else\n            Walk (direction) [-15]\n        end\n    end\n    set [canmove? v] to [1]\n    set [sliding? v] to [0]\nend\nwait (1) seconds\n\nwhen I receive [you win v]\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 [bossgate #1 v]\nif <(FIGHTSTART?) = [1]> then\nbroadcast (bATTLE begin v)\nset [fightstart? v] to [1]\nset [transition v] to [0]\nrepeat (10)\n    change x by (-50)\nend\nhide\n\nwhen flag clicked\nwait (10) seconds\nset [ghost v] effect to (5)\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 (2)\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\nnext costume\ncreate clone of (_myself_ v)\nrepeat (15)\n    wait (.02) seconds\n    start sound [light v]\nend\nwait (2) seconds\nnext costume\ncreate clone of (_myself_ v)\nrepeat (5)\n    wait (.02) seconds\n    start sound [Mega Man 6 SRX \(40\)2 v]\nend\nwait (2) seconds\nrepeat (10)\n    change x by (-50)\nend\nhide\n\nwhen I receive [you win v]\nwait (6) seconds\nset [ghost v] effect to (5)\ngo to x: (-550) y: (121)\ngo to [front v] layer\nswitch costume to (yayayaya v)\nshow\nrepeat (10)\n    change x by (50)\nend\nnext costume\ncreate clone of (_myself_ v)\nrepeat (22)\n    wait (.02) seconds\n    start sound [light 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\nnext costume\ncreate clone of (_myself_ v)\nrepeat (5)\n    wait (.02) seconds\n    start sound [light v]\nend\nwait (2) seconds\nnext costume\ncreate clone of (_myself_ v)\nrepeat (5)\n    wait (.02) seconds\n    start sound [Mega Man 6 SRX \(40\)2 v]\nend\nwait (.2) seconds\nrepeat (5)\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 (5)\n    wait (.02) seconds\n    start sound [Mega Man 6 SRX \(40\)2 v]\nend\nwait (.2) seconds\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 (7)\n    wait (.02) seconds\n    start sound [light v]\nend\nwait (2) seconds\nrepeat (10)\n    change x by (-50)\nend\nhide\nbroadcast (END v)\n\n@ready\n\nwhen flag clicked\nset [scroll x v] to [0]\nhide\nwait (5) seconds\ngo to x: (0) y: (0)\ngo to [front v] layer\nswitch costume to (costume1 v)\nrepeat (3)\n    show\n    wait (.3) seconds\n    hide\n    wait (.3) seconds\nend\nbroadcast (Teleportin v)\n\n@Projectiles\n\nwhen flag clicked\nset size to (200) %\nhide\n\nwhen I receive [create projectile v]\nif <(clone) = [0]> then\n    clear graphic effects\n    switch costume to (PROJECTILE NAME)\n    set [level_x v] to (PROJ X)\n    set [level_y v] to (PROJ Y)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nset [clone v] to [1]\nshow\n\nwhen I start as a clone\nset [clone v] to [1]\nset [blow up v] to [0]\ngo to [front v] layer\nif <(costume [number v]) = [35]> then\n    start sound [Mega Man 5 SFX \(11\) v]\n    point in direction (PROJ DIRECTION)\n    set rotation style [all around v]\n    if <(direction) = [90]> then\n        repeat until <(direction) = [180]>\n            set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (15)))\n            set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (15)))\n            if <((x position) + (0)) > ([x position v] of [hitbox v])> then\n                point in direction (180)\n            end\n        end\n    else\n        repeat until <(direction) = [180]>\n            set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (15)))\n            set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (15)))\n            if <((x position) + (0)) < ([x position v] of [hitbox v])> then\n                point in direction (180)\n            end\n        end\n    end\n    repeat until <<touching (ground v)?> or <(y position) < [-150]>>\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (15)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (15)))\n    end\n    if <touching (hitbox v)?> then\n        change [health v] by (1)\n        broadcast (TAKE DMG v)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [9]> then\n    start sound [Mega Man 5 SFX \(11\) v]\n    go to [front v] layer\n    point in direction (90)\n    set rotation style [left-right v]\n    repeat (2)\n        wait (.1) seconds\n        next costume\n    end\n    wait (.1) seconds\n    delete this clone\nend\nif <(costume [number v]) = [36]> then\n    start sound [Mega Man 6 SRX \(6\) v]\n    point in direction (PROJ DIRECTION)\n    set rotation style [left-right v]\n    repeat until <<touching (ground v)?> or <touching (hitbox v)?>>\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (14)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (14)))\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\nif <(costume [number v]) = [27]> then\n    start sound [Mega Man 5 SFX \(11\)2 v]\n    point in direction (PROJ DIRECTION)\n    set rotation style [left-right v]\n    repeat until <<touching (ground v)?> or <touching (hitbox v)?>>\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (7)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (7)))\n    end\n    set [blow up v] to [1]\n    if <touching (hitbox v)?> then\n        change [health v] by (1)\n        broadcast (TAKE DMG v)\n    end\nend\nif <(costume [number v]) = [16]> then\n    set rotation style [left-right v]\n    repeat (5)\n        point towards (hitbox v)\n    end\n    repeat until <<touching (ground v)?> or <touching (hitbox v)?>>\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (5)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (5)))\n    end\n    set [blow up v] to [1]\n    if <touching (hitbox v)?> then\n        change [health v] by (2)\n        broadcast (TAKE DMG v)\n    end\nend\nif <(costume [number v]) = [39]> then\n    point in direction (PROJ DIRECTION)\n    start sound [Mega Man 5 SFX \(50\) v]\n    set rotation style [all around v]\n    repeat until <<touching (_edge_ v)?> or <touching (hitbox v)?>>\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (9)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (9)))\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\nif <(costume [number v]) = [37]> then\n    point in direction (PROJ DIRECTION)\n    set rotation style [all around v]\n    start sound [Mega Man 5 SFX \(11\)2 v]\n    repeat until <<touching (_edge_ v)?> or <touching (hitbox v)?>>\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (10)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (10)))\n    end\n    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]) = [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]) = [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 (PROJ DIRECTION)\n    set rotation style [all around v]\n    start sound [misseis-magicos v]\n    repeat (20)\n        change [y v] by (.4)\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 <(direction) > [0]> then\n        repeat (10)\n            turn right (15) degrees\n            change [y v] by (.4)\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    else\n        repeat (10)\n            turn right (-15) degrees\n            change [y v] by (.4)\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    end\n    repeat until <<touching (ground v)?> or <touching (hitbox v)?>>\n        change [y v] by (.4)\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    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 (hitbox v)?>\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (8)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (8)))\n    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\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    point in direction (PROJ DIRECTION)\n    set rotation style [left-right 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 (1)\n        broadcast (TAKE DMG v)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [15]> then\n    point in direction (PROJ DIRECTION)\n    set rotation style [left-right v]\n    repeat until <touching (hitbox v)?>\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (10)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (10)))\n    end\n    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]) = [5]> then\n    point in direction (PROJ DIRECTION)\n    set rotation style [left-right v]\n    repeat until <touching (hitbox v)?>\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (10)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (10)))\n    end\n    if <touching (hitbox v)?> then\n        change [health v] by (1)\n        broadcast (TAKE DMG v)\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\nchange y by (-5)\n\nwhen I start as a clone\nset [internal timer v] to [0]\nrepeat until <(internal timer) > [3]>\n    wait (1) seconds\n    change [internal timer v] by (1)\nend\ndelete this clone\n\nwhen I start as a clone\nif <(costume [number v]) = [39]> then\n    forever\n        switch costume to (spark v)\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n    end\nend\nif <(costume [number v]) = [37]> then\n    forever\n        switch costume to (spark shot v)\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n    end\nend\nif <(costume [number v]) = [16]> then\n    wait (.05) seconds\n    repeat until <(blow up) = [1]>\n        switch costume to (bomb v)\n        repeat (2)\n            wait (.1) seconds\n            next costume\n        end\n        wait (.1) seconds\n    end\n    switch costume to (exp1 v)\n    start sound [Mega Man 5 SFX \(11\)2 v]\n    repeat (7)\n        wait (.01) seconds\n        next costume\n    end\n    delete this clone\nend\nif <(costume [number v]) = [27]> then\n    wait (.05) seconds\n    repeat until <(blow up) = [1]>\n        switch costume to (grenade v)\n        repeat (7)\n            wait (.02) seconds\n            next costume\n        end\n        wait (.02) seconds\n    end\n    switch costume to (expl1 v)\n    start sound [Mega Man 5 SFX \(11\) v]\n    repeat (2)\n        wait (.01) seconds\n        next costume\n    end\n    delete this clone\nend\n\nwhen I receive [teleportin v]\ndelete this clone\n\n@Robot Masters\n\nwhen flag clicked\nset [fightstart? v] to [0]\nhide\n\nwhen I start as a clone\nset rotation style [left-right v]\nshow\nif <(costume [number v]) = [1]> then\n    if <(FIGHTSTART?) = [1]> then\n        hide\n        wait (.02) seconds\n        show\n        set [robot master hp v] to [15]\n        point in direction (90)\n        go to x: (184) y: (194)\n        switch costume to (mag4 v)\n        repeat (8)\n            change y by (-35)\n        end\n        change y by (-30)\n        switch costume to (mag1 v)\n        repeat until <(ROBOT MASTER HP) < [1]>\n            switch costume to (mag4 v)\n            set [y v] to [0]\n            repeat (4)\n                change [y v] by (5)\n                if <(x position) < [-195]> then\n                    turn right (180) degrees\n                    move (-8) steps\n                else\n                    if <(x position) > [199]> then\n                        turn right (180) degrees\n                        move (-8) steps\n                    end\n                end\n                change y by (y)\n                move (-8) steps\n            end\n            repeat (8)\n                change [y v] by (-5)\n                if <(x position) < [-195]> then\n                    turn right (180) degrees\n                    move (-8) steps\n                else\n                    if <(x position) > [199]> then\n                        turn right (180) degrees\n                        move (-8) steps\n                    end\n                end\n                change y by (y)\n                move (-8) steps\n            end\n            set [y v] to [0]\n            set y to (-116)\n            repeat (4)\n                change [y v] by (8)\n                if <(x position) < [-195]> then\n                    turn right (180) degrees\n                    move (-8) steps\n                else\n                    if <(x position) > [199]> then\n                        turn right (180) degrees\n                        move (-8) steps\n                    end\n                end\n                change y by (y)\n                move (-8) steps\n            end\n            repeat (8)\n                change [y v] by (-8)\n                if <(x position) < [-195]> then\n                    turn right (180) degrees\n                    move (-8) steps\n                else\n                    if <(x position) > [199]> then\n                        turn right (180) degrees\n                        move (-8) steps\n                    end\n                end\n                change y by (y)\n                move (-8) steps\n            end\n            set [y v] to [0]\n            set y to (-116)\n            repeat (5)\n                change [y v] by (8)\n                if <(x position) < [-195]> then\n                    turn right (180) degrees\n                    move (-8) steps\n                else\n                    if <(x position) > [199]> then\n                        turn right (180) degrees\n                        move (-8) steps\n                    end\n                end\n                change y by (y)\n                move (-8) steps\n            end\n            repeat (5)\n                change [y v] by (-8)\n                if <(x position) < [-195]> then\n                    turn right (180) degrees\n                    move (-8) steps\n                else\n                    if <(x position) > [199]> then\n                        turn right (180) degrees\n                        move (-8) steps\n                    end\n                end\n                change y by (y)\n                move (-8) steps\n            end\n            switch costume to (mag4 v)\n            wait (.2) seconds\n            switch costume to (mag5 v)\n            repeat (3)\n                wait (.2) seconds\n                if <(x position) > ([x position v] of [hitbox v])> then\n                    point in direction (90)\n                else\n                    point in direction (-90)\n                end\n                set [proj x v] to ((x position) + (3810))\n                set [proj y v] to (y position)\n                set [proj direction v] to ((direction) * (-1))\n                set [projectile name v] to [magnet]\n                broadcast (CREATE PROJECTILE v)\n            end\n            wait (1) seconds\n            switch costume to (mag2 v)\n            set [y v] to [0]\n            repeat (5)\n                change [y v] by (-8)\n                if <(x position) < [-195]> then\n                    turn right (180) degrees\n                    move (-8) steps\n                else\n                    if <(x position) > [199]> then\n                        turn right (180) degrees\n                        move (-8) steps\n                    end\n                end\n                change y by (y)\n            end\n            set [y v] to [0]\n            set y to (-116)\n        end\n    else\n        point in direction (90)\n        go to x: (184) y: (194)\n        switch costume to (mag4 v)\n        repeat (8)\n            change y by (-35)\n        end\n        change y by (-30)\n        switch costume to (mag1 v)\n        repeat (3)\n            point in direction (-90)\n            wait (.25) seconds\n            switch costume to (mag3 v)\n            wait (.25) seconds\n            switch costume to (mag1 v)\n            point in direction (90)\n            wait (.25) seconds\n            switch costume to (mag3 v)\n            wait (.25) seconds\n            switch costume to (mag1 v)\n        end\n    end\nend\nif <(costume [number v]) = [6]> then\n    if <(FIGHTSTART?) = [1]> then\n        hide\n        wait (.02) seconds\n        go to x: (160) y: (201)\n        show\n        set [robot master hp v] to [15]\n        point in direction (90)\n        switch costume to (hard3 v)\n        repeat (8)\n            change y by (-35)\n        end\n        change y by (-25)\n        repeat until <(ROBOT MASTER HP) < [1]>\n            point towards (hitbox v)\n            turn right (180) degrees\n            repeat (2)\n                switch costume to (hard1 v)\n                wait (.2) seconds\n                switch costume to (hard2 v)\n                wait (.2) seconds\n            end\n            start sound [spring v]\n            switch costume to (hard3 v)\n            glide (.5) secs to x: ([x position v] of [mega man v]) y: (109)\n            switch costume to (hard4 v)\n            wait (.1) seconds\n            wait (.1) seconds\n            repeat until <(y position) < [-112]>\n                change y by (-50)\n            end\n            switch costume to (hard6 v)\n            set y to (-120)\n            start sound [super-stomp v]\n            broadcast (ground shake v)\n            wait (.5) seconds\n            switch costume to (hard5 v)\n            wait (.1) seconds\n            switch costume to (hard4 v)\n            switch costume to (hard5 v)\n            set y to (-108)\n        end\n    else\n        go to x: (103) y: (194)\n        switch costume to (hard3 v)\n        point in direction (90)\n        switch costume to (hard1 v)\n        repeat (8)\n            change y by (-35)\n        end\n        change y by (-20)\n        switch costume to (hard1 v)\n        repeat (3)\n            point in direction (-90)\n            wait (.25) seconds\n            switch costume to (hard2 v)\n            wait (.25) seconds\n            switch costume to (hard1 v)\n            point in direction (90)\n            wait (.25) seconds\n            switch costume to (hard2 v)\n            wait (.25) seconds\n            switch costume to (hard1 v)\n        end\n    end\nend\nif <(costume [number v]) = [12]> then\n    if <(FIGHTSTART?) = [1]> then\n        hide\n        wait (.02) seconds\n        go to x: (160) y: (201)\n        show\n        set [robot master hp v] to [15]\n        point in direction (90)\n        switch costume to (needle2 v)\n        repeat (8)\n            change y by (-35)\n        end\n        change y by (-30)\n        switch costume to (needle1 v)\n        repeat until <(ROBOT MASTER HP) < [1]>\n            switch costume to (needle1 v)\n            wait (.25) seconds\n            point towards (hitbox v)\n            turn right (180) degrees\n            switch costume to (needl36 v)\n            set [proj x v] to ((x position) + (3810))\n            set [proj y v] to (y position)\n            set [proj direction v] to ((direction) + (180))\n            set [projectile name v] to [needle]\n            broadcast (CREATE PROJECTILE v)\n            wait (.02) seconds\n            switch costume to (needl36 v)\n            set [proj x v] to ((x position) + (3810))\n            set [proj y v] to (y position)\n            set [proj direction v] to (((direction) + (180)) + (25))\n            set [projectile name v] to [needle]\n            broadcast (CREATE PROJECTILE v)\n            wait (.02) seconds\n            switch costume to (needl36 v)\n            set [proj x v] to ((x position) + (3810))\n            set [proj y v] to (y position)\n            set [proj direction v] to (((direction) + (180)) + (-25))\n            set [projectile name v] to [needle]\n            broadcast (CREATE PROJECTILE v)\n            wait (1) seconds\n            switch costume to (needle2 v)\n            set [y v] to [0]\n            repeat (6)\n                change [y v] by (5)\n                if <(x position) < [-195]> then\n                    turn right (180) degrees\n                    move (-10) steps\n                else\n                    if <(x position) > [199]> then\n                        turn right (180) degrees\n                        move (-10) steps\n                    end\n                end\n                change y by (y)\n                move (-10) steps\n            end\n            repeat (6)\n                change [y v] by (-5)\n                if <(x position) < [-195]> then\n                    turn right (180) degrees\n                    move (-10) steps\n                else\n                    if <(x position) > [199]> then\n                        turn right (180) degrees\n                        move (-10) steps\n                    end\n                end\n                change y by (y)\n                move (-10) steps\n            end\n            repeat (3)\n                point towards (hitbox v)\n                turn right (180) degrees\n                switch costume to (needl36 v)\n                set [proj x v] to ((x position) + (3810))\n                set [proj y v] to (y position)\n                set [proj direction v] to ((direction) + (180))\n                set [projectile name v] to [needle]\n                broadcast (CREATE PROJECTILE v)\n                switch costume to (needle3 v)\n                wait (.1) seconds\n                switch costume to (needle4 v)\n                wait (.1) seconds\n            end\n            set [y v] to [0]\n            repeat (5)\n                change [y v] by (-4)\n                if <(x position) < [-195]> then\n                    turn right (180) degrees\n                    move (-8) steps\n                else\n                    if <(x position) > [199]> then\n                        turn right (180) degrees\n                        move (-8) steps\n                    end\n                end\n                change y by (y)\n                move (-8) steps\n            end\n            set [y v] to [0]\n            set y to (-110)\n        end\n    else\n        switch costume to (needle2 v)\n        go to x: (-175) y: (194)\n        point in direction (-90)\n        repeat (8)\n            change y by (-35)\n        end\n        change y by (-25)\n        switch costume to (needle1 v)\n        repeat (3)\n            point in direction (90)\n            wait (.25) seconds\n            switch costume to (needl36 v)\n            wait (.25) seconds\n            switch costume to (needle1 v)\n            point in direction (-90)\n            wait (.25) seconds\n            switch costume to (needl36 v)\n            wait (.25) seconds\n            switch costume to (needle1 v)\n        end\n    end\nend\nif <(costume [number v]) = [17]> then\n    if <(FIGHTSTART?) = [1]> then\n        hide\n        wait (.02) seconds\n        go to x: (160) y: (201)\n        show\n        set [robot master hp v] to [15]\n        point in direction (90)\n        switch costume to (mm3_sparkman9 v)\n        repeat (8)\n            change y by (-35)\n        end\n        change y by (-30)\n        switch costume to (mm3_sparkman v)\n        wait (.5) seconds\n        repeat until <(ROBOT MASTER HP) < [1]>\n            switch costume to (mm3_sparkman v)\n            repeat (6)\n                wait (.1) seconds\n                next costume\n                point towards (hitbox v)\n                turn right (180) degrees\n            end\n            set [proj x v] to ((x position) + (3810))\n            set [proj y v] to (y position)\n            set [proj direction v] to ((direction) + (180))\n            set [projectile name v] to [spark shot]\n            broadcast (CREATE PROJECTILE v)\n            wait (.2) seconds\n            switch costume to (mm3_sparkman9 v)\n            set [y v] to [0]\n            repeat (6)\n                change [y v] by (5)\n                if <(x position) < [-195]> then\n                    turn right (180) degrees\n                    move (-10) steps\n                else\n                    if <(x position) > [199]> then\n                        turn right (180) degrees\n                        move (-10) steps\n                    end\n                end\n                change y by (y)\n                move (-10) steps\n            end\n            repeat (14)\n                change [y v] by (-5)\n                if <(x position) < [-195]> then\n                    turn right (180) degrees\n                    move (-10) steps\n                else\n                    if <(x position) > [199]> then\n                        turn right (180) degrees\n                        move (-10) steps\n                    end\n                end\n                change y by (y)\n                move (-10) steps\n            end\n            set y to (-113)\n            switch costume to (mm3_sparkman8 v)\n            wait (.1) seconds\n            switch costume to (mm3_sparkman2 v)\n            wait (.1) seconds\n            point towards (hitbox v)\n            turn right (180) degrees\n            set [proj x v] to ((x position) + (3810))\n            set [proj y v] to (y position)\n            set [proj direction v] to ((direction) + (0))\n            set [projectile name v] to [spark]\n            broadcast (CREATE PROJECTILE v)\n            wait (.02) seconds\n            set [proj x v] to ((x position) + (3810))\n            set [proj y v] to (y position)\n            set [proj direction v] to ((direction) + (180))\n            set [projectile name v] to [spark]\n            broadcast (CREATE PROJECTILE v)\n            wait (.02) seconds\n            set [proj x v] to ((x position) + (3810))\n            set [proj y v] to (y position)\n            set [proj direction v] to ((direction) + (90))\n            set [projectile name v] to [spark]\n            broadcast (CREATE PROJECTILE v)\n            wait (.02) seconds\n            set [proj x v] to ((x position) + (3810))\n            set [proj y v] to (y position)\n            set [proj direction v] to ((direction) + (-90))\n            set [projectile name v] to [spark]\n            broadcast (CREATE PROJECTILE v)\n            wait (.02) seconds\n        end\n    else\n        switch costume to (mm3_sparkman9 v)\n        go to x: (-103) y: (194)\n        point in direction (-90)\n        repeat (8)\n            change y by (-35)\n        end\n        change y by (-25)\n        switch costume to (mm3_sparkman v)\n        repeat (3)\n            point in direction (90)\n            wait (.25) seconds\n            switch costume to (mm3_sparkman2 v)\n            wait (.25) seconds\n            switch costume to (mm3_sparkman v)\n            point in direction (-90)\n            wait (.25) seconds\n            switch costume to (mm3_sparkman2 v)\n            wait (.25) seconds\n            switch costume to (mm3_sparkman v)\n        end\n    end\nend\n\nwhen I receive [bossgate #1 v]\nif <(FIGHTSTART?) = [0]> then\n    wait (5) seconds\n    switch costume to (mag1 v)\n    create clone of (_myself_ v)\n    wait (.05) seconds\n    switch costume to (hard1 v)\n    create clone of (_myself_ v)\n    wait (.05) seconds\n    switch costume to (needle1 v)\n    create clone of (_myself_ v)\n    wait (.05) seconds\n    switch costume to (mm3_sparkman v)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [battle begin v]\nrepeat (10)\n    change y by (40)\nend\ndelete this clone\n\nwhen I receive [battle begin v]\nwait (1.5) seconds\nswitch costume to (mag1 v)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nclear graphic effects\nset rotation style [left-right v]\nshow\nif <(costume [number v]) = [1]> then\n    if <(FIGHTSTART?) = [1]> then\n        forever\n            if <touching (hitbox v)?> then\n                change [health v] by (2)\n                broadcast (TAKE DMG v)\n                broadcast (KNOCKBACK v)\n                wait (1) seconds\n            end\n        end\n    end\nend\nif <(costume [number v]) = [12]> then\n    if <(FIGHTSTART?) = [1]> then\n        forever\n            if <touching (hitbox v)?> then\n                change [health v] by (2)\n                broadcast (TAKE DMG v)\n                broadcast (KNOCKBACK v)\n                wait (1) seconds\n            end\n        end\n    end\nend\nif <(costume [number v]) = [6]> then\n    if <(FIGHTSTART?) = [1]> then\n        forever\n            if <touching (hitbox v)?> then\n                change [health v] by (3)\n                broadcast (TAKE DMG v)\n                broadcast (KNOCKBACK v)\n                wait (1) seconds\n            end\n        end\n    end\nend\nif <(costume [number v]) = [17]> then\n    if <(FIGHTSTART?) = [1]> then\n        forever\n            if <touching (hitbox v)?> then\n                change [health v] by (2)\n                broadcast (TAKE DMG v)\n                broadcast (KNOCKBACK v)\n                wait (1) seconds\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nset rotation style [left-right v]\nshow\nif <(costume [number v]) = [1]> then\n    if <(FIGHTSTART?) = [1]> then\n        forever\n            wait until <touching color (#fcd8a8)?>\n            broadcast (BossDMG v)\n            start sound [Mega Man 5 SFX \(20\) v]\n            repeat (5)\n                set [ghost v] effect to (100)\n                wait (.05) seconds\n                clear graphic effects\n                wait (.05) seconds\n            end\n        end\n    end\nend\nif <(costume [number v]) = [12]> then\n    if <(FIGHTSTART?) = [1]> then\n        forever\n            wait until <touching color (#fcd8a8)?>\n            broadcast (BossDMG v)\n            start sound [Mega Man 5 SFX \(20\) v]\n            repeat (5)\n                set [ghost v] effect to (100)\n                wait (.05) seconds\n                clear graphic effects\n                wait (.05) seconds\n            end\n        end\n    end\nend\nif <(costume [number v]) = [6]> then\n    if <(FIGHTSTART?) = [1]> then\n        forever\n            wait until <touching color (#fcd8a8)?>\n            broadcast (BossDMG v)\n            start sound [Mega Man 5 SFX \(20\) v]\n            repeat (5)\n                set [ghost v] effect to (100)\n                wait (.05) seconds\n                clear graphic effects\n                wait (.05) seconds\n            end\n        end\n    end\nend\nif <(costume [number v]) = [17]> then\n    if <(FIGHTSTART?) = [1]> then\n        forever\n            wait until <touching color (#fcd8a8)?>\n            broadcast (BossDMG v)\n            start sound [Mega Man 5 SFX \(20\) v]\n            repeat (5)\n                set [ghost v] effect to (100)\n                wait (.05) seconds\n                clear graphic effects\n                wait (.05) seconds\n            end\n        end\n    end\nend\n\ndefine death\nstart sound [Mega Man 5 SFX \(7\)2 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)\n\nwhen I receive [bossdie v]\nif <(clone) = [1]> then\n    if <(costume [number v]) < [6]> then\n        broadcast (needle man v)\n    end\n    if <<(costume [number v]) > [11]> and <(costume [number v]) < [17]>> then\n        broadcast (hard man v)\n    end\n    if <<(costume [number v]) > [5]> and <(costume [number v]) < [12]>> then\n        broadcast (spark man v)\n    end\n    if <(costume [number v]) > [16]> then\n        broadcast (you win v)\n    end\n    death\n    delete this clone\nend\n\nwhen I start as a clone\nset [clone v] to [1]\nif <(costume [number v]) = [26]> then\n    repeat (25)\n        move (8) steps\n    end\n    delete this clone\nend\n\nwhen I receive [hard man v]\nwait (2) seconds\nswitch costume to (hard1 v)\ncreate clone of (_myself_ v)\n\nwhen I receive [needle man v]\nwait (2) seconds\nswitch costume to (needle1 v)\ncreate clone of (_myself_ v)\n\nwhen I receive [spark man v]\nwait (2) seconds\nswitch costume to (mm3_sparkman v)\ncreate clone of (_myself_ v)\n\n@border\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (costume2 v)\nclear graphic effects\nshow\n\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\nwhen I receive [intro v]\nrepeat (10)\n    change [brightness v] effect by (-10)\nend\nclear graphic effects\nhide\n\nwhen I receive [game start v]\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@hpbar\n\nwhen flag clicked\nwait (1) seconds\nforever\n    wait until <(HEALTH) > [14]>\n    broadcast (die v)\n    wait (1) seconds\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]\nif <(GHOST MODE?) = [0]> then\n    set [brightness v] effect to (100)\n    wait (.2) seconds\n    clear graphic effects\n    wait (.2) seconds\nend\n\nwhen flag clicked\nrepeat (10)\n    go to [front v] layer\nend\nhide\n\nwhen I receive [teleportin v]\nset [health v] to [1]\npoint in direction (0)\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]\n\nstop [other scripts in sprite v]\nwait (4) seconds\nshow\nrepeat (20)\n    change [ghost v] effect by (5)\nend\n\nwhen I receive [heal v]\nstart sound [Mega Man 5 SFX \(19\) v]\nset [health v] to [1]\nrepeat (3)\n    set [brightness v] effect to (100)\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]\n\n@boss hp\n\nwhen flag clicked\nclear graphic effects\nhide\n\nwhen I receive [battle begin v]\ngo to x: (-180) y: (91)\nset size to (250) %\ngo to [front v] layer\nshow\nset [brightness v] effect to (0)\nswitch costume to (hpbar29 v)\nrepeat (28)\n    start sound [Mega Man 5 SFX \(16\) v]\n    switch costume to ((costume [number v]) + (-1))\n    wait (0) seconds\nend\n\nwhen I receive [bossdmg v]\nrepeat (3)\n    set [brightness v] effect to (100)\n    wait (.1) seconds\n    set [brightness v] effect to (0)\n    wait (.1) seconds\nend\n\nwhen I receive [bossdmg v]\nnext costume\nnext costume\nnext costume\nif <(costume [number v]) > [28]> then\n    broadcast (BOSSDIE v)\nend\n\nwhen I receive [bossdie v]\nshow\n\nwhen I receive [aight im out v]\nhide\n\nwhen I receive [hard man v]\ngo to x: (-180) y: (91)\nset size to (250) %\nclear graphic effects\ngo to [front v] layer\nshow\nset [brightness v] effect to (0)\nswitch costume to (hpbar29 v)\nrepeat (28)\n    start sound [Mega Man 5 SFX \(16\) v]\n    switch costume to ((costume [number v]) + (-1))\n    wait (0) seconds\nend\n\nwhen I receive [needle man v]\ngo to x: (-180) y: (91)\nset size to (250) %\nclear graphic effects\ngo to [front v] layer\nshow\nset [brightness v] effect to (0)\nswitch costume to (hpbar29 v)\nrepeat (28)\n    start sound [Mega Man 5 SFX \(16\) v]\n    switch costume to ((costume [number v]) + (-1))\n    wait (0) seconds\nend\n\nwhen I receive [spark man v]\ngo to x: (-180) y: (91)\nset size to (250) %\nclear graphic effects\ngo to [front v] layer\nshow\nset [brightness v] effect to (0)\nswitch costume to (hpbar29 v)\nrepeat (28)\n    start sound [Mega Man 5 SFX \(16\) v]\n    switch costume to ((costume [number v]) + (-1))\n    wait (0) seconds\nend\n\n@toenail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nswitch costume to (costume5 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