Mega Man: Return of Gemini Man -- PLATFORMER

Instructions: {THIS GAME IS MOBILE SUPPORTED}\n\n  This platformer I created is based off of the Gemini Man Stage from Mega Man III. Use your blaster to fight off many enemies and face off against Gemini Man as the boss at the very end.\n\n\n  Gemini Man is a pretty interesting and underrated Robot Master from Mega Man. I thought it would be cool to create a custom stage based on him.\n\n-- Remember to Love and Favorite to see more        custom Mega Man Stages like this! --\n\n-----\n*Credit to Mega Man III for all sounds used

@Stage\n\nwhen flag clicked\nswitch backdrop to (sky v)\nset volume to (100) %\nstart sound [43-get-the-punk-out-special-stage-2-.mp3 v]\n\nwhen I receive [player start v]\nstop all sounds\nforever\n    if <([costume # v] of [ground v]) = [16]> then\n        play sound [Mega Man 5 Boss Music \(Arranged\) v] until done\n    else\n        play sound [Mega Man 3 - Gemini Man Stage \(Sega Genesis Remix\).mp3 v] until done\n    end\nend\n\nwhen I receive [gemini die v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change volume by (-10)\nend\nstart sound [reee v]\nrepeat (10)\n    change volume by (10)\nend\n\nwhen I receive [die v]\nwait (.1) seconds\nstop all sounds\n\n@random stars\n\nwhen flag clicked\nhide\nforever\n    wait (.05) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\ngo to (random position v)\ngo to [back v] layer\nshow\nrepeat (10)\n    turn right (15) degrees\nend\nrepeat (10)\n    turn right (15) degrees\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\n@Sprite1\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [front v] layer\nswitch costume to (gemini3 v)\nshow\nforever\n    wait (1) seconds\n    next costume\nend\n\nwhen flag clicked\nwait (.5) seconds\nwait until <<mouse down?> or <key (any v) pressed?>>\nbroadcast (PLAYER START v)\n\nwhen I receive [player start v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen flag clicked\nrepeat (10)\n    go to [front v] layer\nend\n\n@tiles\n\n@ground\n\nwhen I receive [player start v]\nswitch costume to (crysal v)\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (crysal v)\nclear graphic effects\nshow\n\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [nextsectiom v]\nnext costume\n\nwhen I receive [die v]\nswitch costume to (crysal v)\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\n@animations\n\nwhen flag clicked\nswitch costume to (idle v)\nset size to (200) %\nset size to (100) %\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)\nhide\nbroadcast (Teleportin v)\n\nwhen I receive [die v]\nif <(dead:) = [0]> then\n    set [canmove? v] to [0]\n    hide\n    death\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 rotation style [left-right v]\nforever\n    if <(CanMove?) = [1]> then\n        if <not <(dead:) = [1]>> then\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]\ngo to x: (0) y: (-120)\nhide\nset [canmove? v] to [0]\nset [scroll x v] to [0]\nwait (2) seconds\nset [canmove? v] to [1]\nset [ghost v] effect to (100)\nshow\nstart sound [Mega Man 5 SFX \(4\) v]\nrepeat (3)\n    wait (.2) seconds\n    clear graphic effects\n    wait (.2) seconds\n    set [ghost v] effect to (100)\nend\nwait (.2) seconds\nclear graphic effects\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 <<key (space v) pressed?> or <mouse down?>>> then\n        create clone of (_myself_ v)\n        start sound [Mega Man 5 SFX \(4\) v]\n        wait until <<not <key (space v) pressed?>> and <not <mouse down?>>>\n    end\nend\n\nwhen I start as a clone\nif <not <(costume [number v]) = [18]>> then\n    switch costume to (laser v)\n    repeat (12)\n        move (20) steps\n    end\n    delete this clone\nend\n\nwhen I receive [die v]\nwait (1) seconds\nbroadcast (Teleportin v)\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 I receive [teleportin v]\nset [scroll stop v] to [-1079]\n\nwhen flag clicked\nforever\n    if <(CanMove?) = [1]> then\n        go to x: ([x position v] of [hitbox v]) y: (([y position v] of [hitbox v]) + (-12))\n    end\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)\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]\nrepeat (3)\n    set [brightness v] effect to (100)\n    wait (.2) seconds\n    clear graphic effects\n    wait (.2) seconds\nend\n\nwhen flag clicked\nclear graphic effects\n\nTick  <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or > \n\nwhen I receive [gemini die v]\nset [canmove? v] to [0]\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)?>>>\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\nbroadcast (Teleportin v)\nforever\n    if <(CanMove?) = [1]> 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        if <touching (spikes v)?> then\n            Reset\n        end\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 (2) 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 [speed v] to [1]\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    change [speed y v] by (-1)\n    change y by (speed y)\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 [12]\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        change [speed y v] by (-1)\n    end\nend\n\ndefine Touch Ground <up?>\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\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]) = [16]>>>\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    broadcast (NextSectiom v)\n    set y to (166)\n    set x to (-220)\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\n@sheor\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 (1) 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 (30)\n        change y by (-10)\n    end\n    delete this clone\nelse\n    if <(costume [number v]) = [2]> then\n        repeat (10)\n            change size by (30)\n        end\n        delete this clone\n    else\n        repeat (15)\n            change size by (20)\n        end\n        delete this clone\n    end\nend\n\n@hpbar\n\nwhen flag clicked\npoint in direction (0)\ngo to x: (-209) y: (91)\nclear graphic effects\nset size to (200) %\nshow\nforever\n    switch costume to (HEALTH)\n    go to [front v] layer\nend\n\nwhen flag clicked\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\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 [joe] [152] [42]\nend\nif <([costume # v] of [ground v]) = [3]> then\n    Create Enemy [joe] [-65] [58]\nend\nif <([costume # v] of [ground v]) = [5]> then\n    Create Enemy [met] [105] [-118]\n    wait (.3) seconds\n    Create Enemy [met] [-95] [25]\nend\nif <([costume # v] of [ground v]) = [6]> then\n    Create Enemy [bow] [211] [137]\nend\nif <([costume # v] of [ground v]) = [7]> then\n    Create Enemy [met] [36] [-105]\n    wait (.3) seconds\n    Create Enemy [bow] [220] [137]\nend\nif <([costume # v] of [ground v]) = [8]> then\n    Create Enemy [joe] [112] [-50]\nend\nif <([costume # v] of [ground v]) = [9]> then\n    Create Enemy [trap] [14] [-55]\nend\nif <([costume # v] of [ground v]) = [10]> then\n    Create Enemy [met] [91] [-62]\n    wait (.3) seconds\n    Create Enemy [bow] [200] [137]\nend\nif <([costume # v] of [ground v]) = [11]> then\n    Create Enemy [trap] [-65] [-130]\n    Create Enemy [trap] [50] [-130]\n    Create Enemy [trap] [160] [-130]\nend\nif <([costume # v] of [ground v]) = [12]> then\n    Create Enemy [joe] [93] [-39]\nend\nif <([costume # v] of [ground v]) = [13]> then\n    Create Enemy [trap] [18] [-33]\n    Create Enemy [bow] [220] [137]\n    wait (.5) seconds\n    Create Enemy [bow] [220] [137]\nend\nif <([costume # v] of [ground v]) = [14]> then\n    Create Enemy [met] [-57] [-33]\n    wait (.3) seconds\n    Create Enemy [met] [138] [-107]\nend\nif <([costume # v] of [ground v]) = [15]> then\n    Create Enemy [trap] [18] [-105]\n    Create Enemy [bow] [220] [137]\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]) = [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]) = [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\n\nwhen I receive [die v]\ndelete this clone\n\nwhen I start as a clone\nforever\n    wait until <touching color (#ffeda0)?>\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\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [1]> 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\nend\nif <(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\nend\nif <(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\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\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\nif <(costume [number v]) = [1]> then\n    forever\n        switch costume to (chain v)\n        wait (.05) seconds\n        switch costume to (chain2 v)\n        wait (.05) seconds\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [1]> then\n    set [x v] to [0]\n    set [y v] to [0]\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 (x) steps\n        change [x v] by (1)\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]) = [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 (12) 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]) = [4]> then\n    point in direction (90)\n    set rotation style [left-right v]\n    repeat until <<touching (_edge_ v)?> or <touching (hitbox v)?>>\n        change y by (-10)\n    end\n    if <touching (hitbox v)?> then\n        change [health v] by (3)\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 (_edge_ v)?> or <touching (hitbox v)?>>\n        move (15) 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]) = [6]> then\n    point towards (hitbox v)\n    set rotation style [left-right v]\n    repeat (30)\n        move (10) steps\n        if <touching (hitbox v)?> then\n            change [health v] by (1)\n            broadcast (TAKE DMG v)\n            delete this clone\n        end\n    end\n    delete this clone\nend\n\n@border\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nforever\n    go to [front v] layer\nend\n\nwhen I receive [gemini die v]\nwait (1) seconds\nhide\n\n@Gemini Man\n\nwhen flag clicked\nset size to (150) %\nhide\n\nwhen I receive [bossfight v]\nset rotation style [left-right v]\nclear graphic effects\nswitch costume to (gemini1 v)\nstop all sounds\ngo to x: (138) y: (7)\npoint in direction (-90)\nhide\nstart sound [Mega Man 5 SFX \(45\) v]\nrepeat (3)\n    hide\n    wait (.1) seconds\n    show\n    wait (.1) seconds\nend\nswitch costume to (geminishoot v)\nrepeat (3)\n    start sound [Mega Man 5 SFX \(32\) v]\n    set [projectile name v] to [laser]\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 (.05) seconds\nend\nswitch costume to (gemini1 v)\nstart sound [Mega Man 5 SFX \(45\) v]\nrepeat (3)\n    show\n    wait (.1) seconds\n    hide\n    wait (.1) seconds\nend\nforever\n    go to x: (-101) y: (63)\n    create clone of (_myself_ v)\n    go to x: (138) y: (7)\n    start sound [Mega Man 5 SFX \(45\) v]\n    repeat (3)\n        hide\n        wait (.1) seconds\n        show\n        wait (.1) seconds\n    end\n    go to x: (138) y: (7)\n    switch costume to (gemini2 v)\n    set [y v] to [3]\n    repeat (17)\n        change y by (Y)\n        change [y v] by (-1)\n    end\n    change y by (-15)\n    switch costume to (gemini1 v)\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    switch costume to (geminishoot v)\n    repeat (3)\n        start sound [Mega Man 5 SFX \(32\) v]\n        set [projectile name v] to [laser]\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 (.05) seconds\n    end\n    switch costume to (gemini1 v)\n    wait (1) seconds\n    repeat (3)\n        switch costume to (gemini3 v)\n        change x by (-20)\n        repeat (3)\n            wait (.1) seconds\n            change x by (-20)\n            next costume\n        end\n        wait (.1) seconds\n    end\n    switch costume to (gemini2 v)\n    set [y v] to [15]\n    repeat (22)\n        change y by (Y)\n        change x by (11)\n        change [y v] by (-1)\n    end\n    switch costume to (gemini1 v)\n    wait (.2) seconds\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    switch costume to (geminishoot v)\n    repeat (3)\n        start sound [Mega Man 5 SFX \(32\) v]\n        set [projectile name v] to [seek]\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 (.05) seconds\n    end\n    switch costume to (gemini2 v)\n    go to x: (140) y: (6)\n    set [y v] to [3]\n    repeat (17)\n        change y by (Y)\n        change [y v] by (-1)\n    end\n    change y by (-15)\n    switch costume to (gemini1 v)\n    wait (.3) seconds\n    switch costume to (gemini2 v)\n    repeat (3)\n        start sound [Mega Man 5 SFX \(32\) v]\n        set [projectile name v] to [laser]\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        change y by (5)\n        wait (.05) seconds\n    end\n    repeat (3)\n        change y by (-5)\n    end\n    switch costume to (gemini2 v)\n    set [y v] to [15]\n    repeat (22)\n        change y by (Y)\n        change [y v] by (-1)\n    end\n    switch costume to (gemini1 v)\n    wait (1) seconds\n    broadcast (NEW CLONE v)\nend\n\nwhen I start as a clone\nshow\nif <(costume [number v]) = [8]> then\n    set size to (250) %\n    repeat (25)\n        switch costume to (death v)\n        move (5) steps\n        change size by (-10)\n    end\n    delete this clone\nend\n\nwhen I receive [gemini die v]\nstart sound [Mega Man 5 SFX \(7\) v]\nswitch costume to (death v)\nhide\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)\nforever\n    hide\n    stop [other scripts in sprite v]\n    delete this clone\nend\n\nwhen I receive [geminidmg v]\nstart sound [Mega Man 5 SFX \(2\) v]\nset [brightness v] effect to (100)\nwait (.1) seconds\nclear graphic effects\nwait (.1) seconds\n\nwhen I start as a clone\nstart sound [Mega Man 5 SFX \(45\) v]\ngo to x: (-101) y: (63)\nswitch costume to (gemini1 v)\nrepeat (3)\n    hide\n    wait (.1) seconds\n    show\n    wait (.1) seconds\nend\nrepeat (2)\n    switch costume to (gemini2 v)\n    set [y v] to [3]\n    repeat (21)\n        change y by (Y)\n        change [y v] by (-1)\n    end\n    change y by (-10)\n    switch costume to (gemini1 v)\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    switch costume to (geminishoot v)\n    repeat (3)\n        start sound [Mega Man 5 SFX \(32\) v]\n        set [projectile name v] to [laser]\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 (.05) seconds\n    end\n    switch costume to (gemini1 v)\n    wait (1) seconds\n    repeat (3)\n        switch costume to (gemini3 v)\n        change x by (20)\n        repeat (3)\n            wait (.1) seconds\n            change x by (20)\n            next costume\n        end\n        wait (.1) seconds\n    end\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    switch costume to (geminishoot v)\n    repeat (3)\n        start sound [Mega Man 5 SFX \(32\) v]\n        set [projectile name v] to [laser]\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 (.05) seconds\n    end\n    switch costume to (gemini2 v)\n    set [y v] to [15]\n    repeat (20)\n        change y by (Y)\n        change [y v] by (-1)\n    end\n    change y by (-10)\n    switch costume to (gemini1 v)\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    switch costume to (geminishoot v)\n    repeat (3)\n        start sound [Mega Man 5 SFX \(32\) v]\n        set [projectile name v] to [laser]\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 (.05) seconds\n    end\n    go to x: (139) y: (6)\n    switch costume to (gemini2 v)\n    set [y v] to [15]\n    repeat (27)\n        change y by (Y)\n        change x by (-9)\n        change [y v] by (-1)\n    end\n    switch costume to (gemini1 v)\n    wait (.2) seconds\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    switch costume to (geminishoot v)\n    repeat (3)\n        start sound [Mega Man 5 SFX \(32\) v]\n        set [projectile name v] to [laser]\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 (.05) seconds\n    end\nend\n\nwhen I start as a clone\nset [hp v] to [3]\nforever\n    wait until <touching color (#ffeda0)?>\n    change [hp v] by (-1)\n    if <(HP) < [1]> then\n        delete this clone\n    else\n        start sound [Mega Man 5 SFX \(45\) v]\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 [new clone v]\ndelete this clone\n\nwhen I receive [die v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [bossfight v]\nset [gemini hp v] to [1]\nwait (1) seconds\nwait until <(GEMINI HP) > [14]>\nstop [other scripts in sprite v]\nbroadcast (Gemini Die v)\n\nwhen I receive [bossfight v]\nwait (1) seconds\nforever\n    wait until <touching color (#ffeda0)?>\n    change [gemini hp v] by (1)\n    start sound [Mega Man 5 SFX \(45\) v]\n    set [brightness v] effect to (100)\n    wait (.1) seconds\n    clear graphic effects\n    wait (.1) seconds\nend\n\nwhen I receive [gemini die v]\ndelete this clone\n\n@bossicon\n\nwhen I receive [die v]\nhide\n\nwhen I receive [gemini die v]\nhide\n\nwhen I receive [bossfight v]\nshow\n\nwhen flag clicked\ngo to x: (211) y: (0)\nhide\nforever\n    go to [front v] layer\nend\n\n@hpbar2\n\nwhen flag clicked\npoint in direction (0)\ngo to x: (209) y: (70)\nclear graphic effects\nset size to (200) %\nhide\nforever\n    switch costume to (GEMINI HP)\nend\n\nwhen flag clicked\n\nwhen I receive [geminidmg 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 [bossfight v]\nrepeat (10)\n    set [gemini hp v] to [1]\n    go to [front v] layer\nend\nshow\nwait until <(GEMINI HP) > [14]>\nbroadcast (Gemini Die v)\n\nwhen I receive [die v]\nhide\n\n@toenail/end\n\nwhen flag clicked\nswitch costume to (costume5 v)\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nshow\nforever\n    go to [front v] layer\nend\n\nwhen I receive [gemini die v]\nwait (2) seconds\nswitch costume to (costume3 v)\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\n\n