Mega Man: The Phantom Challenger      //// SCROLLING PLATFORMER

Instructions: ★★★★★★★INSTRUCTIONS★★★★★★★\n\n- Arrow keys or WASD to move and jump\n- Space to fire your blaster\n- Press Down while running to perform a Slide\n- Press Z or X to switch Special Weapons (if you have any)\n- Hold Up or W on ladders to climb them\n\n( you do not need your mouse to play this game, except for using the Omega Chaser )\n\n★★★★★★★★★★★★★★★★★★★★★★\n\n<<<>>>\nNOTE: If the game takes too long to load or is running slow, you can try playing it on a different browser or going here: https://turbowarp.org/423958882\n<<<>>>\n\nThis is part 1 out of a 2-part game, part 2 will be released on a later date.\n\n\nBACKSTORY: An evil scientist named Dr. Phantom is turning innocent robots into his own war machines in order to rule the world. Megaman's arch nemesis, Dr. Wily, sends an army of his own robots to fight Dr. Phantom, but his robots also get turned into war machines. \n\nMega Man's creator, Dr. Light sends Mega Man on an adventure to destroy these evil robots and stop Team Phantom, once and for all.\n\nFight against 8 different Phantom Agents and obtain their special weapons, which you can use to fight the other Robots.\n\n--\nIf you have a suggestion or see a problem in this game, please contact me on my profile.\n--\n\n★★★★★★★★★CREDITS★★★★★★★★★\n\n-All sprites and all sound effects belong to Capcom,    the original creator of Mega Man, as well as Yacht Club games for Shovel Knight SFX.\n\n- Credit to Spriters Resource, MegaPhilX, @DancingBoi , and Sprites Inc for additional sprites\n\n- Credit to Mega Man Maker for the backgrounds and tilesets\n\n- Special thanks to: RRThiel, Cosmicgem, MaxOKE2, Khinsider, Tiled, Awsomachine, Zdagger67, Pixelated-Dude, Chips n' Cellos, and Textcraft.

@Stage\n\ndefine find next weapon (z/x)\nif <(z/x) = [2]> then\n    set [findweaponcounter v] to [1]\n    change [megaman costume v] by (1)\n    if <(Megaman Costume) > [9]> then\n        set [megaman costume v] to [1]\n    end\n    repeat until <<<not <(item (Megaman Costume) of [robot master weapons v]) = [0]>> and <not <(item (Megaman Costume) of [robot master weapons v]) = []>>> or <(Megaman Costume) = [1]>>\n        change [megaman costume v] by (1)\n        if <(Megaman Costume) > [9]> then\n            set [megaman costume v] to [0]\n        end\n    end\nend\nif <(z/x) = [1]> then\n    set [findweaponcounter v] to [1]\n    change [megaman costume v] by (-1)\n    repeat until <<<not <(item (Megaman Costume) of [robot master weapons v]) = [0]>> and <not <(item (Megaman Costume) of [robot master weapons v]) = []>>> or <(Megaman Costume) = [1]>>\n        change [megaman costume v] by (-1)\n        if <(Megaman Costume) < [1]> then\n            set [megaman costume v] to [9]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Show stage select stars?) = [1]> then\nend\n\nwhen flag clicked\nset [transition v] to [0]\nset [ypos offset v] to [0]\nset [music v] to [1]\nset volume to (100) %\nforever\n    play sound (Music) until done\nend\n\nwhen I receive [die v]\nchange [lives v] by (-1)\nrepeat (10)\n    change volume by (-10)\nend\nwait (3) seconds\nif <(LIVES) < [1]> then\n    broadcast (haha u lose v)\nelse\n    broadcast (SetUp v)\n    broadcast (READY v)\n    wait (1) seconds\n    broadcast (Teleportin v)\nend\n\nwhen I receive [transition up v]\nset [transition v] to [1]\nset [scroll y min v] to (Scroll Y Max)\nbroadcast (Disable Movement v)\nif <<(STAGE #) = [6]> and <(Scroll Y Max) = [2693]>> then\n    repeat (35)\n        change [scroll y max v] by (10)\n        change [scroll y min v] by (10)\n        broadcast (Player_MoveDown v)\n    end\n    broadcast (Enable Movement v)\n    wait (1) seconds\n    set [checkpoint # v] to [4]\n    set [scroll x max v] to [7195]\nelse\n    repeat (43)\n        change [scroll y max v] by (10)\n        change [scroll y min v] by (10)\n        broadcast (Player_MoveDown v)\n    end\n    broadcast (Enable Movement v)\n    if <(STAGE #) = [8]> then\n        if <(Scroll X Max) = [8000]> then\n            set [scroll x max v] to [8000]\n            set [scroll x min v] to [8000]\n        end\n    end\n    if <(STAGE #) = [1]> then\n        if <<(Checkpoint #) = [2]> and <(Scroll X Max) = [500]>> then\n            set [checkpoint # v] to [3]\n            set [scroll x max v] to [500]\n            set [scroll x min v] to [500]\n        end\n    end\n    if <(STAGE #) = [2]> then\n        if <(Checkpoint #) < [3]> then\n            set [checkpoint # v] to [2]\n            set [scroll x max v] to [3954]\n            set [scroll x min v] to [3954]\n        end\n    end\n    if <(STAGE #) = [7]> then\n        if <(Checkpoint #) < [3]> then\n            set [checkpoint # v] to [3]\n            set [scroll x max v] to [2222]\n            set [scroll x min v] to [2222]\n        end\n    end\n    if <(STAGE #) = [6]> then\n        if <(Checkpoint #) < [3]> then\n            set [checkpoint # v] to [3]\n        end\n    end\nend\nwait (1) seconds\nset [transition v] to [0]\n\nwhen I receive [transition down v]\nset [transition v] to [1]\nbroadcast (Disable Movement v)\nrepeat (43)\n    change [scroll y max v] by (-10)\n    change [scroll y min v] by (-10)\n    broadcast (Player_MoveUp v)\nend\nbroadcast (Enable Movement v)\nif <(STAGE #) = [2]> then\n    if <(Checkpoint #) < [3]> then\n        set [checkpoint # v] to [2]\n        set [scroll x max v] to [3954]\n        set [scroll x min v] to [3954]\n    end\nend\nif <(STAGE #) = [9]> then\n    if <(Scroll Y Min) = [-1720]> then\n        wait (1) seconds\n        broadcast (Megaman walk to left v)\n    end\nend\nwait (1) seconds\nset [transition v] to [0]\n\nwhen I receive [bossgatetransition v]\nbroadcast (Disable Movement v)\nset [scroll x min v] to (Scroll X Max)\nrepeat (48)\n    change [scroll x max v] by (10)\n    change [scroll x min v] by (10)\n    broadcast (Player_MoveLeft v)\nend\nbroadcast (Enable Movement v)\n\nwhen flag clicked\nset [lives v] to [4]\nset [show stage select stars? v] to [1]\nset [scroll x max v] to [0]\nset [scroll x min v] to [0]\nset [scroll y max v] to [0]\nset [scroll y min v] to [0]\ndelete all of [activated bossgates v]\nadd [0] to [activated bossgates v]\nforever\n    if <(LIVES) > [8]> then\n        set [lives v] to [8]\n    end\nend\n\nwhen I receive [bossdie v]\nrepeat (10)\n    change volume by (-10)\nend\n\nwhen I receive [take dmg v]\nif <(HEALTH) < [15]> then\n    set [dmg thingy v] to [1]\n    create clone of (ready v)\n    wait (.02) seconds\n    set [dmg thingy v] to [2]\n    create clone of (ready v)\n    wait (.02) seconds\n    set [dmg thingy v] to [3]\n    create clone of (ready v)\n    wait (.02) seconds\n    set [dmg thingy v] to [4]\n    create clone of (ready v)\n    wait (.02) seconds\nend\n\nwhen I receive [start v]\nrepeat (10)\n    change volume by (-10)\nend\n\nwhen I receive [transition right v]\nbroadcast (Disable Movement v)\nset [transition v] to [1]\nset [scroll x min v] to (Scroll X Max)\nrepeat (50)\n    change [scroll x max v] by (10)\n    change [scroll x min v] by (10)\n    broadcast (Player_MoveLeft v)\nend\nbroadcast (Enable Movement v)\nset [transition v] to [0]\nwait (1) seconds\n\nwhen I receive [transition left v]\nbroadcast (Disable Movement v)\nset [transition v] to [1]\nrepeat (50)\n    change [scroll x max v] by (-10)\n    change [scroll x min v] by (-10)\n    broadcast (Player_MoveRight v)\nend\nbroadcast (Enable Movement v)\nwait (1) seconds\nset [transition v] to [0]\n\nwhen I receive [teleportin v]\nset [ypos offset v] to [0]\n\nwhen I receive [screenshake v]\nset [ypos offset v] to [50]\nif <([canmove? v] of [hitbox v]) = [1]> then\n    broadcast (Player_MoveUp v)\nend\nrepeat (10)\n    set [ypos offset v] to ((YPos Offset) * (.4))\nend\nset [ypos offset v] to [0]\n\nwhen I receive [bosscutscene v]\nset [major boss? v] to [0]\nrepeat (10)\n    change volume by (-10)\nend\nset [music v] to [3]\nstop all sounds\nrepeat (10)\n    change volume by (10)\nend\n\nwhen I receive [battle begin v]\nif <(BossBattle Phase) = [0]> then\n    if <(Major Boss?) = [1]> then\n        repeat (10)\n            change volume by (-10)\n        end\n        set [music v] to [8]\n        stop all sounds\n        repeat (10)\n            change volume by (10)\n        end\n    else\n        repeat (10)\n            change volume by (-10)\n        end\n        set [music v] to [7]\n        stop all sounds\n        repeat (10)\n            change volume by (10)\n        end\n        set [music v] to [16]\n    end\nend\n\nwhen I receive [stage select v]\nset [heard boss speech? v] to [0]\nset [transition v] to [0]\nset [bossbattle phase v] to [0]\nif <(LIVES) < [4]> then\n    set [lives v] to [4]\nend\n\nwhen I receive [resume stage music v]\nrepeat (10)\n    change volume by (-10)\nend\nif <(STAGE #) = [2]> then\n    set [music v] to [2]\nend\nif <(STAGE #) = [1]> then\n    set [music v] to [4]\nend\nif <(STAGE #) = [3]> then\n    set [music v] to [10]\nend\nif <(STAGE #) = [4]> then\n    set [music v] to [14]\nend\nif <(STAGE #) = [6]> then\n    set [music v] to [11]\nend\nif <(STAGE #) = [7]> then\n    set [music v] to [12]\nend\nif <(STAGE #) = [8]> then\n    set [music v] to [13]\nend\nif <(STAGE #) = [9]> then\n    set [music v] to [6]\nend\nif <(STAGE #) = [10]> then\n    set [music v] to [10]\nend\nstop all sounds\nrepeat (10)\n    change volume by (10)\nend\n\nwhen I receive [menu_start v]\nrepeat (10)\n    change volume by (-10)\nend\n\nwhen I receive [stage select v]\nbroadcast (Delete Text v)\nrepeat (10)\n    change volume by (-10)\nend\nset [music v] to [5]\nstop all sounds\nrepeat (10)\n    change volume by (10)\nend\n\nwhen I receive [stage selected v]\nrepeat (10)\n    change volume by (-10)\nend\n\nwhen I receive [robot master intro v]\nbroadcast (Delete Text v)\n\nwhen I receive [setup v]\nrepeat (10)\n    change volume by (-10)\nend\nif <(STAGE #) = [2]> then\n    set [music v] to [2]\nend\nif <(STAGE #) = [1]> then\n    set [music v] to [4]\nend\nif <(STAGE #) = [3]> then\n    set [music v] to [10]\nend\nif <(STAGE #) = [4]> then\n    set [music v] to [14]\nend\nif <(STAGE #) = [6]> then\n    set [music v] to [11]\nend\nif <(STAGE #) = [7]> then\n    set [music v] to [12]\nend\nif <(STAGE #) = [8]> then\n    set [music v] to [13]\nend\nif <(STAGE #) = [9]> then\n    set [music v] to [6]\nend\nif <(STAGE #) = [10]> then\n    set [music v] to [10]\nend\nstop all sounds\nrepeat (10)\n    change volume by (10)\nend\n\nwhen I receive [protoman whistle v]\nrepeat (10)\n    change volume by (-10)\nend\nwait (2) seconds\nrepeat (10)\n    change volume by (10)\nend\n\nwhen I receive [treble+bass fuse v]\nrepeat (10)\n    change volume by (-10)\nend\nset [music v] to [15]\nstop all sounds\nrepeat (10)\n    change volume by (10)\nend\n\nwhen flag clicked\ndelete all of [robot masters defeated v]\nrepeat (8)\n    add [0] to [robot masters defeated v]\nend\n\nwhen I receive [stage select v]\ndelete all of [special weapon energy v]\nrepeat (9)\n    add [27] to [special weapon energy v]\nend\n\nwhen flag clicked\ndelete all of [robot master weapons v]\nadd [1] to [robot master weapons v]\nrepeat (8)\n    add [0] to [robot master weapons v]\nend\n\nwhen I receive [weapon get screen v]\nrepeat (10)\n    change volume by (-10)\nend\nset [music v] to [9]\nstop all sounds\nrepeat (10)\n    change volume by (10)\nend\n\nwhen flag clicked\nforever\n    if <<<(Scroll Y) < [0]> and <(STAGE #) = [8]>> or <(STAGE #) = [6]>> then\n        set [antigravity? v] to [1]\n    else\n        set [antigravity? v] to [0]\n    end\nend\n\nwhen I receive [stage select v]\ndelete all of [activated bossgates v]\nrepeat (5)\n    add [0] to [activated bossgates v]\nend\n\nwhen flag clicked\nset [show stage select stars? v] to [0]\n\nwhen I receive [stage select v]\nrepeat (3)\n    delete all of [activated bossgates v]\n    repeat (5)\n        add [0] to [activated bossgates v]\n    end\nend\n\nwhen [p v] key pressed\nif <(username) = [legobuzz12]> then\n    set [phantom armor? v] to [1]\nend\n\nwhen flag clicked\nset [phantom armor? v] to [0]\n\nwhen flag clicked\ndelete all of [special weapon energy v]\nrepeat (9)\n    add [27] to [special weapon energy v]\nend\n\nwhen [b v] key pressed\nif <(username) = [legobuzz12]> then\n    set [heard boss speech? v] to [1]\n    set [doc encounter? v] to [1]\nend\n\nwhen I receive [teleportin v]\nif <(STAGE #) = [4]> then\n    wait until <<(Scroll Y) = [-860]> and <(Scroll X) < [300]>>\n    if <(STAGE #) = [4]> then\n        set [scroll x max v] to ((Scroll X Min) + (400))\n        repeat (35)\n            broadcast (fwd_10 v)\n            change [scroll x max v] by (-10)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<(Show stage select stars?) = [0]> and <(At Stage Select) = [0]>> and <(STAGE #) = [6]>> then\n        wait (.05) seconds\n        create clone of (switchblock thing v)\n    end\nend\n\nwhen I receive [teleportin v]\nif <(STAGE #) = [6]> then\n    wait until <<(Scroll Y) = [2263]> and <(Scroll X) < [3591]>>\n    if <(STAGE #) = [6]> then\n        set [scroll x max v] to (Scroll X Min)\n    end\nend\n\n@mega man\n\nwhen I receive [regenerate misc objects v]\nrepeat (25)\n    go to [front v] layer\nend\n\nwhen I receive [megaman get on snowboard v]\nset [on snowboard? v] to [1]\n\nwhen flag clicked\nset [on snowboard? v] to [0]\n\nwhen I receive [ready v]\nset [on snowboard? v] to [0]\n\nwhen I receive [ready v]\nwait (1) seconds\nforever\n    if <<(On Snowboard?) = [1]> and <touching color (#b540d9)?>> then\n        set [health v] to [30]\n        wait (6) seconds\n    end\nend\n\nwhen I receive [@mm go to front v]\nrepeat (10)\n    go to [front v] layer\nend\n\nwhen I receive [you win v]\nstop [other scripts in sprite v]\n\nwhen flag clicked\nset [health v] to [1]\n\nwhen flag clicked\n\nwhen I receive [die v]\nset [speed v] to [1]\nset [sliding? v] to [0]\nset [canmove? v] to [0]\n\nwhen I start as a clone\nset rotation style [left-right v]\ngo to [front v] layer\nshow\nif <<<(HEALTH) > [14]> and <(PHANTOM ARMOR?) = [0]>> or <<(HEALTH) > [26]> and <(PHANTOM ARMOR?) = [1]>>> then\n    set size to (250) %\n    switch costume to (death v)\n    wait (.1) seconds\n    switch costume to (death2 v)\n    wait (.1) seconds\n    switch costume to (death3 v)\n    wait (.1) seconds\nelse\n    if <(hold) = [60]> then\n        forever\n            switch costume to (shot1 v)\n            wait (.05) seconds\n            next costume\n            wait (.05) seconds\n            next costume\n            wait (.05) seconds\n            next costume\n            wait (.05) seconds\n        end\n    else\n        start sound [Mega Man 5 SFX \(4\) v]\n        switch costume to (laser v)\n    end\nend\n\nwhen flag clicked\nset [sliding? v] to [0]\nforever\n    if <(Megaman_Holding_Orb?) = [0]> then\n        if <<(CanMove?) = [1]> and <key (space v) pressed?>> then\n            if <(SLIDING?) = [0]> then\n                if <(Megaman Costume) = [1]> then\n                    set [hold v] to [0]\n                    create clone of (_myself_ v)\n                    repeat until <<<(hold) > [39]> or <<not <key (space v) pressed?>> and <not <mouse down?>>>> or <(takingdmg) = [1]>>\n                        change [hold v] by (1)\n                    end\n                    if <(hold) > [39]> then\n                        repeat until <<<not <key (space v) pressed?>> and <not <mouse down?>>> or <(takingdmg) = [1]>>\n                            start sound [Mega Man 5 SFX \(12\) v]\n                            set [md v] to [50]\n                            repeat (2)\n                                change [md v] by (25)\n                            end\n                            repeat (4)\n                                change [md v] by (-25)\n                            end\n                        end\n                        set [md v] to [0]\n                        set [hold v] to [60]\n                        if <(SLIDING?) = [0]> then\n                            if <not <<<(HEALTH) > [14]> and <(PHANTOM ARMOR?) = [0]>> or <<(HEALTH) > [26]> and <(PHANTOM ARMOR?) = [1]>>>> then\n                                if <(Megaman_Holding_Orb?) = [0]> then\n                                    if <(CanMove?) = [1]> then\n                                        if <(PHANTOM ARMOR?) = [1]> then\n                                            broadcast (Fire Special Weapon v)\n                                            start sound [Mega Man 5 SFX \(21\) v]\n                                        else\n                                            create clone of (_myself_ v)\n                                            start sound [Mega Man 5 SFX \(21\) v]\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    else\n                        wait until <<not <key (space v) pressed?>> and <not <mouse down?>>>\n                    end\n                else\n                    broadcast (Fire Special Weapon v)\n                    wait (.5) seconds\n                    wait until <<not <key (space v) pressed?>> and <not <mouse down?>>>\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset rotation style [left-right v]\nset [speed v] to [3]\n\nwhen flag clicked\nforever\n    if <key (space v) pressed?> then\n        set [animations: using gun?2 v] to [1]\n        repeat until <not <<key (space v) pressed?> or <mouse down?>>>\n            wait (.4) seconds\n        end\n        set [animations: using gun?2 v] to [0]\n        wait until <not <<key (space v) pressed?> or <mouse down?>>>\n        if <(Universal Hold) > [5]> then\n            set [animations: using gun?2 v] to [1]\n            wait (.2) seconds\n            set [animations: using gun?2 v] to [0]\n        end\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 <(what?) = [Walk]> then\n        if <not <(dead:) = [1]>> then\n            if <<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(x position) < (mouse x)>>>> or <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(mouse x) < (x position)>>>>> then\n                if <(round ([frame v] of [hitbox v])) = [0]> then\n                    set [animationcounter v] to [1]\n                    if <(PHANTOM ARMOR?) = [1]> then\n                        if <(animations: using gun?2) = [1]> then\n                            switch costume to (phantomstepgun1 v)\n                        else\n                            switch costume to (phantomstep1 v)\n                        end\n                    else\n                        if <(animations: using gun?2) = [1]> then\n                            switch costume to (mmstep2 v)\n                        else\n                            switch costume to (mmstep1 v)\n                        end\n                    end\n                else\n                    if <(PHANTOM ARMOR?) = [1]> then\n                        if <(animations: using gun?2) = [1]> then\n                            if <(SLIDING?) = [0]> then\n                                switch costume to ((animationcounter) + (51))\n                            end\n                        else\n                            if <(SLIDING?) = [0]> then\n                                switch costume to ((animationcounter) + (43))\n                            end\n                        end\n                        if <(SLIDING?) = [0]> then\n                            change [animationcounter v] by (1)\n                            if <(animationcounter) > [8]> then\n                                set [animationcounter v] to [1]\n                            end\n                            wait (0) seconds\n                        end\n                    else\n                        if <(animations: using gun?2) = [1]> then\n                            if <(SLIDING?) = [0]> then\n                                switch costume to ((animationcounter) + (25))\n                            end\n                        else\n                            if <(SLIDING?) = [0]> then\n                                switch costume to ((animationcounter) + (16))\n                            end\n                        end\n                        if <(SLIDING?) = [0]> then\n                            change [animationcounter v] by (1)\n                            if <(animationcounter) > [6]> then\n                                set [animationcounter v] to [1]\n                            end\n                            wait (.04) seconds\n                        end\n                    end\n                end\n            else\n                set [animationcounter v] to [1]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset rotation style [left-right v]\nforever\n    if <(getting ouched ?) = [1]> then\n        if <(PHANTOM ARMOR?) = [1]> then\n            if <([falling? v] of [hitbox v]) > [1]> then\n                switch costume to (phantomouchair v)\n            else\n                switch costume to (phantomouchground v)\n            end\n        else\n            if <([falling? v] of [hitbox v]) > [1]> then\n                switch costume to (megaoof v)\n            else\n                switch costume to (megamouch1 v)\n            end\n        end\n    else\n        if <(SLIDING?) = [1]> then\n    end\nend\n\nwhen I start as a clone\nif <<(On Snowboard?) = [1]> or <(@HTBX_GLOBAL XY?) = [1]>> then\n    change y by (5)\n    move (2) steps\nend\nif <<<not <(HEALTH) > [14]>> and <(PHANTOM ARMOR?) = [0]>> or <<not <(HEALTH) > [26]>> and <(PHANTOM ARMOR?) = [1]>>> then\n    if <(PHANTOM ARMOR?) = [1]> then\n        change y by (5)\n        move (15) steps\n    end\n    move (15) steps\n    repeat until <<(x position) < [-230]> or <(x position) > [230]>>\n        move (20) steps\n    end\n    delete this clone\nend\nif <(HEALTH) > [14]> then\n    set size to (100) %\n    repeat until <touching (_edge_ v)?>\n        move (5) steps\n    end\n    delete this clone\nend\n\ndefine death\nif <(clone) = [0]> then\n    hide\n    start sound [Mega Man 5 SFX \(7\) v]\n    switch costume to (death v)\n    point in direction (0)\n    create clone of (_myself_ v)\n    turn right (45) degrees\n    create clone of (_myself_ v)\n    turn right (45) degrees\n    create clone of (_myself_ v)\n    turn right (45) degrees\n    create clone of (_myself_ v)\n    turn right (45) degrees\n    create clone of (_myself_ v)\n    turn right (45) degrees\n    create clone of (_myself_ v)\n    turn right (45) degrees\n    create clone of (_myself_ v)\n    turn right (45) degrees\n    create clone of (_myself_ v)\n    turn right (45) degrees\n    point in direction (90)\nend\n\nwhen I start as a clone\nforever\n    show\nend\n\nwhen flag clicked\nset volume to (100) %\nset size to (200) %\nclear graphic effects\nset [falling v] to [0]\nset [speed y v] to [0]\nset [canmove? v] to [0]\nset [holding? v] to [0]\nset [dead: v] to [0]\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)\n\nwhen I receive [take dmg v]\nstart sound [Mega Man 5 SFX \(6\) v]\nset [takingdmg v] to [1]\nset [canmove? v] to [0]\nset [getting ouched ? v] to [1]\nrepeat (4)\n    set [ghost v] effect to (100)\n    wait (.05) seconds\n    set [ghost v] effect to (0)\n    wait (.05) seconds\nend\nset [getting ouched ? v] to [0]\nset [canmove? v] to [1]\nrepeat (6)\n    set [ghost v] effect to (100)\n    wait (.05) seconds\n    set [ghost v] effect to (0)\n    wait (.05) seconds\nend\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]\nif <(clone?) = [0]> then\n    repeat (3)\n        set [ghost v] effect to (100)\n        wait (.05) seconds\n        set [ghost v] effect to (0)\n        wait (.05) seconds\n    end\nend\n\nwhen I receive [teleportin v]\nset [md v] to [0]\nif <(clone?) = [0]> then\n    hide\n    set [canmove? v] to [-1]\n    go to [front v] layer\n    if <(PHANTOM ARMOR?) = [1]> then\n        switch costume to (phtele1 v)\n        set [sliding? v] to [0]\n        wait (1) seconds\n        switch costume to (phtele1 v)\n        set [y v] to [0]\n        go to x: (0) y: (899)\n        show\n    else\n        switch costume to (megam1 v)\n        set [sliding? v] to [0]\n        wait (1) seconds\n        switch costume to (megam1 v)\n        set [y v] to [0]\n        go to x: (0) y: (899)\n        show\n    end\n    if <<(STAGE #) = [6]> and <(Checkpoint #) = [2]>> then\n        repeat (15)\n            set [canmove? v] to [-1]\n            go to [front v] layer\n            change y by (y)\n            change [y v] by (-1)\n        end\n    else\n        if <<<(STAGE #) = [1]> and <(Checkpoint #) = [6]>> or <<(STAGE #) = [4]> or <<(STAGE #) = [3]> and <(Checkpoint #) = [4]>>>> then\n            repeat (24)\n                set [canmove? v] to [-1]\n                go to [front v] layer\n                change y by (y)\n                change [y v] by (-1)\n            end\n        else\n            repeat (21)\n                set [canmove? v] to [-1]\n                go to [front v] layer\n                change y by (y)\n                change [y v] by (-1)\n            end\n        end\n    end\n    if <(STAGE #) = [8]> then\n        repeat until <<touching (ground v)?> or <touching (misc objects v)?>>\n            change y by (y)\n            change [y v] by (-1)\n        end\n    else\n        repeat until <touching (ground v)?>\n            change y by (y)\n            change [y v] by (-1)\n        end\n    end\n    findground\n    start sound [Mega Man 5 SFX \(2\)2 v]\n    if <(PHANTOM ARMOR?) = [1]> then\n        switch costume to (phtele2 v)\n        repeat (5)\n            wait (.02) seconds\n            next costume\n        end\n        wait (0) seconds\n        switch costume to (phantom1 v)\n    else\n        switch costume to (megam2 v)\n        repeat (6)\n            wait (.02) seconds\n            next costume\n        end\n        wait (0) seconds\n    end\n    change [scroll x v] by (0)\n    set [canmove? v] to [1]\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [bossdie v]\nset [y v] to [0]\nset [canmove? v] to [-1]\nwait (1) seconds\nset [y v] to [0]\nset [canmove? v] to [-1]\nif <(x position) < [-120]> then\n    repeat (9)\n        change x by (5)\n    end\nend\nif <(x position) > [120]> then\n    repeat (9)\n        change x by (-5)\n    end\nend\nif <([falling? v] of [hitbox v]) < [3]> then\n    repeat (10)\n        if <(PHANTOM ARMOR?) = [1]> then\n            switch costume to (phantom1 v)\n        else\n            switch costume to (megamidle v)\n        end\n    end\nelse\n    repeat (10)\n        if <(PHANTOM ARMOR?) = [1]> then\n            switch costume to (phantomjump1 v)\n        else\n            switch costume to (megamjump v)\n        end\n    end\nend\nif <(STAGE #) = [9]> then\n    repeat until <<(y position) < [-103]> or <touching (ground v)?>>\n        change [y v] by (-2)\n        change y by (y)\n    end\nelse\n    repeat until <touching (ground v)?>\n        change [y v] by (-2)\n        change y by (y)\n    end\nend\nchange y by (-6)\nif <(PHANTOM ARMOR?) = [1]> then\n    switch costume to (phantom1 v)\nelse\n    switch costume to (megamidle v)\nend\nfindground\nif <(STAGE #) = [7]> then\n    wait (4) seconds\nend\nif <<(STAGE #) = [4]> and <(Checkpoint #) = [2]>> then\n    wait (.03) seconds\n    set [override v] to [1]\n    broadcast (Disable Movement v)\n    wait (1) seconds\n    set [y v] to [0]\n    set [canmove? v] to [-1]\n    change x by (5)\n    if <(x position) < [-180]> then\n        repeat (9)\n            change x by (3)\n        end\n    end\n    if <(x position) > [180]> then\n        repeat (9)\n            change x by (-3)\n        end\n    end\n    if <([falling? v] of [hitbox v]) < [3]> then\n        repeat (10)\n            if <(PHANTOM ARMOR?) = [1]> then\n                switch costume to (phantom1 v)\n            else\n                switch costume to (megamidle v)\n            end\n        end\n    else\n        repeat (10)\n            if <(PHANTOM ARMOR?) = [1]> then\n                switch costume to (phantomjump1 v)\n            else\n                switch costume to (megamjump v)\n            end\n        end\n    end\n    repeat until <touching (ground v)?>\n        change [y v] by (-2)\n        change y by (y)\n    end\n    if <(PHANTOM ARMOR?) = [1]> then\n        switch costume to (phantom1 v)\n    else\n        switch costume to (megamidle v)\n    end\n    change y by (-10)\n    findground\n    set [y v] to [15]\n    if <(PHANTOM ARMOR?) = [1]> then\n        switch costume to (phantomjump1 v)\n    else\n        switch costume to (megamjump v)\n    end\n    repeat (15)\n        change y by (y)\n        change [y v] by (-1)\n    end\n    if <(PHANTOM ARMOR?) = [1]> then\n        switch costume to (phantom1 v)\n        wait (.02) seconds\n        switch costume to (phtele7 v)\n        start sound [Mega Man 5 SFX \(31\) v]\n        repeat (6)\n            wait (.02) seconds\n            switch costume to ((costume [number v]) + (-1))\n            change y by (y)\n            change [y v] by (-1)\n        end\n        switch costume to (phtele1 v)\n        set [canmove? v] to [-1]\n        repeat until <(y position) > [180]>\n            change y by (y)\n            change [y v] by (1)\n        end\n        hide\n    else\n        switch costume to (megamidle v)\n        start sound [Mega Man 5 SFX \(31\) v]\n        repeat (7)\n            wait (.02) seconds\n            switch costume to ((costume [number v]) + (-1))\n            change y by (y)\n            change [y v] by (-1)\n        end\n        switch costume to (megam1 v)\n        set [canmove? v] to [-1]\n        repeat until <(y position) > [180]>\n            change y by (y)\n            change [y v] by (1)\n        end\n        hide\n    end\n    broadcast (Resume Stage music v)\n    broadcast (READY v)\n    wait (1) seconds\n    broadcast (Teleportin v)\nelse\n    if <<(STAGE #) = [9]> and <(BossBattle Phase) = [0]>> then\n        wait (.03) seconds\n        set [override v] to [1]\n        broadcast (Disable Movement v)\n        wait (.5) seconds\n        set [y v] to [0]\n        set [canmove? v] to [-1]\n        change x by (5)\n        if <(x position) < [-120]> then\n            repeat (9)\n                change x by (3)\n            end\n        end\n        if <(x position) > [120]> then\n            repeat (9)\n                change x by (-3)\n            end\n        end\n        if <([falling? v] of [hitbox v]) < [3]> then\n            repeat (10)\n                if <(PHANTOM ARMOR?) = [1]> then\n                    switch costume to (phantom1 v)\n                else\n                    switch costume to (megamidle v)\n                end\n            end\n        else\n            repeat (10)\n                if <(PHANTOM ARMOR?) = [1]> then\n                    switch costume to (phantomjump1 v)\n                else\n                    switch costume to (megamjump v)\n                end\n            end\n        end\n        repeat until <touching (ground v)?>\n            change [y v] by (-2)\n            change y by (y)\n        end\n        if <(PHANTOM ARMOR?) = [1]> then\n            switch costume to (phantom1 v)\n        else\n            switch costume to (megamidle v)\n        end\n        change y by (-10)\n        findground\n        change y by (-2)\n        repeat until <(x position) < [-80]>\n            if <(PHANTOM ARMOR?) = [1]> then\n                point in direction (-90)\n                switch costume to (phantom5 v)\n                repeat (7)\n                    repeat (2)\n                        change x by (-5)\n                    end\n                    next costume\n                end\n                repeat (2)\n                    change x by (-5)\n                end\n            else\n                point in direction (-90)\n                switch costume to (megamrun v)\n                repeat (5)\n                    repeat (2)\n                        change x by (-5)\n                    end\n                    next costume\n                end\n                repeat (2)\n                    change x by (-5)\n                end\n            end\n        end\n        if <(PHANTOM ARMOR?) = [1]> then\n            switch costume to (phantom1 v)\n        else\n            switch costume to (megamidle v)\n        end\n        change y by (-20)\n        findground\n        change y by (-2)\n        point in direction (90)\n        broadcast (hitboxsnap v)\n        repeat (10)\n            set [canmove? v] to [-1]\n        end\n        if <(PHANTOM ARMOR?) = [1]> then\n            switch costume to (phantom1 v)\n        else\n            switch costume to (megamidle v)\n        end\n    else\n        if <not <<(STAGE #) = [1]> and <(Checkpoint #) = [3]>>> then\n            play sound [Boss Defeated v] until done\n            set [y v] to [15]\n            if <([falling? v] of [hitbox v]) < [3]> then\n                repeat (10)\n                    if <(PHANTOM ARMOR?) = [1]> then\n                        switch costume to (phantom1 v)\n                    else\n                        switch costume to (megamidle v)\n                    end\n                end\n            else\n                repeat (10)\n                    if <(PHANTOM ARMOR?) = [1]> then\n                        switch costume to (phantomjump1 v)\n                    else\n                        switch costume to (megamjump v)\n                    end\n                end\n            end\n            if <(PHANTOM ARMOR?) = [1]> then\n                switch costume to (phantomjump1 v)\n            else\n                switch costume to (megamjump v)\n            end\n            repeat (12)\n                change y by (y)\n                change [y v] by (-1)\n            end\n            broadcast (Weapon get v)\n            wait (2.5) seconds\n            repeat (5)\n                change y by (y)\n                change [y v] by (-1)\n            end\n            if <(PHANTOM ARMOR?) = [1]> then\n                switch costume to (phantom1 v)\n                wait (.02) seconds\n                switch costume to (phtele7 v)\n                start sound [Mega Man 5 SFX \(31\) v]\n                repeat (6)\n                    wait (.02) seconds\n                    switch costume to ((costume [number v]) + (-1))\n                    change y by (y)\n                    change [y v] by (-1)\n                end\n                switch costume to (phtele1 v)\n                set [canmove? v] to [-1]\n                repeat until <(y position) > [180]>\n                    change y by (y)\n                    change [y v] by (1)\n                end\n                hide\n                broadcast (Weapon get screen v)\n            else\n                switch costume to (megamidle v)\n                start sound [Mega Man 5 SFX \(31\) v]\n                repeat (7)\n                    wait (.02) seconds\n                    switch costume to ((costume [number v]) + (-1))\n                    change y by (y)\n                    change [y v] by (-1)\n                end\n                switch costume to (megam1 v)\n                set [canmove? v] to [-1]\n                repeat until <(y position) > [180]>\n                    change y by (y)\n                    change [y v] by (1)\n                end\n                hide\n                broadcast (Weapon get screen v)\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nclear graphic effects\n\nwhen I receive [teleportin v]\nrepeat (10)\n    clear graphic effects\nend\n\nwhen I receive [battle begin v]\nset [canmove? v] to [1]\nset rotation style [left-right v]\n\nwhen flag clicked\nforever\n    if <(@HTBX_GLOBAL XY?) = [1]> then\n        if <(animations: using gun?2) = [1]> then\n            if <(PHANTOM ARMOR?) = [1]> then\n                switch costume to (phantomgrab2 v)\n            else\n                switch costume to (megamgrab2 v)\n            end\n        else\n            if <(PHANTOM ARMOR?) = [1]> then\n                switch costume to (phantomgrab1 v)\n            else\n                switch costume to (megamgrab v)\n            end\n        end\n    else\n        if <(On Snowboard?) = [1]> then\n            if <(getting ouched ?) = [1]> then\n                if <([falling? v] of [hitbox v]) > [1]> then\n                    if <(PHANTOM ARMOR?) = [1]> then\n                        switch costume to (board8 v)\n                    else\n                        switch costume to (board10 v)\n                    end\n                else\n                    if <(PHANTOM ARMOR?) = [1]> then\n                        switch costume to (board15 v)\n                    else\n                        switch costume to (board4 v)\n                    end\n                end\n            else\n                if <<([falling? v] of [hitbox v]) > [1]> and <(CanMove?) = [1]>> then\n                    if <(animations: using gun?2) = [1]> then\n                        if <(PHANTOM ARMOR?) = [1]> then\n                            switch costume to (board12 v)\n                        else\n                            switch costume to (board2 v)\n                        end\n                    else\n                        if <(PHANTOM ARMOR?) = [1]> then\n                            switch costume to (phantomboard2 v)\n                        else\n                            switch costume to (board11 v)\n                        end\n                    end\n                else\n                    if <(PHANTOM ARMOR?) = [1]> then\n                        if <(animations: using gun?2) = [1]> then\n                            switch costume to (board13 v)\n                        else\n                            switch costume to ((88) + <(round (((timer) * (5)) mod (1))) = [1]>)\n                        end\n                    else\n                        if <(animations: using gun?2) = [1]> then\n                            switch costume to (board3 v)\n                        else\n                            switch costume to (board1 v)\n                        end\n                    end\n                end\n            end\n        else\n            if <(Collide with ladder) = [1]> then\n                if <(PHANTOM ARMOR?) = [1]> then\n                    if <<mouse down?> or <key (space v) pressed?>> then\n                        switch costume to (phantomladderfire v)\n                    else\n                        if <(Ladder Climb Alternate) = [4]> then\n                            switch costume to (phantomladder4 v)\n                        else\n                            if <(Ladder Climb Alternate) = [3]> then\n                                switch costume to (phantomladder3 v)\n                            else\n                                if <(Ladder Climb Alternate) = [1]> then\n                                    switch costume to (phantomladder1 v)\n                                else\n                                    switch costume to (phantomladder2 v)\n                                end\n                            end\n                        end\n                    end\n                else\n                    if <<mouse down?> or <key (space v) pressed?>> then\n                        switch costume to (megamladderfire v)\n                    else\n                        if <(Ladder Climb Alternate) = [4]> then\n                            switch costume to (megamladder4 v)\n                        else\n                            if <(Ladder Climb Alternate) = [3]> then\n                                switch costume to (megamladder3 v)\n                            else\n                                if <(Ladder Climb Alternate) = [1]> then\n                                    switch costume to (megamladder1 v)\n                                else\n                                    switch costume to (megamladder2 v)\n                                end\n                            end\n                        end\n                    end\n                end\n            else\n                if <<([falling? v] of [hitbox v]) > [3]> and <(CanMove?) = [1]>> then\n                    if <(animations: using gun?2) = [1]> then\n                        if <(PHANTOM ARMOR?) = [1]> then\n                            switch costume to ((62) + <(round (((timer) * (5)) mod (1))) = [1]>)\n                        else\n                            switch costume to (megamanjumpgun v)\n                        end\n                    else\n                        if <(PHANTOM ARMOR?) = [1]> then\n                            switch costume to ((60) + <(round (((timer) * (5)) mod (1))) = [1]>)\n                        else\n                            switch costume to (megamjump v)\n                        end\n                    end\n                else\n                    if <(SLIDING?) = [1]> then\n                        if <(PHANTOM ARMOR?) = [1]> then\n                            switch costume to ((65) + <(round (((timer) * (5)) mod (1))) = [1]>)\n                        else\n                            switch costume to (megaslide v)\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\ngo to [front v] layer\nset [s_y v] to ((Scroll Y) + (y position))\nforever\n    if <(HEALTH) < [15]> then\n        set y to ((s_y) - (Scroll Y))\n    end\nend\n\nwhen I start as a clone\nif <<<(HEALTH) > [14]> and <(PHANTOM ARMOR?) = [0]>> or <<(HEALTH) > [26]> and <(PHANTOM ARMOR?) = [1]>>> then\n    forever\n        set size to (250) %\n        switch costume to (enemeexp1 v)\n        wait (0) seconds\n        switch costume to (enemyexp2 v)\n        wait (0) seconds\n        switch costume to (enemyxp3 v)\n        wait (0) seconds\n        switch costume to (enemyxp4 v)\n        wait (0) seconds\n        switch costume to (enemyexp5 v)\n        wait (0) seconds\n    end\nend\n\nwhen I start as a clone\nset [clone? v] to [1]\n\nwhen I start as a clone\nset [clone v] to [1]\n\nwhen I receive [die v]\nset [canmove? v] to [0]\n\nwhen I receive [die v]\nrepeat (50)\n    set [canmove? v] to [0]\nend\n\nwhen I receive [bossdie v]\ndelete this clone\n\nwhen I receive [teleportin v]\nset size to (200) %\nset [speed v] to [1]\nforever\n    if <(On Snowboard?) = [1]> then\n        point in direction (90)\n    else\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            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            end\n        end\n    end\nend\n\nwhen I receive [teleportin v]\nforever\n    if <<not <<<(HEALTH) > [14]> and <(PHANTOM ARMOR?) = [0]>> or <<(HEALTH) > [26]> and <(PHANTOM ARMOR?) = [1]>>>> and <not <(CanMove?) = [-1]>>> then\n        if <(On Snowboard?) = [1]> then\n            go to x: ([x position v] of [hitbox v]) y: ((([y position v] of [hitbox v]) + (-3)) + (YPos Offset))\n        else\n            if <<<(STAGE #) = [3]> and <not <touching (misc objects v)?>>> and <(Scroll X) < [2200]>> then\n                go to x: ([x position v] of [hitbox v]) y: ((([y position v] of [hitbox v]) + (-10)) + (YPos Offset))\n            else\n                go to x: ([x position v] of [hitbox v]) y: ((([y position v] of [hitbox v]) + (-5)) + (YPos Offset))\n            end\n        end\n    end\nend\n\nwhen I receive [stunned v]\nset [canmove? v] to [-1]\nrepeat (10)\n    change x by (5)\n    wait (0) seconds\n    repeat (2)\n        change x by (-5)\n        wait (0) seconds\n    end\n    change x by (5)\n    wait (0) seconds\nend\nset [canmove? v] to [1]\n\nwhen I start as a clone\nwait until <<<touching (enemies v)?> or <touching (boss v)?>> or <<touching (c'mon! not more enemies v)?> or <touching (boss 2: electric boogaloo v)?>>>\nif <not <<<(HEALTH) > [14]> and <(PHANTOM ARMOR?) = [0]>> or <<(HEALTH) > [26]> and <(PHANTOM ARMOR?) = [1]>>>> then\n    wait (.06) seconds\n    delete this clone\nend\n\nwhen I receive [battle begin v]\nset [canmove? v] to [0]\nwait (2) seconds\nset [canmove? v] to [1]\n\nwhen I receive [ready v]\nset [canmove? v] to [0]\nhide\n\nwhen I receive [teleportin v]\ndelete this clone\n\nset [megaman costume v] to [1]\n\nwhen I receive [take dmg v]\nrepeat (45)\n    set [invincibility v] to [1]\nend\nset [invincibility v] to [0]\n\nwhen I receive [die v]\nwait (1) seconds\nrepeat (10)\n    hide\nend\n\nwhen I start as a clone\nwait until <touching (_edge_ v)?>\ndelete this clone\n\nwhen I receive [ready v]\nset [hold v] to [0]\n\nwhen I receive [disable movement v]\nset [canmove? v] to [0]\n\nwhen I receive [enable movement v]\nset [canmove? v] to [1]\n\nwhen I receive [disable movement v]\nif <(clone?) = [0]> then\n    set [canmove? v] to [0]\n    if <([falling? v] of [hitbox v]) < [3]> then\n        repeat (3)\n            if <(PHANTOM ARMOR?) = [1]> then\n                switch costume to (phantom1 v)\n            else\n                switch costume to (megamidle v)\n            end\n        end\n    else\n        repeat (3)\n            if <(PHANTOM ARMOR?) = [1]> then\n                switch costume to (phantomjump1 v)\n            else\n                switch costume to (megamjump v)\n            end\n        end\n    end\nend\n\ndefine findground\nset [canmove? v] to [-1]\nif <(STAGE #) = [8]> then\n    repeat until <not <<touching (ground v)?> or <touching (misc objects v)?>>>\n        change y by (.2)\n    end\nelse\n    repeat until <not <touching (ground v)?>>\n        change y by (.2)\n    end\nend\n\nwhen I receive [teleportin v]\nforever\n    if <touching (switchblock thing v)?> then\n        set [touching_switchblock v] to [1]\n    else\n        set [touching_switchblock v] to [0]\n    end\nend\n\nwhen I receive [teleportin v]\nrepeat (50)\n    go to [front v] layer\nend\n\nwhen I receive [bosscutscene v]\nif <(override) = [0]> then\n    wait (.03) seconds\n    set [y v] to [0]\n    set [canmove? v] to [-1]\n    change x by (5)\n    if <(x position) < [-180]> then\n        repeat (9)\n            change x by (3)\n        end\n    end\n    if <(x position) > [180]> then\n        repeat (9)\n            change x by (-3)\n        end\n    end\n    if <([falling? v] of [hitbox v]) < [3]> then\n        repeat (10)\n            if <(PHANTOM ARMOR?) = [1]> then\n                switch costume to (phantom1 v)\n            else\n                switch costume to (megamidle v)\n            end\n        end\n    else\n        repeat (10)\n            if <(PHANTOM ARMOR?) = [1]> then\n                switch costume to (phantomjump1 v)\n            else\n                switch costume to (megamjump v)\n            end\n        end\n    end\n    repeat until <touching (ground v)?>\n        change [y v] by (-2)\n        change y by (y)\n    end\n    change y by (-6)\n    if <(PHANTOM ARMOR?) = [1]> then\n        switch costume to (phantom1 v)\n    else\n        switch costume to (megamidle v)\n    end\n    findground\n    change y by (-2)\n    broadcast (hitboxsnap v)\n    point in direction (90)\n    if <(PHANTOM ARMOR?) = [1]> then\n        switch costume to (phantom1 v)\n    else\n        switch costume to (megamidle v)\n    end\nend\n\nwhen I receive [teleportin v]\nforever\n    set [brightness v] effect to ((Darkness) + (md))\nend\n\nwhen I receive [megaman walk to left v]\nwait (.03) seconds\nset [override v] to [1]\nbroadcast (Disable Movement v)\nwait (.5) seconds\nset [y v] to [0]\nset [canmove? v] to [-1]\nchange x by (5)\nif <(x position) < [-150]> then\n    repeat (9)\n        change x by (5)\n    end\nend\nif <(x position) > [150]> then\n    repeat (9)\n        change x by (-5)\n    end\nend\nif <([falling? v] of [hitbox v]) < [3]> then\n    repeat (10)\n        if <(PHANTOM ARMOR?) = [1]> then\n            switch costume to (phantom1 v)\n        else\n            switch costume to (megamidle v)\n        end\n    end\nelse\n    repeat (10)\n        if <(PHANTOM ARMOR?) = [1]> then\n            switch costume to (phantomjump1 v)\n        else\n            switch costume to (megamjump v)\n        end\n    end\nend\nrepeat until <touching (ground v)?>\n    change [y v] by (-2)\n    change y by (y)\nend\nif <(PHANTOM ARMOR?) = [1]> then\n    switch costume to (phantom1 v)\nelse\n    switch costume to (megamidle v)\nend\nchange y by (-10)\nfindground\nchange y by (-2)\nrepeat until <(x position) < [-80]>\n    if <(PHANTOM ARMOR?) = [1]> then\n        point in direction (-90)\n        switch costume to (phantom5 v)\n        repeat (7)\n            repeat (2)\n                change x by (-5)\n            end\n            next costume\n        end\n        repeat (2)\n            change x by (-5)\n        end\n    else\n        point in direction (-90)\n        switch costume to (megamrun v)\n        repeat (5)\n            repeat (2)\n                change x by (-5)\n            end\n            next costume\n        end\n        repeat (2)\n            change x by (-5)\n        end\n    end\nend\nif <(PHANTOM ARMOR?) = [1]> then\n    switch costume to (phantom1 v)\nelse\n    switch costume to (megamidle v)\nend\nchange y by (-20)\nfindground\nchange y by (-2)\npoint in direction (90)\nbroadcast (Bosscutscene v)\nbroadcast (hitboxsnap v)\nrepeat (10)\n    set [canmove? v] to [-1]\nend\nif <(PHANTOM ARMOR?) = [1]> then\n    switch costume to (phantom1 v)\nelse\n    switch costume to (megamidle v)\nend\n\nwhen I receive [teleportin v]\nset [override v] to [0]\n\nwhen I receive [weapon get screen v]\nwait (1.6) seconds\nif <(PHANTOM ARMOR?) = [1]> then\n    go to [front v] layer\n    go to [front v] layer\n    switch costume to (phtele1 v)\n    go to x: (0) y: (10000)\n    set [canmove? v] to [-1]\n    show\n    set [y v] to [0]\n    repeat (10)\n        change y by (y)\n        change [y v] by (-3)\n    end\n    set y to (17)\n    switch costume to (phtele1 v)\n    repeat (6)\n        wait (.02) seconds\n        next costume\n    end\n    wait (.02) seconds\n    repeat (5)\n        switch costume to (phantom1 v)\n        repeat (3)\n            wait (.02) seconds\n            next costume\n        end\n        wait (.02) seconds\n    end\nelse\n    go to [front v] layer\n    go to [front v] layer\n    switch costume to (megam1 v)\n    go to x: (0) y: (10000)\n    set [canmove? v] to [-1]\n    show\n    set [y v] to [0]\n    repeat (10)\n        change y by (y)\n        change [y v] by (-3)\n    end\n    set y to (17)\n    switch costume to (megam1 v)\n    repeat (7)\n        wait (.02) seconds\n        next costume\n    end\nend\n\nwhen I receive [happy megaman v]\nif <(PHANTOM ARMOR?) = [1]> then\n    repeat (3)\n        switch costume to (phantom1 v)\n        wait (.2) seconds\n        switch costume to (phantomshoot v)\n        wait (.1) seconds\n    end\n    wait (.5) seconds\n    switch costume to (phtele7 v)\n    repeat (6)\n        wait (.02) seconds\n        switch costume to ((costume [number v]) + (-1))\n    end\n    set y to (17)\n    set [y v] to [0]\n    repeat (15)\n        change y by (y)\n        change [y v] by (3)\n    end\n    hide\n    broadcast (Get rid of weapon get v)\nelse\n    repeat (3)\n        switch costume to (megamidle v)\n        wait (.2) seconds\n        switch costume to (megamfire v)\n        wait (.1) seconds\n    end\n    wait (.5) seconds\n    switch costume to (megamidle v)\n    repeat (7)\n        wait (.02) seconds\n        switch costume to ((costume [number v]) + (-1))\n    end\n    set y to (17)\n    set [y v] to [0]\n    repeat (15)\n        change y by (y)\n        change [y v] by (3)\n    end\n    hide\n    broadcast (Get rid of weapon get v)\nend\n\nwhen I receive [happy megaman v]\nstart sound [weapon_get v]\nif <(STAGE #) < [5]> then\n    set [megaman costume v] to ((STAGE #) + (1))\nelse\n    set [megaman costume v] to ((STAGE #) + (0))\nend\nrepeat (10)\n    set [brightness v] effect to (0)\n    create clone of (sp wep aura v)\n    wait (.1) seconds\n    set [brightness v] effect to (100)\nend\nrepeat (10)\n    change [brightness v] effect by (-10)\nend\nset [megaman costume v] to [0]\nclear graphic effects\n\nwhen flag clicked\nforever\n    set [sliding? v] to ([sliding?2 v] of [hitbox v])\nend\n\n@hpbar\n\nwhen flag clicked\nwait (1) seconds\nforever\n    wait until <<<(HEALTH) > [14]> and <(PHANTOM ARMOR?) = [0]>> or <<(HEALTH) > [26]> and <(PHANTOM ARMOR?) = [1]>>>\n    if <([costume # v] of [boss hp v]) > [28]> then\n        if <(PHANTOM ARMOR?) = [1]> then\n            set [health v] to [24]\n        else\n            set [health v] to [13]\n        end\n    else\n        broadcast (die v)\n        wait until <<<(HEALTH) < [15]> and <(PHANTOM ARMOR?) = [0]>> or <<(HEALTH) < [27]> and <(PHANTOM ARMOR?) = [1]>>>\n    end\n    wait (.05) seconds\nend\n\nwhen I receive [take dmg v]\nif <(INVINCIBILITY) = [0]> then\n    set [brightness v] effect to (60)\n    wait (.2) seconds\nend\nclear graphic effects\nwait (.2) seconds\n\nwhen flag clicked\nhide\nrepeat (50)\n    go to [front v] layer\nend\n\nwhen I receive [teleportin v]\nset [health v] to [1]\npoint in direction (180)\ngo to x: (-150) y: (151)\nclear graphic effects\nset size to (250) %\nshow\nforever\n    if <(PHANTOM ARMOR?) = [1]> then\n        switch costume to ((HEALTH) + (27))\n    else\n        switch costume to (HEALTH)\n    end\nend\n\nwhen I receive [bossdie v]\nhide\ndelete this clone\n\nwhen I receive [heal v]\nstart sound [Mega Man 5 SFX \(16\) v]\nrepeat (2)\n    set [brightness v] effect to (50)\n    wait (.1) seconds\n    clear graphic effects\n    wait (.1) seconds\nend\n\nwhen I receive [you win v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [die v]\nhide\n\nwhen I start as a clone\nclear graphic effects\ngo to [front v] layer\nset size to (200) %\ngo to (mega man v)\nset rotation style [left-right v]\npoint in direction ([direction v] of [hitbox v])\nif <([direction v] of [hitbox v]) = [90]> then\n    change x by (-25)\nelse\n    change x by (25)\nend\nchange y by (-4)\nshow\nswitch costume to (dashfx1 v)\nrepeat (3)\n    wait (0) seconds\n    next costume\nend\nwait (0) seconds\ndelete this clone\n\nwhen I receive [die v]\ndelete this clone\n\nwhen I receive [teleportin v]\nset [invincibility v] to [0]\n\nwhen I receive [take dmg v]\nset [invincibility v] to [1]\nwait (.8) seconds\nset [invincibility v] to [0]\n\nwhen I receive [battle begin v]\ngo to [front v] layer\n\nwhen I receive [set up stage v]\nrepeat (10)\n    set [health v] to [1]\nend\nshow\n\nwhen I receive [stage intro v]\nhide\n\nwhen I receive [teleportin v]\nrepeat (100)\n    go to [front v] layer\nend\n\nwhen I start as a clone\nforever\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change x by (-10)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change x by (10)\n    end\nend\n\nwhen I receive [enable movement v]\nshow\n\nwhen I receive [autoscroller v]\nshow\n\nwhen I receive [stage select v]\nwait (3) seconds\nset [health v] to [1]\n\nwhen I receive [regenerate misc objects v]\nrepeat (25)\n    go to [front v] layer\nend\n\n@READY\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [ready v]\nset [megaman costume v] to [1]\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nswitch costume to (costume2 v)\ngo to x: (10) y: (15)\nrepeat (4)\n    go to [front v] layer\n    show\n    wait (.2) seconds\n    hide\n    wait (.2) seconds\nend\n\nwhen I start as a clone\nif <(Dmg thingy) = [1]> then\n    switch costume to (dmg v)\n    go to [front v] layer\n    repeat (3)\n        go to [front v] layer\n        show\n        wait (.05) seconds\n        hide\n        wait (.05) seconds\n    end\n    delete this clone\nelse\n    if <(Dmg thingy) = [2]> then\n        switch costume to (slide1 v)\n        go to (mega man v)\n        change y by (40)\n        change x by (-35)\n        go to [front v] layer\n        go to [front v] layer\n        show\n        repeat (2)\n            wait (.05) seconds\n            next costume\n        end\n        wait (.05) seconds\n        delete this clone\n    else\n        if <(Dmg thingy) = [3]> then\n            switch costume to (slide1 v)\n            go to (mega man v)\n            change y by (40)\n            change x by (0)\n            go to [front v] layer\n            go to [front v] layer\n            show\n            repeat (2)\n                wait (.05) seconds\n                next costume\n            end\n            wait (.05) seconds\n            delete this clone\n        else\n            if <(Dmg thingy) = [4]> then\n                switch costume to (slide1 v)\n                go to (mega man v)\n                change y by (40)\n                change x by (35)\n                go to [front v] layer\n                go to [front v] layer\n                show\n                repeat (2)\n                    wait (.05) seconds\n                    next costume\n                end\n                wait (.05) seconds\n                delete this clone\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <(Dmg thingy) = [1]> then\n    forever\n        go to (mega man v)\n    end\nelse\nend\n\nwhen I receive [ready v]\nrepeat (50)\n    set [scroll x v] to [0]\n    set [scroll y v] to [0]\nend\n\n@boss die\n\nwhen flag clicked\nhide\n\nwhen I receive [bossdie v]\nif <<<not <<(Checkpoint #) = [2]> and <(STAGE #) = [4]>>> and <<not <<(Checkpoint #) = [3]> and <(STAGE #) = [1]>>> and <not <(STAGE #) = [9]>>>> and <<not <(STAGE #) = [7]>> and <not <(STAGE #) = [3]>>>> then\n    if <(ALT BOSS?) = [1]> then\n        go to (boss 2: electric boogaloo v)\n    else\n        go to (boss v)\n    end\n    death\n    wait (1) seconds\nend\n\ndefine death\nif <(clone) = [0]> then\n    set size to (250) %\n    start sound [Mega Man 5 SFX \(7\)2 v]\n    switch costume to (death v)\n    point in direction (0)\n    create clone of (_myself_ v)\n    turn right (45) degrees\n    create clone of (_myself_ v)\n    turn right (45) degrees\n    create clone of (_myself_ v)\n    turn right (45) degrees\n    create clone of (_myself_ v)\n    turn right (45) degrees\n    create clone of (_myself_ v)\n    turn right (45) degrees\n    create clone of (_myself_ v)\n    turn right (45) degrees\n    create clone of (_myself_ v)\n    turn right (45) degrees\n    create clone of (_myself_ v)\n    turn right (45) degrees\n    point in direction (90)\nend\n\nwhen I start as a clone\nset [clone v] to [1]\n\nwhen I start as a clone\nshow\nforever\n    wait (0) seconds\n    go to [front v] layer\n    next costume\nend\n\nwhen I start as a clone\nrepeat until <touching (_edge_ v)?>\n    move (4) steps\nend\ndelete this clone\n\n@slide checker\n\nwhen flag clicked\nset [ghost v] effect to (99)\nshow\nforever\n    go to (hitbox v)\nend\n\nwhen flag clicked\nforever\n    if <touching (ground v)?> then\n        set [stay sliding v] to [1]\n    else\n        set [stay sliding v] to [0]\n    end\nend\n\n@Level_Art\n\nwhen I receive [setup v]\nhide\nclear graphic effects\ngo to x: (0) y: (0)\nset [level_x v] to [0]\nif <[1] = [1]> then\n    delete this clone\nend\nCreate\n\ndefine Create\nclear graphic effects\nset [brightness v] effect to (5)\nif <(STAGE #) = [4]> then\n    switch costume to (junkbg v)\n    set [level_y v] to [15]\n    set [level_x v] to [-510]\n    set size to (200) %\n    set [brightness v] effect to (5)\n    repeat (2)\n        create clone of (_myself_ v)\n        change [level_x v] by (510)\n    end\n    switch costume to (junkbg3 v)\n    repeat (3)\n        create clone of (_myself_ v)\n        change [level_x v] by (510)\n    end\n    change [level_x v] by (-510)\n    change [level_y v] by (-440)\n    create clone of (_myself_ v)\n    switch costume to (bgmm9wily1alt3 v)\n    change [level_y v] by (-440)\n    create clone of (_myself_ v)\n    repeat (4)\n        change [level_x v] by (510)\n        create clone of (_myself_ v)\n    end\n    switch costume to (bgdust2 v)\n    set [level_y v] to [-3010]\n    set [level_x v] to [3050]\n    create clone of (_myself_ v)\n    repeat (5)\n        create clone of (_myself_ v)\n        change [level_x v] by (510)\n    end\nend\nif <(STAGE #) = [3]> then\n    switch costume to (cossack_1_alt_2 v)\n    set [level_y v] to [15]\n    set [level_x v] to [0]\n    set size to (200) %\n    set [brightness v] effect to (0)\n    repeat (8)\n        create clone of (_myself_ v)\n        change [level_x v] by (510)\n    end\n    switch costume to (cossack_1_alt_2 v)\n    set [level_y v] to [430]\n    set [level_x v] to [2533]\n    set size to (200) %\n    set [brightness v] effect to (0)\n    repeat (8)\n        create clone of (_myself_ v)\n        change [level_x v] by (510)\n    end\n    set [brightness v] effect to (-50)\n    switch costume to (freezebg v)\n    set [level_y v] to [35]\n    set [level_x v] to [0]\n    create clone of (_myself_ v)\n    switch costume to (freezebg2 v)\n    set [level_y v] to [35]\n    set [level_x v] to [0]\n    create clone of (_myself_ v)\n    switch costume to (freezebg3 v)\n    set [level_y v] to [35]\n    set [level_x v] to [0]\n    create clone of (_myself_ v)\n    switch costume to (cossack_1_alt_2 v)\n    set [level_y v] to [430]\n    set [level_x v] to [30000]\n    set size to (200) %\n    set [brightness v] effect to (0)\n    repeat (5)\n        create clone of (_myself_ v)\n        change [level_x v] by (510)\n    end\nend\nif <(STAGE #) = [6]> then\n    switch costume to (endless_8 v)\n    set [level_y v] to [15]\n    set [level_x v] to [0]\n    set size to (200) %\n    set [brightness v] effect to (0)\n    create clone of (_myself_ v)\nend\nif <(STAGE #) = [8]> then\n    switch costume to (pixil-gif-drawing-6 v)\n    set [level_y v] to [-35]\n    set [level_x v] to [0]\n    set size to (200) %\n    set [brightness v] effect to (15)\n    create clone of (_myself_ v)\n    switch costume to (pixil-gif-drawing-2 v)\n    create clone of (_myself_ v)\n    switch costume to (pixil-gif-drawing-3 v)\n    create clone of (_myself_ v)\n    set [level_y v] to [-480]\n    set [level_x v] to [4500]\n    set size to (200) %\n    switch costume to (bgsplash2 v)\n    set [brightness v] effect to (15)\n    repeat (7)\n        create clone of (_myself_ v)\n        change [level_x v] by (510)\n    end\n    set [level_y v] to [410]\n    set [level_x v] to [8000]\n    set size to (200) %\n    switch costume to (windbg2 v)\n    set [brightness v] effect to (15)\n    repeat (2)\n        create clone of (_myself_ v)\n        change [level_y v] by (440)\n    end\n    switch costume to (bgdark2alt2 v)\n    set [brightness v] effect to (15)\n    change [level_y v] by (-440)\n    change [level_x v] by (-5)\n    repeat (2)\n        change [level_x v] by (510)\n        create clone of (_myself_ v)\n    end\n    repeat (4)\n        change [level_y v] by (440)\n        create clone of (_myself_ v)\n    end\nend\nif <(STAGE #) = [9]> then\n    switch costume to (bgmm9wily4 v)\n    set [level_y v] to [15]\n    set [level_x v] to [0]\n    set size to (200) %\n    set [brightness v] effect to (0)\n    repeat (4)\n        create clone of (_myself_ v)\n        change [level_y v] by (-440)\n    end\nend\nif <(STAGE #) = [7]> then\n    switch costume to (hard v)\n    set [level_y v] to [15]\n    set [level_x v] to [0]\n    set size to (200) %\n    set [brightness v] effect to (0)\n    repeat (3)\n        create clone of (_myself_ v)\n        next costume\n    end\nend\nif <(STAGE #) = [1]> then\n    switch costume to (block_22 v)\n    set size to (200) %\n    set [level_y v] to [15]\n    set [level_x v] to [0]\n    repeat (9)\n        create clone of (_myself_ v)\n        change [level_y v] by (440)\n    end\n    switch costume to (block_1 v)\n    set [level_y v] to [768]\n    set [level_x v] to [470]\n    repeat (8)\n        create clone of (_myself_ v)\n        change [level_x v] by (510)\n    end\n    switch costume to (block_1 v)\n    set size to (200) %\n    set [level_y v] to [1198]\n    set [level_x v] to [400]\n    repeat (2)\n        create clone of (_myself_ v)\n        change [level_x v] by (510)\n    end\n    go to [front v] layer\n    switch costume to (nitro_1 v)\n    set size to (200) %\n    set [level_y v] to [1135]\n    set [level_x v] to [1460]\n    repeat (3)\n        create clone of (_myself_ v)\n        change [level_y v] by (440)\n        switch costume to (endless_14 v)\n    end\n    go to [front v] layer\n    switch costume to (block_22 v)\n    set size to (200) %\n    set [level_y v] to [2170]\n    set [level_x v] to [960]\n    create clone of (_myself_ v)\n    change [level_y v] by (440)\n    create clone of (_myself_ v)\n    switch costume to (endless_14 v)\n    change [level_x v] by (460)\n    create clone of (_myself_ v)\n    switch costume to (wily_4_2 v)\n    change [level_x v] by (510)\n    create clone of (_myself_ v)\nend\nif <(STAGE #) = [2]> then\n    switch costume to (bgastro v)\n    set size to (200) %\n    set [level_y v] to [15]\n    set [level_x v] to [0]\n    repeat (9)\n        create clone of (_myself_ v)\n        change [level_x v] by (510)\n    end\n    set [level_y v] to [440]\n    set [level_x v] to [3954]\n    repeat (8)\n        switch costume to (bgknight3 v)\n        create clone of (_myself_ v)\n        change [level_x v] by (510)\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [47]> then\n    forever\n        switch costume to (pixil-gif-drawing-6 v)\n        repeat (2)\n            wait (.1) seconds\n            next costume\n        end\n        wait (.02) seconds\n    end\nend\nif <(costume [number v]) = [57]> then\n    forever\n        switch costume to (cossack_1_alt_2 v)\n        repeat (2)\n            wait (0) seconds\n            next costume\n        end\n        wait (0) seconds\n    end\nend\nif <(costume [number v]) = [64]> then\n    forever\n        switch costume to (junkbg v)\n        wait (.8) seconds\n        next costume\n        wait (.3) seconds\n    end\nend\nif <(costume [number v]) = [66]> then\n    forever\n        switch costume to (junkbg3 v)\n        wait (.8) seconds\n        next costume\n        wait (.3) seconds\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nforever\n    if <<(costume [number v]) = [7]> or <<(costume [number v]) = [47]> or <<(costume [number v]) = [38]> or <(costume [number v]) = [61]>>>> then\n        forever\n            go to [back v] layer\n            set x to (((Scroll X) * (-.05)) + ())\n            set y to (((Level_Y) - (Scroll Y)) + (YPos Offset))\n            if <<<(x position) < [-475]> or <(x position) > [475]>> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [380]>> then\n                hide\n            else\n                show\n            end\n        end\n    else\n        if <<(costume [number v]) = [5]> or <<(costume [number v]) = [39]> or <<(costume [number v]) = [50]> or <(costume [number v]) = [62]>>>> then\n            forever\n                go to [back v] layer\n                set x to (((Scroll X) * (-.05)) + (-511))\n                set y to (((Level_Y) - (Scroll Y)) + (YPos Offset))\n                if <<<(x position) < [-475]> or <(x position) > [480]>> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [380]>> then\n                    hide\n                else\n                    show\n                end\n            end\n        else\n            if <<<(costume [number v]) = [6]> or <(costume [number v]) = [60]>> or <<(costume [number v]) = [40]> or <<(costume [number v]) = [51]> or <(costume [number v]) = [70]>>>> then\n                forever\n                    go to [back v] layer\n                    if <(costume [number v]) = [70]> then\n                        set x to (0)\n                    else\n                        set x to (((Scroll X) * (-.05)) + (511))\n                    end\n                    set y to (((Level_Y) - (Scroll Y)) + (YPos Offset))\n                    if <<<(x position) < [-475]> or <(x position) > [480]>> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [380]>> then\n                        hide\n                    else\n                        show\n                    end\n                end\n            else\n                if <(costume [number v]) = [4]> then\n                    go to [back v] layer\n                    set x to ((Level_X) - (Scroll X))\n                    set y to (((Level_Y) - (Scroll Y)) + (YPos Offset))\n                    if <<<((Level_X) - (Scroll X)) < [-200]> or <((Level_X) - (Scroll X)) > [500]>> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [400]>> then\n                        hide\n                    else\n                        show\n                    end\n                else\n                    go to [back v] layer\n                    set x to ((Level_X) - (Scroll X))\n                    set y to (((Level_Y) - (Scroll Y)) + (YPos Offset))\n                    if <<([abs v] of ((Level_X) - (Scroll X)) ) > [498]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [400]>> then\n                        hide\n                    else\n                        show\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [setup v]\ndelete this clone\n\nwhen I receive [ready v]\nset [darkness v] to [0]\nif <(STAGE #) = [4]> then\n    if <(Checkpoint #) = [3]> then\n        repeat (15)\n            set [darkness v] to [0]\n            set [scroll y min v] to [-3010]\n            set [scroll y max v] to [-3010]\n            set [scroll x min v] to [4630]\n            set [scroll x max v] to [4630]\n        end\n    end\n    if <(Checkpoint #) = [2]> then\n        repeat (15)\n            set [darkness v] to [0]\n            set [scroll y min v] to [-860]\n            set [scroll y max v] to [-860]\n            set [scroll x min v] to [1480]\n            set [scroll x max v] to [1555]\n        end\n    end\n    if <(Checkpoint #) = [1]> then\n        repeat (15)\n            set [darkness v] to [0]\n            set [scroll y min v] to [0]\n            set [scroll y max v] to [0]\n            set [scroll x min v] to [0]\n            set [scroll x max v] to [0]\n        end\n    end\nend\nif <(STAGE #) = [8]> then\n    if <(Checkpoint #) = [6]> then\n        repeat (15)\n            set [darkness v] to [0]\n            set [scroll y min v] to [860]\n            set [scroll y max v] to [860]\n            set [scroll x min v] to [8980]\n            set [scroll x max v] to [8980]\n        end\n    end\n    if <(Checkpoint #) = [5]> then\n        repeat (15)\n            set [darkness v] to [0]\n            set [scroll y min v] to [860]\n            set [scroll y max v] to [860]\n            set [scroll x min v] to [8000]\n            set [scroll x max v] to [8000]\n        end\n    end\n    if <(Checkpoint #) = [4]> then\n        repeat (15)\n            set [darkness v] to [0]\n            set [scroll y min v] to [-430]\n            set [scroll y max v] to [-430]\n            set [scroll x min v] to [7075]\n            set [scroll x max v] to [7075]\n        end\n    end\n    if <(Checkpoint #) = [3]> then\n        repeat (15)\n            set [darkness v] to [0]\n            set [scroll y min v] to [-430]\n            set [scroll y max v] to [-430]\n            set [scroll x min v] to [6030]\n            set [scroll x max v] to [6030]\n        end\n    end\n    if <(Checkpoint #) = [2]> then\n        repeat (15)\n            set [darkness v] to [0]\n            set [scroll y min v] to [-430]\n            set [scroll y max v] to [-430]\n            set [scroll x min v] to [4500]\n            set [scroll x max v] to [4500]\n        end\n    end\n    if <(Checkpoint #) = [1]> then\n        repeat (15)\n            set [darkness v] to [0]\n            set [scroll y min v] to [0]\n            set [scroll y max v] to [0]\n            set [scroll x min v] to [0]\n            set [scroll x max v] to [4000]\n        end\n    end\nend\nif <(STAGE #) = [6]> then\n    if <(Checkpoint #) = [1]> then\n        repeat (15)\n            set [darkness v] to [0]\n            set [scroll y min v] to [0]\n            set [scroll y max v] to [0]\n            set [scroll x min v] to [0]\n            set [scroll x max v] to [3590]\n        end\n    end\n    if <(Checkpoint #) = [2]> then\n        repeat (15)\n            set [darkness v] to [0]\n            set [scroll y min v] to [0]\n            set [scroll y max v] to [0]\n            set [scroll x min v] to [3590]\n            set [scroll x max v] to [3590]\n        end\n    end\n    if <(Checkpoint #) = [3]> then\n        repeat (15)\n            set [darkness v] to [0]\n            set [scroll y min v] to [2263]\n            set [scroll y max v] to [2263]\n            set [scroll x min v] to [4590]\n            set [scroll x max v] to [4590]\n        end\n    end\n    if <(Checkpoint #) = [4]> then\n        repeat (15)\n            set [darkness v] to [0]\n            set [scroll y min v] to [3043]\n            set [scroll y max v] to [3043]\n            set [scroll x min v] to [3590]\n            set [scroll x max v] to [7195]\n        end\n    end\n    if <(Checkpoint #) = [5]> then\n        repeat (15)\n            set [darkness v] to [0]\n            set [scroll y min v] to [3043]\n            set [scroll y max v] to [3043]\n            set [scroll x min v] to [7675]\n            set [scroll x max v] to [7675]\n        end\n    end\nend\nif <(STAGE #) = [9]> then\n    if <(Checkpoint #) = [1]> then\n        repeat (15)\n            set [scroll y min v] to [0]\n            set [scroll y max v] to [0]\n            set [scroll x min v] to [0]\n            set [scroll x max v] to [0]\n        end\n    end\nend\nif <(STAGE #) = [7]> then\n    if <(Checkpoint #) = [1]> then\n        set [darkness v] to [-15]\n        repeat (15)\n            set [scroll y min v] to [0]\n            set [scroll y max v] to [0]\n            set [scroll x min v] to [0]\n            set [scroll x max v] to [1722]\n        end\n    end\n    if <(Checkpoint #) = [2]> then\n        set [darkness v] to [-15]\n        repeat (15)\n            set [scroll y min v] to [-430]\n            set [scroll y max v] to [-430]\n            set [scroll x min v] to [1722]\n            set [scroll x max v] to [1722]\n        end\n    end\n    if <(Checkpoint #) = [3]> then\n        set [darkness v] to [-15]\n        repeat (15)\n            set [scroll y min v] to [0]\n            set [scroll y max v] to [0]\n            set [scroll x min v] to [2222]\n            set [scroll x max v] to [2222]\n        end\n    end\n    if <(Checkpoint #) = [4]> then\n        set [darkness v] to [-15]\n        repeat (15)\n            set [scroll y min v] to [0]\n            set [scroll y max v] to [0]\n            set [scroll x min v] to [4790]\n            set [scroll x max v] to [4790]\n        end\n    end\nend\nif <(STAGE #) = [3]> then\n    if <(Checkpoint #) = [4]> then\n        set [darkness v] to [-15]\n        repeat (15)\n            set [scroll y min v] to [430]\n            set [scroll y max v] to [430]\n            set [scroll x min v] to [31200]\n            set [scroll x max v] to [31200]\n        end\n    end\n    if <(Checkpoint #) = [3]> then\n        set [darkness v] to [-15]\n        repeat (15)\n            set [scroll y min v] to [430]\n            set [scroll y max v] to [430]\n            set [scroll x min v] to [30188]\n            set [scroll x max v] to [30700]\n        end\n    end\n    if <(Checkpoint #) = [2]> then\n        set [darkness v] to [-15]\n        repeat (15)\n            set [scroll y min v] to [430]\n            set [scroll y max v] to [430]\n            set [scroll x min v] to [3039]\n            set [scroll x max v] to [3039]\n        end\n    end\n    if <(Checkpoint #) = [1]> then\n        set [darkness v] to [-15]\n        repeat (15)\n            set [scroll y min v] to [0]\n            set [scroll y max v] to [0]\n            set [scroll x min v] to [0]\n            set [scroll x max v] to [2500]\n        end\n    end\nend\nif <(STAGE #) = [1]> then\n    if <(Checkpoint #) = [1]> then\n        repeat (15)\n            set [scroll y min v] to [0]\n            set [scroll y max v] to [768]\n            set [scroll x min v] to [0]\n            set [scroll x max v] to [0]\n        end\n    end\n    if <<(Checkpoint #) = [2]> or <(Checkpoint #) = [3]>> then\n        repeat (15)\n            set [scroll y min v] to [768]\n            set [scroll y max v] to [768]\n            set [scroll x min v] to [500]\n            set [scroll x max v] to [500]\n        end\n    end\n    if <(Checkpoint #) = [4]> then\n        repeat (15)\n            set [scroll y min v] to [1198]\n            set [scroll x min v] to [1460]\n            set [scroll x max v] to [1460]\n            set [scroll y max v] to [2170]\n        end\n    end\n    if <(Checkpoint #) = [5]> then\n        repeat (15)\n            set [scroll y min v] to [2170]\n            set [scroll x min v] to [960]\n            set [scroll x max v] to [960]\n            set [scroll y max v] to [2170]\n        end\n    end\n    if <(Checkpoint #) = [6]> then\n        repeat (15)\n            set [scroll y min v] to [2600]\n            set [scroll y max v] to [2600]\n            set [scroll x min v] to [1440]\n            set [scroll x max v] to [1440]\n        end\n    end\nend\nif <(STAGE #) = [2]> then\n    if <(Checkpoint #) = [1]> then\n        repeat (15)\n            set [scroll y min v] to [0]\n            set [scroll y max v] to [0]\n            set [scroll x min v] to [0]\n            set [scroll x max v] to [3954]\n        end\n    end\n    if <(Checkpoint #) = [2]> then\n        repeat (15)\n            set [scroll y min v] to [430]\n            set [scroll y max v] to [430]\n            set [scroll x min v] to [3954]\n            set [scroll x max v] to [3954]\n        end\n    end\n    if <(Checkpoint #) = [3]> then\n        repeat (15)\n            set [scroll y min v] to [430]\n            set [scroll y max v] to [430]\n            set [scroll x min v] to [7012]\n            set [scroll x max v] to [7012]\n        end\n    end\nend\n\nwhen flag clicked\nset [checkpoint # v] to [3]\nset [stage # v] to [3]\nwait (1) seconds\nset [heard boss speech? v] to [0]\nset [bossbattle phase v] to [0]\n\nwhen I start as a clone\nif <(costume [number v]) = [15]> then\n    forever\n        switch costume to (block_22 v)\n        repeat (7)\n            wait (.05) seconds\n            next costume\n        end\n        wait (.05) seconds\n    end\nend\nif <(costume [number v]) = [24]> then\n    forever\n        switch costume to (block_1 v)\n        repeat (6)\n            wait (.05) seconds\n            next costume\n        end\n        wait (.05) seconds\n    end\nend\nif <(costume [number v]) = [31]> then\n    forever\n        switch costume to (nitro_1 v)\n        repeat (3)\n            wait (.05) seconds\n            next costume\n        end\n        wait (.05) seconds\n    end\nend\nif <(costume [number v]) = [35]> then\n    forever\n        switch costume to (endless_14 v)\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n    end\nend\nif <(costume [number v]) = [7]> then\n    forever\n        switch costume to (endless_9 v)\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n    end\nend\nif <(costume [number v]) = [41]> then\n    forever\n        switch costume to (bgmm9wily4 v)\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n    end\nend\nif <(costume [number v]) = [68]> then\n    forever\n        switch costume to (bgdust2 v)\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n    end\nend\n\nwhen flag clicked\nset [darkness v] to [0]\n\nwhen I receive [stage select v]\ndelete this clone\n\nwhen I receive [snowboard fall back v]\nif <(clone) = [0]> then\n    set [level_x v] to [4080]\n    set [level_y v] to [350]\n    change [level_x v] by (-100)\n    set [my variable v] to [1]\n    set [lvllimit v] to [0]\n    repeat (45)\n        wait until <(Scroll X) > ((LVLLIMIT) + (-500))>\n        set [level_y v] to [430]\n        change [level_x v] by (542)\n        set [brightness v] effect to (0)\n        switch costume to (cossack_1_alt_2 v)\n        set size to (200) %\n        create clone of (_myself_ v)\n        set [lvllimit v] to (Level_X)\n    end\nend\n\nwhen flag clicked\nset [clone v] to [0]\n\nwhen I start as a clone\nset [clone v] to [1]\n\n@ground\n\nwhen I receive [setup v]\nhide\nclear graphic effects\ngo to x: (0) y: (0)\nset [level_x v] to [0]\nif <[1] = [1]> then\n    delete this clone\nend\nCreate\n\ndefine Create\nif <(STAGE #) = [4]> then\n    set [level_y v] to [40]\n    set [level_x v] to [-510]\n    switch costume to (delta1 v)\n    set size to (200) %\n    repeat (5)\n        create clone of (_myself_ v)\n        change [level_x v] by (510)\n        next costume\n    end\n    change [level_x v] by (-510)\n    change [level_y v] by (-450)\n    create clone of (_myself_ v)\n    next costume\n    change [level_y v] by (-410)\n    create clone of (_myself_ v)\n    next costume\n    repeat (3)\n        change [level_x v] by (-510)\n        create clone of (_myself_ v)\n        next costume\n    end\n    change [level_x v] by (2)\n    repeat (2)\n        change [level_y v] by (-423)\n        create clone of (_myself_ v)\n        next costume\n    end\n    set [level_x v] to [1525]\n    set [level_y v] to [-820]\n    switch costume to (delta9 v)\n    set size to (200) %\n    repeat (3)\n        change [level_x v] by (510)\n        create clone of (_myself_ v)\n        next costume\n    end\n    repeat (4)\n        change [level_y v] by (-450)\n        create clone of (_myself_ v)\n        next costume\n    end\n    change [level_y v] by (-445)\n    create clone of (_myself_ v)\n    next costume\n    repeat (4)\n        change [level_x v] by (510)\n        create clone of (_myself_ v)\n        next costume\n    end\nend\nif <(STAGE #) = [6]> then\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    set size to (200) %\n    switch costume to (psi1 v)\n    repeat (10)\n        create clone of (_myself_ v)\n        change [level_x v] by (510)\n        next costume\n    end\n    change [level_x v] by (-510)\n    repeat (5)\n        change [level_y v] by (445)\n        create clone of (_myself_ v)\n        next costume\n    end\n    repeat (2)\n        change [level_x v] by (-510)\n        create clone of (_myself_ v)\n        next costume\n    end\n    repeat (2)\n        change [level_y v] by (445)\n        create clone of (_myself_ v)\n        next costume\n    end\n    change [level_y v] by (-32)\n    repeat (5)\n        change [level_x v] by (510)\n        create clone of (_myself_ v)\n        next costume\n    end\n    change [level_x v] by (510)\n    repeat (3)\n        change [level_x v] by (510)\n        create clone of (_myself_ v)\n        next costume\n    end\nend\nif <(STAGE #) = [8]> then\n    set [level_y v] to [40]\n    set [level_x v] to [0]\n    switch costume to (aq1 v)\n    set size to (200) %\n    repeat (10)\n        create clone of (_myself_ v)\n        change [level_x v] by (510)\n        next costume\n    end\n    set [level_y v] to [-404]\n    set [level_x v] to [4500]\n    create clone of (_myself_ v)\n    repeat (6)\n        create clone of (_myself_ v)\n        change [level_x v] by (510)\n        next costume\n    end\n    switch costume to (aq17 v)\n    set [level_y v] to [0]\n    set [level_x v] to [7050]\n    create clone of (_myself_ v)\n    repeat (2)\n        create clone of (_myself_ v)\n        change [level_x v] by (510)\n        next costume\n    end\n    change [level_x v] by (-75)\n    create clone of (_myself_ v)\n    repeat (2)\n        change [level_y v] by (415)\n        next costume\n        create clone of (_myself_ v)\n    end\n    repeat (1)\n        change [level_x v] by (510)\n        next costume\n        create clone of (_myself_ v)\n    end\n    set [level_x v] to [8965]\n    set [level_y v] to [861]\nend\nif <(STAGE #) = [9]> then\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    switch costume to (costume67 v)\n    set size to (200) %\n    repeat (5)\n        create clone of (_myself_ v)\n        change [level_y v] by (-500)\n        next costume\n    end\n    set [level_y v] to [-1720]\n    create clone of (_myself_ v)\n    repeat (15)\n        change [level_x v] by (510)\n        switch costume to (costume69 v)\n        create clone of (_myself_ v)\n        change [level_x v] by (510)\n        switch costume to (costume77 v)\n        create clone of (_myself_ v)\n        change [level_x v] by (510)\n        switch costume to (costume68 v)\n        create clone of (_myself_ v)\n    end\nend\nif <(STAGE #) = [7]> then\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    switch costume to (costume59 v)\n    set size to (200) %\n    repeat (5)\n        create clone of (_myself_ v)\n        change [level_x v] by (510)\n        next costume\n    end\n    switch costume to (v4 v)\n    set size to (200) %\n    set [level_y v] to [-500]\n    set [level_x v] to [1718]\n    repeat (2)\n        create clone of (_myself_ v)\n        change [level_x v] by (510)\n        next costume\n    end\n    switch costume to (costume58 v)\n    set [level_y v] to [0]\n    set [level_x v] to [2222]\n    repeat (7)\n        create clone of (_myself_ v)\n        change [level_x v] by (510)\n        next costume\n    end\nend\nif <(STAGE #) = [3]> then\n    set [level_y v] to [35]\n    set [level_x v] to [0]\n    switch costume to (alpha1 v)\n    set size to (200) %\n    repeat (6)\n        create clone of (_myself_ v)\n        change [level_x v] by (510)\n        next costume\n    end\n    change [level_x v] by (-510)\n    set [level_y v] to [430]\n    switch costume to (alpha8 v)\n    set size to (200) %\n    repeat (3)\n        create clone of (_myself_ v)\n        change [level_x v] by (510)\n        next costume\n    end\n    set [level_y v] to [430]\n    set [level_x v] to [30200]\n    switch costume to (alphaend1 v)\n    set size to (200) %\n    repeat (4)\n        create clone of (_myself_ v)\n        change [level_x v] by (510)\n        next costume\n    end\nend\nif <(STAGE #) = [1]> then\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    switch costume to (costume30 v)\n    set size to (200) %\n    repeat (3)\n        create clone of (_myself_ v)\n        next costume\n        change [level_y v] by (440)\n    end\n    set [level_y v] to [768]\n    set [level_x v] to [500]\n    repeat (6)\n        create clone of (_myself_ v)\n        change [level_x v] by (510)\n        next costume\n    end\n    set [level_y v] to [1198]\n    set [level_x v] to [500]\n    switch costume to (costume41 v)\n    set size to (200) %\n    repeat (3)\n        create clone of (_myself_ v)\n        next costume\n        change [level_x v] by (510)\n    end\n    set [level_y v] to [1198]\n    change [level_y v] by (440)\n    set [level_x v] to [1460]\n    switch costume to (costume47 v)\n    set size to (200) %\n    repeat (2)\n        create clone of (_myself_ v)\n        next costume\n        change [level_y v] by (440)\n    end\n    go to [front v] layer\n    switch costume to (costume45 v)\n    set size to (200) %\n    set [level_y v] to [2170]\n    set [level_x v] to [960]\n    create clone of (_myself_ v)\n    change [level_y v] by (440)\n    next costume\n    create clone of (_myself_ v)\n    repeat (2)\n        change [level_x v] by (510)\n        next costume\n        create clone of (_myself_ v)\n    end\nend\nif <(STAGE #) = [2]> then\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    switch costume to (costume9 v)\n    set size to (200) %\n    repeat (9)\n        create clone of (_myself_ v)\n        next costume\n        change [level_x v] by (500)\n    end\n    set [level_y v] to [440]\n    set [level_x v] to [3954]\n    repeat (8)\n        create clone of (_myself_ v)\n        change [level_x v] by (510)\n        next costume\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\ngo to [front v] layer\nforever\n    set [brightness v] effect to (Darkness)\n    set [ghost v] effect to (0)\n    set x to ((Level_X) - (Scroll X))\n    set y to (((Level_Y) - (Scroll Y)) + (YPos Offset))\n    if <(costume [number v]) = [188]> then\n        if <<<((Level_X) - (Scroll X)) < [-425]> or <((Level_X) - (Scroll X)) > [100]>> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [425]>> then\n            hide\n        else\n            show\n        end\n    else\n        if <(costume [number v]) = [52]> then\n            if <<<((Level_X) - (Scroll X)) > [360]> or <([abs v] of ((Level_X) - (Scroll X)) ) > [500]>> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [299]>> then\n                hide\n            else\n                show\n            end\n        else\n            if <(costume [number v]) = [51]> then\n                if <<<((Level_X) - (Scroll X)) < [-250]> or <((Level_X) - (Scroll X)) > [470]>> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [299]>> then\n                    hide\n                else\n                    show\n                end\n            else\n                if <<(costume [number v]) = [32]> or <(costume [number v]) = [169]>> then\n                    if <<<((Level_X) - (Scroll X)) > [280]> or <([abs v] of ((Level_X) - (Scroll X)) ) > [500]>> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [299]>> then\n                        hide\n                    else\n                        show\n                    end\n                else\n                    if <<(costume [number v]) = [55]> or <<(costume [number v]) = [23]> or <(costume [number v]) = [30]>>> then\n                        if <<([abs v] of ((Level_X) - (Scroll X)) ) > [502]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [410]>> then\n                            hide\n                        else\n                            show\n                        end\n                    else\n                        if <<(costume [number v]) = [57]> or <(costume [number v]) = [62]>> then\n                            if <<([abs v] of ((Level_X) - (Scroll X)) ) > [472]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [90]>> then\n                                hide\n                            else\n                                show\n                            end\n                        else\n                            if <(costume [number v]) = [63]> then\n                                if <<([abs v] of ((Level_X) - (Scroll X)) ) > [525]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [90]>> then\n                                    hide\n                                else\n                                    show\n                                end\n                            else\n                                if <(costume [number v]) = [103]> then\n                                    if <<([abs v] of ((Level_X) - (Scroll X)) ) > [380]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [425]>> then\n                                        hide\n                                    else\n                                        show\n                                    end\n                                else\n                                    if <<([abs v] of ((Level_X) - (Scroll X)) ) > [500]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [425]>> then\n                                        hide\n                                    else\n                                        show\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [setup v]\ndelete this clone\n\nwhen I receive [floor collapse v]\nif <(costume [number v]) = [23]> then\n    set [checkpoint # v] to [4]\n    delete this clone\nend\n\nwhen I receive [teleportin v]\nif <(STAGE #) = [9]> then\n    if <[1] = [1]> then\n        delete this clone\n    end\n    broadcast (SetUp v)\nend\n\nwhen I receive [bass ram into wall v]\nif <(costume [number v]) = [92]> then\n    delete this clone\nend\n\nwhen I receive [stage select v]\ndelete this clone\n\nwhen I start as a clone\nif <<(costume [number v]) > [131]> and <(costume [number v]) < [142]>> then\n    wait (1) seconds\n    wait until <not <<([abs v] of ((Level_X) - (Scroll X)) ) > [472]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [425]>>>\n    wait (1) seconds\n    wait until <<([abs v] of ((Level_X) - (Scroll X)) ) > [472]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [425]>>\n    delete this clone\nend\n\nwhen flag clicked\ndelete all of [snowboard levely v]\nrepeat (200)\n    add [350] to [snowboard levely v]\n    add [350] to [snowboard levely v]\n    add [360] to [snowboard levely v]\n    add [370] to [snowboard levely v]\nend\n\nwhen flag clicked\ndelete all of [snowboard level layout v]\nadd [132] to [snowboard level layout v]\nadd [140] to [snowboard level layout v]\nadd [141] to [snowboard level layout v]\nadd [134] to [snowboard level layout v]\nrepeat (4)\n    add [132] to [snowboard level layout v]\n    add [140] to [snowboard level layout v]\nend\nadd [141] to [snowboard level layout v]\nrepeat (4)\n    add [132] to [snowboard level layout v]\n    add [133] to [snowboard level layout v]\nend\nadd [132] to [snowboard level layout v]\nadd [139] to [snowboard level layout v]\nadd [132] to [snowboard level layout v]\nadd [132] to [snowboard level layout v]\nadd [137] to [snowboard level layout v]\nadd [132] to [snowboard level layout v]\nrepeat (2)\n    add [132] to [snowboard level layout v]\n    add [134] to [snowboard level layout v]\n    add [132] to [snowboard level layout v]\n    add [132] to [snowboard level layout v]\n    add [139] to [snowboard level layout v]\n    add [135] to [snowboard level layout v]\nend\nadd [136] to [snowboard level layout v]\nrepeat (8)\n    add [132] to [snowboard level layout v]\nend\n\nwhen I receive [snowboard fall back v]\nif <(clone) = [0]> then\n    set [level_x v] to [4080]\n    set [level_y v] to [350]\n    change [level_x v] by (-100)\n    set [my variable v] to [1]\n    set [lvllimit v] to [0]\n    repeat until <((my variable) + (-1)) > (length of [snowboard level layout v])>\n        wait until <(Scroll X) > ((LVLLIMIT) + (-500))>\n        set [level_y v] to [350]\n        switch costume to (item (my variable) of [snowboard level layout v])\n        change [my variable v] by (1)\n        set size to (200) %\n        create clone of (_myself_ v)\n        change [level_x v] by (510)\n        switch costume to (item (my variable) of [snowboard level layout v])\n        change [my variable v] by (1)\n        set size to (200) %\n        create clone of (_myself_ v)\n        change [level_x v] by (510)\n        switch costume to (item (my variable) of [snowboard level layout v])\n        change [my variable v] by (1)\n        set size to (200) %\n        create clone of (_myself_ v)\n        set [lvllimit v] to (Level_X)\n        change [level_x v] by (510)\n    end\nend\n\nwhen flag clicked\nset [clone v] to [0]\n\nwhen I start as a clone\nset [clone v] to [1]\n\nwhen I receive [haha u lose v]\ndelete this clone\n\nwhen I start as a clone\nif <(STAGE #) = [3]> then\n    wait (3) seconds\n    repeat (5)\n        go to [front v] layer\n    end\nend\n\n@enemies\n\nwhen flag clicked\nhide\n\ndefine Create Enemy (what enemy ) (x) (y) (attribute)\ngo to [front v] layer\nset size to (200) %\nset rotation style [left-right v]\nswitch costume to (what enemy )\nset [attr v] to (attribute)\nset [level_x v] to (x)\nset [level_y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\nset rotation style [left-right v]\n\nwhen I receive [die v]\nwait (3) seconds\ndelete this clone\n\nwhen I start as a clone\nAI\n\nwhen I start as a clone\nwait (1) seconds\nforever\n    wait until <<touching (hitbox v)?> and <(takingdmg) = [0]>>\n    broadcast (KNOCKBACK v)\n    change [health v] by (2)\n    broadcast (TAKE DMG v)\n    wait (1) seconds\nend\n\nwhen I start as a clone\nset [clone v] to [1]\nforever\n    if <(clone) = [1]> then\n        if <(Darkness) = [-90]> then\n            if <not <<<touching (mega man v)?> and <touching color (#fae0c1)?>> and <not <touching (hitbox v)?>>>> then\n                set [brightness v] effect to (-90)\n            end\n        end\n        set x to ((Level_X) - (Scroll X))\n        set y to ((Level_Y) - (Scroll Y))\n        if <<([abs v] of ((Level_X) - (Scroll X)) ) > [260]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [200]>> then\n            set [enemy onscreen? v] to [0]\n            hide\n        else\n            set [enemy onscreen? v] to [1]\n            show\n        end\n    end\nend\n\nwhen I receive [teleportin v]\ndelete this clone\n\nwhen I start as a clone\nif <(costume [number v]) = [85]> then\n    start sound [plague_tracer_explode v]\n    wait (1) seconds\nend\nforever\n    wait until <<<<touching (mega man v)?> and <touching color (#fae0c1)?>> and <not <touching (hitbox v)?>>> or <touching (special weapons v)?>>\n    if <<<<(costume [number v]) > [81]> and <(costume [number v]) < [84]>> or <<(costume [number v]) > [71]> and <(costume [number v]) < [75]>>> or <<<<(costume [number v]) > [17]> and <(costume [number v]) < [25]>> and <not <([direction v] of [hitbox v]) = (direction)>>> or <<(costume [number v]) = [42]> or <<<(costume [number v]) = [48]> or <<(costume [number v]) = [51]> or <(costume [number v]) = [52]>>> and <not <([direction v] of [hitbox v]) = (direction)>>>>>> then\n        start sound [cling v]\n        set [ghost v] effect to (100)\n        wait (.1) seconds\n        clear graphic effects\n        wait (.05) seconds\n    else\n        if <<(costume [number v]) > [87]> and <(costume [number v]) < [91]>> then\n            start sound [plague_tracer_explode v]\n            stop [other scripts in sprite v]\n            switch costume to (edeath1 v)\n            set [proj direction v] to [90]\n            set [proj x v] to (Level_X)\n            set [proj y v] to (Level_Y)\n            set [projectile name v] to [msproj]\n            broadcast (CREATE PROJECTILE v)\n            wait (.01) seconds\n            set [proj direction v] to [90]\n            set [proj x v] to (Level_X)\n            set [proj y v] to (Level_Y)\n            set [projectile name v] to [msproj2]\n            broadcast (CREATE PROJECTILE v)\n            wait (.01) seconds\n            set [proj direction v] to [90]\n            set [proj x v] to (Level_X)\n            set [proj y v] to (Level_Y)\n            set [projectile name v] to [msproj3]\n            broadcast (CREATE PROJECTILE v)\n            wait (.01) seconds\n            set [proj direction v] to [90]\n            set [proj x v] to (Level_X)\n            set [proj y v] to (Level_Y)\n            set [projectile name v] to [msproj4]\n            broadcast (CREATE PROJECTILE v)\n            wait (.01) seconds\n            repeat (3)\n                wait (.01) seconds\n                next costume\n            end\n            wait (.01) seconds\n            delete this clone\n        else\n            if <(Megaman Costume) > [1]> then\n                change [hp v] by (-2)\n                set [dmg # v] to [2]\n            else\n                if <(Universal Hold) > [20]> then\n                    if <<(PHANTOM ARMOR?) = [1]> and <(Universal Hold) > [20]>> then\n                        change [hp v] by (-4)\n                        set [dmg # v] to [4]\n                    else\n                        change [hp v] by (-3)\n                        set [dmg # v] to [3]\n                    end\n                else\n                    change [hp v] by (-1)\n                    set [dmg # v] to [1]\n                end\n            end\n            set [dmg_x v] to (Level_X)\n            set [dmg_y v] to (Level_Y)\n            create clone of (dmg v)\n            if <(HP) < [1]> then\n                stop [other scripts in sprite v]\n                start sound [Mega Man 6 SRX \(19\) v]\n                if <(pick random (1) to (2)) = [1]> then\n                    if <(pick random (1) to (10)) = [1]> then\n                        set [proj x v] to (Level_X)\n                        set [proj y v] to (Level_Y)\n                        set [projectile name v] to [1up]\n                        create clone of (hp drops v)\n                    else\n                        if <(pick random (1) to (2)) = [1]> then\n                            if <(pick random (1) to (3)) = [1]> then\n                                set [proj x v] to (Level_X)\n                                set [proj y v] to (Level_Y)\n                                set [projectile name v] to [wen]\n                                create clone of (hp drops v)\n                            else\n                                set [proj x v] to (Level_X)\n                                set [proj y v] to (Level_Y)\n                                set [projectile name v] to [wen3]\n                                create clone of (hp drops v)\n                            end\n                        else\n                            if <(pick random (1) to (3)) = [1]> then\n                                set [proj x v] to (Level_X)\n                                set [proj y v] to (Level_Y)\n                                set [projectile name v] to [health3]\n                                create clone of (hp drops v)\n                            else\n                                set [proj x v] to (Level_X)\n                                set [proj y v] to (Level_Y)\n                                set [projectile name v] to [health]\n                                create clone of (hp drops v)\n                            end\n                        end\n                    end\n                end\n                switch costume to (edeath1 v)\n                if <(ATTR) = [69]> then\n                    repeat (3)\n                        switch costume to (edeath1 v)\n                        Create Enemy [metsmall] (Level_X) (Level_Y) []\n                        switch costume to (edeath1 v)\n                    end\n                end\n                repeat (3)\n                    wait (0) seconds\n                    set x to ((Level_X) - (Scroll X))\n                    set y to ((Level_Y) - (Scroll Y))\n                    next costume\n                end\n                wait (0) seconds\n                delete this clone\n            else\n                if <(Megaman Costume) = [8]> then\n                    start sound [SE \[11\]2 v]\n                    set [brightness v] effect to (100)\n                    wait (0) seconds\n                    clear graphic effects\n                    wait (0) seconds\n                else\n                    start sound [SE \[11\]2 v]\n                    set [brightness v] effect to (100)\n                    wait (.1) seconds\n                    clear graphic effects\n                    wait (.05) seconds\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [teleportin v]\nwait (.03) seconds\nbroadcast (load enemies v)\n\nwhen I start as a clone\nif <(costume [number v]) = [85]> then\n    forever\n        switch costume to (metsmall v)\n        wait (.1) seconds\n        switch costume to (metsmall2 v)\n        wait (.1) seconds\n        switch costume to (metsmall3 v)\n        wait (.1) seconds\n    end\nend\nif <(costume [number v]) = [31]> then\n    forever\n        switch costume to (hornet v)\n        wait (.1) seconds\n        switch costume to (hornet2 v)\n        wait (.1) seconds\n    end\nend\nif <(costume [number v]) = [78]> then\n    forever\n        if <(ATTR) = [1]> then\n            switch costume to (birdq v)\n            wait (.02) seconds\n        else\n            switch costume to (birdq3 v)\n            wait (.02) seconds\n        end\n        if <(ATTR) = [1]> then\n            switch costume to (birdq2 v)\n            wait (.02) seconds\n        else\n            switch costume to (birdq4 v)\n            wait (.02) seconds\n        end\n    end\nend\nif <(costume [number v]) = [88]> then\n    forever\n        switch costume to (ms v)\n        repeat (2)\n            wait (.05) seconds\n            next costume\n        end\n        wait (.05) seconds\n    end\nend\n\nwhen I receive [teleportin v]\nif <[1] = [1]> then\n    delete this clone\nend\nif <(STAGE #) = [3]> then\n    Create Enemy [birdq] [600] [155] [1]\nend\nif <(STAGE #) = [4]> then\n    Create Enemy [ms] [1300] [-70] [1]\n    Create Enemy [ms] [1500] [-60] [1]\n    Create Enemy [ms] [1550] [-80] [1]\n    Create Enemy [crattacker] [1450] [-320] [1]\n    Create Enemy [ms] [2200] [-930] [1]\n    Create Enemy [ms] [2350] [-870] [1]\n    Create Enemy [crattacker] [2576] [-953] [1]\n    Create Enemy [metv2] [3500] [-3010] [1]\n    Create Enemy [ms] [3825] [-3100] [1]\n    Create Enemy [ms] [3900] [-3010] [1]\n    Create Enemy [metv2] [1140] [-100] [1]\n    Create Enemy [crattacker] [850] [-792] [1]\nend\nif <(STAGE #) = [8]> then\n    Create Enemy [bun] [1000] [100] [1]\n    Create Enemy [bun] [2170] [-60] [1]\n    Create Enemy [bun] [3790] [35] [1]\n    Create Enemy [suru] [5150] [-315] [1]\n    Create Enemy [shelln] [5780] [-294] [0]\n    Create Enemy [shelln] [7774] [80] [0]\n    Create Enemy [shelln] [3100] [50] [0]\nend\nif <(STAGE #) = [9]> then\n    Create Enemy [sas] [-150] [-420] []\n    Create Enemy [sas] [0] [-505] []\n    Create Enemy [sas] [80] [-940] []\nend\nif <(STAGE #) = [7]> then\n    Create Enemy [snipe] [545] [-60] []\n    Create Enemy [snipe] [1060] [-25] []\n    Create Enemy [snipe] [1536] [-7] []\n    Create Enemy [snipe] [1705] [29] []\n    Create Enemy [snipe] [2325] [-498] []\n    Create Enemy [snipe] [3375] [-40] []\n    Create Enemy [snipe] [3074] [100] []\n    Create Enemy [snipe] [4100] [8] []\nend\nif <(STAGE #) = [2]> then\n    Create Enemy [hornet] [600] [100] []\n    Create Enemy [hornet] [5000] [400] []\n    Create Enemy [teck] [4468] [370] []\n    Create Enemy [hornet] [1800] [100] []\n    Create Enemy [teck] [2235] [100] []\n    Create Enemy [hornet] [2800] [100] []\n    Create Enemy [hornet] [2900] [100] []\n    Create Enemy [metv] [5700] [550] []\nend\nif <(STAGE #) = [1]> then\n    if <(Checkpoint #) < [3]> then\n        wait (2) seconds\n    end\n    Create Enemy [metv] [-100] [112] []\n    Create Enemy [metv] [150] [500] []\n    Create Enemy [metv] [2380] [768] []\n    Create Enemy [sas] [2236] [710] []\n    Create Enemy [joe] [340] [1105] []\n    Create Enemy [joe] [1460] [1564] []\n    Create Enemy [joe] [1460] [1970] []\n    Create Enemy [joe] [1000] [2555] []\nend\n\nwhen I start as a clone\nrepeat (10)\n    go to [front v] layer\nend\n\nwhen I start as a clone\nset [x v] to [0]\nset [y v] to [0]\nset [fall guys ultimate knockout v] to [1]\nif <(costume [number v]) = [42]> then\n    forever\n        if <(ENEMY ONSCREEN?) = [1]> then\n            if <touching (ground v)?> then\n                set [y v] to [0]\n                set [level_x v] to ((Level_X) + ((x) * (-1)))\n                set [level_y v] to ((Level_Y) + (1))\n                set [fall guys ultimate knockout v] to [0]\n            else\n                if <(fall guys ultimate knockout) = [1]> then\n                    change [y v] by (-1)\n                    set [level_y v] to ((Level_Y) + (y))\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [respawn enemies v]\nif <[1] = [1]> then\n    delete this clone\nend\nif <(STAGE #) = [1]> then\n    wait (1) seconds\n    Create Enemy [sas] [2236] [710] []\n    Create Enemy [joe] [340] [1105] []\n    Create Enemy [joe] [1525] [1140] []\n    Create Enemy [joe] [1460] [1564] []\n    Create Enemy [joe] [1460] [1970] []\n    Create Enemy [joe] [1000] [2555] []\nend\n\nwhen I receive [stage select v]\ndelete this clone\n\ndefine AI\nif <(costume [number v]) = [88]> then\n    set [hp v] to [6]\n    wait until <(ENEMY ONSCREEN?) = [1]>\n    repeat (25)\n        set [level_x v] to ((Level_X) + (-5))\n    end\n    repeat until <(ENEMY ONSCREEN?) = [0]>\n        set [level_x v] to ((Level_X) + (-5))\n    end\n    delete this clone\nend\nif <(costume [number v]) = [72]> then\n    set [hp v] to [4]\n    wait until <(ENEMY ONSCREEN?) = [1]>\n    wait (2) seconds\n    if <touching (misc objects v)?> then\n        forever\n            switch costume to (shelln v)\n            wait until <<<(distance to [hitbox v]) < [200]> or <not <touching (misc objects v)?>>> and <(ENEMY ONSCREEN?) = [1]>>\n            if <touching (misc objects v)?> then\n                switch costume to (shelln v)\n                repeat (4)\n                    wait (.02) seconds\n                    next costume\n                end\n                wait (.5) seconds\n                next costume\n                if <([x position v] of [hitbox v]) < (x position)> then\n                    point in direction (-90)\n                else\n                    point in direction (90)\n                end\n                start sound [bubbleblock_dissolve v]\n                repeat (4)\n                    wait (.1) seconds\n                    set [proj direction v] to (direction)\n                    set [proj x v] to ((Level_X) + (([sin v] of (direction) ) * (15)))\n                    set [proj y v] to (Level_Y)\n                    set [projectile name v] to [bubble]\n                    broadcast (CREATE PROJECTILE v)\n                end\n                switch costume to (shelln5 v)\n                wait (.4) seconds\n                repeat (4)\n                    wait (.02) seconds\n                    switch costume to ((costume [number v]) + (-1))\n                end\n                wait (1) seconds\n            else\n                set [y v] to [0]\n                repeat (35)\n                    change [level_y v] by (y)\n                    change [y v] by (-1)\n                end\n                delete this clone\n            end\n        end\n    else\n        forever\n            switch costume to (shelln v)\n            wait until <<(distance to [hitbox v]) < [200]> and <(ENEMY ONSCREEN?) = [1]>>\n            switch costume to (shelln v)\n            repeat (4)\n                wait (.02) seconds\n                next costume\n            end\n            wait (.5) seconds\n            next costume\n            if <([x position v] of [hitbox v]) < (x position)> then\n                point in direction (-90)\n            else\n                point in direction (90)\n            end\n            start sound [bubbleblock_dissolve v]\n            repeat (4)\n                wait (.1) seconds\n                set [proj direction v] to (direction)\n                set [proj x v] to ((Level_X) + (([sin v] of (direction) ) * (15)))\n                set [proj y v] to (Level_Y)\n                set [projectile name v] to [bubble]\n                broadcast (CREATE PROJECTILE v)\n            end\n            switch costume to (shelln5 v)\n            wait (.4) seconds\n            repeat (4)\n                wait (.02) seconds\n                switch costume to ((costume [number v]) + (-1))\n            end\n            wait (1) seconds\n        end\n    end\nend\nif <(costume [number v]) = [63]> then\n    set [hp v] to [4]\n    forever\n        repeat until <<<(distance to [hitbox v]) < [200]> or <(HP) < [4]>> and <(ENEMY ONSCREEN?) = [1]>>\n            switch costume to (suru v)\n            repeat (4)\n                wait (.02) seconds\n                next costume\n            end\n            wait (.02) seconds\n        end\n        point towards (hitbox v)\n        set [x v] to [0]\n        repeat (2)\n            switch costume to (suru9 v)\n            repeat (3)\n                repeat (2)\n                    set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (x)))\n                    set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (x)))\n                    if <touching (ground v)?> then\n                        set [level_x v] to ((Level_X) + ((([sin v] of (direction) ) * (x)) * (-1)))\n                        set [level_y v] to ((Level_Y) + ((([cos v] of (direction) ) * (x)) * (-1)))\n                    end\n                    change [x v] by (1)\n                end\n                next costume\n            end\n            repeat (2)\n                set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (x)))\n                set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (x)))\n                if <touching (ground v)?> then\n                    set [level_x v] to ((Level_X) + ((([sin v] of (direction) ) * (x)) * (-1)))\n                    set [level_y v] to ((Level_Y) + ((([cos v] of (direction) ) * (x)) * (-1)))\n                end\n                change [x v] by (1)\n            end\n        end\n        repeat (2)\n            set [level_x v] to ((Level_X) + ((([sin v] of (direction) ) * (6)) * (-1)))\n            set [level_y v] to ((Level_Y) + ((([cos v] of (direction) ) * (6)) * (-1)))\n        end\n        switch costume to (suru v)\n        repeat (4)\n            wait (.02) seconds\n            next costume\n        end\n        wait (.02) seconds\n    end\nend\nif <(costume [number v]) = [57]> then\n    set [hp v] to [4]\n    delete all of [en_atr v]\n    if <(ATTR) = [1]> then\n        add ((Level_X) + (-50)) to [en_atr v]\n        add ((Level_X) + (50)) to [en_atr v]\n    end\n    if <(ATTR) = [2]> then\n        add ((Level_X) + (-100)) to [en_atr v]\n        add ((Level_X) + (100)) to [en_atr v]\n    end\n    if <(ATTR) = [3]> then\n        add ((Level_X) + (-150)) to [en_atr v]\n        add ((Level_X) + (150)) to [en_atr v]\n    end\n    forever\n        repeat until <<<(distance to [hitbox v]) < [60]> or <(HP) < [4]>> or <(Level_X) > (item (2) of [en_atr v])>>\n            switch costume to (bun v)\n            repeat (2)\n                point in direction (90)\n                set [level_x v] to ((Level_X) + (5))\n            end\n            switch costume to (bun2 v)\n            repeat (2)\n                point in direction (90)\n                set [level_x v] to ((Level_X) + (5))\n            end\n        end\n        if <<(distance to [hitbox v]) < [60]> or <(HP) < [4]>> then\n            Bunby_missile atk\n        end\n        repeat until <<<(distance to [hitbox v]) < [60]> or <(HP) < [4]>> or <(Level_X) < (item (1) of [en_atr v])>>\n            switch costume to (bun v)\n            repeat (2)\n                point in direction (-90)\n                set [level_x v] to ((Level_X) + (-5))\n            end\n            switch costume to (bun2 v)\n            repeat (2)\n                point in direction (-90)\n                set [level_x v] to ((Level_X) + (-5))\n            end\n        end\n        if <<(distance to [hitbox v]) < [60]> or <(HP) < [4]>> then\n            Bunby_missile atk\n        end\n    end\nend\nif <(costume [number v]) = [48]> then\n    set [hp v] to [4]\n    forever\n        repeat until <<(ENEMY ONSCREEN?) = [1]> and <(distance to [hitbox v]) < [300]>>\n            point towards (hitbox v)\n            switch costume to (joe v)\n        end\n        switch costume to (joe v)\n        wait (1) seconds\n        repeat (2)\n            wait (.1) seconds\n            next costume\n        end\n        if <([x position v] of [hitbox v]) < (x position)> then\n            point in direction (-90)\n        else\n            point in direction (90)\n        end\n        start sound [laser_big2 v]\n        repeat (4)\n            wait (.05) seconds\n            set [proj direction v] to (direction)\n            set [proj x v] to ((Level_X) + (([sin v] of (direction) ) * (15)))\n            set [proj y v] to (Level_Y)\n            set [projectile name v] to [joeshot]\n            broadcast (CREATE PROJECTILE v)\n        end\n        wait (.5) seconds\n        switch costume to (joe2 v)\n        wait (.2) seconds\n    end\nend\nif <(costume [number v]) = [82]> then\n    set [hp v] to [4]\n    wait (1) seconds\n    forever\n        if <(ENEMY ONSCREEN?) = [1]> then\n            if <([x position v] of [hitbox v]) < (x position)> then\n                point in direction (-90)\n            else\n                point in direction (90)\n            end\n            set [proj direction v] to (direction)\n            set [proj x v] to ((Level_X) + (([sin v] of (direction) ) * (35)))\n            set [proj y v] to ((Level_Y) + (15))\n            set [projectile name v] to [orby]\n            broadcast (CREATE PROJECTILE v)\n            repeat (5)\n                switch costume to (crattacker v)\n                wait (.05) seconds\n                next costume\n                wait (.05) seconds\n            end\n            switch costume to (crattacker3 v)\n            wait (.8) seconds\n        end\n    end\nend\nif <(costume [number v]) = [85]> then\n    set [hp v] to [1]\n    point in direction (pick random (-90) to (90))\n    switch costume to (metsmall v)\n    wait (0) seconds\n    forever\n        if <(ENEMY ONSCREEN?) = [1]> then\n            set [y v] to [8]\n            set [x v] to [3]\n            set [fall guys ultimate knockout v] to [1]\n            repeat (10)\n                set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (x)))\n                set [level_y v] to ((Level_Y) + ((([cos v] of (direction) ) * (x)) + (y)))\n                change [y v] by (-1)\n            end\n            repeat until <<touching (_edge_ v)?> or <touching (ground v)?>>\n                set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (x)))\n                set [level_y v] to ((Level_Y) + ((([cos v] of (direction) ) * (x)) + (y)))\n                if <touching (ground v)?> then\n                    set [level_y v] to ((Level_Y) + ((([cos v] of (direction) ) * (x)) + ((y) * (-1))))\n                end\n                change [y v] by (-1)\n            end\n            set [fall guys ultimate knockout v] to [0]\n            if <touching (_edge_ v)?> then\n                delete this clone\n            else\n                set [x v] to [0]\n                point towards (hitbox v)\n                repeat until <not <touching (ground v)?>>\n                    set [level_y v] to ((Level_Y) + (8))\n                end\n            end\n        end\n    end\nend\nif <(costume [number v]) = [43]> then\n    set [hp v] to [2]\n    switch costume to (metv v)\n    wait (1) seconds\n    forever\n        set [attr v] to [69]\n        point towards (hitbox v)\n        if <<(ENEMY ONSCREEN?) = [1]> and <(distance to [hitbox v]) < [200]>> then\n            switch costume to (metv v)\n            repeat (4)\n                wait (.02) seconds\n                next costume\n            end\n            set [proj direction v] to (direction)\n            set [proj x v] to (Level_X)\n            set [proj y v] to ((Level_Y) + (0))\n            set [projectile name v] to [bolt]\n            broadcast (CREATE PROJECTILE v)\n            wait (.2) seconds\n            switch costume to (metv7 v)\n            wait (.1) seconds\n            switch costume to (metv v)\n            wait (1) seconds\n        end\n    end\nend\nif <(costume [number v]) = [42]> then\n    set [hp v] to [2]\n    wait (1) seconds\n    forever\n        point towards (hitbox v)\n        if <<(ENEMY ONSCREEN?) = [1]> and <(distance to [hitbox v]) < [200]>> then\n            switch costume to (metv v)\n            repeat (4)\n                wait (.02) seconds\n                next costume\n            end\n            set [y v] to [8]\n            set [x v] to [5]\n            set [fall guys ultimate knockout v] to [1]\n            repeat (10)\n                set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (x)))\n                set [level_y v] to ((Level_Y) + ((([cos v] of (direction) ) * (x)) + (y)))\n            end\n            set [proj direction v] to (direction)\n            set [proj x v] to (Level_X)\n            set [proj y v] to ((Level_Y) + (-50))\n            set [projectile name v] to [bolt]\n            broadcast (CREATE PROJECTILE v)\n            repeat until <<touching (_edge_ v)?> or <touching (ground v)?>>\n                set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (x)))\n                set [level_y v] to ((Level_Y) + ((([cos v] of (direction) ) * (x)) + (y)))\n                if <touching (ground v)?> then\n                    set [level_y v] to ((Level_Y) + ((([cos v] of (direction) ) * (x)) + ((y) * (-1))))\n                end\n            end\n            set [fall guys ultimate knockout v] to [0]\n            if <touching (_edge_ v)?> then\n                delete this clone\n            else\n                set [x v] to [0]\n                repeat until <not <touching (ground v)?>>\n                    set [level_y v] to ((Level_Y) + (2))\n                end\n                switch costume to (metv7 v)\n                wait (.1) seconds\n                switch costume to (metv v)\n                wait (1) seconds\n            end\n        end\n    end\nend\nif <(costume [number v]) = [18]> then\n    set [hp v] to [3]\n    point in direction (90)\n    set [y v] to [15]\n    forever\n        wait until <(ENEMY ONSCREEN?) = [1]>\n        repeat until <<<touching (ground v)?> or <touching (misc objects v)?>> or <(ENEMY ONSCREEN?) = [0]>>\n            switch costume to (sas v)\n            set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (10)))\n            wait (0) seconds\n            switch costume to (sas2 v)\n            set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (10)))\n            wait (0) seconds\n        end\n        switch costume to (sas v)\n        repeat (5)\n            wait (0) seconds\n            next costume\n        end\n        wait (0) seconds\n        turn right (180) degrees\n        repeat (5)\n            switch costume to (sas v)\n            set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (10)))\n            wait (0) seconds\n            switch costume to (sas2 v)\n            set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (10)))\n            wait (0) seconds\n        end\n    end\nend\nif <(costume [number v]) = [78]> then\n    set [hp v] to [2]\n    set [attr v] to [1]\n    point in direction (-90)\n    set [y v] to [15]\n    wait until <(ENEMY ONSCREEN?) = [1]>\n    repeat until <(x position) < (([x position v] of [hitbox v]) + (150))>\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n        change [y v] by (1)\n    end\n    set [attr v] to [0]\n    set [proj direction v] to (direction)\n    set [proj x v] to (Level_X)\n    set [proj y v] to ((Level_Y) + (-15))\n    set [projectile name v] to [birdegg]\n    broadcast (CREATE PROJECTILE v)\n    repeat (8)\n        change [y v] by (-2)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n    end\n    repeat until <(ENEMY ONSCREEN?) = [0]>\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n        change [y v] by (1)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [51]> then\n    set [hp v] to [5]\n    go to [front v] layer\n    point in direction (-90)\n    forever\n        if <(ENEMY ONSCREEN?) = [1]> then\n            repeat (pick random (15) to (25))\n                if <([x position v] of [hitbox v]) < (x position)> then\n                    point in direction (-90)\n                else\n                    point in direction (90)\n                end\n            end\n            switch costume to (snipe v)\n            repeat (3)\n                wait (.1) seconds\n                next costume\n            end\n            set [proj direction v] to (direction)\n            set [proj x v] to (Level_X)\n            set [proj y v] to (Level_Y)\n            set [projectile name v] to [snipeshot]\n            broadcast (CREATE PROJECTILE v)\n            wait (.4) seconds\n            if <(pick random (1) to (2)) = [1]> then\n                next costume\n                wait (0) seconds\n                switch costume to (snipe5 v)\n                wait (.4) seconds\n                switch costume to (snipe6 v)\n                repeat (5)\n                    set [y v] to [6]\n                    set [level_y v] to ((Level_Y) + (y))\n                end\n                repeat (5)\n                    set [y v] to [3]\n                    set [level_y v] to ((Level_Y) + (y))\n                end\n                repeat (5)\n                    set [y v] to [-3]\n                    set [level_y v] to ((Level_Y) + (y))\n                end\n                repeat (5)\n                    set [y v] to [-6]\n                    set [level_y v] to ((Level_Y) + (y))\n                end\n                switch costume to (snipe v)\n            end\n        end\n    end\nend\nif <(costume [number v]) = [15]> then\n    set [hp v] to [2]\n    point in direction (-90)\n    set [y v] to [15]\n    wait until <(ENEMY ONSCREEN?) = [1]>\n    switch costume to (msat v)\n    repeat (1)\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)) + (([sin v] of (y) ) * (5))))\n        change [y v] by (15)\n    end\n    repeat (2)\n        next costume\n        repeat (1)\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)) + (([sin v] of (y) ) * (5))))\n            change [y v] by (15)\n        end\n    end\n    repeat until <(ENEMY ONSCREEN?) = [0]>\n        switch costume to (msat v)\n        repeat (1)\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)) + (([sin v] of (y) ) * (5))))\n            change [y v] by (15)\n        end\n        repeat (2)\n            next costume\n            repeat (1)\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)) + (([sin v] of (y) ) * (5))))\n                change [y v] by (15)\n            end\n        end\n    end\n    delete this clone\nend\nif <(costume [number v]) = [10]> then\n    set [hp v] to [2]\n    point in direction (-90)\n    set [y v] to [15]\n    repeat until <((Level_X) + (-150)) < ((Scroll X) + ([x position v] of [mega man v]))>\n        if <(ENEMY ONSCREEN?) = [1]> then\n            switch costume to (bird v)\n            repeat (2)\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)) + (([sin v] of (y) ) * (5))))\n                change [y v] by (15)\n            end\n            next costume\n            repeat (2)\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)) + (([sin v] of (y) ) * (5))))\n                change [y v] by (15)\n            end\n        end\n    end\n    set [proj direction v] to [90]\n    set [proj x v] to (Level_X)\n    set [proj y v] to (Level_Y)\n    set [projectile name v] to [rock]\n    broadcast (CREATE PROJECTILE v)\n    switch costume to (bird5 v)\n    repeat (5)\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)) + (([sin v] of (y) ) * (5))))\n        change [y v] by (15)\n    end\n    repeat until <(Level_X) < [-300]>\n        point in direction (-90)\n        switch costume to (bird3 v)\n        repeat (2)\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)) + (([sin v] of (y) ) * (5))))\n            change [y v] by (15)\n        end\n        next costume\n        repeat (2)\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)) + (([sin v] of (y) ) * (5))))\n            change [y v] by (15)\n        end\n    end\n    delete this clone\nend\nif <(costume [number v]) = [33]> then\n    point in direction (-90)\n    set [hp v] to [3]\n    forever\n        if <(ENEMY ONSCREEN?) = [1]> then\n            switch costume to (teck v)\n            repeat (3)\n                repeat (2)\n                    set [level_y v] to ((Level_Y) + (-5))\n                end\n                next costume\n            end\n            repeat (2)\n                set [level_y v] to ((Level_Y) + (-5))\n            end\n            switch costume to (teck v)\n            repeat (3)\n                repeat (2)\n                    set [level_y v] to ((Level_Y) + (5))\n                end\n                next costume\n            end\n            repeat (2)\n                set [level_y v] to ((Level_Y) + (5))\n            end\n            switch costume to (teck5 v)\n            repeat (3)\n                wait (.05) seconds\n                next costume\n            end\n            set [proj direction v] to (direction)\n            set [proj x v] to (Level_X)\n            set [proj y v] to (Level_Y)\n            set [projectile name v] to [teckshot]\n            broadcast (CREATE PROJECTILE v)\n            wait (.05) seconds\n            next costume\n            wait (.2) seconds\n            switch costume to (teck v)\n            wait (.5) seconds\n        end\n    end\nend\nif <(costume [number v]) = [31]> then\n    set [hp v] to [2]\n    forever\n        if <(ENEMY ONSCREEN?) = [1]> then\n            point towards (hitbox v)\n            wait (.5) seconds\n            set [y v] to [0]\n            point towards (hitbox v)\n            start sound [SE \[51\] v]\n            turn left (pick random (-25) to (25)) degrees\n            repeat (5)\n                set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n                set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n                change [y v] by (1)\n            end\n            repeat (8)\n                set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n                set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n                change [y v] by (1)\n            end\n        end\n    end\nend\nif <(costume [number v]) = [25]> then\n    set [hp v] to [4]\n    point in direction (90)\n    forever\n        if <(ENEMY ONSCREEN?) = [1]> then\n            switch costume to (mjack v)\n            start sound [knight_digpile v]\n            set [proj direction v] to (pick random (-90) to (90))\n            set [proj x v] to (Level_X)\n            set [proj y v] to (Level_Y)\n            set [projectile name v] to [debris]\n            broadcast (CREATE PROJECTILE v)\n            repeat (5)\n                wait (0) seconds\n                change [level_x v] by (4)\n                next costume\n            end\n            wait (0) seconds\n            switch costume to (mjack v)\n            start sound [knight_digpile v]\n            set [proj direction v] to (pick random (-90) to (90))\n            set [proj x v] to (Level_X)\n            set [proj y v] to ((Level_Y) + (-35))\n            set [projectile name v] to [debris]\n            broadcast (CREATE PROJECTILE v)\n            repeat (5)\n                wait (0) seconds\n                change [level_x v] by (-4)\n                next costume\n            end\n            wait (0) seconds\n        end\n    end\nend\n\ngo to [front v] layer\nshow\n\ndefine Bunby_missile atk\nif <(ENEMY ONSCREEN?) = [1]> then\n    switch costume to (bun3 v)\n    point towards (mega man v)\n    wait (.4) seconds\n    next costume\n    set [proj direction v] to (direction)\n    set [proj x v] to (Level_X)\n    set [proj y v] to ((Level_Y) + (5))\n    set [projectile name v] to [bunms]\n    broadcast (CREATE PROJECTILE v)\n    repeat (2)\n        wait (.4) seconds\n        point towards (mega man v)\n        next costume\n    end\n    set [proj direction v] to (direction)\n    set [proj x v] to (Level_X)\n    set [proj y v] to ((Level_Y) + (5))\n    set [projectile name v] to [bunms]\n    broadcast (CREATE PROJECTILE v)\n    wait (.4) seconds\n    switch costume to (bun3 v)\n    wait (.4) seconds\nend\n\n@Projectiles\n\nwhen flag clicked\nset size to (200) %\nhide\n\nwhen I receive [create projectile v]\nif <(clone) = [0]> then\n    clear graphic effects\n    switch costume to (PROJECTILE NAME)\n    set [level_x v] to (PROJ X)\n    set [level_y v] to (PROJ Y)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nset [clone v] to [1]\nset rotation style [left-right v]\npoint in direction (PROJ DIRECTION)\ngo to [front v] layer\nshow\nif <(costume [number v]) = [122]> then\n    point in direction (90)\n    repeat (50)\n        change [level_x v] by (5)\n        change [level_y v] by (5)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [123]> then\n    point in direction (90)\n    repeat (50)\n        change [level_x v] by (-5)\n        change [level_y v] by (5)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [124]> then\n    point in direction (90)\n    repeat (50)\n        change [level_x v] by (5)\n        change [level_y v] by (-5)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [125]> then\n    point in direction (90)\n    repeat (50)\n        change [level_x v] by (-5)\n        change [level_y v] by (-5)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [79]> then\n    set [y v] to [0]\n    start sound [tinkertank_missile_big v]\n    set rotation style [all around v]\n    start sound [tinkertank_ball v]\n    repeat (100)\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    delete this clone\nend\nif <(costume [number v]) = [126]> then\n    start sound [shieldknight_shield v]\n    set [y v] to [0]\n    repeat until <(Bossattack_Release) = [1]>\n        change [y v] by (15)\n        set [level_x v] to (((Scroll X) + ([x position v] of [boss v])) + ((([sin v] of (y) ) * (10)) + (([sin v] of (direction) ) * (35))))\n    end\n    repeat until <touching (_edge_ v)?>\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (10)))\n    end\n    delete this clone\nend\nif <(costume [number v]) = [129]> then\n    set [x v] to [15]\n    set [y v] to [2]\n    start sound [moleknight_fire v]\n    repeat (2)\n        repeat (1)\n            switch costume to (fpillar v)\n            change [y v] by (-1)\n            set [level_y v] to ((Level_Y) + (y))\n            set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (x)))\n            change [x v] by (-1)\n        end\n        repeat (1)\n            switch costume to (fpillar2 v)\n            change [y v] by (-1)\n            set [level_y v] to ((Level_Y) + (y))\n            set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (x)))\n            change [x v] by (-1)\n        end\n    end\n    repeat until <(y position) < [-125]>\n        repeat (1)\n            switch costume to (fpillar v)\n            change [y v] by (-1)\n            set [level_y v] to ((Level_Y) + (y))\n            set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (x)))\n            change [x v] by (-1)\n        end\n        repeat (1)\n            switch costume to (fpillar2 v)\n            change [y v] by (-1)\n            set [level_y v] to ((Level_Y) + (y))\n            set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (x)))\n            change [x v] by (-1)\n        end\n    end\n    set [level_y v] to ((Scroll Y) + (-133))\n    start sound [tinkertank_missile_small v]\n    switch costume to (fpillar2 v)\n    repeat (3)\n        wait (0) seconds\n        next costume\n    end\n    repeat (4)\n        wait (0) seconds\n        switch costume to ((costume [number v]) + (-1))\n    end\n    wait (0) seconds\n    delete this clone\nend\nif <(costume [number v]) = [111]> then\n    if <(direction) = [90]> then\n        clear graphic effects\n        switch costume to (burnershock v)\n        set [y v] to [0]\n        repeat (3)\n            repeat (1)\n                change [y v] by (1)\n                set [level_x v] to ((Level_X) + (y))\n            end\n            next costume\n        end\n        repeat (3)\n            repeat (1)\n                change [y v] by (1)\n                set [level_x v] to ((Level_X) + (y))\n            end\n            switch costume to ((costume [number v]) + (-1))\n        end\n        wait (.01) seconds\n        delete this clone\n    else\n        switch costume to (burnershock v)\n        set [y v] to [0]\n        repeat (3)\n            repeat (1)\n                change [y v] by (-1)\n                set [level_x v] to ((Level_X) + (y))\n            end\n            next costume\n        end\n        repeat (3)\n            repeat (1)\n                change [y v] by (-1)\n                set [level_x v] to ((Level_X) + (y))\n            end\n            switch costume to ((costume [number v]) + (-1))\n        end\n        wait (.01) seconds\n        delete this clone\n    end\nend\nif <(costume [number v]) = [82]> then\n    clear graphic effects\n    go to [front v] layer\n    wait (.2) seconds\n    switch costume to (bassbeam v)\n    repeat (2)\n        wait (.05) seconds\n        next costume\n    end\n    repeat (2)\n        wait (.02) seconds\n        next costume\n    end\n    wait (.05) seconds\n    repeat (4)\n        change [ghost v] effect by (25)\n        change [brightness v] effect by (25)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [118]> then\n    set [x v] to [3]\n    go to [front v] layer\n    repeat (4)\n        clear graphic effects\n        set size to (0) %\n    end\n    show\n    repeat (20)\n        change size by (10)\n    end\n    start sound [tinkertank_ball v]\n    repeat (50)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (10)))\n        change [x v] by (x)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [103]> then\n    switch costume to (burnergas v)\n    set [x v] to (pick random (5) to (8))\n    set [y v] to ((distance to [hitbox v]) / (8))\n    repeat (50)\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))) + (x))\n        change [x v] by (-.5)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [115]> then\n    point in direction (-90)\n    switch costume to (birdegg v)\n    set [y v] to [0]\n    set [y v] to [0]\n    repeat (4)\n        set [level_y v] to ((Level_Y) + (Y))\n        change [y v] by (-1)\n    end\n    repeat until <(y position) < (([y position v] of [hitbox v]) + (15))>\n        set [level_y v] to ((Level_Y) + (Y))\n        change [y v] by (-2)\n    end\n    set [x v] to [1]\n    start sound [tinkertank_missile_small v]\n    if <([x position v] of [hitbox v]) < (x position)> then\n        point in direction (-90)\n    else\n        point in direction (90)\n    end\n    repeat (25)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n        change [y v] by (5)\n    end\n    wait (.02) seconds\n    delete this clone\nend\nif <(costume [number v]) = [100]> then\n    switch costume to (burnerflame v)\n    set [y v] to [0]\n    set [x v] to [0]\n    repeat (2)\n        repeat (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))) + (x))\n            change [x v] by (-.5)\n            change [y v] by (2)\n        end\n        next costume\n    end\n    repeat (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))) + (x))\n        change [x v] by (-.5)\n        change [y v] by (2)\n    end\n    wait (.02) seconds\n    delete this clone\nend\nif <(costume [number v]) = [55]> then\n    if <(direction) = [90]> then\n        clear graphic effects\n        set [y v] to [0]\n        forever\n            set [y v] to [0]\n            repeat until <(Level_X) > [2125]>\n                change [y v] by (1)\n                set [level_x v] to ((Level_X) + (y))\n            end\n            set [level_x v] to [2150]\n            set [y v] to [0]\n            repeat until <(Level_Y) > [2730]>\n                change [y v] by (1)\n                set [level_y v] to ((Level_Y) + (y))\n            end\n            set [level_y v] to [2740]\n            set [y v] to [0]\n            repeat until <(Level_X) < [1720]>\n                change [y v] by (-1)\n                set [level_x v] to ((Level_X) + (y))\n            end\n            set [level_x v] to [1720]\n            set [y v] to [0]\n            repeat until <(Level_Y) < [2510]>\n                change [y v] by (-1)\n                set [level_y v] to ((Level_Y) + (y))\n            end\n            set [level_y v] to [2510]\n        end\n    else\n        clear graphic effects\n        set [y v] to [0]\n        forever\n            set [y v] to [0]\n            repeat until <(Level_X) < [1720]>\n                change [y v] by (-1)\n                set [level_x v] to ((Level_X) + (y))\n            end\n            set [level_x v] to [1720]\n            set [y v] to [0]\n            repeat until <(Level_Y) > [2730]>\n                change [y v] by (1)\n                set [level_y v] to ((Level_Y) + (y))\n            end\n            set [level_y v] to [2740]\n            set [y v] to [0]\n            repeat until <(Level_X) > [2125]>\n                change [y v] by (1)\n                set [level_x v] to ((Level_X) + (y))\n            end\n            set [level_x v] to [2150]\n            set [y v] to [0]\n            repeat until <(Level_Y) < [2510]>\n                change [y v] by (-1)\n                set [level_y v] to ((Level_Y) + (y))\n            end\n            set [level_y v] to [2510]\n        end\n    end\nend\nif <(costume [number v]) = [41]> then\n    set rotation style [left-right v]\n    clear graphic effects\n    set [y v] to [12]\n    repeat (15)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n    end\n    point towards (hitbox v)\n    wait until <(Bossattack_Release) = [1]>\n    start sound [tinkertank_ball v]\n    repeat (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    repeat until <touching (_edge_ v)?>\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n    end\n    delete this clone\nend\nif <(costume [number v]) = [89]> then\n    set rotation style [left-right v]\n    clear graphic effects\n    switch costume to (bubble v)\n    set [y v] to (pick random (8.5) to (15))\n    set [x v] to [0]\n    repeat (10)\n        point towards (hitbox v)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n        set [level_y v] to (((Level_Y) + (([cos v] of (direction) ) * (y))) + (x))\n        change [x v] by (pick random (.5) to (2))\n        change [y v] by (-1)\n    end\n    repeat (4)\n        wait (.02) seconds\n        next costume\n    end\n    wait (.02) seconds\n    delete this clone\nend\nif <(costume [number v]) = [59]> then\n    set rotation style [left-right v]\n    clear graphic effects\n    set [y v] to [6]\n    repeat (4)\n        point towards (hitbox v)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n    end\n    repeat until <(distance to [hitbox v]) < [120]>\n        point towards (hitbox v)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n    end\n    set [bossattack_release v] to [1]\n    forever\n        repeat (15)\n            if <([x position v] of [hitbox v]) < (x position)> then\n                broadcast (Fwd_4 v)\n            else\n                broadcast (Bck_4 v)\n            end\n        end\n        start sound [SE \[50\]2 v]\n    end\nend\nif <(costume [number v]) = [51]> then\n    set rotation style [left-right v]\n    clear graphic effects\n    set [y v] to [22]\n    repeat (15)\n        change [y v] by (-1)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (10)))\n        set [level_y v] to ((Level_Y) + (y))\n    end\n    repeat until <(Level_Y) < [2715]>\n        change [y v] by (-1)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (10)))\n        set [level_y v] to ((Level_Y) + (y))\n    end\n    set [level_y v] to [2708]\n    set [x v] to [0]\n    wait until <(Bossattack_Release) = [1]>\n    start sound (pick random (21) to (22))\n    if <([x position v] of [hitbox v]) < [0]> then\n        repeat (15)\n            change [x v] by (1)\n            set [level_x v] to ((Level_X) + (x))\n        end\n        repeat (15)\n            change [x v] by (-1)\n            set [level_x v] to ((Level_X) + (x))\n        end\n    else\n        repeat (15)\n            change [x v] by (-1)\n            set [level_x v] to ((Level_X) + (x))\n        end\n        repeat (15)\n            change [x v] by (1)\n            set [level_x v] to ((Level_X) + (x))\n        end\n    end\n    repeat (10)\n        change [brightness v] effect by (10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [78]> then\n    set rotation style [all around v]\n    clear graphic effects\n    set [y v] to [10]\n    repeat (25)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n    end\n    delete this clone\nend\nif <(costume [number v]) = [94]> then\n    start sound [tinkertank_missile_big v]\n    set rotation style [left-right v]\n    clear graphic effects\n    set [y v] to [0]\n    repeat (2)\n        point in direction (-90)\n        repeat (1)\n            repeat (2)\n                switch costume to (whms v)\n                change [y v] by (.5)\n                set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n                set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n            end\n            repeat (2)\n                switch costume to (whms2 v)\n                change [y v] by (.5)\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 <([y position v] of [hitbox v]) < (y position)> then\n                point in direction (-135)\n            else\n                point in direction (-45)\n            end\n            repeat (2)\n                repeat (2)\n                    if <(direction) = [-135]> then\n                        switch costume to (whms5 v)\n                    else\n                        switch costume to (whms3 v)\n                    end\n                    change [y v] by (.5)\n                    set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n                    set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n                end\n                repeat (2)\n                    if <(direction) = [-135]> then\n                        switch costume to (whms6 v)\n                    else\n                        switch costume to (whms4 v)\n                    end\n                    change [y v] by (.5)\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        end\n    end\n    repeat until <<touching (_edge_ v)?> or <<touching (mega man v)?> or <touching (ground v)?>>>\n        point in direction (-90)\n        repeat (1)\n            repeat (2)\n                switch costume to (whms v)\n                change [y v] by (.5)\n                set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n                set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n            end\n            repeat (2)\n                switch costume to (whms2 v)\n                change [y v] by (.5)\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 <([y position v] of [hitbox v]) < (y position)> then\n                point in direction (-135)\n            else\n                point in direction (-45)\n            end\n            repeat (2)\n                repeat (2)\n                    if <(direction) = [-135]> then\n                        switch costume to (whms5 v)\n                    else\n                        switch costume to (whms3 v)\n                    end\n                    change [y v] by (.5)\n                    set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n                    set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n                end\n                repeat (2)\n                    if <(direction) = [-135]> then\n                        switch costume to (whms6 v)\n                    else\n                        switch costume to (whms4 v)\n                    end\n                    change [y v] by (.5)\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        end\n    end\n    if <touching (_edge_ v)?> then\n        delete this clone\n    else\n        start sound [SE \[83\] v]\n        switch costume to (explo v)\n        repeat (4)\n            wait (.02) seconds\n            next costume\n        end\n        wait (.02) seconds\n        delete this clone\n    end\nend\nif <(costume [number v]) = [87]> then\n    set rotation style [left-right v]\n    clear graphic effects\n    start sound [tinkertank_missile_small v]\n    set [y v] to [0]\n    repeat (5)\n        point towards (mega man v)\n        change [y v] by (1)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n    end\n    repeat until <<touching (_edge_ v)?> or <<touching (misc objects v)?> or <touching (ground v)?>>>\n        change [y v] by (1)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n    end\n    if <touching (_edge_ v)?> then\n        delete this clone\n    else\n        start sound [SE \[83\] v]\n        stop [other scripts in sprite v]\n        switch costume to (explo v)\n        repeat (4)\n            wait (0) seconds\n            next costume\n        end\n        wait (0) seconds\n        delete this clone\n    end\nend\nif <(costume [number v]) = [76]> then\n    start sound [blackknight_fireball v]\n    set rotation style [left-right v]\n    clear graphic effects\n    set [y v] to [15]\n    repeat (25)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n    end\n    delete this clone\nend\nif <(costume [number v]) = [48]> then\n    set rotation style [left-right v]\n    clear graphic effects\n    set [y v] to [0]\n    repeat (15)\n        change [y v] by (1)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n    end\n    delete this clone\nend\nif <(costume [number v]) = [8]> then\n    set rotation style [left-right v]\n    set [y v] to [0]\n    repeat (10)\n        change [y v] by (-2)\n        change [level_y v] by (y)\n    end\n    repeat until <touching (ground v)?>\n        change [y v] by (-2)\n        change [level_y v] by (y)\n    end\n    set [ghost v] effect to (100)\n    set [proj x v] to (Level_X)\n    set [proj y v] to (Level_Y)\n    set [projectile name v] to [shrapnel]\n    repeat (3)\n        set [proj direction v] to (pick random (-90) to (90))\n        broadcast (CREATE PROJECTILE v)\n    end\n    start sound [SE \[83\]2 v]\n    delete this clone\nend\nif <(costume [number v]) = [21]> then\n    start sound [SE \[83\]2 v]\n    switch costume to (bone v)\n    hide\n    repeat (3)\n        if <(Scroll X) = [11220]> then\n            if <(x position) > [180]> then\n                set [level_x v] to ((Scroll X) + (180))\n            end\n            if <(x position) < [-220]> then\n                set [level_x v] to ((Scroll X) + (-220))\n            end\n        end\n    end\n    show\n    repeat (4)\n        wait (.02) seconds\n        next costume\n    end\n    repeat (4)\n        wait (.02) seconds\n        switch costume to ((costume [number v]) + (-1))\n    end\n    wait (.02) seconds\n    delete this clone\nend\nif <(costume [number v]) = [19]> then\n    start sound [Mega Man 5 SFX \(11\) v]\n    set rotation style [left-right v]\n    if <([x position v] of [hitbox v]) > (x position)> then\n        point in direction (90)\n    else\n        point in direction (-90)\n    end\n    repeat until <(y position) < ([y position v] of [hitbox v])>\n        change [level_y v] by (-10)\n    end\n    if <([x position v] of [hitbox v]) > (x position)> then\n        point in direction (90)\n    else\n        point in direction (-90)\n    end\n    repeat until <touching (_edge_ v)?>\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (10)))\n    end\n    delete this clone\nend\nif <(costume [number v]) = [40]> then\n    clear graphic effects\n    set rotation style [left-right v]\n    go to [front v] layer\n    start sound [tinkertank_ball v]\n    show\n    set [x v] to [0]\n    set [y v] to [0]\n    repeat (5)\n        repeat (5)\n            set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n            set [level_y v] to ((Level_Y) + (x))\n            change [y v] by (1)\n            change [x v] by (1)\n        end\n        repeat (10)\n            set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n            set [level_y v] to ((Level_Y) + (x))\n            change [y v] by (1)\n            change [x v] by (-1)\n        end\n        repeat (5)\n            set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n            set [level_y v] to ((Level_Y) + (x))\n            change [y v] by (1)\n            change [x v] by (1)\n        end\n    end\n    delete this clone\nend\nif <<(costume [number v]) > [44]> and <(costume [number v]) < [48]>> then\n    clear graphic effects\n    set rotation style [all around v]\n    go to [front v] layer\n    show\n    set [y v] to [10]\n    repeat (50)\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n    end\n    delete this clone\nend\nif <(costume [number v]) = [39]> then\n    clear graphic effects\n    set rotation style [left-right v]\n    go to [front v] layer\n    show\n    set [y v] to [10]\n    repeat until <touching (_edge_ v)?>\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n        change [y v] by (1)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [37]> then\n    clear graphic effects\n    set rotation style [left-right v]\n    go to [front v] layer\n    start sound [laser_small v]\n    set [y v] to [0]\n    repeat (15)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n        change [y v] by (1)\n    end\n    repeat (round ((distance to [hitbox v]) / (15)))\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n        change [y v] by (-1)\n    end\n    start sound [lantern_upgraded v]\n    set [proj x v] to (Level_X)\n    set [proj y v] to (Level_Y)\n    set [projectile name v] to [teckshrapnel]\n    set [proj direction v] to [0]\n    broadcast (CREATE PROJECTILE v)\n    wait (.05) seconds\n    set [proj x v] to (Level_X)\n    set [proj y v] to (Level_Y)\n    set [projectile name v] to [teckshrapnel]\n    set [proj direction v] to [180]\n    broadcast (CREATE PROJECTILE v)\n    wait (0) seconds\n    delete this clone\nend\nif <(costume [number v]) = [26]> then\n    switch costume to (pick random (26) to (28))\n    set rotation style [left-right v]\n    set [y v] to [15]\n    change [level_y v] by (8)\n    repeat (4)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (10)))\n        change [y v] by (-2)\n        change [level_y v] by (y)\n    end\n    repeat until <<touching (ground v)?> or <touching (_edge_ v)?>>\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (10)))\n        change [y v] by (-2)\n        change [level_y v] by (y)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [9]> then\n    set rotation style [left-right v]\n    set [y v] to [15]\n    change [level_y v] by (8)\n    repeat (4)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (8)))\n        change [y v] by (-2)\n        change [level_y v] by (y)\n    end\n    repeat until <touching (ground v)?>\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (8)))\n        change [y v] by (-2)\n        change [level_y v] by (y)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [17]> then\n    start sound [SE \[92\] v]\n    set rotation style [left-right v]\n    set [y v] to [15]\n    repeat (10)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n    end\n    repeat until <touching (_edge_ v)?>\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n    end\n    delete this clone\nend\nif <(costume [number v]) = [15]> then\n    start sound [Mega Man 6 SRX \(6\) v]\n    set rotation style [left-right v]\n    set [y v] to ((distance to [hitbox v]) / (45))\n    repeat (10)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (15)))\n        set [level_y v] to ((Level_Y) + (y))\n        change [y v] by (-1)\n    end\n    repeat until <(y position) < [-109]>\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (15)))\n        set [level_y v] to ((Level_Y) + (y))\n        change [y v] by (-1)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [29]> then\n    start sound [plague_throw v]\n    set rotation style [left-right v]\n    set [y v] to ((distance to [hitbox v]) / (35))\n    repeat (10)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (15)))\n        set [level_y v] to ((Level_Y) + (y))\n        change [y v] by (-1)\n    end\n    repeat until <(y position) < [-80]>\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (15)))\n        set [level_y v] to ((Level_Y) + (y))\n        change [y v] by (-1)\n    end\n    set [proj x v] to (Level_X)\n    set [proj y v] to (Level_Y)\n    set [projectile name v] to [explo]\n    set [proj direction v] to [90]\n    broadcast (CREATE PROJECTILE v)\n    delete this clone\nend\nif <(costume [number v]) = [43]> then\n    set rotation style [all around v]\n    set [y v] to [5]\n    repeat (45)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n        change [y v] by (1)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [11]> then\n    start sound [SE \[83\] v]\n    set rotation style [left-right v]\n    set [y v] to [15]\n    repeat (10)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n    end\n    repeat until <touching (_edge_ v)?>\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n    end\n    delete this clone\nend\nif <(costume [number v]) = [1]> then\n    set rotation style [left-right v]\n    set [y v] to [15]\n    repeat until <touching (_edge_ v)?>\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n    end\n    delete this clone\nend\nif <(costume [number v]) = [3]> then\n    set rotation style [left-right v]\n    start sound [SE \[83\] v]\n    switch costume to (explmk2 v)\n    wait (0) seconds\n    next costume\n    wait (0) seconds\n    switch costume to (explo v)\n    wait (0) seconds\n    repeat (4)\n        wait (0) seconds\n        next costume\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)) ) > [350]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [200]>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I start as a clone\nif <<(costume [number v]) = [126]> or <<(costume [number v]) = [55]> or <<(costume [number v]) = [59]> or <(costume [number v]) = [41]>>>> then\n    set [internal timer v] to [0]\n    repeat until <(internal timer) > [3]>\n        wait (1) seconds\n        change [internal timer v] by (1)\n    end\n    stop [other scripts in sprite v]\n    repeat (4)\n        change [ghost v] effect by (25)\n    end\nelse\n    set [internal timer v] to [0]\n    repeat until <(internal timer) > [1]>\n        wait (1) seconds\n        change [internal timer v] by (1)\n    end\nend\ndelete this clone\n\nwhen I receive [teleportin v]\ndelete this clone\n\nwhen I receive [bossdie v]\ndelete this clone\n\nwhen I receive [die v]\nwait (1) seconds\ndelete this clone\n\nwhen I receive [bossdie v]\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <<touching (hitbox v)?> and <(takingdmg) = [0]>> then\n        if <(INVINCIBILITY) = [0]> then\n            change [health v] by (1)\n            broadcast (TAKE DMG v)\n            broadcast (KNOCKBACK v)\n        end\n    end\nend\n\nwhen I start as a clone\nset size to (200) %\nif <(costume [number v]) = [118]> then\n    forever\n        switch costume to (orby v)\n        repeat (3)\n            wait (.02) seconds\n            next costume\n        end\n        wait (.02) seconds\n    end\nend\nif <(costume [number v]) = [126]> then\n    forever\n        switch costume to (firewall v)\n        wait (.02) seconds\n        next costume\n        wait (.02) seconds\n        next costume\n        wait (.02) seconds\n    end\nend\nif <(costume [number v]) = [79]> then\n    forever\n        switch costume to (energyshield v)\n        wait (.02) seconds\n        next costume\n        wait (.02) seconds\n        next costume\n        wait (.02) seconds\n    end\nend\nif <(costume [number v]) = [11]> then\n    forever\n        switch costume to (tankjoeshot v)\n        wait (.02) seconds\n        next costume\n        wait (.02) seconds\n    end\nend\nif <(costume [number v]) = [115]> then\n    set [x v] to [0]\n    wait until <(x) = [1]>\n    forever\n        switch costume to (birdqegg2 v)\n        wait (.02) seconds\n        next costume\n        wait (.02) seconds\n    end\nend\nif <(costume [number v]) = [15]> then\n    forever\n        switch costume to (airtk v)\n        wait (.02) seconds\n        next costume\n        wait (.02) seconds\n    end\nend\nif <(costume [number v]) = [17]> then\n    forever\n        switch costume to (megatk v)\n        wait (.02) seconds\n        next costume\n        wait (.02) seconds\n    end\nend\nif <(costume [number v]) = [19]> then\n    forever\n        set size to (400) %\n        switch costume to (yokushot v)\n        wait (.02) seconds\n        next costume\n        wait (.02) seconds\n    end\nend\nif <(costume [number v]) = [55]> then\n    forever\n        switch costume to (plugball 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\nend\nif <(costume [number v]) = [29]> then\n    forever\n        switch costume to (hammer v)\n        wait (.02) seconds\n        repeat (7)\n            next costume\n            wait (.02) seconds\n        end\n    end\nend\nif <(costume [number v]) = [37]> then\n    forever\n        switch costume to (teckshot v)\n        wait (.02) seconds\n        next costume\n        wait (.02) seconds\n    end\nend\nif <<(costume [number v]) = [40]> or <(costume [number v]) = [41]>> then\n    forever\n        switch costume to (bolt v)\n        wait (.02) seconds\n        next costume\n        wait (.02) seconds\n        next costume\n        wait (.02) seconds\n    end\nend\nif <(costume [number v]) = [43]> then\n    forever\n        switch costume to (beta v)\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n    end\nend\nif <(costume [number v]) = [48]> then\n    forever\n        switch costume to (joeshot v)\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n    end\nend\nif <(costume [number v]) = [51]> then\n    repeat until <(Bossattack_Release) = [1]>\n        switch costume to (thundercloud4 v)\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n    end\n    forever\n        switch costume to (thundercloud v)\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n    end\nend\nif <(costume [number v]) = [76]> then\n    forever\n        switch costume to (snipeshot v)\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n    end\nend\nif <(costume [number v]) = [59]> then\n    set [bossattack_release v] to [0]\n    repeat until <(Bossattack_Release) = [1]>\n        start sound [SE \[49\]2 v]\n        switch costume to (bhole v)\n        wait (.05) seconds\n        repeat (3)\n            next costume\n            wait (.05) seconds\n        end\n    end\n    forever\n        switch costume to (bholesuck1 v)\n        wait (.05) seconds\n        repeat (12)\n            next costume\n            wait (.05) seconds\n        end\n    end\nend\nif <(costume [number v]) = [87]> then\n    forever\n        switch costume to (bunms v)\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n    end\nend\n\nwhen I receive [stage select v]\ndelete this clone\n\nwhen I start as a clone\nif <(costume [number v]) = [94]> then\n    start sound [tinkertank_missile_big v]\n    set rotation style [left-right v]\n    clear graphic effects\n    set [y v] to [0]\n    wait (1) seconds\n    wait until <<touching (_edge_ v)?> or <<touching (mega man v)?> or <touching (ground v)?>>>\n    stop [other scripts in sprite v]\n    start sound [SE \[83\] v]\n    switch costume to (explo v)\n    if <touching (hitbox v)?> then\n        if <<(INVINCIBILITY) = [0]> and <(getting ouched ?) = [0]>> then\n            broadcast (TAKE DMG v)\n            broadcast (KNOCKBACK v)\n            change [health v] by (2)\n        end\n    end\n    repeat (4)\n        wait (.02) seconds\n        next costume\n    end\n    wait (.02) seconds\n    delete this clone\nend\nif <(costume [number v]) = [103]> then\n    set rotation style [left-right v]\n    clear graphic effects\n    wait (1) seconds\n    wait until <<touching (_edge_ v)?> or <<<touching (misc objects v)?> or <touching (hitbox v)?>> or <touching (ground v)?>>>\n    stop [other scripts in sprite v]\n    start sound [SE \[83\] v]\n    switch costume to (explo v)\n    if <touching (hitbox v)?> then\n        if <<(INVINCIBILITY) = [0]> and <(getting ouched ?) = [0]>> then\n            broadcast (TAKE DMG v)\n            broadcast (KNOCKBACK v)\n            change [health v] by (2)\n        end\n    end\n    repeat (4)\n        wait (.02) seconds\n        next costume\n    end\n    wait (.02) seconds\n    delete this clone\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [103]> then\n    forever\n        switch costume to (burnergas v)\n        repeat (7)\n            wait (0) seconds\n            next costume\n        end\n        wait (0) seconds\n    end\nend\n\n@Boss\n\nwhen flag clicked\nclear graphic effects\nset [heard boss speech? v] to [0]\nhide\n\nwhen I receive [bossdie v]\nstop [other scripts in sprite v]\nif <(STAGE #) = [9]> then\n    if <(BossBattle Phase) = [0]> then\n        repeat (3)\n            start sound (pick random (26) to (28))\n            broadcast (Screen Blink v)\n            wait (.1) seconds\n            clear graphic effects\n            switch costume to (bassz8 v)\n            go to [front v] layer\n            show\n            point in direction (-90)\n            wait (.5) seconds\n        end\n        start sound (pick random (26) to (28))\n        broadcast (Screen Blink v)\n        glide (.5) secs to x: (89) y: (32)\n        repeat (10)\n            set y to (pick random (28) to (35))\n            set x to (pick random (85) to (94))\n        end\n        repeat (10)\n            set y to (pick random (20) to (40))\n            set x to (pick random (80) to (100))\n        end\n        repeat (10)\n            set y to (pick random (10) to (50))\n            set x to (pick random (70) to (110))\n        end\n        start sound [thunder_01 v]\n        broadcast (Screen Blink v)\n        set [y v] to [0]\n        repeat (25)\n            change y by (y)\n            change [y v] by (-.5)\n        end\n        switch costume to (phantombass v)\n        set y to (-103)\n        wait (1) seconds\n        broadcast (Summon Treble v)\n        set [bossbattle phase v] to [1]\n    else\n        clear graphic effects\n        go to [front v] layer\n        show\n        switch costume to (bolt v)\n        start sound [thunder_01 v]\n        repeat (4)\n            change [brightness v] effect by (25)\n            change [ghost v] effect by (10)\n        end\n        broadcast (Screen Blink v)\n        repeat (6)\n            change [brightness v] effect by (25)\n            change [ghost v] effect by (10)\n        end\n        hide\n    end\nelse\n    if <(STAGE #) = [7]> then\n        broadcast (Protoman lose arm v)\n        start sound [explode_large v]\n        broadcast (Screen Blink v)\n        wait (.1) seconds\n        clear graphic effects\n        go to [front v] layer\n        switch costume to (protomanlosearm v)\n        show\n        set [y v] to [15]\n        repeat (20)\n            change [y v] by (-.1)\n            move (-2) steps\n            change y by ((y) / (2))\n        end\n        repeat until <touching (ground v)?>\n            change [y v] by (-2)\n            move (-6) steps\n            change y by (y)\n        end\n        switch costume to (megam6 v)\n        start sound [Mega Man 5 SFX \(31\) v]\n        repeat (5)\n            wait (.02) seconds\n            switch costume to ((costume [number v]) + (-1))\n        end\n        set [y v] to [0]\n        repeat until <(y position) > [190]>\n            change [y v] by (2)\n            change y by (y)\n        end\n        hide\n    else\n        if <<(STAGE #) = [1]> and <(Checkpoint #) = [3]>> then\n            clear graphic effects\n            go to [front v] layer\n            show\n            set y to (0)\n            switch costume to (bolt v)\n            start sound [thunder_01 v]\n            repeat (4)\n                change [brightness v] effect by (25)\n                change [ghost v] effect by (10)\n            end\n            broadcast (Screen Blink v)\n            repeat (6)\n                change [brightness v] effect by (25)\n                change [ghost v] effect by (10)\n            end\n            wait (2) seconds\n            broadcast (Enable Movement v)\n            broadcast (Resume Stage music v)\n            set [heard boss speech? v] to [0]\n            set [checkpoint # v] to [4]\n            replace item (1) of [activated bossgates v] with [1]\n            hide\n        else\n            hide\n        end\n    end\nend\n\nwhen I receive [init_battle v]\nwait (1) seconds\nclear graphic effects\nforever\n    if <<touching (hitbox v)?> and <(takingdmg) = [0]>> then\n        change [health v] by (3)\n        broadcast (KNOCKBACK v)\n        broadcast (TAKE DMG v)\n        wait (3) seconds\n    end\nend\n\nwhen I receive [ready v]\nstop [other scripts in sprite v]\nhide\n\ndefine touchground\nrepeat until <touching (ground v)?>\n    change y by (-1)\nend\nrepeat until <not <touching (ground v)?>>\n    change y by (1)\nend\n\nwhen I receive [last boss fight v]\nwait (.2) seconds\nclear graphic effects\nbroadcast (Disable Movement v)\n\nwhen I receive [init_battle v]\nwait (1) seconds\nclear graphic effects\nforever\n    if <<<touching (mega man v)?> and <<touching color (#fae0c1)?> and <not <touching (hitbox v)?>>>> or <touching (special weapons v)?>> then\n        if <touching (special weapons v)?> then\n            set [universal hold v] to [0]\n            if <<(PHANTOM ARMOR?) = [1]> and <(Megaman Costume) = [1]>> then\n                broadcast (Boss 4 DMG v)\n                create clone of (boss hp v)\n                set [dmg # v] to [4]\n                set [dmg_x v] to ((Scroll X) + (x position))\n                set [dmg_y v] to ((Scroll Y) + (y position))\n                create clone of (dmg v)\n                repeat (4)\n                    set [ghost v] effect to (90)\n                    wait (.05) seconds\n                    set [ghost v] effect to (0)\n                    wait (.1) seconds\n                end\n            else\n                if <<<(STAGE #) = [9]> and <(Megaman Costume) = [2]>> or <<<(STAGE #) = [8]> and <(Megaman Costume) = [7]>> or <<<(STAGE #) = [7]> and <(Megaman Costume) = [4]>> or <<<(STAGE #) = [6]> and <(Megaman Costume) = [3]>> or <<<(STAGE #) = [4]> and <(Megaman Costume) = [6]>> or <<<(STAGE #) = [3]> and <(Megaman Costume) = [2]>> or <<<(STAGE #) = [1]> and <(Megaman Costume) = [8]>> or <<(STAGE #) = [2]> and <(Megaman Costume) = [9]>>>>>>>>> then\n                    broadcast (BossWeaknessDMG v)\n                    create clone of (boss hp v)\n                    set [dmg # v] to [5]\n                    set [dmg_x v] to ((Scroll X) + (x position))\n                    set [dmg_y v] to ((Scroll Y) + (y position))\n                    create clone of (dmg v)\n                    repeat (4)\n                        set [ghost v] effect to (90)\n                        wait (.05) seconds\n                        set [ghost v] effect to (0)\n                        wait (.1) seconds\n                    end\n                else\n                    broadcast (Boss get oofed v)\n                    create clone of (boss hp v)\n                    set [dmg # v] to [2]\n                    set [dmg_x v] to ((Scroll X) + (x position))\n                    set [dmg_y v] to ((Scroll Y) + (y position))\n                    create clone of (dmg v)\n                    repeat (4)\n                        set [ghost v] effect to (90)\n                        wait (.05) seconds\n                        set [ghost v] effect to (0)\n                        wait (.1) seconds\n                    end\n                end\n            end\n        else\n            broadcast (BossDMG v)\n            create clone of (boss hp v)\n            if <(Universal Hold) > [40]> then\n                change [hp v] by (-3)\n                set [dmg # v] to [3]\n                set [dmg_x v] to ((Scroll X) + (x position))\n                set [dmg_y v] to ((Scroll Y) + (y position))\n                create clone of (dmg v)\n            else\n                change [hp v] by (-1)\n                set [dmg # v] to [1]\n                set [dmg_x v] to ((Scroll X) + (x position))\n                set [dmg_y v] to ((Scroll Y) + (y position))\n                create clone of (dmg v)\n            end\n            repeat (4)\n                set [ghost v] effect to (90)\n                wait (.05) seconds\n                set [ghost v] effect to (0)\n                wait (.1) seconds\n            end\n        end\n    end\nend\n\nwhen I receive [bosscutscene v]\nset size to (200) %\nset [alt boss? v] to [0]\nclear graphic effects\npoint in direction (-90)\nif <(STAGE #) = [4]> then\n    if <(Checkpoint #) = [2]> then\nend\nif <(STAGE #) = [8]> then\n    broadcast (Epsilon idle animation v)\n    go to [front v] layer\n    go to x: (128) y: (-96)\n    show\nend\nif <(STAGE #) = [9]> then\n    wait (1) seconds\n    hide\n    set size to (225) %\n    broadcast (Screen Flash v)\n    repeat (12)\n        broadcast (ScreenShake v)\n        create clone of (_myself_ v)\n        wait (.1) seconds\n    end\n    broadcast (ScreenShake v)\n    switch costume to (phantombass v)\n    go to x: (71) y: (-103)\n    point in direction (-90)\n    show\n    set [brightness v] effect to (100)\n    repeat (10)\n        change [brightness v] effect by (-10)\n    end\nend\nif <(STAGE #) = [7]> then\n    wait (1) seconds\n    broadcast (ProtoMan Whistle v)\n    start sound [SE \[21\] v]\n    wait (2) seconds\n    switch costume to (megam1 v)\n    clear graphic effects\n    set size to (200) %\n    go to x: (80) y: (999)\n    go to [front v] layer\n    show\n    set [y v] to [0]\n    repeat (22)\n        change [y v] by (-1)\n        change y by (y)\n    end\n    set y to (-55)\n    start sound [SE \[14\] v]\n    repeat (7)\n        wait (.02) seconds\n        next costume\n    end\n    forever\n        switch costume to (protoman2 v)\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n    end\nelse\n    if <(STAGE #) = [1]> then\n        if <(Checkpoint #) = [6]> then\n            wait (1) seconds\n            hide\n            set size to (225) %\n            broadcast (Screen Blink v)\n            create clone of (_myself_ v)\n            broadcast (ScreenShake v)\n            switch costume to (omegafall v)\n            go to x: (140) y: (250)\n            point in direction (-90)\n            set size to (400) %\n            show\n            glide (.2) secs to x: (140) y: (-53)\n            create clone of (_myself_ v)\n            switch costume to (omega v)\n            repeat (23)\n                wait (.05) seconds\n                next costume\n            end\n        else\n            wait (1) seconds\n            hide\n            set size to (225) %\n            broadcast (Screen Flash v)\n            repeat (12)\n                broadcast (ScreenShake v)\n                create clone of (_myself_ v)\n                wait (.1) seconds\n            end\n            broadcast (ScreenShake v)\n            switch costume to (phantombass v)\n            go to x: (101) y: (-54)\n            point in direction (-90)\n            show\n            set [brightness v] effect to (100)\n            repeat (10)\n                change [brightness v] effect by (-10)\n            end\n        end\n    end\n    if <(STAGE #) = [2]> then\n        repeat (10)\n            go to [front v] layer\n        end\n        switch costume to (teng1 v)\n        clear graphic effects\n        go to x: (100) y: (999)\n        show\n        point in direction (-90)\n        repeat (12)\n            switch costume to (teng1 v)\n            repeat (2)\n                change y by (-5)\n            end\n            next costume\n            repeat (2)\n                change y by (-5)\n            end\n        end\n        broadcast (Beta hover animation v)\n    end\nend\n\nwhen I receive [blackout v]\nrepeat (10)\n    change [brightness v] effect by (-10)\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nclear graphic effects\n\nwhen I receive [beta hover animation v]\nif <(STAGE #) = [9]> then\n    set [y v] to [0]\n    forever\n        change [y v] by (5)\n        set y to ((50) + (([sin v] of (y) ) * (35)))\n    end\nelse\n    set [y v] to [0]\n    forever\n        change [y v] by (15)\n        set y to ((-38) + (([sin v] of (y) ) * (15)))\n    end\nend\n\nwhen I receive [beta hover animation v]\nif <(STAGE #) = [9]> then\n\nwhen I receive [battle begin v]\nclear graphic effects\nif <(ALT BOSS?) = [0]> then\n    if <<(STAGE #) = [4]> and <(Checkpoint #) = [3]>> then\n        stop [other scripts in sprite v]\n        switch costume to (fireanger1 v)\n        wait (.2) seconds\n        start sound [enchantress_groundslam v]\n        repeat (2)\n            wait (.1) seconds\n            next costume\n        end\n        wait (.05) seconds\n        switch costume to (fireblast1 v)\n        broadcast (Init_battle v)\n        wait (.5) seconds\n        forever\n            if <(distance to [mega man v]) < [150]> then\n                BossAttack [3]\n                repeat (6)\n                    switch costume to (firem v)\n                    wait (0) seconds\n                    next costume\n                    wait (0) seconds\n                end\n                repeat (2)\n                    BossAttack [2]\n                end\n            else\n                BossAttack [1]\n                repeat (2)\n                    BossAttack [2]\n                end\n                set [bossattack_release v] to [1]\n                switch costume to (fireanger1 v)\n                start sound [enchantress_groundslam v]\n                wait (.8) seconds\n                repeat (4)\n                    switch costume to (firem v)\n                    wait (0) seconds\n                    next costume\n                    wait (0) seconds\n                end\n            end\n            repeat (pick random (1) to (3))\n                if <(pick random (1) to (2)) = [1]> then\n                    repeat (2)\n                        switch costume to (firem v)\n                        wait (0) seconds\n                        next costume\n                        wait (0) seconds\n                    end\n                    BossAttack [5]\n                else\n                    repeat (6)\n                        switch costume to (firem v)\n                        wait (0) seconds\n                        next costume\n                        wait (0) seconds\n                    end\n                    BossAttack [4]\n                end\n            end\n            if <<([costume # v] of [boss hp v]) > [7]> and <(BossBattle Phase) = [0]>> then\n                set [bossbattle phase v] to [2]\n                switch costume to (fireanger1 v)\n                start sound [dr_teleport v]\n                wait (1) seconds\n            end\n            if <(Boss-Charged) = [1]> then\n                BossAttack [6]\n            end\n        end\n    end\n    if <<(STAGE #) = [8]> and <(Checkpoint #) = [5]>> then\n        stop [other scripts in sprite v]\n        start sound [raiment_powerup v]\n        switch costume to (burner1 v)\n        repeat (6)\n            wait (.05) seconds\n            next costume\n        end\n        repeat (8)\n            switch costume to (burner6 v)\n            wait (.01) seconds\n            next costume\n            wait (.01) seconds\n        end\n        wait (.1) seconds\n        switch costume to (burnerstand1 v)\n        broadcast (Init_battle v)\n        wait (.5) seconds\n        BurnerMan AI\n    end\n    if <(STAGE #) = [9]> then\n        if <(BossBattle Phase) = [1]> then\n            wait (2) seconds\n            broadcast (Init_battle v)\n            go to x: (44) y: (-3)\n            go to [front v] layer\n            switch costume to (bassfly2 v)\n            point in direction (-90)\n            set [y v] to [-10]\n            repeat (20)\n                change x by (y)\n                change [y v] by (2)\n            end\n            broadcast (Autoscroller v)\n            start sound [rockbig_land v]\n            start sound [explode_large v]\n            broadcast (Bass ram into wall v)\n            hide\n            repeat (25)\n                change x by (y)\n                change [y v] by (-1)\n            end\n            show\n            repeat (20)\n                change x by (y)\n                change [y v] by (-1)\n            end\n            repeat (16)\n                change x by (y)\n                change [y v] by (2)\n            end\n            set y to (-3)\n            set [y v] to [0]\n            repeat (10)\n                change y by (y)\n                change [y v] by (1)\n            end\n            broadcast (Beta hover animation v)\n            forever\n                switch costume to (bassfly2 v)\n                wait (([abs v] of (([costume # v] of [boss hp v]) - (27)) ) * (.18)) seconds\n                switch costume to (bassfly2 v)\n                wait (.2) seconds\n                switch costume to (bassfly3 v)\n                wait (.4) seconds\n                switch costume to (bassflyshoot v)\n                repeat (3)\n                    point in direction (-100)\n                    start sound [SE \[5\] v]\n                    repeat (2)\n                        set [projectile name v] to [bullet]\n                        set [proj direction v] to ((direction) + (0))\n                        set [proj x v] to (((Scroll X) + (x position)) + (([sin v] of (direction) ) * (35)))\n                        set [proj y v] to (((Scroll Y) + (y position)) + (0))\n                        broadcast (CREATE PROJECTILE v)\n                        wait (.02) seconds\n                        turn right (-35) degrees\n                    end\n                    set [projectile name v] to [bullet]\n                    set [proj direction v] to ((direction) + (0))\n                    set [proj x v] to (((Scroll X) + (x position)) + (([sin v] of (direction) ) * (35)))\n                    set [proj y v] to (((Scroll Y) + (y position)) + (0))\n                    broadcast (CREATE PROJECTILE v)\n                    wait (.02) seconds\n                    point in direction (-90)\n                    wait (.5) seconds\n                end\n                switch costume to (bassfly2 v)\n            end\n        else\n            wait (2) seconds\n            broadcast (Init_battle v)\n            forever\n                go to [front v] layer\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                switch costume to (phantombass v)\n                wait (.2) seconds\n                switch costume to (bassz2 v)\n                repeat (3)\n                    repeat (4)\n                        move (6) steps\n                        if <(x position) > [180]> then\n                            set x to (180)\n                        end\n                        if <(x position) < [-180]> then\n                            set x to (-180)\n                        end\n                    end\n                    next costume\n                end\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                switch costume to (bassjump v)\n                set [y v] to [15]\n                repeat (5)\n                    move (5) steps\n                    change y by (y)\n                    change [y v] by (-1)\n                    if <(x position) > [180]> then\n                        set x to (180)\n                    end\n                    if <(x position) < [-180]> then\n                        set x to (-180)\n                    end\n                end\n                repeat until <(y position) < [-90]>\n                    move (5) steps\n                    change y by (y)\n                    change [y v] by (-1)\n                    if <(x position) > [180]> then\n                        set x to (180)\n                    end\n                    if <(x position) < [-180]> then\n                        set x to (-180)\n                    end\n                end\n                set y to (-103)\n                if <([costume # v] of [boss hp v]) > [12]> then\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                end\n                switch costume to (phantombass v)\n                wait (.2) seconds\n                start sound [shieldknight_throw v]\n                switch costume to (bassz6 v)\n                set [projectile name v] to [bassbeam]\n                set [proj direction v] to ((direction) + (0))\n                set [proj x v] to (((Scroll X) + (x position)) + (([sin v] of (direction) ) * (35)))\n                set [proj y v] to (((Scroll Y) + (y position)) + (0))\n                broadcast (CREATE PROJECTILE v)\n                wait (1) seconds\n                switch costume to (phantombass v)\n                wait (.5) seconds\n            end\n        end\n    end\n    if <(STAGE #) = [7]> then\n        stop [other scripts in sprite v]\n        broadcast (Init_battle v)\n        wait (2) seconds\n        forever\n            repeat until <([costume # v] of [boss hp v]) > [12]>\n                repeat (3)\n                    go to [front v] layer\n                    switch costume to (protoman5 v)\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 [y v] to [12]\n                    repeat (5)\n                        move (5) steps\n                        change y by (y)\n                        change [y v] by (-1)\n                    end\n                    broadcast (Protoman Spray Attk v)\n                    repeat until <touching (ground v)?>\n                        move (5) steps\n                        change y by (y)\n                        change [y v] by (-1)\n                        if <(x position) > [200]> then\n                            set x to (200)\n                        end\n                        if <(x position) < [-200]> then\n                            set x to (-200)\n                        end\n                    end\n                    switch costume to (protoman2 v)\n                    touchground\n                    wait (.2) seconds\n                end\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                switch costume to (protoman6 v)\n                repeat (3)\n                    repeat (2)\n                        move (5) steps\n                    end\n                    next costume\n                end\n                repeat (2)\n                    move (5) steps\n                end\n                switch costume to (protoman2 v)\n                wait (.4) seconds\n            end\n            broadcast (Start_Thunderstorm v)\n            repeat (3)\n                go to [front v] layer\n                switch costume to (protoman5 v)\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 [y v] to [12]\n                repeat (5)\n                    move (3) steps\n                    change y by (y)\n                    change [y v] by (-1)\n                end\n                broadcast (Protoman Spray Attk v)\n                repeat until <touching (ground v)?>\n                    move (3) steps\n                    change y by (y)\n                    change [y v] by (-1)\n                    if <(x position) > [200]> then\n                        set x to (200)\n                    end\n                    if <(x position) < [-200]> then\n                        set x to (-200)\n                    end\n                end\n                switch costume to (protoman2 v)\n                touchground\n                wait (.2) seconds\n            end\n        end\n    end\n    if <<(STAGE #) = [1]> and <(Checkpoint #) = [6]>> then\n        wait (.5) seconds\n        switch costume to (omegaintro2 v)\n        repeat (3)\n            wait (.05) seconds\n            next costume\n        end\n        switch costume to (costume16 v)\n        repeat (4)\n            wait (.05) seconds\n            next costume\n        end\n        repeat (4)\n            wait (.05) seconds\n            next costume\n        end\n        wait (.5) seconds\n        broadcast (Init_battle v)\n        forever\n            if <(pick random (1) to (2)) = [1]> then\n                go to [front v] layer\n                switch costume to (omegathrow1 v)\n                repeat (2)\n                    wait (.1) seconds\n                    next costume\n                end\n                set [bossattack_release v] to [0]\n                point towards (mega man v)\n                start sound [sfx28 v]\n                set [projectile name v] to [thundercloud4]\n                set [proj direction v] to ((direction) + (0))\n                set [proj x v] to (((Scroll X) + (x position)) + (([sin v] of (direction) ) * (15)))\n                set [proj y v] to (((Scroll Y) + (y position)) + (0))\n                broadcast (CREATE PROJECTILE v)\n                wait (.02) seconds\n                point towards (mega man v)\n                set [projectile name v] to [thundercloud4]\n                set [proj direction v] to ((direction) + (75))\n                set [proj x v] to (((Scroll X) + (x position)) + (([sin v] of (direction) ) * (15)))\n                set [proj y v] to (((Scroll Y) + (y position)) + (0))\n                broadcast (CREATE PROJECTILE v)\n                repeat (2)\n                    next costume\n                    wait (.05) seconds\n                end\n                wait (1) seconds\n                set [bossattack_release v] to [1]\n            else\n                switch costume to (omegajumpprepare v)\n                repeat (3)\n                    wait (.1) seconds\n                    next costume\n                end\n                point towards (mega man v)\n                start sound [sfx28 v]\n                set [y v] to [15]\n                repeat (15)\n                    move (5) steps\n                    change y by (y)\n                    change [y v] by (-1)\n                end\n                switch costume to (omegaairattack v)\n                repeat (2)\n                    wait (.05) seconds\n                    next costume\n                end\n                start sound [cutter v]\n                set [projectile name v] to [bhole]\n                set [proj direction v] to [90]\n                set [proj x v] to ((Scroll X) + (x position))\n                set [proj y v] to ((Scroll Y) + (y position))\n                broadcast (CREATE PROJECTILE v)\n                repeat (2)\n                    wait (.05) seconds\n                    next costume\n                end\n                wait (.4) seconds\n                switch costume to (omegafall v)\n                repeat until <(y position) < [-45]>\n                    change y by (y)\n                    change [y v] by (-1)\n                end\n                set y to (-53)\n                point towards (mega man v)\n                wait (.02) seconds\n                switch costume to (omegafall v)\n                repeat (7)\n                    wait (.05) seconds\n                    next costume\n                end\n                wait (.4) seconds\n                set [bossattack_release v] to [0]\n                go to [front v] layer\n                switch costume to (omegasling v)\n                repeat (3)\n                    wait (.05) seconds\n                    next costume\n                end\n                start sound [lantern_throw v]\n                set [projectile name v] to [bolt2]\n                set [proj direction v] to [-45]\n                set [proj x v] to ((Scroll X) + (x position))\n                set [proj y v] to (((Scroll Y) + (y position)) + (15))\n                broadcast (CREATE PROJECTILE v)\n                repeat (3)\n                    wait (.05) seconds\n                    next costume\n                end\n                start sound [lantern_throw v]\n                set [projectile name v] to [bolt2]\n                set [proj direction v] to [0]\n                set [proj x v] to ((Scroll X) + (x position))\n                set [proj y v] to (((Scroll Y) + (y position)) + (15))\n                broadcast (CREATE PROJECTILE v)\n                repeat (3)\n                    wait (.05) seconds\n                    next costume\n                end\n                start sound [lantern_throw v]\n                set [projectile name v] to [bolt2]\n                set [proj direction v] to [45]\n                set [proj x v] to ((Scroll X) + (x position))\n                set [proj y v] to (((Scroll Y) + (y position)) + (15))\n                broadcast (CREATE PROJECTILE v)\n                switch costume to (omega v)\n                wait (1) seconds\n                set [bossattack_release v] to [1]\n                wait (1) seconds\n            end\n            switch costume to (omega v)\n            wait (.5) seconds\n            repeat (2)\n                switch costume to (omegajumpprepare v)\n                repeat (3)\n                    wait (.1) seconds\n                    next costume\n                end\n                point towards (mega man v)\n                start sound [sfx28 v]\n                set [y v] to [18]\n                repeat (10)\n                    move (5) steps\n                    change y by (y)\n                    change [y v] by (-1)\n                end\n                switch costume to (omegafall v)\n                repeat until <(y position) < [-45]>\n                    move (5) steps\n                    change y by (y)\n                    change [y v] by (-1)\n                    if <(x position) > [200]> then\n                        set x to (200)\n                    end\n                    if <(x position) < [-200]> then\n                        set x to (-200)\n                    end\n                end\n                set y to (-53)\n                point towards (mega man v)\n                broadcast (ScreenShake v)\n                start sound [rockbig_land v]\n                start sound [tpin_fireball v]\n                set [projectile name v] to [plugball]\n                set [proj direction v] to [90]\n                set [proj x v] to ((Scroll X) + (x position))\n                set [proj y v] to [2510]\n                broadcast (CREATE PROJECTILE v)\n                wait (.02) seconds\n                set [projectile name v] to [plugball]\n                set [proj direction v] to [-90]\n                set [proj x v] to ((Scroll X) + (x position))\n                set [proj y v] to [2510]\n                broadcast (CREATE PROJECTILE v)\n                wait (.02) seconds\n                switch costume to (omegafall v)\n                repeat (7)\n                    wait (.05) seconds\n                    next costume\n                end\n                wait (.4) seconds\n            end\n        end\n    end\n    if <<(STAGE #) = [1]> and <(Checkpoint #) = [3]>> then\n        wait (2) seconds\n        broadcast (Init_battle v)\n        forever\n            go to [front v] layer\n            go to x: (101) y: (-54)\n            point in direction (-90)\n            switch costume to (phantombass v)\n            wait (.2) seconds\n            switch costume to (bassz2 v)\n            repeat (2)\n                repeat (4)\n                    change x by (-5)\n                end\n                next costume\n            end\n            switch costume to (bassjump v)\n            set [y v] to [5]\n            repeat until <(y position) < [-75]>\n                change x by (-5)\n                change y by (y)\n                change [y v] by (-1)\n            end\n            set y to (-85)\n            switch costume to (phantombass v)\n            wait (.2) seconds\n            switch costume to (bassz6 v)\n            point towards (mega man v)\n            set [projectile name v] to [teckshot]\n            set [proj direction v] to ((direction) + (0))\n            set [proj x v] to (((Scroll X) + (x position)) + (([sin v] of (direction) ) * (35)))\n            set [proj y v] to (((Scroll Y) + (y position)) + (0))\n            broadcast (CREATE PROJECTILE v)\n            wait (.2) seconds\n            point in direction (-90)\n            switch costume to (phantombass v)\n            wait (.2) seconds\n            repeat (3)\n                switch costume to (bassz2 v)\n                repeat (3)\n                    repeat (4)\n                        change x by (-5)\n                    end\n                    next costume\n                end\n            end\n            switch costume to (phantombass v)\n            wait (.2) seconds\n            switch costume to (bassz6 v)\n            point towards (mega man v)\n            set [projectile name v] to [teckshot]\n            set [proj direction v] to ((direction) + (0))\n            set [proj x v] to (((Scroll X) + (x position)) + (([sin v] of (direction) ) * (35)))\n            set [proj y v] to (((Scroll Y) + (y position)) + (0))\n            broadcast (CREATE PROJECTILE v)\n            wait (.2) seconds\n            point in direction (90)\n            switch costume to (phantombass v)\n            wait (.2) seconds\n            repeat (3)\n                switch costume to (bassz2 v)\n                repeat (3)\n                    repeat (4)\n                        change x by (5)\n                    end\n                    next costume\n                end\n            end\n            go to x: (-14) y: (-85)\n            switch costume to (bassjump v)\n            set [y v] to [15]\n            repeat (10)\n                change x by (10)\n                change y by (y)\n                change [y v] by (-1)\n            end\n            repeat until <(y position) < [-45]>\n                change x by (5)\n                change y by (y)\n                change [y v] by (-1)\n            end\n            set y to (-54)\n            switch costume to (phantombass v)\n            wait (.2) seconds\n            switch costume to (bassz6 v)\n            point towards (mega man v)\n            set [projectile name v] to [teckshot]\n            set [proj direction v] to ((direction) + (0))\n            set [proj x v] to (((Scroll X) + (x position)) + (([sin v] of (direction) ) * (35)))\n            set [proj y v] to (((Scroll Y) + (y position)) + (0))\n            broadcast (CREATE PROJECTILE v)\n            wait (.2) seconds\n            point in direction (-90)\n            switch costume to (phantombass v)\n            wait (.2) seconds\n            repeat (1)\n                switch costume to (bassz2 v)\n                repeat (3)\n                    repeat (4)\n                        change x by (-6)\n                    end\n                    next costume\n                end\n            end\n        end\n    end\n    if <(STAGE #) = [2]> then\n        stop [other scripts in sprite v]\n        switch costume to (teng3 v)\n        repeat (6)\n            wait (.05) seconds\n            next costume\n        end\n        start sound [blitzsteed_whoosh v]\n        repeat (2)\n            wait (.05) seconds\n            next costume\n        end\n        wait (.2) seconds\n        repeat (4)\n            wait (.05) seconds\n            next costume\n        end\n        start sound [coin v]\n        broadcast (Init_battle v)\n        go to x: (100) y: (-51)\n        point in direction (-90)\n        show\n        forever\n            switch costume to (teng18 v)\n            set [y v] to [0]\n            set [x v] to [0]\n            wait (.2) seconds\n            next costume\n            point in direction (-90)\n            start sound [wind_side v]\n            repeat (10)\n                change x by (x)\n                change y by (y)\n                change [x v] by (-1)\n                change [y v] by (-1)\n            end\n            repeat (18)\n                change x by (x)\n                change y by (y)\n                change [x v] by (-1)\n                change [y v] by (1)\n            end\n            hide\n            repeat (10)\n                go to [front v] layer\n            end\n            switch costume to (teng1 v)\n            clear graphic effects\n            go to x: (0) y: (999)\n            show\n            point towards (mega man v)\n            repeat (5)\n                switch costume to (teng1 v)\n                repeat (2)\n                    change y by (-5)\n                end\n                next costume\n                repeat (2)\n                    change y by (-5)\n                end\n            end\n            set [x v] to [90]\n            set [y v] to [0]\n            repeat (2)\n                repeat (pick random (8) to (12))\n                    switch costume to (teng1 v)\n                    point towards (mega man v)\n                    repeat (2)\n                        go to x: ((0) + (([cos v] of (x) ) * (150))) y: ((102) + (([sin v] of (y) ) * (15)))\n                        change [x v] by (4)\n                        change [y v] by (8)\n                    end\n                    next costume\n                    repeat (2)\n                        go to x: ((0) + (([cos v] of (x) ) * (150))) y: ((102) + (([sin v] of (y) ) * (15)))\n                        change [x v] by (4)\n                        change [y v] by (8)\n                    end\n                end\n                switch costume to (teng6 v)\n                repeat (4)\n                    wait (.05) seconds\n                    next costume\n                end\n                point towards (mega man v)\n                start sound [knight_slash v]\n                set [projectile name v] to [beta]\n                set [proj direction v] to ((direction) + (10))\n                set [proj x v] to ((Scroll X) + (x position))\n                set [proj y v] to (((Scroll Y) + (y position)) + (0))\n                broadcast (CREATE PROJECTILE v)\n                wait (.02) seconds\n                set [projectile name v] to [beta]\n                set [proj direction v] to ((direction) + (-10))\n                set [proj x v] to ((Scroll X) + (x position))\n                set [proj y v] to (((Scroll Y) + (y position)) + (0))\n                broadcast (CREATE PROJECTILE v)\n                next costume\n                wait (.2) seconds\n                repeat (3)\n                    wait (.05) seconds\n                    next costume\n                end\n            end\n            broadcast (Boss_charge_anim v)\n            repeat (10)\n                switch costume to (teng1 v)\n                point towards (mega man v)\n                repeat (2)\n                    go to x: ((0) + (([cos v] of (x) ) * (150))) y: ((102) + (([sin v] of (y) ) * (15)))\n                    change [x v] by (4)\n                    change [y v] by (8)\n                end\n                next costume\n                repeat (2)\n                    go to x: ((0) + (([cos v] of (x) ) * (150))) y: ((102) + (([sin v] of (y) ) * (15)))\n                    change [x v] by (4)\n                    change [y v] by (8)\n                end\n            end\n            switch costume to (teng6 v)\n            repeat (4)\n                wait (.05) seconds\n                next costume\n            end\n            point towards (mega man v)\n            start sound [knight_slash v]\n            set [projectile name v] to [beta]\n            set [proj direction v] to ((direction) + (10))\n            set [proj x v] to ((Scroll X) + (x position))\n            set [proj y v] to (((Scroll Y) + (y position)) + (0))\n            broadcast (CREATE PROJECTILE v)\n            wait (.02) seconds\n            set [projectile name v] to [beta]\n            set [proj direction v] to ((direction) + (0))\n            set [proj x v] to ((Scroll X) + (x position))\n            set [proj y v] to (((Scroll Y) + (y position)) + (0))\n            broadcast (CREATE PROJECTILE v)\n            wait (.02) seconds\n            set [projectile name v] to [beta]\n            set [proj direction v] to ((direction) + (-10))\n            set [proj x v] to ((Scroll X) + (x position))\n            set [proj y v] to (((Scroll Y) + (y position)) + (0))\n            broadcast (CREATE PROJECTILE v)\n            next costume\n            wait (.5) seconds\n            repeat (3)\n                wait (.05) seconds\n                next costume\n            end\n            start sound [coin v]\n            wait (.05) seconds\n            next costume\n            wait (.4) seconds\n            repeat (3)\n                switch costume to (teng1 v)\n                wait (.05) seconds\n                next costume\n                wait (.05) seconds\n            end\n            show\n            repeat until <(y position) > [200]>\n                switch costume to (teng1 v)\n                repeat (2)\n                    change y by (10)\n                end\n                next costume\n                repeat (2)\n                    change y by (10)\n                end\n            end\n            hide\n            set x to (-250)\n            set y to (-80)\n            hide\n            beta dash [1] [.8]\n            set x to (250)\n            set y to (0)\n            hide\n            beta dash [2] [.6]\n            set x to (-250)\n            set y to (50)\n            hide\n            beta dash [1] [.6]\n            wait (1) seconds\n            hide\n            set x to (-250)\n            set y to (0)\n            hide\n            beta dash [1] [.4]\n            set x to (250)\n            set y to (-80)\n            hide\n            beta dash [2] [.4]\n            set x to (-250)\n            set y to (50)\n            hide\n            beta dash [1] [.2]\n            repeat (10)\n                go to [front v] layer\n            end\n            switch costume to (teng1 v)\n            clear graphic effects\n            go to x: (0) y: (999)\n            show\n            point towards (mega man v)\n            repeat (12)\n                switch costume to (teng1 v)\n                repeat (2)\n                    change y by (-5)\n                end\n                next costume\n                repeat (2)\n                    change y by (-5)\n                end\n            end\n            switch costume to (teng1 v)\n            repeat (14)\n                wait (.05) seconds\n                next costume\n            end\n            start sound [coin v]\n            wait (1) seconds\n        end\n    end\nend\n\nwhen I receive [boss_charge_anim v]\nstart sound [SE \[2\] v]\nrepeat (6)\n    set [brightness v] effect to (100)\n    wait (.05) seconds\n    clear graphic effects\n    wait (.05) seconds\nend\n\ndefine beta dash (sound) (delay)\nset [proj y v] to (y position)\ncreate clone of (robot master intro v)\nif <(x position) > [0]> then\n    point in direction (-90)\nelse\n    point in direction (90)\nend\nwait (delay) seconds\nif <(sound) = [1]> then\n    start sound [wind_side v]\nelse\n    start sound [wind_side2 v]\nend\ngo to [front v] layer\nswitch costume to (teng19 v)\nshow\nglide (delay) secs to x: ((x position) * (-1)) y: (y position)\nhide\n\nwhen I start as a clone\nif <(STAGE #) = [9]> then\n    go to x: (pick random (90) to (115)) y: (25)\n    set size to (275) %\nelse\n    go to x: (pick random (90) to (115)) y: (48)\n    set size to (200) %\nend\nstart sound (pick random (26) to (28))\ngo to [front v] layer\nswitch costume to (bolt v)\npoint in direction (pick random (-90) to (90))\nset [brightness v] effect to (100)\nshow\nrepeat (4)\n    change [brightness v] effect by (-25)\nend\nrepeat (4)\n    change [ghost v] effect by (25)\nend\ndelete this clone\n\nwhen I receive [omega anger v]\nswitch costume to (omegaintro2 v)\nrepeat (3)\n    wait (.05) seconds\n    next costume\nend\nswitch costume to (costume16 v)\nrepeat (4)\n    wait (.05) seconds\n    next costume\nend\nwait (1) seconds\nrepeat (4)\n    wait (.05) seconds\n    next costume\nend\n\nwhen I receive [protoman spray attk v]\nrepeat (3)\n    start sound [SE \[5\] v]\n    set [projectile name v] to [bullet]\n    set [proj direction v] to ((direction) + (0))\n    set [proj x v] to (((Scroll X) + (x position)) + (([sin v] of (direction) ) * (15)))\n    set [proj y v] to (((Scroll Y) + (y position)) + (0))\n    broadcast (CREATE PROJECTILE v)\n    wait (.05) seconds\nend\n\nwhen I receive [start_thunderstorm v]\nforever\n    if <(Darkness) = [-90]> then\n        set [brightness v] effect to (-90)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen I receive [treble+bass fuse v]\nstart sound [heirloom_flamespin v]\nrepeat (2)\n    broadcast (ScreenShake v)\n    go to x: (71) y: (-103)\n    set [x v] to [0]\n    repeat (10)\n        change [x v] by (-.5)\n        change x by (x)\n    end\nend\nstart sound [thunder_03 v]\nbroadcast (Flashy flash v)\nswitch costume to (bassfly1 v)\nbroadcast (ScreenShake v)\ngo to x: (71) y: (-103)\nset [x v] to [0]\nrepeat (10)\n    change [x v] by (-.5)\n    change x by (x)\nend\nstart sound [thunder_02 v]\ngo to [front v] layer\nset [brightness v] effect to (-100)\nwait (1) seconds\ngo to [front v] layer\nrepeat (5)\n    wait (.5) seconds\n    change [brightness v] effect by (20)\nend\nswitch costume to (bassfly4 v)\ngo to x: (44) y: (-103)\nset [y v] to [0]\nrepeat (10)\n    change y by (y)\n    change [y v] by (1)\nend\nrepeat (10)\n    change y by (y)\n    change [y v] by (-1)\nend\nswitch costume to (bassfly2 v)\nbroadcast (bATTLE begin v)\n\nwhen I receive [autoscroller v]\nset [x v] to [0]\nset [a v] to [0]\nset [speed v] to [0]\nif <(STAGE #) = [3]> then\n    broadcast (Snowboard fall back v)\n    repeat (80)\n        change [a v] by (.05)\n        change [scroll x min v] by (a)\n        change [scroll x max v] by (a)\n    end\n    set [scroll x max v] to [100000]\n    repeat (100)\n        change [a v] by (.1)\n        broadcast (ChangeSPEEDX v)\n    end\n    repeat until <(Scroll X) > [10000]>\n        change [a v] by (.0005)\n        broadcast (ChangeSPEEDX v)\n    end\n    repeat (25)\n        change [a v] by (.2)\n        broadcast (ChangeSPEEDX v)\n    end\n    repeat (25)\n        change [a v] by (.1)\n        broadcast (ChangeSPEEDX v)\n    end\n    repeat until <(Scroll X) > [30100]>\n        change [a v] by (.0005)\n        broadcast (ChangeSPEEDX v)\n    end\n    set [on snowboard? v] to [0]\n    broadcast (@HOP off snowboard v)\n    set [scroll x max v] to [30700]\nelse\n    repeat (30)\n        change [x v] by (.05)\n        change [scroll x min v] by (x)\n        change [scroll x max v] by (x)\n    end\n    forever\n        set [a v] to ((([costume # v] of [boss hp v]) * (.1)) + (3))\n        change [scroll x min v] by (a)\n        change [scroll x max v] by (a)\n        broadcast (Left 5 v)\n    end\nend\n\nwhen I receive [stage selected v]\nset size to (200) %\nwait (1.5) seconds\nif <(STAGE #) = [9]> then\n    repeat (3)\n        point in direction (90)\n        go to x: (0) y: (999)\n        switch costume to (phantombass v)\n        set size to (200) %\n        clear graphic effects\n        go to [front v] layer\n        set [y v] to [-1.8]\n        show\n        repeat (8)\n            change [y v] by (-2)\n            change y by (y)\n        end\n        set y to (13)\n    end\n    wait (1) seconds\n    switch costume to (bassz6 v)\nend\nif <(STAGE #) = [7]> then\n    point in direction (90)\n    go to x: (0) y: (999)\n    switch costume to (megam1 v)\n    set size to (200) %\n    clear graphic effects\n    go to [front v] layer\n    set [y v] to [-1.8]\n    show\n    repeat (16)\n        change [y v] by (-1)\n        change y by (y)\n    end\n    set y to (13)\n    switch costume to (megam2 v)\n    repeat (7)\n        wait (.05) seconds\n        next costume\n    end\n    repeat (25)\n        switch costume to (protoman2 v)\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n    end\nend\nif <(STAGE #) = [8]> then\n    point in direction (90)\n    go to x: (0) y: (999)\n    switch costume to (burnerjump1 v)\n    set size to (200) %\n    clear graphic effects\n    go to [front v] layer\n    set [y v] to [-1.8]\n    show\n    repeat (15)\n        change [y v] by (-1)\n        change y by (y)\n    end\n    switch costume to (burner1 v)\n    set y to (15)\n    repeat (4)\n        wait (.05) seconds\n        next costume\n    end\n    repeat (20)\n        switch costume to (burner6 v)\n        wait (0) seconds\n        next costume\n        wait (0) seconds\n    end\n    switch costume to (burnerstand1 v)\nend\nif <(STAGE #) = [4]> then\n    point in direction (90)\n    go to x: (0) y: (999)\n    switch costume to (firej2 v)\n    set size to (200) %\n    clear graphic effects\n    go to [front v] layer\n    set [y v] to [-1.8]\n    show\n    repeat (15)\n        change [y v] by (-1)\n        change y by (y)\n    end\n    set y to (15)\n    repeat (8)\n        switch costume to (firem v)\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n    end\n    repeat (3)\n        wait (.05) seconds\n        next costume\n    end\n    wait (.05) seconds\n    switch costume to (fireblast1 v)\nend\nif <(STAGE #) = [1]> then\n    point in direction (90)\n    go to x: (0) y: (999)\n    switch costume to (omegajump v)\n    set size to (400) %\n    clear graphic effects\n    go to [front v] layer\n    set [y v] to [-1.8]\n    show\n    repeat (8)\n        change [y v] by (-1)\n        change y by (y)\n    end\n    switch costume to (omegafall v)\n    repeat (8)\n        change [y v] by (-1)\n        change y by (y)\n    end\n    set y to (29)\n    switch costume to (omegafall v)\n    repeat (5)\n        wait (.02) seconds\n        next costume\n    end\n    switch costume to (omega v)\n    repeat (15)\n        wait (.02) seconds\n        next costume\n    end\n    repeat (8)\n        set x to (pick random (-5) to (5))\n    end\n    set x to (0)\n    wait (.2) seconds\n    switch costume to (omega v)\nend\nif <(STAGE #) = [2]> then\n    point in direction (90)\n    go to x: (0) y: (999)\n    clear graphic effects\n    go to [front v] layer\n    set [y v] to [-1.5]\n    show\n    repeat (3)\n        repeat (2)\n            change [y v] by (-1)\n            change y by (y)\n        end\n        switch costume to (teng1 v)\n        repeat (2)\n            change [y v] by (-1)\n            change y by (y)\n        end\n        switch costume to (teng2 v)\n    end\n    repeat (4)\n        repeat (2)\n            change [y v] by (1)\n            change y by (y)\n        end\n        switch costume to (teng1 v)\n        repeat (2)\n            change [y v] by (1)\n            change y by (y)\n        end\n        switch costume to (teng2 v)\n    end\n    repeat (4)\n        wait (.02) seconds\n        switch costume to (teng1 v)\n        wait (.02) seconds\n        switch costume to (teng2 v)\n    end\n    repeat (13)\n        wait (.05) seconds\n        next costume\n    end\nend\n\nwhen I receive [haha u lose v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [midboss v]\nwait (1) seconds\nclear graphic effects\nforever\n    if <<<touching (mega man v)?> and <<touching color (#fae0c1)?> and <not <touching (hitbox v)?>>>> or <touching (special weapons v)?>> then\n        if <touching (special weapons v)?> then\n            set [universal hold v] to [0]\n            set [dmg # v] to [2]\n            set [dmg_x v] to ((Scroll X) + (x position))\n            set [dmg_y v] to ((Scroll Y) + (y position))\n            create clone of (dmg v)\n            change [hp v] by (-2)\n            start sound [Mega Man 5 SFX \(20\) v]\n            repeat (4)\n                set [brightness v] effect to (90)\n                wait (.1) seconds\n                set [brightness v] effect to (0)\n                wait (.1) seconds\n            end\n        else\n            if <(Universal Hold) > [40]> then\n                set [dmg # v] to [3]\n                set [dmg_x v] to ((Scroll X) + (x position))\n                set [dmg_y v] to ((Scroll Y) + (y position))\n                create clone of (dmg v)\n                start sound [Mega Man 5 SFX \(20\) v]\n                change [hp v] by (-3)\n            else\n                set [dmg # v] to [1]\n                set [dmg_x v] to ((Scroll X) + (x position))\n                set [dmg_y v] to ((Scroll Y) + (y position))\n                create clone of (dmg v)\n                start sound [Mega Man 5 SFX \(20\) v]\n                change [hp v] by (-1)\n            end\n            repeat (4)\n                set [brightness v] effect to (90)\n                wait (.1) seconds\n                set [brightness v] effect to (0)\n                wait (.1) seconds\n            end\n        end\n    end\nend\n\nwhen I receive [midboss v]\nwait (1) seconds\nclear graphic effects\nforever\n    if <<touching (hitbox v)?> and <(takingdmg) = [0]>> then\n        change [health v] by (3)\n        broadcast (KNOCKBACK v)\n        broadcast (TAKE DMG v)\n        wait (3) seconds\n    end\nend\n\nwhen I receive [midboss v]\nclear graphic effects\nif <(STAGE #) = [8]> then\n    if <(Checkpoint #) = [3]> then\n        go to x: (115) y: (555)\n        start sound [dr_teleport v]\n        set [hp v] to [15]\n        go to [front v] layer\n        switch costume to (whtele1 v)\n        point in direction (-90)\n        show\n        set [y v] to [0]\n        repeat (20)\n            change y by (y)\n            change [y v] by (-1)\n        end\n        repeat (2)\n            wait (.02) seconds\n            next costume\n        end\n        wait (.02) seconds\n        start sound [blitzsteed_whoosh v]\n        switch costume to (whale1 v)\n        wait (.1) seconds\n        broadcast (Whale Midboss AI v)\n        repeat until <(HP) < [1]>\n            switch costume to (whale2 v)\n            wait (.02) seconds\n            repeat (5)\n                wait (.02) seconds\n                next costume\n            end\n        end\n        stop [other scripts in sprite v]\n        switch costume to (whaledie v)\n        repeat (4)\n            set [projectile name v] to [explo]\n            set [proj direction v] to [90]\n            set [proj x v] to (((Scroll X) + (x position)) + (pick random (-35) to (35)))\n            set [proj y v] to (((Scroll Y) + (y position)) + (pick random (-35) to (35)))\n            broadcast (CREATE PROJECTILE v)\n            change [ghost v] effect by (25)\n            change [brightness v] effect by (-25)\n            wait (.2) seconds\n        end\n        hide\n        clear graphic effects\n        set [scroll x max v] to [6595]\n        replace item (1) of [activated bossgates v] with [1]\n    end\nend\n\nwhen I receive [whale midboss ai v]\nset [x v] to [0]\nforever\n    set y to ((41) + (([sin v] of (x) ) * (80)))\n    change [x v] by (4)\nend\n\nwhen I receive [whale midboss ai v]\nset [x v] to [0]\nforever\n    wait (.5) seconds\n    repeat (4)\n        point in direction (-90)\n        set [projectile name v] to [whms]\n        set [proj direction v] to [-90]\n        set [proj x v] to (((Scroll X) + (x position)) + (([sin v] of (direction) ) * (35)))\n        set [proj y v] to (((Scroll Y) + (y position)) + (-25))\n        broadcast (CREATE PROJECTILE v)\n        wait (.8) seconds\n    end\n    wait (1) seconds\n    start sound [heirloom_flamespin v]\n    set x to (115)\n    set [y v] to [-3]\n    repeat (5)\n        point towards (hitbox v)\n        set [projectile name v] to [bubble]\n        set [proj direction v] to (direction)\n        set [proj x v] to (((Scroll X) + (x position)) + (([sin v] of (direction) ) * (80)))\n        set [proj y v] to (((Scroll Y) + (y position)) + (-35))\n        broadcast (CREATE PROJECTILE v)\n        repeat (2)\n            change x by (y)\n            change [y v] by (-1)\n        end\n    end\n    repeat (30)\n        change x by (y)\n        change [y v] by (1)\n    end\n    set x to (115)\nend\n\nwhen I receive [epsilon idle animation v]\nforever\n    switch costume to (burnerstand1 v)\n    wait (.02) seconds\n    next costume\n    wait (.02) seconds\nend\n\ngo to x: (127) y: (-108)\n\ndefine BurnerMan AI\nforever\n    if <(pick random (1) to (3)) = [1]> then\n        if <(pick random (1) to (2)) = [1]> then\n            point towards (hitbox v)\n            switch costume to (burnerthrow1 v)\n            start sound [plague_throw v]\n            repeat (2)\n                wait (.1) seconds\n                next costume\n            end\n            set [projectile name v] to [burnergas]\n            set [proj direction v] to ((direction) + (0))\n            set [proj x v] to (((Scroll X) + (x position)) + (([sin v] of (direction) ) * (35)))\n            set [proj y v] to (((Scroll Y) + (y position)) + (15))\n            broadcast (CREATE PROJECTILE v)\n            repeat (3)\n                switch costume to (burnerthrow3 v)\n                wait (0) seconds\n                next costume\n                wait (0) seconds\n            end\n            repeat (8)\n                switch costume to (burnerstand1 v)\n                wait (0) seconds\n                next costume\n                wait (0) seconds\n            end\n        else\n            point towards (hitbox v)\n            set [y v] to [15]\n            switch costume to (burnerjump1 v)\n            repeat (10)\n                move (5) steps\n                change y by (y)\n                change [y v] by (-1)\n                if <(x position) > [190]> then\n                    set x to (190)\n                end\n                if <(x position) < [-190]> then\n                    set x to (-190)\n                end\n            end\n            repeat until <(y position) < [-80]>\n                switch costume to (burnerflip1 v)\n                repeat (3)\n                    move (6) steps\n                    change y by (y)\n                    change [y v] by (-1)\n                    if <(x position) > [190]> then\n                        set x to (190)\n                    end\n                    if <(x position) < [-190]> then\n                        set x to (-190)\n                    end\n                    next costume\n                end\n            end\n            set y to (-96)\n            start sound [raiment_powerup v]\n            switch costume to (burner1 v)\n            start sound [enchantress_groundslam v]\n            broadcast (ScreenShake v)\n            set [x v] to [15]\n            repeat (3)\n                set [projectile name v] to [burnershock]\n                set [proj direction v] to [90]\n                set [proj x v] to (((Scroll X) + (x position)) + (x))\n                set [proj y v] to ((Scroll Y) + (-125))\n                broadcast (CREATE PROJECTILE v)\n                wait (.05) seconds\n                set [projectile name v] to [burnershock]\n                set [proj direction v] to [-90]\n                set [proj x v] to (((Scroll X) + (x position)) + ((x) * (-1)))\n                set [proj y v] to ((Scroll Y) + (-125))\n                broadcast (CREATE PROJECTILE v)\n                wait (.05) seconds\n                change [x v] by (35)\n            end\n            repeat (6)\n                wait (.05) seconds\n                next costume\n            end\n            repeat (8)\n                switch costume to (burner6 v)\n                wait (.01) seconds\n                next costume\n                wait (.01) seconds\n            end\n            wait (.1) seconds\n            switch costume to (burnerstand1 v)\n        end\n    else\n        if <(distance to [hitbox v]) < [200]> then\n            start sound [enchantress_fireblocks_die v]\n            repeat (5)\n                switch costume to (burnerflamethrower1 v)\n                point towards (hitbox v)\n                set [projectile name v] to [burnerflame]\n                set [proj direction v] to ((direction) + (0))\n                set [proj x v] to (((Scroll X) + (x position)) + (([sin v] of (direction) ) * (35)))\n                set [proj y v] to (((Scroll Y) + (y position)) + (0))\n                broadcast (CREATE PROJECTILE v)\n                wait (.05) seconds\n                switch costume to (burnerflamethrower2 v)\n                point towards (hitbox v)\n                set [projectile name v] to [burnerflame]\n                set [proj direction v] to ((direction) + (0))\n                set [proj x v] to (((Scroll X) + (x position)) + (([sin v] of (direction) ) * (35)))\n                set [proj y v] to (((Scroll Y) + (y position)) + (0))\n                broadcast (CREATE PROJECTILE v)\n                wait (.05) seconds\n            end\n            repeat (8)\n                switch costume to (burnerstand1 v)\n                wait (.01) seconds\n                next costume\n                wait (.01) seconds\n            end\n        else\n            if <([x position v] of [hitbox v]) < (x position)> then\n                point in direction (-90)\n            else\n                point in direction (90)\n            end\n            start sound [lantern_throw v]\n            set [y v] to [0]\n            repeat (10)\n                switch costume to (burnerdash1 v)\n                change [y v] by (.5)\n                if <(direction) = [90]> then\n                    change x by (y)\n                else\n                    change x by ((y) * (-1))\n                end\n                if <(x position) > [190]> then\n                    set x to (190)\n                end\n                if <(x position) < [-190]> then\n                    set x to (-190)\n                end\n                change [y v] by (.5)\n                switch costume to (burnerdash2 v)\n                if <(direction) = [90]> then\n                    change x by (y)\n                else\n                    change x by ((y) * (-1))\n                end\n                if <(x position) > [190]> then\n                    set x to (190)\n                end\n                if <(x position) < [-190]> then\n                    set x to (-190)\n                end\n            end\n            repeat (8)\n                switch costume to (burnerstand1 v)\n                wait (.01) seconds\n                next costume\n                wait (.01) seconds\n            end\n        end\n    end\nend\n\nwhen I receive [burnerman jump out v]\nset [y v] to [15]\nset y to (-96)\nshow\nrepeat until <(y position) < [-150]>\n    switch costume to (burnerflip1 v)\n    clear graphic effects\n    repeat (3)\n        repeat (2)\n            change y by (y)\n            change [y v] by (-1)\n        end\n        next costume\n    end\n    repeat (2)\n        change y by (y)\n        change [y v] by (-1)\n    end\nend\nset [checkpoint # v] to [6]\nreplace item (2) of [activated bossgates v] with [1]\nbroadcast (Enable Movement v)\nbroadcast (Resume Stage music v)\nhide\n\nwhen I receive [delta idle anim v]\nforever\n    switch costume to (firem v)\n    wait (.05) seconds\n    next costume\n    wait (.05) seconds\nend\n\nwhen I receive [boss_face to -90 v]\npoint in direction (-90)\n\ndefine BossAttack (atk)\nif <(STAGE #) = [4]> then\n    if <(atk) = [1]> then\n        switch costume to (fireanger1 v)\n        point towards (hitbox v)\n        wait (.2) seconds\n        set [bossattack_release v] to [0]\n        set [projectile name v] to [firewall]\n        set [proj direction v] to [90]\n        set [proj x v] to ((Scroll X) + (x position))\n        set [proj y v] to (((Scroll Y) + (y position)) + (-15))\n        broadcast (CREATE PROJECTILE v)\n        wait (.02) seconds\n        set [bossattack_release v] to [0]\n        set [projectile name v] to [firewall]\n        set [proj direction v] to [-90]\n        set [proj x v] to ((Scroll X) + (x position))\n        set [proj y v] to (((Scroll Y) + (y position)) + (-15))\n        broadcast (CREATE PROJECTILE v)\n        wait (.5) seconds\n    end\n    if <(atk) = [2]> then\n        point towards (hitbox v)\n        switch costume to (firerun1 v)\n        repeat (6)\n            change x by (([sin v] of (direction) ) * (10))\n            wait (0) seconds\n            next costume\n        end\n    end\n    if <(atk) = [5]> then\n        if <([x position v] of [hitbox v]) > (x position)> then\n            point in direction (90)\n        else\n            point in direction (-90)\n        end\n        switch costume to (fireblast1 v)\n        wait (0) seconds\n        next costume\n        set [bossattack_release v] to [1]\n        set [projectile name v] to [firewall]\n        set [proj direction v] to (direction)\n        set [proj x v] to ((Scroll X) + (x position))\n        set [proj y v] to (((Scroll Y) + (y position)) + (-15))\n        broadcast (CREATE PROJECTILE v)\n        wait (.05) seconds\n        switch costume to (fireblast1 v)\n        wait (.2) seconds\n    end\n    if <(atk) = [6]> then\n        switch costume to (firej1 v)\n        point towards (hitbox v)\n        set [y v] to [15]\n        repeat (5)\n            repeat (1)\n                switch costume to (firej2 v)\n                move (-5) steps\n                change y by (y)\n                change [y v] by (-1)\n                if <(x position) > [160]> then\n                    set x to (160)\n                end\n                if <(x position) < [-190]> then\n                    set x to (-190)\n                end\n            end\n            repeat (1)\n                next costume\n                move (-5) steps\n                change y by (y)\n                change [y v] by (-1)\n                if <(x position) > [160]> then\n                    set x to (160)\n                end\n                if <(x position) < [-190]> then\n                    set x to (-190)\n                end\n            end\n        end\n        switch costume to (firej6 v)\n        start sound [raiment_powerup v]\n        set [boss-charged v] to [0]\n        point towards (hitbox v)\n        set [projectile name v] to [energyshield]\n        set [proj direction v] to (direction)\n        set [proj x v] to (((Scroll X) + (x position)) + (([sin v] of (direction) ) * (15)))\n        set [proj y v] to (((Scroll Y) + (y position)) + (0))\n        broadcast (CREATE PROJECTILE v)\n        wait (.2) seconds\n        repeat until <(y position) < [-90]>\n            switch costume to (firej4 v)\n            move (-5) steps\n            change y by (y)\n            change [y v] by (-1)\n            if <(x position) > [160]> then\n                set x to (160)\n            end\n            if <(x position) < [-190]> then\n                set x to (-190)\n            end\n        end\n        set y to (-108)\n        repeat (4)\n            switch costume to (firem v)\n            wait (0) seconds\n            next costume\n            wait (0) seconds\n        end\n    end\n    if <(atk) = [3]> then\n        point towards (hitbox v)\n        switch costume to (fireblast1 v)\n        wait (0) seconds\n        next costume\n        set [bossattack_release v] to [0]\n        set [projectile name v] to [fpillar]\n        set [proj direction v] to (direction)\n        set [proj x v] to ((Scroll X) + (x position))\n        set [proj y v] to (((Scroll Y) + (y position)) + (5))\n        broadcast (CREATE PROJECTILE v)\n        wait (.05) seconds\n        switch costume to (fireblast1 v)\n        wait (.2) seconds\n    end\n    if <(atk) = [4]> then\n        switch costume to (firej1 v)\n        point towards (hitbox v)\n        set [y v] to [15]\n        repeat (5)\n            repeat (1)\n                switch costume to (firej2 v)\n                move (5) steps\n                change y by (y)\n                change [y v] by (-1)\n            end\n            repeat (1)\n                next costume\n                move (5) steps\n                change y by (y)\n                change [y v] by (-1)\n            end\n            if <(x position) > [160]> then\n                set x to (160)\n            end\n            if <(x position) < [-190]> then\n                set x to (-190)\n            end\n        end\n        repeat until <(y position) < [-90]>\n            switch costume to (firej4 v)\n            move (5) steps\n            change y by (y)\n            change [y v] by (-1)\n            if <(x position) > [160]> then\n                set x to (160)\n            end\n            if <(x position) < [-190]> then\n                set x to (-190)\n            end\n        end\n        set y to (-108)\n        repeat (4)\n            switch costume to (firem v)\n            wait (0) seconds\n            next costume\n            wait (0) seconds\n        end\n    end\nend\n\nwhen I receive [init_battle v]\nset [boss-charged v] to [0]\nforever\n    if <<(STAGE #) = [4]> and <(Boss-Charged) = [1]>> then\n        set [brightness v] effect to (50)\n        start sound [SE \[2\] v]\n        wait (0.05) seconds\n        set [brightness v] effect to (0)\n        wait (0) seconds\n    end\nend\n\nwhen I receive [init_battle v]\nset [boss-charged v] to [0]\nif <(STAGE #) = [4]> then\n    forever\n        if <touching (foreground v)?> then\n            set [boss-charged v] to [1]\n        end\n    end\nend\n\n@boss hp\n\nwhen flag clicked\nset [clone v] to [0]\nclear graphic effects\nhide\n\nwhen I receive [battle begin v]\npoint in direction (0)\nset [fightstart? v] to [1]\ngo to x: (150) y: (151)\nset size to (250) %\ngo to [front v] layer\nshow\nset [brightness v] effect to (0)\nswitch costume to (hpbar29 v)\nrepeat (28)\n    start sound [Mega Man 5 SFX \(16\) v]\n    switch costume to ((costume [number v]) + (-1))\n    wait (0) seconds\nend\n\nwhen I receive [bossdmg v]\nif <(clone) = [0]> then\n    repeat (3)\n        set [brightness v] effect to (60)\n        wait (.1) seconds\n        set [brightness v] effect to (0)\n        wait (.1) seconds\n    end\nend\n\nwhen I receive [bossdmg v]\nif <(clone) = [0]> then\n    next costume\n    if <(Universal Hold) > [40]> then\n        next costume\n        next costume\n        next costume\n    end\n    if <(costume [number v]) > [27]> then\n        broadcast (BOSSDIE v)\n        wait (5) seconds\n    end\nend\n\nwhen I receive [bossdie v]\nhide\nswitch costume to (hpbar v)\n\nwhen I receive [die v]\nhide\n\nwhen I start as a clone\nset [clone v] to [1]\nset [ghost v] effect to (5)\nswitch costume to (dmg v)\ngo to [front v] layer\nshow\nstart sound [Mega Man 5 SFX \(20\) v]\nif <(ALT BOSS?) = [1]> then\n    repeat (5)\n        repeat (2)\n            go to (boss 2: electric boogaloo v)\n            go to [front v] layer\n        end\n        set [ghost v] effect to (50)\n        repeat (2)\n            go to (boss 2: electric boogaloo v)\n            go to [front v] layer\n        end\n        set [ghost v] effect to (5)\n    end\n    delete this clone\nelse\n    repeat (5)\n        repeat (2)\n            go to (boss v)\n            go to [front v] layer\n        end\n        set [ghost v] effect to (50)\n        repeat (2)\n            go to (boss v)\n            go to [front v] layer\n        end\n        set [ghost v] effect to (5)\n    end\n    delete this clone\nend\n\nwhen I receive [back to select v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen flag clicked\nforever\n    set [universal hold v] to ([hold v] of [mega man v])\nend\n\nwhen I receive [bossweaknessdmg v]\nif <(clone) = [0]> then\n    next costume\n    next costume\n    next costume\n    next costume\n    next costume\n    if <(costume [number v]) > [27]> then\n        broadcast (BOSSDIE v)\n        wait (5) seconds\n    end\nend\n\nwhen I receive [boss get oofed v]\nif <(clone) = [0]> then\n    next costume\n    next costume\n    if <(costume [number v]) > [27]> then\n        broadcast (BOSSDIE v)\n        wait (5) seconds\n    end\nend\n\nwhen I receive [teleportin v]\nswitch costume to (hpbar v)\n\nwhen I receive [boss 4 dmg v]\nif <(clone) = [0]> then\n    next costume\n    next costume\n    next costume\n    next costume\n    if <(costume [number v]) > [27]> then\n        broadcast (BOSSDIE v)\n        wait (5) seconds\n    end\nend\n\nwhen I receive [boss heal v]\nrepeat (2)\n    if <<not <(costume [number v]) = [1]>> and <not <(costume [number v]) > [27]>>> then\n        switch costume to ((costume [number v]) + (-1))\n    end\nend\n\n@Transition Effect\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\nwait (0) seconds\nswitch costume to (costume1 v)\nset [brightness v] effect to (100)\nset [ghost v] effect to (25)\nstart sound [SE \[18\] v]\nrepeat (3)\n    go to [front v] layer\n    show\n    wait (.2) seconds\n    hide\n    wait (.2) seconds\nend\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\n    change [brightness v] effect by (-10)\nend\nbroadcast (Robot Master Intro v)\nrepeat (60)\n    create clone of (_myself_ v)\n    wait (.05) seconds\nend\nwait (1) seconds\nbroadcast (Blackout v)\nrepeat (10)\n    change [brightness v] effect by (-10)\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nbroadcast (READY v)\nwait (1.5) seconds\nbroadcast (Teleportin v)\n\nwhen flag clicked\nhide\n\nwhen I receive [haha u lose v]\nclear graphic effects\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (-10)\nend\nplay sound [33 - Game Over v] until done\nbroadcast (Stage Select v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen I start as a clone\nswitch costume to (costume2 v)\ngo [forward v] (2) layers\ngo to x: (999) y: (pick random (-250) to (250))\nset size to (pick random (50) to (150)) %\nshow\nrepeat until <(x position) < [-220]>\n    change x by ((size) * (-.2))\nend\ndelete this clone\n\ngo to [front v] layer\n\nwhen I receive [blackout v]\ndelete this clone\n\nwhen I receive [screen flash v]\nclear graphic effects\nset [brightness v] effect to (100)\nset [ghost v] effect to (100)\nshow\nrepeat (50)\n    go to [front v] layer\n    change [ghost v] effect by (-2)\nend\nrepeat (10)\n    go to [front v] layer\nend\nrepeat (4)\n    go to [front v] layer\n    change [ghost v] effect by (25)\nend\nhide\nclear graphic effects\n\nwhen I receive [screen blink v]\nclear graphic effects\nset [brightness v] effect to (100)\nset [ghost v] effect to (100)\nshow\nrepeat (4)\n    go to [front v] layer\n    change [ghost v] effect by (-25)\nend\nrepeat (10)\n    go to [front v] layer\nend\nrepeat (4)\n    go to [front v] layer\n    change [ghost v] effect by (25)\nend\nhide\nclear graphic effects\n\nwhen I receive [menu_start v]\nclear graphic effects\ngo to [front v] layer\nset [brightness v] effect to (100)\nshow\nrepeat (3)\n    wait (.1) seconds\n    set [ghost v] effect to (50)\n    wait (.1) seconds\n    set [ghost v] effect to (100)\nend\nwait (1) seconds\nset [ghost v] effect to (0)\nrepeat (10)\n    change [ghost v] effect by (-10)\n    change [brightness v] effect by (-10)\nend\nbroadcast (Stage Select v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [stage selected v]\nclear graphic effects\ngo to [front v] layer\nstart sound [SE \[18\] v]\nset [brightness v] effect to (100)\nshow\nrepeat (3)\n    wait (.1) seconds\n    set [ghost v] effect to (50)\n    wait (.1) seconds\n    set [ghost v] effect to (100)\nend\nset [ghost v] effect to (0)\nrepeat (10)\n    change [ghost v] effect by (-10)\n    change [brightness v] effect by (-10)\nend\nbroadcast (Robot Master Intro v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [flashy flash v]\nclear graphic effects\ngo to [front v] layer\nset [brightness v] effect to (100)\nshow\nwait (.2) seconds\nrepeat (10)\n    wait (.1) seconds\n    change [ghost v] effect by (10)\n    change [brightness v] effect by (-10)\nend\nhide\n\nwhen I receive [weapon get screen v]\nclear graphic effects\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (-10)\nend\nforever\n    repeat (10)\n        change [brightness v] effect by (2)\n    end\n    repeat (10)\n        change [brightness v] effect by (-2)\n    end\nend\n\nwhen I receive [get rid of weapon get v]\nstop [other scripts in sprite v]\nclear graphic effects\nbroadcast (Stage Select v)\nshow\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (10)\nend\n\n@ladder collision checker\n\nwhen flag clicked\nset [ghost v] effect to (100)\nshow\nforever\n    go to (hitbox v)\nend\n\nwhen flag clicked\n\nforever\n    if <touching (misc objects v)?> then\n        set [collide with ladder v] to [1]\n    else\n        set [collide with ladder v] to [0]\n    end\nend\n\n@misc objects\n\nwhen I receive [setup v]\ndelete this clone\n\nwhen I start as a clone\nset [active v] to [1]\nset [clone v] to [1]\ngo to [front v] layer\ngo to [front v] layer\nforever\n    if <(letter (2) of (costume [name v])) = [&]> then\n        set [ghost v] effect to (99)\n    end\n    if <(costume [number v]) = [61]> then\n        forever\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)) ) > [325]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [300]>> then\n                hide\n            else\n                show\n            end\n        end\n    else\n        if <<(costume [number v]) = [15]> or <(costume [number v]) = [34]>> then\n            forever\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)) ) > [400]>> then\n                    hide\n                else\n                    show\n                end\n            end\n        else\n            if <(costume [number v]) = [21]> then\n                forever\n                    set x to ((Level_X) - (Scroll X))\n                    set y to ((Level_Y) - (Scroll Y))\n                    if <<([abs v] of ((Level_X) - (Scroll X)) ) > [250]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [200]>> then\n                        hide\n                    else\n                        show\n                    end\n                end\n            else\n                if <(costume [number v]) = [14]> then\n                    forever\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)) ) > [250]>> then\n                            hide\n                        else\n                            if <(SwitchBlockState) = [1]> then\n                                hide\n                                wait (pick random (.1) to (.3)) seconds\n                                set [sb_x v] to (Level_X)\n                                set [sb_y v] to (Level_Y)\n                                create clone of (switchblock thing v)\n                            else\n                                show\n                            end\n                        end\n                    end\n                else\n                    if <(costume [number v]) = [13]> then\n                        hide\n                        wait (.1) seconds\n                        forever\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)) ) > [370]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [250]>> then\n                                hide\n                            else\n                                show\n                            end\n                        end\n                    else\n                        if <(costume [number v]) = [10]> then\n                            hide\n                            wait (.1) seconds\n                            forever\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)) ) > [250]>> then\n                                    hide\n                                else\n                                    show\n                                    if <(SwitchBlockState) = [1]> then\n                                        switch costume to (yokuswitch v)\n                                    else\n                                        switch costume to (yokuswitch2 v)\n                                    end\n                                end\n                            end\n                        else\n                            if <(costume [number v]) = [9]> then\n                                forever\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)) ) > [250]>> then\n                                        hide\n                                    else\n                                        if <(SwitchBlockState) = [1]> then\n                                            show\n                                        else\n                                            hide\n                                            wait (pick random (.1) to (.3)) seconds\n                                            set [sb_x v] to (Level_X)\n                                            set [sb_y v] to (Level_Y)\n                                            create clone of (switchblock thing v)\n                                        end\n                                    end\n                                end\n                            else\n                                if <(costume [number v]) = [6]> then\n                                    forever\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)) ) > [200]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [250]>> then\n                                            hide\n                                        else\n                                            show\n                                        end\n                                    end\n                                else\n                                    if <(costume [number v]) = [4]> then\n                                        forever\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)) ) > [270]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [250]>> then\n                                                hide\n                                            else\n                                                show\n                                            end\n                                        end\n                                    else\n                                        if <(costume [number v]) = [17]> then\n                                            set x to ((Level_X) - (Scroll X))\n                                            set y to ((Level_Y) - (Scroll Y))\n                                            if <<([abs v] of ((Level_X) - (Scroll X)) ) > [250]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [215]>> then\n                                                hide\n                                            else\n                                                show\n                                            end\n                                        else\n                                            if <<(costume [number v]) = [27]> or <<(costume [number v]) = [68]> or <(costume [number v]) = [69]>>> then\n                                                set x to ((Level_X) - (Scroll X))\n                                                set y to ((Level_Y) - (Scroll Y))\n                                                if <<([abs v] of ((Level_X) - (Scroll X)) ) > [250]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [320]>> then\n                                                    hide\n                                                else\n                                                    show\n                                                end\n                                            else\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)) ) > [250]>> then\n                                                    hide\n                                                else\n                                                    if <(active) = [1]> then\n                                                        show\n                                                    else\n                                                        hide\n                                                    end\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [setup v]\nhide\nclear graphic effects\ngo to x: (0) y: (0)\nset [level_x v] to [0]\nswitch costume to (divewater v)\nif <[1] = [1]> then\n    delete this clone\nend\nCreate\n\ndefine Create\nif <(STAGE #) = [6]> then\n    switch costume to (magnetplat v)\n    set [level_y v] to [0]\n    set [level_x v] to [1400]\n    create clone of (_myself_ v)\n    switch costume to (magnetplat v)\n    set [level_y v] to [0]\n    set [level_x v] to [2300]\n    create clone of (_myself_ v)\n    switch costume to (magnetplat v)\n    set [level_y v] to [500]\n    set [level_x v] to [4574]\n    create clone of (_myself_ v)\n    switch costume to (magnetplat v)\n    set [level_y v] to [950]\n    set [level_x v] to [4574]\n    create clone of (_myself_ v)\n    switch costume to (ld7 v)\n    set [level_y v] to [2050]\n    set [level_x v] to [4705]\n    create clone of (_myself_ v)\n    switch costume to (magnetplat v)\n    set [level_y v] to [2160]\n    set [level_x v] to [4000]\n    create clone of (_myself_ v)\n    switch costume to (ld8 v)\n    set [level_y v] to [2450]\n    set [level_x v] to [3713]\n    create clone of (_myself_ v)\n    switch costume to (spike12 v)\n    set [level_y v] to [2560]\n    set [level_x v] to [3590]\n    create clone of (_myself_ v)\n    switch costume to (spike13 v)\n    set [level_y v] to [2560]\n    set [level_x v] to [3425]\n    create clone of (_myself_ v)\n    switch costume to (ld7 v)\n    set [level_y v] to [2808]\n    set [level_x v] to [3395]\n    create clone of (_myself_ v)\n    switch costume to (magnetplat v)\n    set [level_y v] to [3000]\n    set [level_x v] to [4800]\n    create clone of (_myself_ v)\n    switch costume to (magnetplat v)\n    set [level_y v] to [3000]\n    set [level_x v] to [5925]\n    create clone of (_myself_ v)\nend\nif <(STAGE #) = [4]> then\n    switch costume to (bm1 v)\n    set [level_y v] to [-53]\n    set [level_x v] to [-560]\n    create clone of (_myself_ v)\n    switch costume to (bm1 v)\n    set [level_y v] to [28]\n    set [level_x v] to [-390]\n    create clone of (_myself_ v)\n    switch costume to (conv v)\n    set [level_y v] to [-73]\n    set [level_x v] to [733]\n    create clone of (_myself_ v)\n    switch costume to (conv v)\n    set [level_y v] to [-931]\n    set [level_x v] to [2230]\n    create clone of (_myself_ v)\n    switch costume to (conv v)\n    set [level_y v] to [-931]\n    set [level_x v] to [2990]\n    create clone of (_myself_ v)\n    switch costume to (conv v)\n    set [level_y v] to [-3145]\n    set [level_x v] to [4075]\n    create clone of (_myself_ v)\n    switch costume to (conv v)\n    set [level_y v] to [-838]\n    set [level_x v] to [414]\n    create clone of (_myself_ v)\nend\nif <(STAGE #) = [3]> then\n    switch costume to (s&3 v)\n    set [level_y v] to [180]\n    set [level_x v] to [31680]\n    create clone of (_myself_ v)\n    switch costume to (fall guys v)\n    set [level_y v] to [350]\n    set [level_x v] to [30450]\n    create clone of (_myself_ v)\n    switch costume to (la1 v)\n    set [level_y v] to [200]\n    set [level_x v] to [2533]\n    create clone of (_myself_ v)\n    switch costume to (fall guys v)\n    set [level_y v] to [-15]\n    set [level_x v] to [698]\n    create clone of (_myself_ v)\n    switch costume to (fall guys v)\n    set [level_y v] to [-50]\n    set [level_x v] to [1085]\n    create clone of (_myself_ v)\n    switch costume to (fall guys v)\n    set [level_y v] to [-11]\n    set [level_x v] to [1790]\n    create clone of (_myself_ v)\n    switch costume to (fall guys v)\n    set [level_y v] to [-11]\n    set [level_x v] to [2038]\n    create clone of (_myself_ v)\n    switch costume to (fall guys v)\n    set [level_y v] to [-135]\n    set [level_x v] to [2168]\n    create clone of (_myself_ v)\n    switch costume to (s&5 v)\n    set [level_y v] to [430]\n    set [level_x v] to [2700]\n    create clone of (_myself_ v)\nend\nif <(STAGE #) = [8]> then\n    if <(Checkpoint #) > [1]> then\n        switch costume to (le3 v)\n        set [level_y v] to [680]\n        set [level_x v] to [7820]\n        create clone of (_myself_ v)\n        switch costume to (tnt v)\n        switch costume to (bm1 v)\n        set [level_y v] to [340]\n        set [level_x v] to [7805]\n        create clone of (_myself_ v)\n        switch costume to (bm1 v)\n        set [level_y v] to [340]\n        set [level_x v] to [7975]\n        create clone of (_myself_ v)\n        switch costume to (bm1 v)\n        set [level_y v] to [-100]\n        set [level_x v] to [7925]\n        create clone of (_myself_ v)\n        switch costume to (bm2 v)\n        set [level_y v] to [-125]\n        set [level_x v] to [8030]\n        create clone of (_myself_ v)\n        switch costume to (bm1 v)\n        set [level_y v] to [-100]\n        set [level_x v] to [8140]\n        create clone of (_myself_ v)\n        switch costume to (tnt v)\n        set [level_y v] to [-60]\n        switch costume to (bm1 v)\n        set [level_x v] to [7665]\n        create clone of (_myself_ v)\n        switch costume to (le2 v)\n        set [level_y v] to [180]\n        set [level_x v] to [8140]\n        create clone of (_myself_ v)\n        switch costume to (le1 v)\n        set [level_y v] to [-250]\n        set [level_x v] to [7258]\n        create clone of (_myself_ v)\n        switch costume to (bm2 v)\n        set [level_y v] to [-415]\n        set [level_x v] to [4980]\n        create clone of (_myself_ v)\n        switch costume to (tnt v)\n        switch costume to (bm1 v)\n        set [level_y v] to [-570]\n        set [level_x v] to [5000]\n        create clone of (_myself_ v)\n        change [level_x v] by (80)\n        create clone of (_myself_ v)\n        switch costume to (bm2 v)\n        set [level_y v] to [-415]\n        set [level_x v] to [5250]\n        create clone of (_myself_ v)\n        switch costume to (tnt v)\n        switch costume to (bm2 v)\n        set [level_y v] to [-570]\n        set [level_x v] to [5250]\n        create clone of (_myself_ v)\n        change [level_x v] by (160)\n        create clone of (_myself_ v)\n        switch costume to (bm1 v)\n        set [level_y v] to [-430]\n        set [level_x v] to [5568]\n        create clone of (_myself_ v)\n        switch costume to (s&2 v)\n        set [level_y v] to [-430]\n        set [level_x v] to [5185]\n        create clone of (_myself_ v)\n        switch costume to (s&3 v)\n        set [level_y v] to [-430]\n        set [level_x v] to [5375]\n        create clone of (_myself_ v)\n        switch costume to (s&4 v)\n        set [level_y v] to [-430]\n        set [level_x v] to [5590]\n        create clone of (_myself_ v)\n    else\n        switch costume to (tnt v)\n        switch costume to (bm1 v)\n        set [level_y v] to [-65]\n        set [level_x v] to [390]\n        create clone of (_myself_ v)\n        change [level_x v] by (80)\n        create clone of (_myself_ v)\n        switch costume to (bm2 v)\n        set [level_y v] to [-25]\n        set [level_x v] to [870]\n        create clone of (_myself_ v)\n        switch costume to (tnt v)\n        switch costume to (bm1 v)\n        set [level_y v] to [-65]\n        set [level_x v] to [1410]\n        create clone of (_myself_ v)\n        repeat (3)\n            change [level_x v] by (80)\n            create clone of (_myself_ v)\n        end\n        switch costume to (bm2 v)\n        set [level_y v] to [15]\n        set [level_x v] to [1625]\n        create clone of (_myself_ v)\n        switch costume to (tnt v)\n        switch costume to (bm1 v)\n        set [level_x v] to [2623]\n        change [level_y v] by (-78)\n        create clone of (_myself_ v)\n        repeat (3)\n            change [level_x v] by (80)\n            create clone of (_myself_ v)\n        end\n        switch costume to (bm2 v)\n        change [level_x v] by (80)\n        repeat (2)\n            change [level_x v] by (80)\n            create clone of (_myself_ v)\n        end\n        repeat (1)\n            change [level_y v] by (78)\n            create clone of (_myself_ v)\n        end\n        switch costume to (bm2 v)\n        set [level_y v] to [-85]\n        set [level_x v] to [3250]\n        create clone of (_myself_ v)\n        change [level_x v] by (32)\n        create clone of (_myself_ v)\n        switch costume to (s&1 v)\n        set [level_y v] to [0]\n        set [level_x v] to [1709]\n        create clone of (_myself_ v)\n    end\nend\nif <(STAGE #) = [9]> then\n    switch costume to (spike9 v)\n    set [level_y v] to [-915]\n    set [level_x v] to [-188]\n    create clone of (_myself_ v)\n    switch costume to (spike10 v)\n    set [level_y v] to [-1300]\n    set [level_x v] to [179]\n    create clone of (_myself_ v)\n    switch costume to (spike9 v)\n    set [level_y v] to [-1300]\n    set [level_x v] to [0]\n    create clone of (_myself_ v)\nend\nif <(STAGE #) = [7]> then\n    switch costume to (spike3 v)\n    set [level_y v] to [-165]\n    set [level_x v] to [466]\n    create clone of (_myself_ v)\n    switch costume to (spike4 v)\n    set [level_y v] to [-165]\n    set [level_x v] to [850]\n    create clone of (_myself_ v)\n    switch costume to (spike3 v)\n    set [level_y v] to [-165]\n    set [level_x v] to [970]\n    create clone of (_myself_ v)\n    switch costume to (spike6 v)\n    set [level_y v] to [-165]\n    set [level_x v] to [1170]\n    create clone of (_myself_ v)\n    switch costume to (spike3 v)\n    set [level_y v] to [-165]\n    set [level_x v] to [1460]\n    create clone of (_myself_ v)\n    switch costume to (spike3 v)\n    set [level_y v] to [-165]\n    set [level_x v] to [1625]\n    create clone of (_myself_ v)\n    switch costume to (spike7 v)\n    set [level_y v] to [-100]\n    set [level_x v] to [1753]\n    create clone of (_myself_ v)\n    switch costume to (spike8 v)\n    set [level_y v] to [-100]\n    set [level_x v] to [1877]\n    create clone of (_myself_ v)\n    switch costume to (lproto v)\n    set [level_y v] to [-250]\n    set [level_x v] to [2400]\n    create clone of (_myself_ v)\n    switch costume to (lproto2 v)\n    set [level_y v] to [42]\n    set [level_x v] to [2785]\n    create clone of (_myself_ v)\nend\nif <(STAGE #) = [1]> then\n    switch costume to (ld4 v)\n    set [level_y v] to [0]\n    set [level_x v] to [138]\n    create clone of (_myself_ v)\n    switch costume to (ld4 v)\n    set [level_y v] to [227]\n    set [level_x v] to [-68]\n    create clone of (_myself_ v)\n    switch costume to (ld4 v)\n    set [level_y v] to [398]\n    set [level_x v] to [42]\n    create clone of (_myself_ v)\n    switch costume to (ld5 v)\n    set [level_y v] to [550]\n    set [level_x v] to [200]\n    create clone of (_myself_ v)\n    switch costume to (mbeamspawner v)\n    set [level_y v] to [930]\n    set [level_x v] to [1150]\n    create clone of (_myself_ v)\n    switch costume to (ztile v)\n    set [level_y v] to [500]\n    set [level_x v] to [1600]\n    create clone of (_myself_ v)\n    switch costume to (ztile v)\n    set [level_y v] to [500]\n    set [level_x v] to [1700]\n    create clone of (_myself_ v)\n    switch costume to (ztile v)\n    set [level_y v] to [500]\n    set [level_x v] to [1800]\n    create clone of (_myself_ v)\n    switch costume to (mbeamspawner v)\n    set [level_y v] to [930]\n    set [level_x v] to [2500]\n    create clone of (_myself_ v)\n    switch costume to (ztile v)\n    set [level_y v] to [450]\n    set [level_x v] to [2500]\n    create clone of (_myself_ v)\n    switch costume to (ztile v)\n    set [level_y v] to [450]\n    set [level_x v] to [2630]\n    create clone of (_myself_ v)\n    switch costume to (ld6 v)\n    set [level_y v] to [1100]\n    set [level_x v] to [500]\n    create clone of (_myself_ v)\n    switch costume to (ld4 v)\n    set [level_y v] to [1274]\n    set [level_x v] to [1545]\n    create clone of (_myself_ v)\n    switch costume to (ztile v)\n    set [level_y v] to [1274]\n    set [level_x v] to [1650]\n    create clone of (_myself_ v)\n    switch costume to (ld4 v)\n    set [level_y v] to [1684]\n    set [level_x v] to [1484]\n    create clone of (_myself_ v)\n    switch costume to (ztile v)\n    set [level_y v] to [1680]\n    set [level_x v] to [1650]\n    create clone of (_myself_ v)\n    switch costume to (ld4 v)\n    set [level_y v] to [2090]\n    set [level_x v] to [1482]\n    create clone of (_myself_ v)\n    switch costume to (ld6 v)\n    set [level_y v] to [2550]\n    set [level_x v] to [754]\n    create clone of (_myself_ v)\nend\nif <(STAGE #) = [2]> then\n    switch costume to (spike v)\n    set [level_y v] to [-150]\n    set [level_x v] to [950]\n    create clone of (_myself_ v)\n    switch costume to (yoku1 v)\n    set [level_y v] to [-78]\n    set [level_x v] to [1244]\n    repeat (4)\n        create clone of (_myself_ v)\n        change [level_y v] by (32)\n    end\n    switch costume to (yokuswitch v)\n    set [level_y v] to [-80]\n    set [level_x v] to [993]\n    create clone of (_myself_ v)\n    switch costume to (l5 v)\n    set [level_y v] to [5]\n    set [level_x v] to [2093]\n    create clone of (_myself_ v)\n    switch costume to (yokuswitch v)\n    set [level_y v] to [59]\n    set [level_x v] to [1775]\n    create clone of (_myself_ v)\n    switch costume to (yoku1 v)\n    set [level_y v] to [-132]\n    set [level_x v] to [2275]\n    repeat (6)\n        create clone of (_myself_ v)\n        change [level_x v] by (32)\n    end\n    switch costume to (spike2 v)\n    set [level_y v] to [-150]\n    set [level_x v] to [2400]\n    create clone of (_myself_ v)\n    switch costume to (divewater v)\n    set [level_y v] to [-150]\n    set [level_x v] to [2821]\n    repeat (6)\n        create clone of (_myself_ v)\n        change [level_x v] by (64)\n    end\n    change [level_x v] by (-12)\n    create clone of (_myself_ v)\n    switch costume to (yokuswitch v)\n    set [level_y v] to [0]\n    set [level_x v] to [3522]\n    create clone of (_myself_ v)\n    switch costume to (yoku2 v)\n    set [level_y v] to [-50]\n    set [level_x v] to [3369]\n    repeat (3)\n        create clone of (_myself_ v)\n        change [level_x v] by (32)\n    end\n    switch costume to (yoku1 v)\n    set [level_y v] to [47]\n    set [level_x v] to [3460]\n    repeat (2)\n        create clone of (_myself_ v)\n        change [level_x v] by (32)\n    end\n    switch costume to (l2 v)\n    set [level_y v] to [47]\n    set [level_x v] to [4115]\n    create clone of (_myself_ v)\n    switch costume to (yoku1 v)\n    set [level_y v] to [368]\n    set [level_x v] to [4302]\n    switch costume to (yokuswitch v)\n    set [level_y v] to [412]\n    set [level_x v] to [4510]\n    create clone of (_myself_ v)\n    switch costume to (yoku1 v)\n    set [level_y v] to [412]\n    set [level_x v] to [4510]\n    repeat (2)\n        change [level_x v] by (-32)\n        create clone of (_myself_ v)\n    end\n    switch costume to (yoku1 v)\n    set [level_y v] to [350]\n    set [level_x v] to [4650]\n    repeat (3)\n        change [level_x v] by (32)\n        create clone of (_myself_ v)\n    end\n    repeat (2)\n        change [level_x v] by (32)\n    end\n    switch costume to (yoku2 v)\n    set [level_y v] to [350]\n    repeat (3)\n        change [level_x v] by (32)\n        create clone of (_myself_ v)\n    end\n    switch costume to (yokuswitch v)\n    change [level_x v] by (32)\n    set [level_y v] to [382]\n    create clone of (_myself_ v)\n    change [level_y v] by (32)\n    switch costume to (yoku1 v)\n    repeat (3)\n        change [level_y v] by (32)\n        create clone of (_myself_ v)\n    end\n    switch costume to (spike v)\n    set [level_y v] to [280]\n    set [level_x v] to [5420]\n    create clone of (_myself_ v)\n    switch costume to (l5 v)\n    set [level_y v] to [447]\n    set [level_x v] to [5568]\n    create clone of (_myself_ v)\n    switch costume to (l3 v)\n    set [level_y v] to [449]\n    set [level_x v] to [6093]\n    create clone of (_myself_ v)\n    set [level_y v] to [300]\n    set [level_x v] to [6000]\n    switch costume to (yoku1 v)\n    repeat (5)\n        change [level_x v] by (32)\n        create clone of (_myself_ v)\n    end\n    set [level_y v] to [411]\n    set [level_x v] to [6267]\n    switch costume to (yokuswitch v)\n    create clone of (_myself_ v)\n    switch costume to (l3 v)\n    set [level_y v] to [449]\n    set [level_x v] to [6157]\n    create clone of (_myself_ v)\n    set [level_y v] to [473]\n    set [level_x v] to [6268]\n    switch costume to (yoku1 v)\n    repeat (4)\n        change [level_y v] by (32)\n        create clone of (_myself_ v)\n    end\nend\n\nwhen flag clicked\nhide\nclear graphic effects\nset size to (200) %\n\nwhen I start as a clone\nforever\n    if <(costume [number v]) = [58]> then\n        wait until <touching (ladder downward collision v)?>\n        start sound [chandelier_fall v]\n        repeat (2)\n            set [brightness v] effect to (25)\n            wait (.05) seconds\n            set [brightness v] effect to (0)\n            wait (.05) seconds\n        end\n        set [y v] to [0]\n        repeat until <(y position) < [-179]>\n            if <<(distance to [ladder downward collision v]) < [75]> and <not <<key (up arrow v) pressed?> or <key (w v) pressed?>>>> then\n                set [speed v] to ((y) * (2))\n                broadcast (MovingPlatformDown v)\n            end\n            change [y v] by (-.5)\n            change [level_y v] by (y)\n        end\n        delete this clone\n    end\n    if <(costume [number v]) = [38]> then\nend\n\nwhen I receive [blink v]\nif <(username) = [legobuzz12]> then\n    delete this clone\nend\n\nwhen I receive [teleportin v]\nset [collide with ladder v] to [0]\nset [switchblockstate v] to [1]\n\nwhen flag clicked\nset [clone v] to [0]\n\nwhen I receive [ready v]\nset [collide with ladder v] to [0]\n\nwhen I start as a clone\nset [ogy v] to (Level_Y)\nif <(costume [number v]) = [4]> then\n    forever\n        set [level_y v] to ((ogy) + ([sin v] of (((timer) + (10)) * (150)) ))\n        switch costume to ((4) + ((round ((timer) * (8))) mod (2)))\n    end\nend\nif <(costume [number v]) = [6]> then\n    forever\n        set [level_y v] to ((ogy) + ([sin v] of (((timer) + (10)) * (150)) ))\n    end\nend\nif <(costume [number v]) = [10]> then\n    forever\n        wait until <<touching (special weapons v)?> or <<<touching (mega man v)?> and <touching color (#fae0c1)?>> and <not <touching (hitbox v)?>>>>\n        if <<([abs v] of ((Level_X) - (Scroll X)) ) > [250]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [250]>> then\n    end\nend\nif <(costume [number v]) = [40]> then\nif <(costume [number v]) = [48]> then\n    clear graphic effects\n    forever\n        wait until <touching (ladder downward collision v)?>\n        if <<([abs v] of ((Level_X) - (Scroll X)) ) > [250]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [250]>> then\n    end\nend\nif <(costume [number v]) = [46]> then\n    clear graphic effects\n    forever\n        wait until <touching (ladder downward collision v)?>\n        if <<([abs v] of ((Level_X) - (Scroll X)) ) > [250]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [250]>> then\n    end\nend\n\nwhen I receive [omega_open first ladder v]\nif <(costume [number v]) = [27]> then\n    repeat (19)\n        change [level_y v] by (-10)\n    end\n    repeat (5)\n        change [level_y v] by (-5)\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [27]> then\n    if <(Checkpoint #) < [3]> then\nend\n\nwhen I receive [bossgatetransition v]\nif <<(costume [number v]) = [19]> or <(costume [number v]) = [20]>> then\n    delete this clone\nend\n\nbroadcast (blink v)\n\nwhen I start as a clone\nrepeat (10)\n    go to [front v] layer\nend\n\nwhen I receive [stage select v]\ndelete this clone\n\nwhen I receive [stage select v]\nhide\ndelete this clone\n\nwhen I receive [haha u lose v]\ndelete this clone\n\nwhen I receive [regenerate misc objects v]\nif <[1] = [1]> then\n    delete this clone\nend\nCreate\n\nwhen I start as a clone\nif <(costume [number v]) = [67]> then\n    set [ogx v] to (Level_X)\n    set [ogy v] to (Level_Y)\n    set [y v] to [0]\n    set [x v] to [0]\n    forever\n        set [level_x v] to ((ogx) + (([sin v] of (y) ) * (70)))\n        set [level_y v] to ((ogy) + (([cos v] of (y) ) * (70)))\n        set [x v] to [2]\n        change [y v] by (x)\n        if <<<([falling? v] of [hitbox v]) > [2]> and <not <touching (ladder downward collision v)?>>> and <touching (hitbox v)?>> then\n            set [@a v] to [-15]\n            broadcast (@Change Y according to A v)\n        end\n        if <<<touching (ladder downward collision v)?> and <not <<([abs v] of ((Level_X) - (Scroll X)) ) > [250]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [250]>>>> and <not <<key (up arrow v) pressed?> or <key (w v) pressed?>>>> then\n            set [@a v] to ([cos v] of (x) )\n            set [a v] to (([cos v] of (y) ) * (-2))\n            broadcast (Left 5 v)\n            broadcast (@Change Y according to A v)\n        end\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [61]> then\n    forever\n        switch costume to (conv v)\n        wait (.02) seconds\n        switch costume to (conv4 v)\n        wait (.02) seconds\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [61]> then\n    forever\n        if <touching (ladder downward collision v)?> then\n            broadcast (back you go v)\n        end\n    end\nend\n\n@ladder downward collision\n\nwhen flag clicked\nset size to (100) %\nswitch costume to (costume1 v)\nset [ghost v] effect to (100)\nshow\nforever\n    go to (hitbox v)\nend\n\nwhen I receive [bossgatetransition v]\nrepeat (10)\n    change x by (6)\nend\n\nwhen I start as a clone\ngo to [front v] layer\nchange x by (40)\nclear graphic effects\nswitch costume to (smoke1 v)\nset size to (200) %\nchange y by (-30)\nshow\nrepeat (3)\n    wait (.02) seconds\n    next costume\nend\nwait (.02) seconds\ndelete this clone\n\nwhen I start as a clone\nrepeat (15)\n    change x by ((a) * (-1))\nend\ndelete this clone\n\nwhen flag clicked\nset volume to (0) %\nforever\n    play sound [grind_begin_LOOP v] until done\nend\n\nwhen flag clicked\nforever\n    if <<<<touching (ground v)?> and <(On Snowboard?) = [1]>> and <(a) > [6]>> and <([canmove? v] of [hitbox v]) = [1]>> then\n        set volume to (100) %\n        create clone of (_myself_ v)\n        wait (.05) seconds\n    else\n        set volume to (0) %\n    end\nend\n\n@boss door\n\nwhen I start as a clone\ngo to [front v] layer\nforever\n    set [ghost v] effect to (0)\n    set x to ((Level_X) - (Scroll X))\n    set y to ((Level_Y) - (Scroll Y))\n    if <<([abs v] of ((Level_X) - (Scroll X)) ) > [265]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [300]>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [ready v]\nhide\nclear graphic effects\ngo to x: (0) y: (0)\nset [level_x v] to [0]\nswitch costume to (bossdoor1 v)\nif <[1] = [1]> then\n    delete this clone\nend\nCreate\n\ndefine Create\nif <(STAGE #) = [6]> then\n    switch costume to (bossdoortall v)\n    set size to (200) %\n    set [level_y v] to [3005]\n    set [level_x v] to [7409]\n    create clone of (_myself_ v)\n    switch costume to (bossdoortall v)\n    set size to (200) %\n    set [level_y v] to [3005]\n    set [level_x v] to [7888]\n    create clone of (_myself_ v)\nend\nif <(STAGE #) = [3]> then\n    switch costume to (bossdoortall v)\n    set size to (200) %\n    set [level_y v] to [351]\n    set [level_x v] to [30881]\n    create clone of (_myself_ v)\n    switch costume to (bossdoortall v)\n    set size to (200) %\n    set [level_y v] to [351]\n    set [level_x v] to [31412]\n    create clone of (_myself_ v)\nend\nif <(STAGE #) = [4]> then\n    switch costume to (bossdoortall v)\n    set size to (200) %\n    set [level_y v] to [-3081]\n    set [level_x v] to [4330]\n    create clone of (_myself_ v)\n    switch costume to (bossdoortall v)\n    set size to (200) %\n    set [level_y v] to [-3081]\n    set [level_x v] to [4850]\n    create clone of (_myself_ v)\n    switch costume to (bossdoortall v)\n    set size to (200) %\n    set [level_y v] to [-930]\n    set [level_x v] to [1258]\n    create clone of (_myself_ v)\nend\nif <(STAGE #) = [8]> then\n    if <(Checkpoint #) < [4]> then\n        switch costume to (bossdoortall v)\n        set size to (200) %\n        set [level_y v] to [-516]\n        set [level_x v] to [6245]\n        create clone of (_myself_ v)\n        switch costume to (bossdoortall v)\n        set size to (200) %\n        set [level_y v] to [-516]\n        set [level_x v] to [6780]\n        create clone of (_myself_ v)\n    end\n    switch costume to (bossdoortall v)\n    set size to (200) %\n    set [level_y v] to [780]\n    set [level_x v] to [8230]\n    create clone of (_myself_ v)\nend\nif <(STAGE #) = [1]> then\n    switch costume to (bossdoor1 v)\n    set size to (200) %\n    set [level_y v] to [1133]\n    set [level_x v] to [725]\n    create clone of (_myself_ v)\n    switch costume to (bossdoor1 v)\n    set size to (200) %\n    set [level_y v] to [1165]\n    set [level_x v] to [1205]\n    create clone of (_myself_ v)\n    switch costume to (bossdoor1 v)\n    set size to (200) %\n    set [level_y v] to [2580]\n    set [level_x v] to [1185]\n    create clone of (_myself_ v)\n    switch costume to (bossdoor1 v)\n    set size to (200) %\n    set [level_y v] to [2580]\n    set [level_x v] to [1665]\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nif <(STAGE #) = [6]> then\n    if <(Level_X) = [7888]> then\n        wait until <touching (hitbox v)?>\n        start sound [SE \[16\] v]\n        broadcast (bossgatetransition v)\n        switch costume to (bossdoortall v)\n        repeat (6)\n            wait (.05) seconds\n            next costume\n        end\n        wait (.5) seconds\n        repeat (6)\n            wait (.05) seconds\n            switch costume to ((costume [number v]) + (-1))\n        end\n        set [checkpoint # v] to [5]\n        broadcast (Bosscutscene v)\n        wait (1) seconds\n    end\n    if <(Level_X) = [7409]> then\n        wait until <touching (hitbox v)?>\n        start sound [SE \[16\] v]\n        broadcast (bossgatetransition v)\n        switch costume to (bossdoortall v)\n        repeat (6)\n            wait (.05) seconds\n            next costume\n        end\n        wait (.5) seconds\n        set [checkpoint # v] to [5]\n        repeat (6)\n            wait (.05) seconds\n            switch costume to ((costume [number v]) + (-1))\n        end\n        wait (1) seconds\n    end\nend\nif <(STAGE #) = [3]> then\n    if <(Level_X) = [31412]> then\n        wait until <touching (hitbox v)?>\n        start sound [SE \[16\] v]\n        broadcast (bossgatetransition v)\n        switch costume to (bossdoortall v)\n        repeat (6)\n            wait (.05) seconds\n            next costume\n        end\n        wait (.5) seconds\n        repeat (6)\n            wait (.05) seconds\n            switch costume to ((costume [number v]) + (-1))\n        end\n        set [checkpoint # v] to [4]\n        broadcast (Bosscutscene v)\n        wait (1) seconds\n    end\n    if <(Level_X) = [30881]> then\n        wait until <<touching (hitbox v)?> and <(Checkpoint #) = [3]>>\n        start sound [SE \[16\] v]\n        set [scroll x min v] to (Scroll X Max)\n        broadcast (Transition Right v)\n        switch costume to (bossdoortall v)\n        repeat (6)\n            wait (.05) seconds\n            next costume\n        end\n        wait (.5) seconds\n        set [checkpoint # v] to [4]\n        repeat (6)\n            wait (.05) seconds\n            switch costume to ((costume [number v]) + (-1))\n        end\n    end\nend\nif <(STAGE #) = [4]> then\n    if <(Level_X) = [1258]> then\n        wait until <<touching (hitbox v)?> and <(HAS CREDIT CARD?) = [1]>>\n        start sound [SE \[16\] v]\n        set [scroll x max v] to (Scroll X Min)\n        broadcast (Transition Left v)\n        switch costume to (bossdoortall v)\n        repeat (6)\n            wait (.05) seconds\n            next costume\n        end\n        wait (.5) seconds\n        repeat (6)\n            wait (.05) seconds\n            switch costume to ((costume [number v]) + (-1))\n        end\n        wait (1) seconds\n        set [scroll x min v] to [0]\n    end\n    if <(Level_X) = [4850]> then\n        wait until <touching (hitbox v)?>\n        start sound [SE \[16\] v]\n        broadcast (bossgatetransition v)\n        switch costume to (bossdoortall v)\n        repeat (6)\n            wait (.05) seconds\n            next costume\n        end\n        wait (.5) seconds\n        repeat (6)\n            wait (.05) seconds\n            switch costume to ((costume [number v]) + (-1))\n        end\n        set [checkpoint # v] to [3]\n        broadcast (Bosscutscene v)\n        wait (1) seconds\n    end\n    if <(Level_X) = [4330]> then\n        wait until <<touching (hitbox v)?> and <(Checkpoint #) = [2]>>\n        start sound [SE \[16\] v]\n        broadcast (bossgatetransition v)\n        switch costume to (bossdoortall v)\n        repeat (6)\n            wait (.05) seconds\n            next costume\n        end\n        wait (.5) seconds\n        repeat (6)\n            wait (.05) seconds\n            switch costume to ((costume [number v]) + (-1))\n        end\n        wait (1) seconds\n        set [checkpoint # v] to [3]\n    end\nend\nif <(STAGE #) = [8]> then\n    if <(Level_X) = [8694]> then\n        wait until <<touching (hitbox v)?> and <<(item (2) of [activated bossgates v]) = [1]> and <(Scroll X) < [8500]>>>\n        start sound [SE \[16\] v]\n        broadcast (bossgatetransition v)\n        switch costume to (bossdoortall v)\n        repeat (6)\n            wait (.05) seconds\n            next costume\n        end\n        wait (.5) seconds\n        repeat (6)\n            wait (.05) seconds\n            switch costume to ((costume [number v]) + (-1))\n        end\n        wait (1) seconds\n        broadcast (Regenerate misc Objects v)\n    end\n    if <(Level_X) = [8230]> then\n        wait until <touching (hitbox v)?>\n        start sound [SE \[16\] v]\n        broadcast (bossgatetransition v)\n        switch costume to (bossdoortall v)\n        repeat (6)\n            wait (.05) seconds\n            next costume\n        end\n        wait (.5) seconds\n        repeat (6)\n            wait (.05) seconds\n            switch costume to ((costume [number v]) + (-1))\n        end\n        set [checkpoint # v] to [5]\n        broadcast (Bosscutscene v)\n        wait (1) seconds\n    end\n    if <(Level_X) = [6780]> then\n        wait until <<touching (hitbox v)?> and <(item (1) of [activated bossgates v]) = [1]>>\n        start sound [SE \[16\] v]\n        broadcast (bossgatetransition v)\n        switch costume to (bossdoortall v)\n        repeat (6)\n            wait (.05) seconds\n            next costume\n        end\n        wait (.5) seconds\n        repeat (6)\n            wait (.05) seconds\n            switch costume to ((costume [number v]) + (-1))\n        end\n        wait (1) seconds\n        set [checkpoint # v] to [4]\n    end\n    if <(Level_X) = [6245]> then\n        wait until <touching (hitbox v)?>\n        start sound [SE \[16\] v]\n        broadcast (bossgatetransition v)\n        switch costume to (bossdoortall v)\n        repeat (6)\n            wait (.05) seconds\n            next costume\n        end\n        wait (.5) seconds\n        repeat (6)\n            wait (.05) seconds\n            switch costume to ((costume [number v]) + (-1))\n        end\n        wait (1) seconds\n        set [checkpoint # v] to [3]\n        broadcast (MIDBOSS v)\n    end\nend\nif <(STAGE #) = [1]> then\n    if <(Level_X) = [725]> then\n        wait until <touching (hitbox v)?>\n        start sound [SE \[16\] v]\n        broadcast (bossgatetransition v)\n        switch costume to (bossdoor1 v)\n        repeat (3)\n            wait (.05) seconds\n            next costume\n        end\n        wait (1) seconds\n        repeat (3)\n            wait (.05) seconds\n            switch costume to ((costume [number v]) + (-1))\n        end\n        wait (1) seconds\n        broadcast (Bosscutscene v)\n    end\n    if <(Level_X) = [1665]> then\n        wait until <touching (hitbox v)?>\n        start sound [SE \[16\] v]\n        broadcast (bossgatetransition v)\n        switch costume to (bossdoor1 v)\n        repeat (3)\n            wait (.05) seconds\n            next costume\n        end\n        wait (1) seconds\n        repeat (3)\n            wait (.05) seconds\n            switch costume to ((costume [number v]) + (-1))\n        end\n        wait (1) seconds\n        broadcast (Bosscutscene v)\n        set [checkpoint # v] to [6]\n    end\n    if <(Level_X) = [1205]> then\n        wait until <<touching (hitbox v)?> and <(item (1) of [activated bossgates v]) = [1]>>\n        start sound [SE \[16\] v]\n        broadcast (bossgatetransition v)\n        switch costume to (bossdoor1 v)\n        repeat (3)\n            wait (.05) seconds\n            next costume\n        end\n        wait (1) seconds\n        repeat (3)\n            wait (.05) seconds\n            switch costume to ((costume [number v]) + (-1))\n        end\n        wait (1) seconds\n        set [scroll y min v] to [1198]\n        set [scroll y max v] to [2170]\n        set [scroll x min v] to [1460]\n        set [scroll x max v] to [1460]\n    end\n    if <(Level_X) = [1185]> then\n        wait until <<touching (hitbox v)?> and <(Checkpoint #) < [6]>>\n        start sound [SE \[16\] v]\n        broadcast (bossgatetransition v)\n        switch costume to (bossdoor1 v)\n        repeat (3)\n            wait (.05) seconds\n            next costume\n        end\n        wait (1) seconds\n        repeat (3)\n            wait (.05) seconds\n            switch costume to ((costume [number v]) + (-1))\n        end\n        wait (1) seconds\n    end\nend\n\nwhen I receive [stage select v]\nhide\ndelete this clone\n\n@toenail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nset [ghost v] effect to (100)\nset [brightness v] effect to (3)\nshow\nforever\n    go to [front v] layer\nend\n\n@Menu\n\nwhen flag clicked\nset [clone v] to [0]\nset [megaman costume v] to [1]\nset [menu_select v] to [1]\nset [able to select? v] to [1]\nset [at stage select v] to [0]\nset size to (200) %\nclear graphic effects\ngo to [front v] layer\nset [brightness v] effect to (8)\ngo to x: (0) y: (999)\nhide\ngo to x: (150) y: (-100)\nswitch costume to (art2 v)\ncreate clone of (_myself_ v)\ngo to x: (-150) y: (-100)\nswitch costume to (mug3 v)\ncreate clone of (_myself_ v)\nset size to (100) %\ngo to x: (34) y: (145)\nswitch costume to (costume1 v)\ncreate clone of (_myself_ v)\nset size to (200) %\ngo to x: (0) y: (15)\nswitch costume to (wily_5_3 v)\ncreate clone of (_myself_ v)\ngo to x: (0) y: (0)\nswitch costume to (endless_14 v)\ncreate clone of (_myself_ v)\ngo to x: (-47) y: (16)\nswitch costume to (costume2 v)\nset size to (200) %\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nset [clone v] to [1]\nshow\nif <(costume [number v]) = [5]> then\n    go to [back v] layer\nend\nif <(costume [number v]) = [6]> then\n    go to [back v] layer\n    forever\n        wait (.05) seconds\n        switch costume to (endless_14 v)\n        wait (.05) seconds\n        next costume\n    end\nend\nif <<(costume [number v]) = [3]> or <(costume [number v]) = [1]>> then\n    set [y v] to [0]\n    forever\n        change [y v] by (5)\n        set y to ((-100) + (([sin v] of (y) ) * (2)))\n    end\nend\nif <(costume [number v]) = [8]> then\n    set [y v] to [0]\n    forever\n        if <(Menu_Select) = [1]> then\n            go to x: ((-47) + (([sin v] of (y) ) * (5))) y: (15)\n        else\n            go to x: ((-60) + (([sin v] of (y) ) * (5))) y: (-50)\n        end\n        change [y v] by (20)\n    end\nend\nif <(costume [number v]) = [18]> then\n    go to [front v] layer\n    forever\n        if <(PHANTOM ARMOR?) = [1]> then\n            if <(STAGE #) = [2]> then\n                switch costume to (phantom2 v)\n            end\n            if <(STAGE #) = [3]> then\n                switch costume to (phantom4 v)\n            end\n            if <(STAGE #) = [1]> then\n                switch costume to (phantom5 v)\n            end\n            if <(STAGE #) = [4]> then\n                switch costume to (phantom3 v)\n            end\n            if <(STAGE #) = [5]> then\n                switch costume to (phantom1 v)\n            end\n            if <(STAGE #) = [6]> then\n                switch costume to (phantom7 v)\n            end\n            if <(STAGE #) = [7]> then\n                switch costume to (phantom8 v)\n            end\n            if <(STAGE #) = [8]> then\n                switch costume to (phantom6 v)\n            end\n            if <(STAGE #) = [9]> then\n                switch costume to (phantom9 v)\n            end\n        else\n            if <(STAGE #) = [2]> then\n                switch costume to (mlook1 v)\n            end\n            if <(STAGE #) = [3]> then\n                switch costume to (mlook2 v)\n            end\n            if <(STAGE #) = [1]> then\n                switch costume to (mlook3 v)\n            end\n            if <(STAGE #) = [4]> then\n                switch costume to (mlook4 v)\n            end\n            if <(STAGE #) = [5]> then\n                switch costume to (mlook5 v)\n            end\n            if <(STAGE #) = [6]> then\n                switch costume to (mlook6 v)\n            end\n            if <(STAGE #) = [7]> then\n                switch costume to (mlook7 v)\n            end\n            if <(STAGE #) = [8]> then\n                switch costume to (mlook8 v)\n            end\n            if <(STAGE #) = [9]> then\n                switch costume to (mlook9 v)\n            end\n        end\n    end\nend\nif <(costume [number v]) = [27]> then\n    go to [front v] layer\n    forever\n        if <(STAGE #) = [2]> then\n            go to x: (-140) y: (111)\n        end\n        if <(STAGE #) = [3]> then\n            go to x: (0) y: (111)\n        end\n        if <(STAGE #) = [1]> then\n            go to x: (140) y: (111)\n        end\n        if <(STAGE #) = [4]> then\n            go to x: (-140) y: (-1)\n        end\n        if <(STAGE #) = [5]> then\n            go to x: (0) y: (-1)\n        end\n        if <(STAGE #) = [6]> then\n            go to x: (140) y: (-1)\n        end\n        if <(STAGE #) = [7]> then\n            go to x: (-140) y: (-113)\n        end\n        if <(STAGE #) = [8]> then\n            go to x: (0) y: (-113)\n        end\n        if <(STAGE #) = [9]> then\n            go to x: (140) y: (-113)\n        end\n    end\nend\n\nwhen I receive [start v]\nwait (1) seconds\ndelete this clone\n\nwhen flag clicked\nrepeat until <<<(Menu_Select) = [1]> and <key (space v) pressed?>> and <(Able to Select?) = [1]>>\n    if <(Able to Select?) = [1]> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            if <(Menu_Select) = [2]> then\n                set [menu_select v] to [1]\n                start sound [SE \[13\] v]\n            end\n        end\n        if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n            if <(Menu_Select) = [1]> then\n                set [menu_select v] to [2]\n                start sound [SE \[13\] v]\n            end\n        end\n        if <key (space v) pressed?> then\n            if <(Menu_Select) = [2]> then\n                broadcast (how to play v)\n                wait until <key (space v) pressed?>\n                wait (1) seconds\n                wait until <not <key (space v) pressed?>>\n            end\n        end\n    end\nend\nbroadcast (menu_start v)\n\nwhen I receive [menu_start v]\nif <(clone) = [1]> then\n    set [able to select? v] to [0]\n    if <(costume [number v]) = [8]> then\n        stop [other scripts in sprite v]\n        start sound [ui_startgame v]\n        set [y v] to [-5]\n        forever\n            go to [front v] layer\n            repeat until <(x position) > [235]>\n                change [y v] by (1)\n                change x by (y)\n            end\n            hide\n        end\n    end\nend\n\nwhen I receive [stage select v]\nset [at stage select v] to [1]\nset [show stage select stars? v] to [1]\nset [checkpoint # v] to [1]\nset [stage # v] to [5]\nif <[1] = [1]> then\n    delete this clone\nend\ngo to x: (0) y: (0)\nset size to (175) %\nswitch costume to (stage slec2 v)\ngo to [back v] layer\nclear graphic effects\ncreate clone of (_myself_ v)\nclear graphic effects\nmugshots\nif <<(Phantom Armor Components) = [1111]> and <(PHANTOM ARMOR?) = [0]>> then\n    set [able to select? v] to [0]\n    repeat (4)\n        start sound [thunder_01 v]\n        broadcast (Screen Blink v)\n        wait (.3) seconds\n    end\n    wait (.2) seconds\n    start sound [thunder_01 v]\n    start sound [ui_startgame v]\n    broadcast (Screen Blink v)\n    set [phantom armor? v] to [1]\n    set [able to select? v] to [1]\nend\n\ndefine mugshots\nswitch costume to (beta v)\ngo to [front v] layer\ngo to x: (-140) y: (111)\nif <(item (2) of [robot masters defeated v]) = [0]> then\n    create clone of (_myself_ v)\nend\nswitch costume to (alpha v)\nchange x by (140)\nif <(item (3) of [robot masters defeated v]) = [0]> then\n    create clone of (_myself_ v)\nend\nnext costume\nchange x by (140)\nif <(item (1) of [robot masters defeated v]) = [0]> then\n    create clone of (_myself_ v)\nend\nswitch costume to (delta v)\ngo to [front v] layer\ngo to x: (-140) y: (-1)\nif <(item (4) of [robot masters defeated v]) = [0]> then\n    create clone of (_myself_ v)\nend\nnext costume\nchange x by (280)\nif <(item (5) of [robot masters defeated v]) = [0]> then\n    create clone of (_myself_ v)\nend\nswitch costume to (phantomproto v)\ngo to [front v] layer\ngo to x: (-140) y: (-113)\nif <(item (6) of [robot masters defeated v]) = [0]> then\n    create clone of (_myself_ v)\nend\nnext costume\nchange x by (140)\nif <(item (7) of [robot masters defeated v]) = [0]> then\n    create clone of (_myself_ v)\nend\nnext costume\nchange x by (140)\nif <(item (8) of [robot masters defeated v]) = [0]> then\n    create clone of (_myself_ v)\nend\ngo to x: (0) y: (-1)\nswitch costume to (mlook1 v)\ncreate clone of (_myself_ v)\ngo to x: (0) y: (-1)\nswitch costume to (costume3 v)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nforever\n    wait until <(At Stage Select) = [1]>\n    repeat until <<key (space v) pressed?> and <not <(STAGE #) = [5]>>>\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            if <(STAGE #) = [5]> then\n                set [stage # v] to [3]\n                start sound [SE \[13\] v]\n            else\n                if <(STAGE #) = [8]> then\n                    set [stage # v] to [5]\n                    start sound [SE \[13\] v]\n                else\n                    if <(STAGE #) = [9]> then\n                        set [stage # v] to [6]\n                        start sound [SE \[13\] v]\n                    else\n                        if <(STAGE #) = [6]> then\n                            set [stage # v] to [1]\n                            start sound [SE \[13\] v]\n                        else\n                            if <(STAGE #) = [4]> then\n                                set [stage # v] to [2]\n                                start sound [SE \[13\] v]\n                            else\n                                if <(STAGE #) = [7]> then\n                                    set [stage # v] to [4]\n                                    start sound [SE \[13\] v]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n            wait until <not <<key (up arrow v) pressed?> or <key (w v) pressed?>>>\n        end\n        if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n            if <(STAGE #) = [5]> then\n                set [stage # v] to [8]\n                start sound [SE \[13\] v]\n            else\n                if <(STAGE #) = [3]> then\n                    set [stage # v] to [5]\n                    start sound [SE \[13\] v]\n                else\n                    if <(STAGE #) = [1]> then\n                        set [stage # v] to [6]\n                        start sound [SE \[13\] v]\n                    else\n                        if <(STAGE #) = [6]> then\n                            set [stage # v] to [9]\n                            start sound [SE \[13\] v]\n                        else\n                            if <(STAGE #) = [2]> then\n                                set [stage # v] to [4]\n                                start sound [SE \[13\] v]\n                            else\n                                if <(STAGE #) = [4]> then\n                                    set [stage # v] to [7]\n                                    start sound [SE \[13\] v]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n            wait until <not <<key (down arrow v) pressed?> or <key (s v) pressed?>>>\n        end\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            if <(STAGE #) = [5]> then\n                set [stage # v] to [6]\n                start sound [SE \[13\] v]\n            else\n                if <(STAGE #) = [4]> then\n                    set [stage # v] to [5]\n                    start sound [SE \[13\] v]\n                else\n                    if <(STAGE #) = [2]> then\n                        set [stage # v] to [3]\n                        start sound [SE \[13\] v]\n                    else\n                        if <(STAGE #) = [3]> then\n                            set [stage # v] to [1]\n                            start sound [SE \[13\] v]\n                        else\n                            if <(STAGE #) = [7]> then\n                                set [stage # v] to [8]\n                                start sound [SE \[13\] v]\n                            else\n                                if <(STAGE #) = [8]> then\n                                    set [stage # v] to [9]\n                                    start sound [SE \[13\] v]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n            wait until <not <<key (right arrow v) pressed?> or <key (d v) pressed?>>>\n        end\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            if <(STAGE #) = [5]> then\n                set [stage # v] to [4]\n                start sound [SE \[13\] v]\n            else\n                if <(STAGE #) = [6]> then\n                    set [stage # v] to [5]\n                    start sound [SE \[13\] v]\n                else\n                    if <(STAGE #) = [1]> then\n                        set [stage # v] to [3]\n                        start sound [SE \[13\] v]\n                    else\n                        if <(STAGE #) = [3]> then\n                            set [stage # v] to [2]\n                            start sound [SE \[13\] v]\n                        else\n                            if <(STAGE #) = [9]> then\n                                set [stage # v] to [8]\n                                start sound [SE \[13\] v]\n                            else\n                                if <(STAGE #) = [8]> then\n                                    set [stage # v] to [7]\n                                    start sound [SE \[13\] v]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n            wait until <not <<key (left arrow v) pressed?> or <key (a v) pressed?>>>\n        end\n    end\n    set [at stage select v] to [0]\n    broadcast (STAGE SELECTED v)\nend\n\nwhen I receive [robot master intro v]\ndelete this clone\n\nwhen I start as a clone\n\nif <<<(costume [number v]) = [16]> or <(costume [number v]) = [14]>> or <<(costume [number v]) = [13]> or <(costume [number v]) = [11]>>> then\n    forever\n        set [brightness v] effect to (pick random (-80) to (-70))\n    end\nend\n\nset [at stage select v] to [0]\nbroadcast (SetUp v)\nbroadcast (READY v)\nwait (.02) seconds\nbroadcast (Teleportin v)\n\n@Phantom armor parts\n\nwhen flag clicked\nset rotation style [left-right v]\nclear graphic effects\nhide\ndelete all of [phantom armor components v]\nrepeat (4)\n    add [0] to [phantom armor components v]\nend\n\nwhen I receive [bossdie v]\nif <<(Checkpoint #) = [2]> and <(STAGE #) = [4]>> then\n    wait (.2) seconds\n    stop [other scripts in sprite v]\n    go to (boss 2: electric boogaloo v)\n    set [y v] to ((distance to [hitbox v]) / (25))\n    point towards (mega man v)\n    go to [front v] layer\n    clear graphic effects\n    replace item (1) of [phantom armor components v] with [1]\n    show\n    repeat (5)\n        change [y v] by (-1)\n        move (10) steps\n        change y by (y)\n    end\n    repeat until <<touching (_edge_ v)?> or <touching (mega man v)?>>\n        change [y v] by (-1)\n        move (10) steps\n        change y by (y)\n    end\n    set [heard boss speech? v] to [0]\n    start sound [magic_collect v]\n    repeat (3)\n        change [y v] by (-1)\n        move (10) steps\n        change y by (y)\n    end\n    repeat (10)\n        change [brightness v] effect by (10)\n    end\n    repeat (10)\n        change [ghost v] effect by (10)\n        hide\n    end\nend\n\nwhen I receive [stage select v]\nset [has credit card? v] to [0]\n\nwhen I receive [@alpha escape v]\nswitch costume to (upg4 v)\nreplace item (4) of [phantom armor components v] with [1]\ngo to (boss 2: electric boogaloo v)\ngo to [front v] layer\nclear graphic effects\nhide\nwait (.5) seconds\nstart sound [magic_collect v]\nset [brightness v] effect to (25)\nshow\nrepeat (10)\n    change y by (10)\nend\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen I receive [weapon get v]\nset [darkness v] to [0]\n\n@Textbox/Icons\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nswitch costume to (textbox v)\nset [ghost v] effect to (10)\ngo to x: (16) y: (300)\ngo to [front v] layer\nshow\nrepeat (5)\n    change y by (-25)\nend\ngo to x: (16) y: (112)\n\nwhen I receive [get rid of textbox v]\nrepeat (5)\n    change y by (25)\nend\nhide\ndelete this clone\n\nwhen I receive [textbox show v]\nswitch costume to (Speaker)\ncreate clone of (_myself_ v)\nset [ghost v] effect to (100)\ngo to x: (-154) y: (127)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\ngo to [front v] layer\nforever\n    if <<(Speaker) = [mega]> and <(PHANTOM ARMOR?) = [1]>> then\n        switch costume to (phantommega v)\n    else\n        switch costume to (Speaker)\n    end\nend\n\n@DancingBoi's Text Engine\n\ndefine Type (dialogue) [specified place] (x) (y) (color) (brightness)\nset [brightness v] effect to (brightness)\nset [color v] effect to (color)\ngo to x: (x) y: (y)\nset [letter number v] to [1]\nset [next v] to [0]\nset [test number v] to [0]\nset [transition v] to (pick random (1) to (2))\nrepeat (length of (dialogue))\n    start sound (Speaker)\n    switch costume to (letter (letter number) of (dialogue))\n    if <(test number) = [0]> then\n        if <not <(x position) > [175]>> then\n            create clone of (_myself_ v)\n            change x by (15)\n        else\n            set x to (-109)\n            change y by (-25)\n            create clone of (_myself_ v)\n            change x by (18)\n            set [test number v] to [1]\n        end\n    else\n        if <not <(x position) > [175]>> then\n            create clone of (_myself_ v)\n            change x by (18)\n        else\n            set x to (-109)\n            change y by (-25)\n            create clone of (_myself_ v)\n            change x by (18)\n        end\n    end\n    set [text_trail_x v] to (x position)\n    set [text_trail_y v] to (y position)\n    change [letter number v] by (1)\nend\n\nwhen I start as a clone\npoint in direction (90)\ngo to [front v] layer\nshow\nif <(smol text) = [1]> then\n    set size to (150) %\nelse\n    if <(y position) = [43]> then\n        set size to (100) %\n    else\n        set size to (200) %\n    end\nend\nwait until <(next) = [1]>\nstop [other scripts in sprite v]\ngo to x: (x) y: (y)\nset [yspeed v] to (pick random (5) to (10))\nset [xspeed v] to (pick random (-3) to (3))\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nset [x v] to (x position)\nset [y v] to (y position)\nset [clone type of text v] to (text effects)\nwait until <not <(clone type of text) = []>>\nforever\n    if <(clone type of text) = [shaky]> then\n        repeat (10)\n            go to x: (pick random ((x) + (intensity)) to ((x) - (intensity))) y: (pick random ((y) + (intensity)) to ((y) - (intensity)))\n        end\n    end\n    if <(clone type of text) = [wavy]> then\n        set [yspeed v] to [1]\n        repeat (21)\n            change y by (yspeed)\n            change [yspeed v] by (-0.1)\n        end\n        set [yspeed v] to [-1]\n        repeat (21)\n            change y by (yspeed)\n            change [yspeed v] by (0.1)\n        end\n    end\nend\n\ndefine instant Type (dialogue) (x) (y) (color) (brightness)\nset [text effects v] to []\nset [brightness v] effect to (brightness)\nset [color v] effect to (color)\ngo to x: (x) y: (y)\nset [letter number v] to [1]\nset [next v] to [0]\nset [test number v] to [0]\nset [transition v] to (pick random (1) to (2))\nrepeat (length of (dialogue))\n    switch costume to (letter (letter number) of (dialogue))\n    if <(y position) = [43]> then\n        if <(test number) = [0]> then\n            create clone of (_myself_ v)\n            change x by (10)\n        else\n            create clone of (_myself_ v)\n            change x by (10)\n        end\n        set [text_trail_x v] to (x position)\n        set [text_trail_y v] to (y position)\n        change [letter number v] by (1)\n    else\n        if <(test number) = [0]> then\n            if <not <(x position) = [175]>> then\n                create clone of (_myself_ v)\n                if <(smol text) = [1]> then\n                    change x by (14)\n                else\n                    change x by (18)\n                end\n            else\n                set x to (-175)\n                change y by (-35)\n                create clone of (_myself_ v)\n                if <(smol text) = [1]> then\n                    change x by (14)\n                else\n                    change x by (18)\n                end\n                set [test number v] to [1]\n            end\n        else\n            if <not <(x position) = [200]>> then\n                create clone of (_myself_ v)\n                if <(smol text) = [1]> then\n                    change x by (14)\n                else\n                    change x by (18)\n                end\n            else\n                set x to (-175)\n                change y by (-35)\n                create clone of (_myself_ v)\n                if <(smol text) = [1]> then\n                    change x by (14)\n                else\n                    change x by (18)\n                end\n            end\n        end\n        change [letter number v] by (1)\n    end\nend\n\nwhen I receive [bosscutscene v]\nbroadcast (Disable Movement v)\nif <(STAGE #) = [8]> then\n    if <(Checkpoint #) = [5]> then\n        if <(Heard Boss Speech?) = [1]> then\n            wait (1) seconds\n            broadcast (Bass get out of epsilon stage v)\n            wait (1) seconds\n            broadcast (bATTLE begin v)\n        else\n            wait (2) seconds\n            set [speaker v] to [phantombass]\n            broadcast (textbox show v)\n            wait (.4) seconds\n            set [text effects v] to []\n            instant Type [bass:] [-109] [147] [35] [15]\n            Type [are you sure  this ] [specified place] [-20] [147] [0] [100]\n            set [text effects v] to [wavy]\n            Type [upgrade] [specified place] (text_trail_x) (text_trail_y) [0] [100]\n            set [text effects v] to []\n            Type [ will work?] [specified place] (text_trail_x) (text_trail_y) [0] [100]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [epsilon2]\n            set [text effects v] to []\n            instant Type [epsilon:] [-109] [147] [66] [40]\n            set [text effects v] to [wavy]\n            Type [i promise!] [specified place] [40] [147] [0] [100]\n            set [text effects v] to []\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [epsilon2]\n            set [text effects v] to []\n            instant Type [epsilon:] [-109] [147] [66] [40]\n            Type [now get   going! i have   company!] [specified place] [40] [147] [0] [100]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            broadcast (get rid of textbox v)\n            wait (.4) seconds\n            broadcast (Bass get out of epsilon stage v)\n            wait (1.5) seconds\n            set [speaker v] to [epsilon]\n            broadcast (textbox show v)\n            wait (.4) seconds\n            set [speaker v] to [epsilon]\n            set [text effects v] to []\n            instant Type [epsilon:] [-109] [147] [66] [40]\n            Type [ha! who   brought the bluepunk here?] [specified place] [40] [147] [0] [100]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [mega]\n            set [text effects v] to []\n            instant Type [mega man:] [-109] [147] [0] [0]\n            Type [my own   heart brought mehere!] [specified place] [50] [147] [0] [100]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [mega]\n            set [text effects v] to []\n            instant Type [mega man:] [-109] [147] [0] [0]\n            Type [i need   you to change   back into your  former self!] [specified place] [50] [147] [0] [100]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [epsilon]\n            set [text effects v] to []\n            instant Type [epsilon:] [-109] [147] [66] [40]\n            Type [silly ] [specified place] [40] [147] [0] [100]\n            Type [mega man!] [specified place] (text_trail_x) (text_trail_y) [0] [0]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [epsilon]\n            set [text effects v] to []\n            instant Type [epsilon:] [-109] [147] [66] [40]\n            Type [my old    pitiful self,] [specified place] [40] [147] [0] [100]\n            Type [    burner man] [specified place] (text_trail_x) (text_trail_y) [100] [0]\n            set [text effects v] to [shaky]\n            Type [... is dead!] [specified place] (text_trail_x) (text_trail_y) [100] [100]\n            set [text effects v] to []\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [epsilon]\n            set [text effects v] to []\n            instant Type [epsilon:] [-109] [147] [66] [40]\n            set [text effects v] to [shaky]\n            Type [and say   hello to] [specified place] [40] [147] [0] [100]\n            Type [ epsilon!] [specified place] (text_trail_x) (text_trail_y) [66] [40]\n            Type [ servant to] [specified place] (text_trail_x) (text_trail_y) [66] [100]\n            Type [ team  phantom!] [specified place] (text_trail_x) (text_trail_y) [105] [15]\n            set [text effects v] to []\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [epsilon]\n            set [text effects v] to []\n            instant Type [epsilon:] [-109] [147] [66] [40]\n            set [text effects v] to [shaky]\n            Type [lets test your skill,] [specified place] [40] [147] [0] [100]\n            Type [mega  man!] [specified place] (text_trail_x) (text_trail_y) [0] [0]\n            Type [ hahaha!] [specified place] (text_trail_x) (text_trail_y) [66] [100]\n            set [text effects v] to []\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            broadcast (get rid of textbox v)\n            wait (1) seconds\n            broadcast (bATTLE begin v)\n        end\n    end\nend\nif <(STAGE #) = [9]> then\n    broadcast (Bass Speech v)\nend\nif <(STAGE #) = [4]> then\n    if <(Checkpoint #) = [3]> then\n        if <(Heard Boss Speech?) = [1]> then\n            wait (2) seconds\n            broadcast (Boss_Face to -90 v)\n            wait (1) seconds\n            broadcast (bATTLE begin v)\n        else\n            wait (2) seconds\n            set [speaker v] to [delta]\n            broadcast (textbox show v)\n            wait (.4) seconds\n            broadcast (Boss_Face to -90 v)\n            wait (.2) seconds\n            set [speaker v] to [delta]\n            set [text effects v] to []\n            instant Type [delta:] [-109] [147] [110] [0]\n            Type [listen,     infidel... i caneasily turn you into rubble..] [specified place] [5] [147] [0] [100]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [delta]\n            instant Type [delta:] [-109] [147] [110] [0]\n            set [text effects v] to [shaky]\n            Type [just like   all the robots  in this         junkyard!] [specified place] [5] [147] [0] [100]\n            set [text effects v] to [0]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [delta]\n            instant Type [delta:] [-109] [147] [110] [0]\n            set [text effects v] to [shaky]\n            Type [time for youto burn to the  ground!] [specified place] [5] [147] [0] [100]\n            set [text effects v] to [0]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [delta]\n            instant Type [delta:] [-109] [147] [110] [0]\n            set [text effects v] to [shaky]\n            Type [hahahaha!] [specified place] [5] [147] [0] [100]\n            set [text effects v] to [0]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [heard boss speech? v] to [1]\n            set [next v] to [1]\n            broadcast (get rid of textbox v)\n            wait (1) seconds\n            broadcast (bATTLE begin v)\n        end\n    else\n        if <(Doc Encounter?) = [1]> then\n            wait (3) seconds\n            broadcast (bATTLE begin v)\n        else\n            wait (2) seconds\n            set [speaker v] to [doc]\n            broadcast (textbox show v)\n            wait (.4) seconds\n            set [doc encounter? v] to [1]\n            set [text effects v] to []\n            instant Type [???:] [-109] [147] [100] [0]\n            Type [ ...] [specified place] [-44] [147] [0] [100]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [mega]\n            set [text effects v] to []\n            instant Type [mega man:] [-109] [147] [0] [0]\n            Type [who are  you and why are you here?] [specified place] [50] [147] [0] [100]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [doc]\n            set [text effects v] to []\n            instant Type [doc phantasm:] [-109] [147] [100] [0]\n            Type [name's doc phantasm] [specified place] [-109] [125] [0] [100]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [doc]\n            set [text effects v] to []\n            instant Type [doc phantasm:] [-109] [147] [100] [0]\n            set [text effects v] to [wavy]\n            Type [they] [specified place] [-109] [125] [110] [0]\n            set [text effects v] to []\n            Type [ have told me alot about you...] [specified place] (text_trail_x) (text_trail_y) [0] [100]\n            Type [mega man...] [specified place] (text_trail_x) (text_trail_y) [0] [0]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [mega]\n            instant Type [mega man:] [-109] [147] [0] [0]\n            set [text effects v] to [shaky]\n            Type [i can't  believe it!] [specified place] [50] [147] [0] [100]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [mega]\n            instant Type [mega man:] [-109] [147] [0] [0]\n            set [text effects v] to []\n            Type [you also work for] [specified place] [50] [147] [0] [100]\n            Type [ dr.      phantom!] [specified place] (text_trail_x) (text_trail_y) [110] [0]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [doc]\n            set [text effects v] to []\n            instant Type [doc phantasm:] [-109] [147] [100] [0]\n            set [text effects v] to [wavy]\n            Type [say,] [specified place] [-109] [125] [0] [100]\n            Type [ mega man...] [specified place] (text_trail_x) (text_trail_y) [0] [0]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [doc]\n            set [text effects v] to []\n            instant Type [doc phantasm:] [-109] [147] [100] [0]\n            set [text effects v] to [wavy]\n            Type [how would you like to join our] [specified place] [-109] [125] [0] [100]\n            Type [      team?] [specified place] (text_trail_x) (text_trail_y) [110] [0]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [doc]\n            set [text effects v] to []\n            instant Type [doc phantasm:] [-109] [147] [100] [0]\n            Type [you'd make a power-ful adversary onthe battlefield!] [specified place] [-109] [125] [0] [100]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [mega]\n            instant Type [mega man:] [-109] [147] [0] [0]\n            set [text effects v] to [wavy]\n            Type [let me   put this in     spanish for you ...] [specified place] [50] [147] [0] [100]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [mega]\n            instant Type [mega man:] [-109] [147] [0] [0]\n            set [text effects v] to [shaky]\n            Type [no!] [specified place] [50] [147] [0] [100]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [doc]\n            set [text effects v] to []\n            instant Type [doc phantasm:] [-109] [147] [100] [0]\n            Type [ah, the aggresive  type, are we?] [specified place] [-109] [125] [0] [100]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [doc]\n            set [text effects v] to []\n            instant Type [doc phantasm:] [-109] [147] [100] [0]\n            Type [hmph...] [specified place] [-109] [125] [0] [100]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [doc]\n            set [text effects v] to []\n            instant Type [doc phantasm:] [-109] [147] [100] [0]\n            Type [well...] [specified place] [-109] [125] [0] [100]\n            set [text effects v] to [shaky]\n            Type [mortal...] [specified place] (text_trail_x) (text_trail_y) [110] [100]\n            set [text effects v] to []\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [doc]\n            set [text effects v] to []\n            instant Type [doc phantasm:] [-109] [147] [100] [0]\n            Type [i'm afraid you     stand no chance against me!] [specified place] [-109] [125] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [doc]\n            instant Type [doc phantasm:] [-109] [147] [100] [0]\n            set [text effects v] to [wavy]\n            Type [not to mention my  upgraded] [specified place] [-109] [125] [0] [100]\n            Type [ power    chip!] [specified place] (text_trail_x) (text_trail_y) [110] [0]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [doc]\n            instant Type [doc phantasm:] [-109] [147] [100] [0]\n            set [text effects v] to [shaky]\n            Type [you want fun?] [specified place] [-109] [125] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [doc]\n            instant Type [doc phantasm:] [-109] [147] [100] [0]\n            set [text effects v] to [shaky]\n            Type [doc phantasm show  you fun!] [specified place] [-109] [125] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [heard boss speech? v] to [1]\n            set [next v] to [1]\n            broadcast (get rid of textbox v)\n            wait (1) seconds\n            broadcast (bATTLE begin v)\n        end\n    end\nend\nif <(STAGE #) = [7]> then\n    if <(Heard Boss Speech?) = [1]> then\n        wait (5) seconds\n        broadcast (bATTLE begin v)\n    else\n        wait (5) seconds\n        set [speaker v] to [mega]\n        broadcast (textbox show v)\n        wait (.4) seconds\n        set [text effects v] to []\n        instant Type [mega man:] [-109] [147] [0] [0]\n        Type [i never  thought i'd see the day...] [specified place] [50] [147] [0] [100]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        set [speaker v] to [mega]\n        set [text effects v] to []\n        instant Type [mega man:] [-109] [147] [0] [0]\n        Type [my own   brother crossed to the dark     side!] [specified place] [50] [147] [0] [100]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        set [speaker v] to [phantomproto]\n        set [text effects v] to []\n        instant Type [proto:] [-109] [147] [80] [10]\n        set [text effects v] to [wavy]\n        Type [they ] [specified place] [0] [147] [100] [0]\n        set [text effects v] to []\n        Type [made medo it!] [specified place] (text_trail_x) (text_trail_y) [0] [100]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        set [speaker v] to [phantomproto]\n        set [text effects v] to []\n        instant Type [proto:] [-109] [147] [80] [10]\n        Type [they ] [specified place] [0] [147] [100] [0]\n        Type [said,  if i came acrosssomeone like you...] [specified place] (text_trail_x) (text_trail_y) [0] [100]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        set [speaker v] to [phantomproto]\n        set [text effects v] to []\n        instant Type [proto:] [-109] [147] [80] [10]\n        Type [i would haveto destroy them immediately!] [specified place] [0] [147] [100] [100]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        set [speaker v] to [mega]\n        set [text effects v] to []\n        instant Type [mega man:] [-109] [147] [0] [0]\n        Type [proto man!] [specified place] [-95] [120] [80] [10]\n        Type [you don't need to do      this!] [specified place] (text_trail_x) (text_trail_y) [0] [100]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        set [speaker v] to [mega]\n        set [text effects v] to []\n        instant Type [mega man:] [-109] [147] [0] [0]\n        Type [join me  and we'll take  down ] [specified place] [50] [147] [0] [100]\n        Type [team phantom] [specified place] (text_trail_x) (text_trail_y) [100] [0]\n        Type [ together!] [specified place] (text_trail_x) (text_trail_y) [0] [100]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        set [speaker v] to [phantomproto]\n        instant Type [proto:] [-109] [147] [80] [10]\n        set [text effects v] to [shaky]\n        Type [i can't!] [specified place] [0] [147] [100] [100]\n        Type [    they'll] [specified place] (text_trail_x) (text_trail_y) [100] [0]\n        Type [ find me   and scrap me!] [specified place] (text_trail_x) (text_trail_y) [0] [100]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        set [speaker v] to [phantomproto]\n        instant Type [proto:] [-109] [147] [80] [10]\n        Type [i'm sorry ithas to be this  way,] [specified place] [0] [147] [100] [100]\n        set [text effects v] to [wavy]\n        Type [brother.] [specified place] (text_trail_x) (text_trail_y) [0] [0]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        broadcast (get rid of textbox v)\n        wait (1) seconds\n        broadcast (bATTLE begin v)\n    end\nend\nif <(STAGE #) = [3]> then\n    if <(Heard Boss Speech?) = [1]> then\n        wait (2.5) seconds\n        broadcast (bATTLE begin v)\n    else\n        wait (2.5) seconds\n        set [speaker v] to [alpha]\n        broadcast (textbox show v)\n        wait (.4) seconds\n        set [text effects v] to []\n        instant Type [alpha:] [-109] [147] [100] [25]\n        Type [halt!       advance no      further!] [specified place] [5] [147] [0] [100]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        instant Type [alpha:] [-109] [147] [100] [25]\n        Type [are you     friend or foe?] [specified place] [5] [147] [0] [100]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        set [speaker v] to [mega]\n        set [text effects v] to []\n        instant Type [mega man:] [-109] [147] [0] [0]\n        Type [whicheveris your         preference.] [specified place] [50] [147] [0] [100]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        set [speaker v] to [alpha]\n        set [text effects v] to []\n        instant Type [alpha:] [-109] [147] [100] [25]\n        Type [very well...] [specified place] [5] [147] [0] [100]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        set [speaker v] to [alpha]\n        set [text effects v] to []\n        instant Type [alpha:] [-109] [147] [100] [25]\n        Type [y'know, you don't look like one of ] [specified place] [5] [147] [0] [100]\n        set [text effects v] to [wavy]\n        Type [us...] [specified place] (text_trail_x) (text_trail_y) [100] [25]\n        set [text effects v] to []\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        set [speaker v] to [mega]\n        set [text effects v] to []\n        instant Type [mega man:] [-109] [147] [0] [0]\n        Type [that's   because i'm not!] [specified place] [50] [147] [0] [100]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        set [speaker v] to [mega]\n        set [text effects v] to []\n        instant Type [mega man:] [-109] [147] [0] [0]\n        Type [i stand  against the     wretched] [specified place] [50] [147] [0] [100]\n        set [text effects v] to [wavy]\n        Type [ team     phantom!] [specified place] (text_trail_x) (text_trail_y) [100] [25]\n        set [text effects v] to []\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        set [speaker v] to [alpha]\n        instant Type [alpha:] [-109] [147] [100] [25]\n        set [text effects v] to [wavy]\n        Type [hehe...] [specified place] [5] [147] [0] [100]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        set [speaker v] to [alpha]\n        instant Type [alpha:] [-109] [147] [100] [25]\n        Type [so do i, kid.] [specified place] [5] [147] [0] [100]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        set [speaker v] to [alpha]\n        set [text effects v] to []\n        instant Type [alpha:] [-109] [147] [100] [25]\n        Type [ever since] [specified place] [5] [147] [0] [100]\n        set [text effects v] to [wavy]\n        Type [  dr phantom] [specified place] (text_trail_x) (text_trail_y) [100] [25]\n        set [text effects v] to []\n        Type [ turned me into this   beast..] [specified place] (text_trail_x) (text_trail_y) [0] [100]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        set [speaker v] to [alpha]\n        set [text effects v] to []\n        instant Type [alpha:] [-109] [147] [100] [25]\n        Type [i've        uncovered his   motives..] [specified place] [5] [147] [0] [100]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        set [speaker v] to [alpha]\n        instant Type [alpha:] [-109] [147] [100] [25]\n        set [text effects v] to [shaky]\n        Type [it made me  realize that he was wrong!] [specified place] [5] [147] [0] [100]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        set [speaker v] to [alpha]\n        instant Type [alpha:] [-109] [147] [100] [25]\n        Type [. . .] [specified place] [5] [147] [0] [100]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        set [speaker v] to [alpha]\n        instant Type [alpha:] [-109] [147] [100] [25]\n        Type [ya know, youand i aren't as different as i  thought.] [specified place] [5] [147] [0] [100]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        set [speaker v] to [alpha]\n        instant Type [alpha:] [-109] [147] [100] [25]\n        Type [with your   help, we can    undermine ] [specified place] [5] [147] [0] [100]\n        set [text effects v] to [wavy]\n        Type [team   phantom.] [specified place] (text_trail_x) (text_trail_y) [100] [25]\n        set [text effects v] to []\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        set [speaker v] to [alpha]\n        instant Type [alpha:] [-109] [147] [100] [25]\n        Type [but first...] [specified place] [5] [147] [0] [100]\n        Type [mega man...] [specified place] (text_trail_x) (text_trail_y) [0] [0]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        set [speaker v] to [alpha]\n        instant Type [alpha:] [-109] [147] [100] [25]\n        Type [i'd like to test your       strength.] [specified place] [5] [147] [0] [100]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        set [speaker v] to [alpha]\n        instant Type [alpha:] [-109] [147] [100] [25]\n        Type [whadd'ya    say? a duel...  just me and you?] [specified place] [5] [147] [0] [100]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        set [speaker v] to [mega]\n        set [text effects v] to []\n        instant Type [mega man:] [-109] [147] [0] [0]\n        Type [sure     thing! it's on!] [specified place] [50] [147] [0] [100]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [heard boss speech? v] to [1]\n        set [next v] to [1]\n        broadcast (get rid of textbox v)\n        wait (1) seconds\n        broadcast (bATTLE begin v)\n    end\nend\nif <(STAGE #) = [1]> then\n    if <(Checkpoint #) = [6]> then\n        if <(Heard Boss Speech?) = [1]> then\n            wait (4) seconds\n            broadcast (bATTLE begin v)\n        else\n            wait (4) seconds\n            set [speaker v] to [omega]\n            broadcast (textbox show v)\n            wait (.4) seconds\n            set [text effects v] to []\n            instant Type [omega:] [-109] [147] [100] [15]\n            Type [hehe... you must be megan   man!] [specified place] [5] [147] [0] [100]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [mega]\n            set [text effects v] to []\n            instant Type [mega man:] [-109] [147] [0] [0]\n            Type [it's     pronounced] [specified place] [50] [147] [0] [100]\n            Type [ mega  man!] [specified place] (text_trail_x) (text_trail_y) [0] [0]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            instant Type [mega man:] [-109] [147] [0] [0]\n            Type [and your name isn't even] [specified place] [50] [147] [0] [100]\n            Type [ omega!] [specified place] (text_trail_x) (text_trail_y) [100] [15]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            instant Type [mega man:] [-109] [147] [0] [0]\n            Type [it's] [specified place] [50] [147] [0] [100]\n            Type [     blast man!] [specified place] (text_trail_x) (text_trail_y) [40] [15]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [omega]\n            set [text effects v] to [shaky]\n            broadcast (Omega anger v)\n            instant Type [omega:] [-109] [147] [100] [15]\n            Type [hss...      that's not my   name!] [specified place] [5] [147] [0] [100]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [omega]\n            set [text effects v] to [shaky]\n            instant Type [omega:] [-109] [147] [100] [15]\n            Type [and in a fewseconds... you  won't be called] [specified place] [5] [147] [0] [100]\n            Type [ mega  man!] [specified place] (text_trail_x) (text_trail_y) [0] [0]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [omega]\n            set [text effects v] to [shaky]\n            instant Type [omega:] [-109] [147] [100] [15]\n            Type [you will    instead be      called...] [specified place] [5] [147] [0] [100]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [omega]\n            set [text effects v] to [shaky]\n            instant Type [omega:] [-109] [147] [100] [15]\n            Type [giant pile  of rubble on my clean floor,    that i have to  clean up!] [specified place] [5] [147] [0] [0]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [omega]\n            set [text effects v] to [wavy]\n            instant Type [omega:] [-109] [147] [100] [15]\n            Type [hehe, heh..] [specified place] [5] [147] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [omega]\n            set [text effects v] to []\n            instant Type [omega:] [-109] [147] [100] [15]\n            Type [yeah... i'vegot a pretty] [specified place] [5] [147] [0] [100]\n            set [text effects v] to [wavy]\n            Type [     short fuse.] [specified place] (text_trail_x) (text_trail_y) [0] [100]\n            set [text effects v] to []\n            Type [      hahaha!] [specified place] (text_trail_x) (text_trail_y) [0] [100]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [heard boss speech? v] to [1]\n            broadcast (get rid of textbox v)\n            wait (1) seconds\n            broadcast (bATTLE begin v)\n        end\n    else\n        broadcast (Bass Speech v)\n    end\nend\nif <(STAGE #) = [6]> then\n    wait (2) seconds\n    if <(Heard Boss Speech?) = [1]> then\n        broadcast (bATTLE begin v)\n    else\n        set [speaker v] to [psi]\n        broadcast (textbox show v)\n        wait (.4) seconds\n        set [text effects v] to []\n        instant Type [psi:] [-109] [147] [80] [15]\n        Type [you must be thefabled] [specified place] [-35] [147] [0] [100]\n        Type [ mega man.] [specified place] (text_trail_x) (text_trail_y) [0] [0]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        instant Type [psi:] [-109] [147] [80] [15]\n        Type [you've met the end of the line.] [specified place] [-35] [147] [0] [100]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        instant Type [psi:] [-109] [147] [80] [15]\n        Type [there is no    turning back,   nor going       forward.] [specified place] [-35] [147] [0] [100]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        instant Type [psi:] [-109] [147] [80] [15]\n        set [text effects v] to [wavy]\n        Type [just let me,   the reaper...] [specified place] [-35] [147] [0] [100]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        instant Type [psi:] [-109] [147] [80] [15]\n        set [text effects v] to [shaky]\n        Type [do my job!] [specified place] [-35] [147] [0] [100]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [heard boss speech? v] to [1]\n        set [next v] to [1]\n        broadcast (get rid of textbox v)\n        wait (1) seconds\n        broadcast (bATTLE begin v)\n    end\nend\nif <(STAGE #) = [2]> then\n    wait (4) seconds\n    set [checkpoint # v] to [3]\n    if <(Heard Boss Speech?) = [1]> then\n        wait (.2) seconds\n        broadcast (bATTLE begin v)\n    else\n        set [speaker v] to [beta]\n        broadcast (textbox show v)\n        wait (.4) seconds\n        set [text effects v] to []\n        instant Type [beta:] [-109] [147] [95] [15]\n        Type [pfft... it's  just a kid,don'tmake me laugh.] [specified place] [-20] [147] [0] [100]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        set [speaker v] to [mega]\n        set [text effects v] to []\n        instant Type [mega man:] [-109] [147] [0] [0]\n        Type [i'm no   more a kid than you are a       brainwashed     robot!] [specified place] [50] [147] [0] [100]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        set [speaker v] to [mega]\n        set [text effects v] to []\n        instant Type [mega man:] [-109] [147] [0] [0]\n        Type [c'mon!   remember your   old self?] [specified place] [50] [147] [0] [100]\n        set [text effects v] to [wavy]\n        Type [          tengu man?] [specified place] (text_trail_x) (text_trail_y) [80] [5]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        set [speaker v] to [beta]\n        set [text effects v] to []\n        instant Type [beta:] [-109] [147] [95] [15]\n        set [text effects v] to [shaky]\n        Type [tengu man?!] [specified place] [-20] [147] [80] [5]\n        set [text effects v] to []\n        Type [   what kind of    name for a robotis that?] [specified place] (text_trail_x) (text_trail_y) [0] [100]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        set [speaker v] to [beta]\n        set [text effects v] to []\n        instant Type [beta:] [-109] [147] [95] [15]\n        Type [look kid, i   don't have time to recollect    false memory...] [specified place] [-20] [147] [0] [100]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        set [speaker v] to [beta]\n        set [text effects v] to [shaky]\n        instant Type [beta:] [-109] [147] [95] [15]\n        Type [but i do have time to slice   and dice you!] [specified place] [-20] [147] [0] [100]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [next v] to [1]\n        wait (.2) seconds\n        set [speaker v] to [beta]\n        set [text effects v] to [shaky]\n        instant Type [beta:] [-109] [147] [95] [15]\n        Type [en garde!] [specified place] [-20] [147] [0] [100]\n        instant Type [press space] [101] [43] [0] [100]\n        wait until <<key (space v) pressed?> or <mouse down?>>\n        set [heard boss speech? v] to [1]\n        set [next v] to [1]\n        broadcast (get rid of textbox v)\n        wait (1) seconds\n        broadcast (bATTLE begin v)\n    end\nend\nif <<not <(STAGE #) = [1]>> and <not <(STAGE #) = [9]>>> then\n    set [heard boss speech? v] to [1]\nend\n\ndefine Write Delayed Text (x) (y) (dialogue)\nset [brightness v] effect to (100)\ngo to x: (x) y: (y)\nset [text effects v] to []\nset [letter number v] to [1]\nset [next v] to [0]\nset [test number v] to [0]\nset [transition v] to (pick random (1) to (2))\nrepeat (length of (dialogue))\n    switch costume to (letter (letter number) of (dialogue))\n    if <(y position) = [43]> then\n        if <(test number) = [0]> then\n            create clone of (_myself_ v)\n            change x by (10)\n        else\n            create clone of (_myself_ v)\n            change x by (10)\n        end\n        set [text_trail_x v] to (x position)\n        set [text_trail_y v] to (y position)\n        change [letter number v] by (1)\n    else\n        if <(test number) = [0]> then\n            if <not <(x position) = [175]>> then\n                create clone of (_myself_ v)\n                change x by (18)\n            else\n                set x to (-175)\n                change y by (-35)\n                create clone of (_myself_ v)\n                change x by (18)\n                set [test number v] to [1]\n            end\n        else\n            if <not <(x position) = [200]>> then\n                create clone of (_myself_ v)\n                change x by (18)\n            else\n                set x to (-175)\n                change y by (-35)\n                create clone of (_myself_ v)\n                change x by (18)\n            end\n        end\n        change [letter number v] by (1)\n        wait (.1) seconds\n    end\nend\n\nwhen I receive [robot master intro v]\nset [smol text v] to [0]\nwait (2) seconds\nset [text effects v] to []\nif <(STAGE #) = [2]> then\n    Write Delayed Text [-80] [-41] [agent beta]\nend\nif <(STAGE #) = [3]> then\n    Write Delayed Text [-80] [-41] [agent alpha]\nend\nif <(STAGE #) = [1]> then\n    Write Delayed Text [-80] [-41] [agent omega]\nend\nif <(STAGE #) = [4]> then\n    Write Delayed Text [-85] [-41] [agent delta]\nend\nif <(STAGE #) = [6]> then\n    Write Delayed Text [-70] [-41] [agent psi]\nend\nif <(STAGE #) = [7]> then\n    Write Delayed Text [-80] [-41] [agent proto]\nend\nif <(STAGE #) = [8]> then\n    Write Delayed Text [-95] [-41] [agent epsilon]\nend\nif <(STAGE #) = [9]> then\n    Write Delayed Text [-75] [-41] [agent bass]\nend\n\nwhen I receive [blackout v]\ndelete this clone\n\nwhen flag clicked\nset [smol text v] to [0]\nset size to (200) %\ninstant Type [start] [-20] [15] [0] [100]\ninstant Type [how to] [-30] [-40] [0] [100]\ninstant Type [play] [-13] [-60] [0] [100]\n\nwhen I receive [delete text v]\ndelete this clone\n\nwhen I receive [stage select v]\nwait (0) seconds\nbroadcast (Delete Text v)\nset [smol text v] to [1]\nset size to (200) %\ngo to [front v] layer\ninstant Type [agent] [-165] [63] [0] [100]\ngo to [front v] layer\ninstant Type [beta] [-155] [50] [0] [100]\ngo to [front v] layer\ninstant Type [agent] [-28] [63] [0] [100]\ngo to [front v] layer\ninstant Type [alpha] [-28] [50] [0] [100]\ngo to [front v] layer\ninstant Type [agent] [111] [63] [0] [100]\ngo to [front v] layer\ninstant Type [omega] [111] [50] [0] [100]\ngo to [front v] layer\ninstant Type [agent] [-165] [-49] [0] [100]\ngo to [front v] layer\ninstant Type [delta] [-165] [-62] [0] [100]\ngo to [front v] layer\ninstant Type [agent] [111] [-49] [0] [100]\ngo to [front v] layer\ninstant Type [psi] [139] [-62] [0] [100]\ngo to [front v] layer\ninstant Type [agent] [-165] [-160] [0] [100]\ngo to [front v] layer\ninstant Type [proto] [-165] [-172] [0] [100]\ngo to [front v] layer\ninstant Type [agent] [-26] [-160] [0] [100]\ngo to [front v] layer\ninstant Type [epsilon] [-40] [-172] [0] [100]\ngo to [front v] layer\ninstant Type [agent] [111] [-160] [0] [100]\ngo to [front v] layer\ninstant Type [bass] [111] [-172] [0] [100]\n\nwhen I receive [ready v]\nset [smol text v] to [0]\n\nwhen I receive [bass speech v]\nif <<(STAGE #) = [9]> and <(BossBattle Phase) = [1]>> then\n    wait (3) seconds\n    broadcast (Summon Treble v)\nelse\n    if <(Heard Bass' Speech?) = [1]> then\n        if <(Heard Boss Speech?) = [1]> then\n            wait (4) seconds\n            broadcast (bATTLE begin v)\n        else\n            wait (5) seconds\n            set [speaker v] to [phantombass]\n            broadcast (textbox show v)\n            wait (.4) seconds\n            set [text effects v] to []\n            instant Type [bass:] [-109] [147] [35] [15]\n            Type [so... have] [specified place] [-20] [147] [0] [100]\n            Type [ you] [specified place] (text_trail_x) (text_trail_y) [0] [0]\n            Type [finally decided to join our     team?] [specified place] (text_trail_x) (text_trail_y) [0] [100]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [mega]\n            set [text effects v] to []\n            instant Type [mega man:] [-109] [147] [0] [0]\n            set [text effects v] to [shaky]\n            Type [no!] [specified place] [50] [147] [0] [100]\n            set [text effects v] to []\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [mega]\n            set [text effects v] to []\n            instant Type [mega man:] [-109] [147] [0] [0]\n            Type [i'm here to make you snapout of your     twisted mindset!] [specified place] [50] [147] [0] [100]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [phantombass]\n            instant Type [bass:] [-109] [147] [35] [15]\n            set [text effects v] to [wavy]\n            Type [hah!] [specified place] [-20] [147] [0] [100]\n            set [text effects v] to []\n            Type [ and you  think my mind istwisted?] [specified place] (text_trail_x) (text_trail_y) [0] [100]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [phantombass]\n            instant Type [bass:] [-109] [147] [35] [15]\n            Type [eat your own  words,] [specified place] [-20] [147] [0] [100]\n            Type [ mega man!] [specified place] (text_trail_x) (text_trail_y) [0] [0]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [phantombass]\n            instant Type [bass:] [-109] [147] [35] [15]\n            Type [time to settlethis here and   now!] [specified place] [-20] [147] [0] [100]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [heard boss speech? v] to [1]\n            broadcast (get rid of textbox v)\n            wait (1) seconds\n            broadcast (bATTLE begin v)\n        end\n    else\n        if <(Heard Boss Speech?) = [1]> then\n            wait (4) seconds\n            broadcast (bATTLE begin v)\n        else\n            wait (5) seconds\n            set [speaker v] to [phantombass]\n            broadcast (textbox show v)\n            wait (.4) seconds\n            set [text effects v] to []\n            instant Type [bass:] [-109] [147] [35] [15]\n            Type [halt!         intruder!] [specified place] [-20] [147] [0] [100]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [mega]\n            set [text effects v] to []\n            instant Type [mega man:] [-109] [147] [0] [0]\n            Type [bass?    ] [specified place] [50] [147] [30] [15]\n            Type [what happened toyou?] [specified place] (text_trail_x) (text_trail_y) [0] [100]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [phantombass]\n            set [text effects v] to []\n            instant Type [bass:] [-109] [147] [35] [15]\n            Type [i serve my newmaster,] [specified place] [-20] [147] [0] [100]\n            Type [dr. phantom] [specified place] (text_trail_x) (text_trail_y) [105] [15]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [phantombass]\n            set [text effects v] to []\n            instant Type [bass:] [-109] [147] [35] [15]\n            Type [he has proven better than my  true creator,] [specified place] [-20] [147] [0] [100]\n            Type [dr. wily.] [specified place] (text_trail_x) (text_trail_y) [95] [15]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [mega]\n            set [text effects v] to []\n            instant Type [mega man:] [-109] [147] [0] [0]\n            set [text effects v] to [shaky]\n            Type [bass!] [specified place] [50] [147] [30] [15]\n            set [text effects v] to []\n            Type [    can't you       understand?...] [specified place] (text_trail_x) (text_trail_y) [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [mega]\n            set [text effects v] to []\n            instant Type [mega man:] [-109] [147] [0] [0]\n            Type [dr.      phantom] [specified place] [50] [147] [105] [15]\n            Type [is only    using you to    help] [specified place] (text_trail_x) (text_trail_y) [0] [100]\n            Type [ him] [specified place] (text_trail_x) (text_trail_y) [105] [15]\n            Type [ take over the world!] [specified place] (text_trail_x) (text_trail_y) [0] [100]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [phantombass]\n            set [text effects v] to []\n            instant Type [bass:] [-109] [147] [35] [15]\n            Type [then i shall  rule the world  with him!] [specified place] [-20] [147] [0] [100]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [phantombass]\n            set [text effects v] to [shaky]\n            instant Type [bass:] [-109] [147] [35] [15]\n            Type [and destroy myold master, ] [specified place] [-20] [147] [0] [100]\n            Type [     dr. wily!] [specified place] (text_trail_x) (text_trail_y) [95] [15]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [phantombass]\n            set [text effects v] to []\n            instant Type [bass:] [-109] [147] [35] [15]\n            Type [come on,] [specified place] [-20] [147] [0] [100]\n            Type [      mega man] [specified place] (text_trail_x) (text_trail_y) [0] [0]\n            Type [, join    us...] [specified place] (text_trail_x) (text_trail_y) [0] [100]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [phantombass]\n            set [text effects v] to []\n            instant Type [bass:] [-109] [147] [35] [15]\n            Type [with your     help, we can    usher in a new, perfect robot   society!] [specified place] [-20] [147] [0] [100]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [mega]\n            set [text effects v] to []\n            instant Type [mega man:] [-109] [147] [0] [0]\n            set [text effects v] to [shaky]\n            Type [never!] [specified place] [50] [147] [0] [100]\n            set [text effects v] to []\n            Type [   it's all an     elaborate schemethat you fell   for! ] [specified place] (text_trail_x) (text_trail_y) [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [speaker v] to [phantombass]\n            set [text effects v] to []\n            instant Type [bass:] [-109] [147] [35] [15]\n            Type [if words can'tconvince you to join, actions   will...] [specified place] [-20] [147] [0] [100]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            instant Type [bass:] [-109] [147] [35] [15]\n            Type [prepare       yourself,] [specified place] [-20] [147] [0] [100]\n            Type [mega man!] [specified place] (text_trail_x) (text_trail_y) [0] [0]\n            instant Type [press space] [101] [43] [0] [100]\n            wait until <<key (space v) pressed?> or <mouse down?>>\n            set [next v] to [1]\n            wait (.2) seconds\n            set [heard boss speech? v] to [1]\n            broadcast (get rid of textbox v)\n            wait (1) seconds\n            broadcast (bATTLE begin v)\n        end\n    end\n    set [heard bass' speech? v] to [1]\nend\n\nwhen flag clicked\nset [heard bass' speech? v] to [0]\n\nwhen I receive [haha u lose v]\nwait (1) seconds\ninstant Type [game over] [-75] [0] [0] [100]\n\nwhen I receive [display amount of lives v]\ninstant Type (LIVES) [-154] [-145] [0] [0]\nwait (1) seconds\nbroadcast (Delete Text v)\n\nwhen I receive [weapon get screen v]\nwait (4) seconds\nset [speaker v] to [e]\nbroadcast (Delete Text v)\nWrite Delayed Text [-55] [-22] [you get]\nif <(STAGE #) = [9]> then\n    replace item (8) of [robot masters defeated v] with [1]\n    replace item (9) of [robot master weapons v] with [1]\n    Write Delayed Text [-90] [-39] [fusion wings]\nend\nif <(STAGE #) = [8]> then\n    replace item (7) of [robot masters defeated v] with [1]\n    replace item (8) of [robot master weapons v] with [1]\n    Write Delayed Text [-115] [-39] [epsilon burner]\nend\nif <(STAGE #) = [7]> then\n    replace item (6) of [robot masters defeated v] with [1]\n    replace item (7) of [robot master weapons v] with [1]\n    Write Delayed Text [-90] [-39] [proto flash]\nend\nif <(STAGE #) = [6]> then\n    replace item (5) of [robot masters defeated v] with [1]\n    replace item (6) of [robot master weapons v] with [1]\n    Write Delayed Text [-90] [-39] [psi sickle]\nend\nif <(STAGE #) = [4]> then\n    replace item (4) of [robot masters defeated v] with [1]\n    replace item (5) of [robot master weapons v] with [1]\n    Write Delayed Text [-100] [-39] [delta orbiter]\nend\nif <(STAGE #) = [1]> then\n    replace item (1) of [robot masters defeated v] with [1]\n    replace item (2) of [robot master weapons v] with [1]\n    Write Delayed Text [-100] [-39] [omega chaser]\nend\nif <(STAGE #) = [2]> then\n    replace item (2) of [robot masters defeated v] with [1]\n    replace item (3) of [robot master weapons v] with [1]\n    Write Delayed Text [-80] [-39] [beta blade]\nend\nif <(STAGE #) = [3]> then\n    replace item (3) of [robot masters defeated v] with [1]\n    replace item (4) of [robot master weapons v] with [1]\n    Write Delayed Text [-120] [-39] [alpha boomerang]\nend\nbroadcast (happy megaman v)\n\nwhen flag clicked\nset [doc encounter? v] to [0]\n\n@Robot Master Intro\n\nwhen I receive [robot master intro v]\nstart sound [1-11 - Stage Start v]\nclear graphic effects\ngo to x: (0) y: (0)\nswitch costume to (costume2 v)\nset size to (100) %\nset [heard boss speech? v] to [0]\nrepeat (4)\n    go to [front v] layer\n    show\nend\nrepeat (7)\n    next costume\nend\nwait (7) seconds\nset [show stage select stars? v] to [0]\nbroadcast (SetUp v)\nbroadcast (READY v)\nwait (.5) seconds\nbroadcast (Teleportin v)\n\nwhen flag clicked\nhide\n\nwhen I receive [blackout v]\nrepeat (10)\n    change [brightness v] effect by (-10)\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I start as a clone\nstart sound [mirror_warning v]\ngo to x: (0) y: (PROJ Y)\nset [ghost v] effect to (5)\nswitch costume to (warning4 v)\nset size to (100) %\ngo to [front v] layer\nshow\nrepeat (3)\n    switch costume to ((costume [number v]) + (-1))\nend\nrepeat (2)\n    wait (.08) seconds\n    start sound [mirror_warning v]\nend\nwait (.4) seconds\nrepeat (3)\n    next costume\nend\ndelete this clone\n\nwhen I receive [robot master intro v]\nrepeat (65)\n    wait (.05) seconds\n    create clone of (message v)\nend\n\nwhen I receive [setup v]\nbroadcast (Delete Text v)\nhide\ndelete this clone\n\nwhen I receive [weapon get screen v]\nrepeat (65)\n    wait (.05) seconds\n    create clone of (message v)\nend\n\nwhen I receive [weapon get screen v]\nwait (1.2) seconds\nclear graphic effects\ngo to x: (0) y: (0)\nswitch costume to (costume2 v)\nset size to (100) %\nset [heard boss speech? v] to [0]\nrepeat (4)\n    go to [front v] layer\n    show\nend\nrepeat (7)\n    next costume\nend\n\nwhen I receive [stage select v]\nhide\n\nwhen I receive [bosscutscene v]\nif <<(STAGE #) = [8]> and <(Checkpoint #) = [5]>> then\n    go to x: (35) y: (-100)\n    switch costume to (phantombass v)\n    go to [front v] layer\n    clear graphic effects\n    set size to (225) %\n    show\nend\n\nwhen I receive [bass get out of epsilon stage v]\nset y to (0)\nstart sound [thunder_01 v]\nswitch costume to (bolt v)\nset size to (300) %\nshow\nclear graphic effects\nrepeat (4)\n    change [brightness v] effect by (25)\nend\nbroadcast (Screen Blink v)\nwait (.4) seconds\nhide\nclear graphic effects\nbroadcast (ScreenShake v)\n\n@switchblock thing\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nif <(STAGE #) = [6]> then\n    switch costume to (pick random (2) to (4))\n    set [level_x v] to ((Scroll X) + (200))\n    if <(Scroll Y) > [0]> then\n        set [level_y v] to ((Scroll Y) + (pick random (-200) to (250)))\n    else\n        set [level_y v] to ((Scroll Y) + (pick random (0) to (200)))\n    end\n    repeat (10)\n        Star_Move\n    end\n    repeat until <<([abs v] of ((Level_X) - (Scroll X)) ) > [250]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [450]>>\n        Star_Move\n    end\n    delete this clone\nelse\n    switch costume to (costume1 v)\n    set [level_x v] to (sb_X)\n    set [level_y v] to (sb_y)\n    forever\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)) ) > [450]>> then\n            hide\n        else\n            show\n        end\n    end\nend\n\nwhen I start as a clone\nif <not <(STAGE #) = [6]>> then\n    repeat (20)\n        change [brightness v] effect by (5)\n        change [ghost v] effect by (5)\n    end\n    delete this clone\nend\n\ndefine Star_Move\nset x to ((Level_X) - (Scroll X))\nset y to ((Level_Y) - (Scroll Y))\nif <<([abs v] of ((Level_X) - (Scroll X)) ) > [250]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [450]>> then\n    hide\nelse\n    show\nend\nif <(costume [number v]) = [2]> then\n    change [level_x v] by (-15)\nend\nif <(costume [number v]) = [3]> then\n    change [level_x v] by (-5)\nend\nif <(costume [number v]) = [4]> then\n    change [level_x v] by (-4)\nend\n\n@Dmg\n\nwhen I start as a clone\nset [level_x v] to (dmg_x)\nset [level_y v] to (dmg_y)\ngo to [front v] layer\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)) ) > [450]>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I start as a clone\nset [dir v] to (pick random (-180) to (180))\npoint in direction (90)\nswitch costume to (dmg #)\nset [y v] to [0]\nset [x v] to (pick random (5.5) to (8))\nrepeat (12)\n    change [level_x v] by (([sin v] of (dir) ) * (y))\n    change [level_y v] by ((([cos v] of (dir) ) * (y)) + (x))\n    change [y v] by (.5)\n    change [x v] by (-.5)\nend\nrepeat (12)\n    change [level_x v] by (([sin v] of (dir) ) * (y))\n    change [level_y v] by ((([cos v] of (dir) ) * (y)) + (x))\n    change [y v] by (-.5)\n    change [x v] by (-.5)\nend\nswitch costume to (costume1 v)\nrepeat (4)\n    wait (.02) seconds\n    next costume\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\n@weapon get\n\nwhen flag clicked\nhide\n\nwhen I receive [weapon get v]\ngo to (mega man v)\nrepeat (3)\n    weapon get\n    wait (.5) seconds\nend\n\ndefine weapon get\nif <(clone) = [0]> then\n    start sound [SE \[32\] v]\n    set size to (250) %\n    switch costume to (death v)\n    point in direction (0)\n    create clone of (_myself_ v)\n    turn right (45) degrees\n    create clone of (_myself_ v)\n    turn right (45) degrees\n    create clone of (_myself_ v)\n    turn right (45) degrees\n    create clone of (_myself_ v)\n    turn right (45) degrees\n    create clone of (_myself_ v)\n    turn right (45) degrees\n    create clone of (_myself_ v)\n    turn right (45) degrees\n    create clone of (_myself_ v)\n    turn right (45) degrees\n    create clone of (_myself_ v)\n    turn right (45) degrees\n    point in direction (90)\nend\n\nwhen I start as a clone\nset [clone v] to [1]\n\nwhen I start as a clone\nshow\nforever\n    wait (.01) seconds\n    go to [front v] layer\n    next costume\nend\n\nwhen I start as a clone\nmove (-100) steps\nrepeat until <touching (mega man v)?>\n    move (10) steps\n    point towards (mega man v)\nend\nrepeat (1)\n    move (10) steps\nend\ndelete this clone\n\n@Foreground\n\nwhen I receive [teleportin v]\nhide\nclear graphic effects\ngo to x: (0) y: (0)\nset [level_x v] to [0]\nif <[1] = [1]> then\n    delete this clone\nend\nCreate\n\ndefine Create\nset [projectile name v] to [0]\npoint in direction (90)\nif <(STAGE #) = [6]> then\n    wait (.05) seconds\n    if <(Checkpoint #) > [3]> then\n        thing\n    else\n        switch costume to (magnetplat v)\n        set [level_y v] to [0]\n        set [level_x v] to [1400]\n        create clone of (_myself_ v)\n        switch costume to (magnetplat v)\n        set [level_y v] to [0]\n        set [level_x v] to [2300]\n        create clone of (_myself_ v)\n        switch costume to (grab3 v)\n        set [level_y v] to [0]\n        set [level_x v] to [640]\n        create clone of (_myself_ v)\n        switch costume to (grab v)\n        create clone of (_myself_ v)\n        switch costume to (grab3 v)\n        set [level_y v] to [0]\n        set [level_x v] to [3300]\n        create clone of (_myself_ v)\n        switch costume to (grab v)\n        create clone of (_myself_ v)\n        switch costume to (upg2 v)\n        create clone of (_myself_ v)\n    end\nend\nif <(STAGE #) = [4]> then\n    wait (.05) seconds\n    point in direction (90)\n    switch costume to (costume5 v)\n    set [level_y v] to [-1816]\n    set [level_x v] to [3]\n    create clone of (_myself_ v)\n    wait (1) seconds\n    set size to (200) %\n    switch costume to (#f v)\n    set [level_y v] to [700]\n    set [level_x v] to [507]\n    create clone of (_myself_ v)\n    set size to (200) %\n    switch costume to (creditcard v)\n    create clone of (_myself_ v)\n    switch costume to (#f3 v)\n    create clone of (_myself_ v)\n    switch costume to (#f44 v)\n    create clone of (_myself_ v)\n    switch costume to (#f6 v)\n    create clone of (_myself_ v)\n    switch costume to (#f9 v)\n    create clone of (_myself_ v)\n    point in direction (90)\n    switch costume to (forcesideways v)\n    set [level_y v] to [-1225]\n    set [level_x v] to [3265]\n    create clone of (_myself_ v)\n    point in direction (-90)\n    switch costume to (forcesideways v)\n    set [level_y v] to [-1380]\n    set [level_x v] to [2845]\n    create clone of (_myself_ v)\n    point in direction (-90)\n    switch costume to (forcesideways v)\n    set [level_y v] to [-1640]\n    set [level_x v] to [2845]\n    create clone of (_myself_ v)\n    point in direction (-90)\n    switch costume to (forcesideways v)\n    set [level_y v] to [-1704]\n    set [level_x v] to [2845]\n    create clone of (_myself_ v)\n    point in direction (90)\n    switch costume to (forcesideways v)\n    set [level_y v] to [-1828]\n    set [level_x v] to [3265]\n    create clone of (_myself_ v)\n    point in direction (90)\n    switch costume to (forcesideways v)\n    set [level_y v] to [-2250]\n    set [level_x v] to [3265]\n    create clone of (_myself_ v)\n    point in direction (-90)\n    switch costume to (forcesideways v)\n    set [level_y v] to [-2025]\n    set [level_x v] to [2845]\n    create clone of (_myself_ v)\n    point in direction (-90)\n    switch costume to (forcesideways v)\n    set [level_y v] to [-2550]\n    set [level_x v] to [2845]\n    create clone of (_myself_ v)\n    point in direction (90)\n    switch costume to (forcesideways v)\n    set [level_y v] to [-2670]\n    set [level_x v] to [3265]\n    create clone of (_myself_ v)\n    switch costume to (#f11 v)\n    create clone of (_myself_ v)\n    switch costume to (#f13 v)\n    create clone of (_myself_ v)\n    switch costume to (#f13 v)\n    create clone of (_myself_ v)\n    switch costume to (#f18 v)\n    create clone of (_myself_ v)\n    switch costume to (#f22 v)\n    create clone of (_myself_ v)\n    wait (1) seconds\n    set size to (200) %\n    switch costume to (1up v)\n    set [level_y v] to [56]\n    set [level_x v] to [1650]\n    create clone of (_myself_ v)\n    switch costume to (#f13 v)\n    create clone of (_myself_ v)\nend\nif <(STAGE #) = [1]> then\n    wait (1) seconds\n    set size to (400) %\n    switch costume to (omega v)\n    set [level_y v] to [700]\n    set [level_x v] to [507]\n    create clone of (_myself_ v)\n    set size to (200) %\n    if <(Checkpoint #) < [3]> then\n        switch costume to (costume1 v)\n        set [level_y v] to [768]\n        set [level_x v] to [2880]\n        create clone of (_myself_ v)\n    end\nend\nif <<(STAGE #) = [8]> and <(Checkpoint #) < [2]>> then\n    switch costume to (1up v)\n    set [level_y v] to [-138]\n    set [level_x v] to [1950]\n    create clone of (_myself_ v)\n    switch costume to (divewater v)\n    set [level_y v] to [-250]\n    set [level_x v] to [4370]\n    create clone of (_myself_ v)\n    set size to (200) %\n    repeat (4)\n        change [level_x v] by (64)\n        create clone of (_myself_ v)\n    end\n    change [level_x v] by (32)\n    create clone of (_myself_ v)\n    switch costume to (upg3 v)\n    create clone of (_myself_ v)\nend\nif <(STAGE #) = [3]> then\n    wait (1) seconds\n    set size to (200) %\n    switch costume to (1up v)\n    set [level_y v] to [430]\n    set [level_x v] to [2650]\n    create clone of (_myself_ v)\n    switch costume to (board1 v)\n    set [level_y v] to [312]\n    set [level_x v] to [3150]\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nif <(PROJECTILE NAME) = [dirt]> then\n    set [level_x v] to (PROJ X)\n    set [level_y v] to (PROJ Y)\nend\nset [clone v] to [1]\ngo to [front v] layer\nforever\n    set x to ((Level_X) - (Scroll X))\n    set y to ((YPos Offset) + ((Level_Y) - (Scroll Y)))\n    if <<([abs v] of ((Level_X) - (Scroll X)) ) > [250]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [250]>> then\n        hide\n    else\n        show\n    end\nend\n\nbroadcast (blink v)\n\nwhen flag clicked\npoint in direction (90)\nset [megaman_holding_orb? v] to [0]\nhide\n\nwhen I receive [blink v]\nif <(username) = [legobuzz12]> then\n    delete this clone\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [8]> then\n    set [brightness v] effect to (15)\n    forever\n        switch costume to ((8) + ((round ((timer) * (8))) mod (2)))\n    end\nend\nif <(PROJECTILE NAME) = [dirt]> then\n    switch costume to (shrapnel v)\n    start sound [dirtblock_break v]\n    point in direction (pick random (-90) to (90))\n    go to [front v] layer\n    show\n    set [y v] to [0]\n    set [zx v] to (pick random (1) to (3.5))\n    repeat (40)\n        change [level_x v] by (([sin v] of (direction) ) * (y))\n        change [level_y v] by (zx)\n        change [y v] by (.4)\n        change [zx v] by (-1)\n    end\n    delete this clone\nelse\n    if <(costume [number v]) = [1]> then\n        if <(Checkpoint #) < [3]> then\n            forever\n                if <touching (hitbox v)?> then\n                    if <(Megaman_Holding_Orb?) = [0]> then\n                        if <<([abs v] of ((Level_X) - (Scroll X)) ) > [250]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [250]>> then\n                    end\n                    if <(Megaman_Holding_Orb?) = [1]> then\n                        if <<([abs v] of ((Level_X) - (Scroll X)) ) > [250]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [250]>> then\n                    end\n                end\n            end\n        else\n            switch costume to (omega2 v)\n        end\n    end\n    if <(costume [number v]) = [2]> then\n        wait (1) seconds\n        forever\n            if <<([abs v] of ((Level_X) - (Scroll X)) ) > [250]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [250]>> then\n        end\n    end\nend\n\nwhen I receive [ready v]\nset [megaman_holding_orb? v] to [0]\n\nwhen I start as a clone\nif <(letter (1) of (costume [name v])) = [#]> then\n    set [frcb_act v] to [1]\n    set [og cst# v] to (costume [number v])\n    if <(costume [number v]) = [47]> then\n        forever\n            set [level_y v] to [-680]\n            set [level_x v] to [480]\n            set [frcb_act v] to [1]\n            repeat (30)\n                change [level_x v] by (-5)\n            end\n            set [frcb_act v] to [0]\n            repeat (11)\n                change [level_x v] by (15)\n            end\n        end\n    end\n    if <(costume [number v]) = [43]> then\n        forever\n            set [level_y v] to [-680]\n            set [level_x v] to [1075]\n            set [frcb_act v] to [1]\n            repeat (15)\n                change [level_x v] by (-5)\n            end\n            set [og cst# v] to [45]\n            repeat (11)\n                change [level_x v] by (-5)\n            end\n            set [og cst# v] to [47]\n            repeat (34)\n                change [level_x v] by (-5)\n            end\n            repeat (30)\n                change [level_x v] by (5)\n            end\n            set [og cst# v] to [45]\n            repeat (13)\n                change [level_x v] by (5)\n            end\n            set [og cst# v] to [43]\n            repeat (15)\n                change [level_x v] by (5)\n            end\n        end\n    end\n    if <(costume [number v]) = [40]> then\n        wait (1) seconds\n        set [frcb_act v] to [0]\n        wait (1) seconds\n        set [level_y v] to [-2890]\n        set [level_x v] to [4920]\n        set [bossbattle phase v] to [0]\n        wait until <(BossBattle Phase) = [2]>\n        forever\n            set [level_y v] to [-2890]\n            set [level_x v] to [4920]\n            set [frcb_act v] to [1]\n            repeat (15)\n                change [level_x v] by (5)\n            end\n            set [frcb_act v] to [0]\n            repeat (35)\n                change [level_x v] by (5)\n            end\n            set [frcb_act v] to [1]\n            repeat (25)\n                change [level_x v] by (5)\n            end\n            set [frcb_act v] to [0]\n            repeat (40)\n                change [level_x v] by (-5)\n            end\n            set [frcb_act v] to [1]\n            repeat (30)\n                change [level_x v] by (-5)\n            end\n        end\n    end\n    if <(costume [number v]) = [36]> then\n        forever\n            set [level_y v] to [-2890]\n            set [level_x v] to [3435]\n            set [frcb_act v] to [1]\n            repeat (24)\n                change [level_x v] by (5)\n            end\n            set [og cst# v] to [18]\n            repeat (15)\n                change [level_x v] by (5)\n            end\n            set [og cst# v] to [38]\n            repeat (53)\n                change [level_x v] by (5)\n            end\n            set [og cst# v] to [18]\n            repeat (15)\n                change [level_x v] by (5)\n            end\n            set [og cst# v] to [38]\n            repeat (40)\n                change [level_x v] by (5)\n            end\n            set [frcb_act v] to [0]\n            repeat (5)\n                change [level_x v] by (-10)\n            end\n            set [og cst# v] to [36]\n            repeat (27)\n                change [level_x v] by (-25)\n            end\n        end\n    end\n    if <(costume [number v]) = [34]> then\n        forever\n            set [level_y v] to [-695]\n            set [level_x v] to [2335]\n            set [frcb_act v] to [1]\n            repeat (21)\n                change [level_x v] by (5)\n            end\n            set [frcb_act v] to [0]\n            repeat (10)\n                change [level_x v] by (-10)\n            end\n        end\n    end\n    if <(costume [number v]) = [27]> then\n        forever\n            set [level_y v] to [-695]\n            set [level_x v] to [1912]\n            repeat (23)\n                change [level_x v] by (5)\n            end\n            set [frcb_act v] to [0]\n            repeat (10)\n                change [level_x v] by (-10)\n            end\n            set [frcb_act v] to [1]\n        end\n    end\n    if <(costume [number v]) = [24]> then\n        forever\n            set [level_y v] to [-430]\n            set [level_x v] to [1770]\n            set [frcb_act v] to [0]\n            wait (2) seconds\n            set [frcb_act v] to [1]\n            wait (1) seconds\n        end\n    end\n    if <(costume [number v]) = [16]> then\n        forever\n            set [level_y v] to [150]\n            set [level_x v] to [490]\n            repeat (27)\n                change [level_x v] by (5)\n            end\n            set [frcb_act v] to [0]\n            repeat (10)\n                change [level_x v] by (-10)\n            end\n            set [frcb_act v] to [1]\n        end\n    end\n    if <(costume [number v]) = [20]> then\n        forever\n            set [level_y v] to [150]\n            set [level_x v] to [1030]\n            repeat (4)\n                change [level_x v] by (5)\n            end\n            set [og cst# v] to [22]\n            repeat (38)\n                change [level_x v] by (5)\n            end\n            set [og cst# v] to [20]\n            repeat (11)\n                change [level_x v] by (5)\n            end\n            set [frcb_act v] to [0]\n            repeat (5)\n                change [level_x v] by (-5)\n            end\n            set [og cst# v] to [20]\n            repeat (24)\n                change [level_x v] by (-10)\n            end\n            set [frcb_act v] to [1]\n        end\n    end\n    if <(costume [number v]) = [18]> then\n        forever\n            set [og cst# v] to [16]\n            set [level_y v] to [150]\n            set [level_x v] to [700]\n            repeat (27)\n                change [level_x v] by (5)\n            end\n            set [og cst# v] to [18]\n            repeat (7)\n                change [level_x v] by (5)\n            end\n            set [frcb_act v] to [0]\n            repeat (5)\n                change [level_x v] by (-5)\n            end\n            set [og cst# v] to [16]\n            repeat (26)\n                change [level_x v] by (-5)\n            end\n            set [frcb_act v] to [1]\n        end\n    end\nend\nif <(costume [number v]) = [12]> then\n    wait until <touching (hitbox v)?>\n    broadcast (Megaman get on snowboard v)\n    broadcast (Autoscroller v)\n    delete this clone\nend\nif <(costume [number v]) = [2]> then\n    forever\n        switch costume to (costume1 v)\n        repeat (3)\n            wait (.05) seconds\n            next costume\n        end\n        wait (.05) seconds\n    end\nend\nif <(costume [number v]) = [10]> then\n    repeat until <touching (hitbox v)?>\n        if <(PHANTOM ARMOR?) = [1]> then\n            switch costume to (1up2 v)\n        else\n            switch costume to (1up v)\n        end\n    end\n    if <(LIVES) < [8]> then\n        change [lives v] by (1)\n    end\n    start sound [25 - 1up v]\n    delete this clone\nend\n\nwhen I receive [die v]\nset [megaman_holding_orb? v] to [0]\n\nwhen [q v] key pressed\nif <(username) = [legobuzz12]> then\n    set [scroll x v] to (Scroll X Max)\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [57]> then\n    forever\n        switch costume to (grabvertical v)\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n    end\nend\nif <(costume [number v]) = [59]> then\n    forever\n        switch costume to (grabv1 v)\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n    end\nend\nif <(costume [number v]) = [55]> then\n    forever\n        switch costume to (grab3 v)\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n    end\nend\nif <(costume [number v]) = [53]> then\n    forever\n        switch costume to (grab v)\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n    end\nend\nif <(costume [number v]) = [51]> then\n    forever\n        switch costume to (magnetplat v)\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n    end\nend\nif <(costume [number v]) = [61]> then\n    forever\n        set [level_x v] to [1780]\n        set [level_y v] to [150]\n        wait (.5) seconds\n        set [y v] to [0]\n        repeat until <touching (hitbox v)?>\n            set [level_x v] to [1780]\n            set [level_y v] to ((([sin v] of (y) ) * (2)) + (150))\n            change [y v] by (15)\n        end\n        start sound [weapon_get v]\n        set [x v] to [0]\n        repeat (10)\n            change [brightness v] effect by (10)\n            change [ghost v] effect by (10)\n            change [level_y v] by (x)\n            change [x v] by (1)\n        end\n        replace item (3) of [phantom armor components v] with [1]\n        delete this clone\n    end\nend\nif <(costume [number v]) = [50]> then\n    forever\n        set [level_x v] to [1180]\n        set [level_y v] to [-90]\n        wait (.5) seconds\n        set [y v] to [0]\n        repeat until <touching (hitbox v)?>\n            set [level_x v] to [1180]\n            set [level_y v] to ((([sin v] of (y) ) * (2)) + (-90))\n            change [y v] by (15)\n        end\n        start sound [weapon_get v]\n        set [x v] to [0]\n        repeat (10)\n            change [brightness v] effect by (10)\n            change [ghost v] effect by (10)\n            change [level_y v] by (x)\n            change [x v] by (1)\n        end\n        replace item (2) of [phantom armor components v] with [1]\n        delete this clone\n    end\nend\nif <(costume [number v]) = [49]> then\n    forever\n        set [level_x v] to [-600]\n        set [level_y v] to [121]\n        wait (.5) seconds\n        set [y v] to [0]\n        repeat until <touching (hitbox v)?>\n            set [level_x v] to [-600]\n            set [level_y v] to ((([sin v] of (y) ) * (2)) + (130))\n            change [y v] by (15)\n        end\n        start sound [weapon_get v]\n        set [x v] to [0]\n        repeat (10)\n            change [brightness v] effect by (10)\n            change [ghost v] effect by (10)\n            change [level_y v] by (x)\n            change [x v] by (1)\n        end\n        set [has credit card? v] to [1]\n        delete this clone\n    end\nend\nif <(costume [number v]) = [29]> then\n    wait (.1) seconds\n    switch costume to (forcesideways v)\n    wait until <not <<([abs v] of ((Level_X) - (Scroll X)) ) > [250]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [200]>>>\n    wait ((([abs v] of ((y position) + (-250)) ) / (205)) + (.2)) seconds\n    start sound [moleknight_lavabeam v]\n    wait (.1) seconds\n    switch costume to (forcesideways v)\n    repeat (3)\n        wait (.02) seconds\n        next costume\n    end\n    forever\n        switch costume to (forcesideways3 v)\n        wait (.02) seconds\n        next costume\n        wait (.02) seconds\n    end\nend\nif <(letter (1) of (costume [name v])) = [#]> then\n    forever\n        if <(FRCB_ACT) = [0]> then\n            if <(Og Cst#) = [24]> then\n                switch costume to (#f8 v)\n            else\n                switch costume to (forcebeam v)\n            end\n        else\n            if <not <<([abs v] of ((Level_X) - (Scroll X)) ) > [250]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [200]>>> then\n                start sound [mole_firecolumn v]\n            end\n            repeat (2)\n                wait (0) seconds\n                if <(Og Cst#) = [24]> then\n                    switch costume to (#f8 v)\n                else\n                    switch costume to (forcebeam v)\n                end\n                wait (<(FRCB_ACT) = [1]> * (.05)) seconds\n                if <(FRCB_ACT) = [0]> then\n                    if <(Og Cst#) = [24]> then\n                        switch costume to (#f8 v)\n                    else\n                        switch costume to (forcebeam v)\n                    end\n                else\n                    switch costume to ((Og Cst#) + (1))\n                end\n                wait (0) seconds\n                if <(FRCB_ACT) = [0]> then\n                    if <(Og Cst#) = [24]> then\n                        switch costume to (#f8 v)\n                    else\n                        switch costume to (forcebeam v)\n                    end\n                else\n                    switch costume to (Og Cst#)\n                end\n                wait (<(FRCB_ACT) = [1]> * (.05)) seconds\n                if <(FRCB_ACT) = [0]> then\n                    if <(Og Cst#) = [24]> then\n                        switch costume to (#f8 v)\n                    else\n                        switch costume to (forcebeam v)\n                    end\n                else\n                    switch costume to ((Og Cst#) + (1))\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [29]> then\n    forever\n        if <<(costume [number v]) > [29]> and <(costume [number v]) < [34]>> then\n            if <<touching (hitbox v)?> and <<([canmove? v] of [hitbox v]) = [1]> and <<<(getting ouched ?) = [0]> and <(takingdmg) = [0]>> and <(INVINCIBILITY) = [0]>>>> then\n                change [health v] by (4)\n                broadcast (TAKE DMG v)\n                broadcast (KNOCKBACK v)\n                set [frcb_act v] to [0]\n                wait (5) seconds\n            end\n        end\n    end\nend\nif <(letter (1) of (costume [name v])) = [#]> then\n    forever\n        if <<touching (hitbox v)?> and <<([canmove? v] of [hitbox v]) = [1]> and <<<(getting ouched ?) = [0]> and <(takingdmg) = [0]>> and <(INVINCIBILITY) = [0]>>>> then\n            change [health v] by (2)\n            broadcast (TAKE DMG v)\n            broadcast (KNOCKBACK v)\n            set [frcb_act v] to [0]\n            wait (3) seconds\n        end\n    end\nend\n\nbroadcast (blink v)\n\nwhen I receive [bossdie v]\ndelete this clone\n\nwhen I start as a clone\nif <(costume [number v]) = [53]> then\n    change [level_y v] by (70)\n    forever\n        repeat (25)\n            change [level_y v] by (-5)\n        end\n        repeat (25)\n            change [level_y v] by (5)\n        end\n    end\nend\nif <(costume [number v]) = [59]> then\n    change [level_y v] by (5)\n    change [level_x v] by (62)\n    forever\n        repeat (25)\n            change [level_x v] by (-5)\n        end\n        repeat (25)\n            change [level_x v] by (5)\n        end\n    end\nend\n\nwhen I start as a clone\nif <<(costume [number v]) = [53]> or <(costume [number v]) = [59]>> then\n    forever\n        wait until <<(getting ouched ?) = [0]> and <<touching (hitbox v)?> and <not <<([abs v] of ((Level_X) - (Scroll X)) ) > [250]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [200]>>>>>\n        replace item (1) of [globalxy v] with (Level_X)\n        replace item (2) of [globalxy v] with (Level_Y)\n        set [@htbx_global xy? v] to [1]\n        start sound [spectre_scythe_catch2 v]\n        repeat until <<not <<key (up arrow v) pressed?> or <key (w v) pressed?>>> or <(getting ouched ?) = [1]>>\n            replace item (1) of [globalxy v] with (Level_X)\n            replace item (2) of [globalxy v] with (Level_Y)\n        end\n        repeat until <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <(getting ouched ?) = [1]>>\n            replace item (1) of [globalxy v] with (Level_X)\n            replace item (2) of [globalxy v] with (Level_Y)\n        end\n        start sound [weighted_platform_jumpoff v]\n        broadcast (JUMP BOOST v)\n        set [@htbx_global xy? v] to [0]\n        wait (1) seconds\n    end\nend\n\nwhen flag clicked\nset [@htbx_global xy? v] to [0]\ndelete all of [globalxy v]\nadd [0] to [globalxy v]\nadd [0] to [globalxy v]\n\nwhen I receive [die v]\nset [@htbx_global xy? v] to [0]\n\nwhen I receive [take dmg v]\nset [@htbx_global xy? v] to [0]\n\nwhen I receive [transition right v]\nif <(STAGE #) = [6]> then\n    delete this clone\nend\nif <(STAGE #) = [6]> then\n    wait (.05) seconds\n    wait until <(Transition) = [0]>\n    if <(Scroll X) = [4090]> then\n        switch costume to (grab3 v)\n        set [level_y v] to [0]\n        set [level_x v] to [4150]\n        create clone of (_myself_ v)\n        switch costume to (grab v)\n        create clone of (_myself_ v)\n    end\n    if <(Scroll X) = [4590]> then\n        switch costume to (grab3 v)\n        set [level_y v] to [75]\n        set [level_x v] to [4500]\n        create clone of (_myself_ v)\n        switch costume to (grab v)\n        create clone of (_myself_ v)\n        switch costume to (grab3 v)\n        set [level_y v] to [350]\n        set [level_x v] to [4690]\n        create clone of (_myself_ v)\n        switch costume to (grab v)\n        create clone of (_myself_ v)\n        switch costume to (magnetplat v)\n        set [level_y v] to [500]\n        set [level_x v] to [4574]\n        create clone of (_myself_ v)\n        switch costume to (grab3 v)\n        set [level_y v] to [800]\n        set [level_x v] to [4475]\n        create clone of (_myself_ v)\n        switch costume to (grab v)\n        create clone of (_myself_ v)\n        switch costume to (grab3 v)\n        set [level_y v] to [800]\n        set [level_x v] to [4685]\n        create clone of (_myself_ v)\n        switch costume to (grab v)\n        create clone of (_myself_ v)\n        switch costume to (magnetplat v)\n        set [level_y v] to [950]\n        set [level_x v] to [4574]\n        create clone of (_myself_ v)\n        switch costume to (grabvertical v)\n        set [level_y v] to [1200]\n        set [level_x v] to [4575]\n        create clone of (_myself_ v)\n        switch costume to (grabv1 v)\n        create clone of (_myself_ v)\n        switch costume to (grabvertical v)\n        set [level_y v] to [1500]\n        set [level_x v] to [4450]\n        create clone of (_myself_ v)\n        switch costume to (grabv1 v)\n        create clone of (_myself_ v)\n        switch costume to (grabvertical v)\n        set [level_y v] to [1500]\n        set [level_x v] to [4700]\n        create clone of (_myself_ v)\n        switch costume to (grabv1 v)\n        create clone of (_myself_ v)\n        switch costume to (grabvertical v)\n        set [level_y v] to [1650]\n        set [level_x v] to [4575]\n        create clone of (_myself_ v)\n        switch costume to (grabv1 v)\n        create clone of (_myself_ v)\n        switch costume to (grab3 v)\n        set [level_y v] to [1800]\n        set [level_x v] to [4425]\n        create clone of (_myself_ v)\n        switch costume to (grab v)\n        create clone of (_myself_ v)\n    end\n    broadcast (@MM go to front v)\nend\n\nwhen I receive [transition left v]\nif <(STAGE #) = [6]> then\n    delete this clone\nend\nif <(STAGE #) = [6]> then\n    wait (.05) seconds\n    switch costume to (magnetplat v)\n    set [level_y v] to [2160]\n    set [level_x v] to [4000]\n    create clone of (_myself_ v)\n    switch costume to (grabvertical v)\n    set [level_y v] to [2156]\n    set [level_x v] to [3825]\n    create clone of (_myself_ v)\n    switch costume to (grabv1 v)\n    create clone of (_myself_ v)\n    switch costume to (grab3 v)\n    set [level_y v] to [2200]\n    set [level_x v] to [3670]\n    create clone of (_myself_ v)\n    switch costume to (grab v)\n    create clone of (_myself_ v)\n    switch costume to (grab3 v)\n    set [level_y v] to [2700]\n    set [level_x v] to [3590]\n    create clone of (_myself_ v)\n    switch costume to (grab v)\n    create clone of (_myself_ v)\n    thing\nend\nbroadcast (@MM go to front v)\n\nwhen I receive [haha u lose v]\ndelete this clone\n\nwhen I receive [stage select v]\ndelete this clone\n\ndefine thing\nswitch costume to (grab3 v)\nset [level_y v] to [3040]\nset [level_x v] to [4600]\ncreate clone of (_myself_ v)\nswitch costume to (grab v)\ncreate clone of (_myself_ v)\nswitch costume to (magnetplat v)\nset [level_y v] to [3000]\nset [level_x v] to [4800]\ncreate clone of (_myself_ v)\nswitch costume to (grabvertical v)\nset [level_y v] to [2950]\nset [level_x v] to [4950]\ncreate clone of (_myself_ v)\nswitch costume to (grabv1 v)\ncreate clone of (_myself_ v)\nswitch costume to (grabvertical v)\nset [level_y v] to [3000]\nset [level_x v] to [5500]\ncreate clone of (_myself_ v)\nswitch costume to (grabv1 v)\ncreate clone of (_myself_ v)\nswitch costume to (magnetplat v)\nset [level_y v] to [3000]\nset [level_x v] to [5925]\ncreate clone of (_myself_ v)\nswitch costume to (grab3 v)\nset [level_y v] to [3040]\nset [level_x v] to [6350]\ncreate clone of (_myself_ v)\nswitch costume to (grab v)\ncreate clone of (_myself_ v)\nswitch costume to (grabvertical v)\nset [level_y v] to [3040]\nset [level_x v] to [6580]\ncreate clone of (_myself_ v)\nswitch costume to (grabv1 v)\ncreate clone of (_myself_ v)\nswitch costume to (grabvertical v)\nset [level_y v] to [3125]\nset [level_x v] to [6825]\ncreate clone of (_myself_ v)\nswitch costume to (grabv1 v)\ncreate clone of (_myself_ v)\nswitch costume to (1up v)\nset [level_y v] to [2970]\nset [level_x v] to [7100]\ncreate clone of (_myself_ v)\n\nbroadcast (blink v)\n\n@Message\n\nwhen flag clicked\nset rotation style [left-right v]\ngo to x: (0) y: (0)\nclear graphic effects\nhide\n\nwhen I receive [orb message v]\nset size to (100) %\nswitch costume to (costume1 v)\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I start as a clone\nswitch costume to (costume3 v)\nclear graphic effects\nset size to (pick random (50) to (150)) %\ngo to x: (500) y: (pick random (-200) to (200))\nshow\nrepeat until <(x position) < [-200]>\n    go to [back v] layer\n    change x by ((size) * (-.2))\nend\ndelete this clone\n\nwhen I receive [start_thunderstorm v]\nif <(Checkpoint #) = [4]> then\n    repeat until <(HEALTH) > [14]>\n        start sound (pick random (1) to (3))\n        repeat (2)\n            set [darkness v] to [0]\n            wait (.05) seconds\n            set [darkness v] to [-90]\n            wait (.1) seconds\n        end\n        wait (pick random (1.2) to (3)) seconds\n    end\n    start sound (pick random (1) to (3))\n    repeat (2)\n        set [darkness v] to [0]\n        wait (.05) seconds\n        set [darkness v] to [-90]\n        wait (.1) seconds\n    end\n    set [darkness v] to [-15]\nelse\n    repeat until <<(HEALTH) > [14]> or <(Scroll X) > [4750]>>\n        start sound (pick random (1) to (3))\n        repeat (2)\n            set [darkness v] to [0]\n            wait (.05) seconds\n            set [darkness v] to [-90]\n            wait (.1) seconds\n        end\n        wait (pick random (1.2) to (3)) seconds\n    end\n    start sound (pick random (1) to (3))\n    repeat (2)\n        set [darkness v] to [0]\n        wait (.05) seconds\n        set [darkness v] to [-90]\n        wait (.1) seconds\n    end\n    set [darkness v] to [-15]\nend\n\nwhen I receive [protoman lose arm v]\nstop [other scripts in sprite v]\nset [darkness v] to [0]\ngo to (boss v)\ngo to [front v] layer\nset [x v] to [15]\nclear graphic effects\nset size to (200) %\nswitch costume to (costume5 v)\nshow\nrepeat (20)\n    change [x v] by (-1)\n    change y by ((x) / (3))\n    change x by (-2)\nend\nswitch costume to (costume6 v)\nrepeat until <touching (ground v)?>\n    change [x v] by (-1)\n    change y by (x)\n    change x by (-2)\nend\nswitch costume to (costume4 v)\nfindground\nrepeat (2)\n    switch costume to (costume4 v)\n    wait (.5) seconds\n    switch costume to (costume7 v)\n    wait (.1) seconds\nend\nswitch costume to (costume4 v)\n\ndefine findground\nrepeat until <not <touching (ground v)?>>\n    change y by (.5)\nend\n\nwhen I receive [weapon get screen v]\nhide\nwait (1) seconds\ngo to [front v] layer\n\nwhen I receive [summon treble v]\nswitch costume to (treb1 v)\nset size to (200) %\nclear graphic effects\ngo to x: (-4) y: (200)\npoint in direction (90)\nset [x v] to [0]\nshow\nrepeat (23)\n    change [x v] by (-1)\n    change y by (x)\nend\nswitch costume to (treb2 v)\nset y to (-97)\nstart sound [SE \[14\] v]\nrepeat (4)\n    wait (.1) seconds\n    next costume\nend\nstart sound [mirror_scream v]\nwait (.1) seconds\nnext costume\nwait (1) seconds\nswitch costume to (treb3 v)\nrepeat (2)\n    wait (.1) seconds\n    next costume\nend\nbroadcast (Treble+Bass Fuse v)\nrepeat (3)\n    go to x: (-4) y: (-97)\n    set [x v] to [0]\n    repeat (10)\n        change [x v] by (.5)\n        change x by (x)\n    end\nend\nrepeat (85)\n    go to (boss v)\n    switch costume to (bassfly5 v)\nend\nforever\n    switch costume to (bassfly5 v)\n    repeat (3)\n        repeat (2)\n            go to (boss v)\n        end\n        next costume\n    end\nend\n\nwhen I receive [die v]\nif <(STAGE #) = [9]> then\n    wait (3.2) seconds\n    stop [other scripts in sprite v]\n    hide\n    delete this clone\nend\n\nwhen I receive [bossdie v]\nif <(STAGE #) = [9]> then\n    stop [other scripts in sprite v]\n    hide\n    delete this clone\nend\n\nwhen I receive [teleportin v]\ngo to x: (0) y: (0)\nclear graphic effects\nhide\nwait (1) seconds\nforever\n    if <(Megaman_Holding_Orb?) = [1]> then\n        repeat until <(Megaman_Holding_Orb?) = [0]>\n            switch costume to (costume2 v)\n            go to [front v] layer\n            set size to (100) %\n            clear graphic effects\n            show\n            wait (.5) seconds\n            hide\n            wait (.1) seconds\n        end\n    end\nend\n\nwhen I receive [megaman get on snowboard v]\ngo to x: (0) y: (0)\nclear graphic effects\nhide\nwait (1) seconds\nswitch costume to (costume8 v)\ngo to [front v] layer\nset size to (100) %\nclear graphic effects\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nrepeat (3)\n    set [ghost v] effect to (100)\n    wait (.1) seconds\n    clear graphic effects\n    wait (.6) seconds\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nclear graphic effects\n\nwhen I receive [@hop off snowboard v]\nstop [other scripts in sprite v]\ngo to (hitbox v)\npoint in direction (90)\nset [checkpoint # v] to [3]\ngo to [front v] layer\nstart sound [grind_jump v]\nset [x v] to [15]\nclear graphic effects\nset size to (200) %\nswitch costume to (costume9 v)\nshow\nrepeat (20)\n    change [x v] by (-1)\n    change y by (x)\n    change x by (-4)\nend\nrepeat until <touching (_edge_ v)?>\n    change [x v] by (-1)\n    change y by (x)\n    change x by (-3)\nend\nhide\n\n@hitbox\n\nwhen flag clicked\nforever\n    if <key (space v) pressed?> then\n        set [using gun? v] to [1]\n    else\n        set [using gun? v] to [0]\n    end\nend\n\nwhen I receive [teleportin v]\nset [falling? v] to [0]\nforever\n    wait until <(falling?) > [3]>\n    wait until <(falling?) < [2]>\n    start sound [Mega Man 5 SFX \(5\) v]\nend\n\nwhen I receive [take dmg v]\nset [collide with ladder v] to [0]\nwait (.6) seconds\n\nwhen flag clicked\nset [sliding?2 v] to [0]\n\nwhen flag clicked\nset [sliding?2 v] to [0]\n\nwhen I receive [kill v]\nset [canmove? v] to [0]\n\nwhen I receive [slide v]\nif <<<(getting ouched ?) = [0]> and <(falling?) < [3]>> and <(On Snowboard?) = [0]>> then\n    reset timer\n    create clone of (hpbar v)\n    start sound [propeller_dagger_flip v]\n    repeat until <<<<(getting ouched ?) = [1]> or <not <(CanMove?) = [1]>>> or <(Collide with ladder) = [1]>> or <<<(timer) > [.5]> or <not <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>>>> and <(STAY SLIDING) = [0]>>>\n        set [slide time2 v] to [0]\n        set [sliding?2 v] to [1]\n        if <(direction) = [90]> then\n            if <(falling?) < [3]> then\n                change [speed x v] by (5)\n            end\n        else\n            if <(falling?) < [3]> then\n                change [speed x v] by (-5)\n            end\n        end\n    end\nend\nset [sliding?2 v] to [0]\nwait (.25) seconds\nset [slide time2 v] to [1]\n\nwhen I receive [die v]\nset [using fusion wings? v] to [0]\nset [canmove? v] to [0]\nstop [other scripts in sprite v]\n\nwhen I receive [die v]\nrepeat (10)\n    set [canmove? v] to [0]\nend\n\nwhen I receive [bossdie v]\nset [canmove? v] to [0]\n\nwhen I receive [bossdie v]\nrepeat (50)\n    set [canmove? v] to [0]\nend\n\nwhen flag clicked\nset [slide time2 v] to [1]\n\nwhen I receive [hitboxsnap v]\ngo to (mega man v)\nchange y by (-25)\nfindground\n\ndefine Tick <<> <^> <>> <v>\nif <(CanMove?) = [1]> then\n    if <(Collide with ladder) = [1]> then\n        set [sliding?2 v] to [0]\n        set [using fusion wings? v] to [0]\n        if <<(round (x position)) < [0]> or <(round (x position)) > [0]>> then\n            set x to (((LADDER_SNP) - (Scroll X)) + (12))\n        else\n            set [scroll x v] to ((LADDER_SNP) + (12))\n        end\n        if <<not <mouse down?>> and <not <key (space v) pressed?>>> then\n            if <^> then\n                change y by (6)\n            end\n            if <v> then\n                if <mouse down?> then\n                    change y by (6)\n                else\n                    change y by (-6)\n                end\n            end\n        end\n    else\n        if <(@HTBX_GLOBAL XY?) = [1]> then\n            set [speed y v] to [0]\n            if <<(Scroll X) = (Scroll X Max)> or <(Scroll X) = (Scroll X Min)>> then\n                set x to ((item (1) of [globalxy v]) - (Scroll X))\n                set y to (((item (2) of [globalxy v]) + (-32)) - (Scroll Y))\n            else\n                set [scroll x v] to (item (1) of [globalxy v])\n                if <(Scroll Y) = (Scroll Y Min)> then\n                    set y to (((item (2) of [globalxy v]) + (-32)) - (Scroll Y))\n                else\n                    set y to ((item (2) of [globalxy v]) + (-32))\n                end\n            end\n        end\n        if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(mouse y) > (y position)>>>> then\n            if <(@HTBX_GLOBAL XY?) = [0]> then\n                if <<(Antigravity?) = [1]> or <(Using Fusion Wings?) = [1]>> then\n                    if <(STAGE #) = [8]> then\n                        change [speed y v] by (-.18)\n                    else\n                        change [speed y v] by (-.3)\n                    end\n                    change y by (speed y)\n                else\n                    change [speed y v] by (-.5)\n                    change y by (speed y)\n                end\n            end\n        else\n            if <(@HTBX_GLOBAL XY?) = [0]> then\n                if <<(Antigravity?) = [1]> or <(Using Fusion Wings?) = [1]>> then\n                    if <(STAGE #) = [8]> then\n                        change [speed y v] by (-.18)\n                    else\n                        change [speed y v] by (-.3)\n                    end\n                    change y by (speed y)\n                else\n                    change [speed y v] by (-.5)\n                    change y by (speed y)\n                end\n            end\n        end\n        Touch Ground <(speed y) > [0]>\n        if <not <<<> or <>>>> then\n            set [frame v] to [0]\n        end\n        if <<> then\n            if <(getting ouched ?) = [0]> then\n                if <(On Snowboard?) = [1]> then\n                    change [speed x v] by ((-4) + (<(PHANTOM ARMOR?) = [1]> * (-3)))\n                else\n                    if <(frame) < [1]> then\n                        change [speed x v] by ((-5) + (<(PHANTOM ARMOR?) = [1]> * (-3)))\n                    else\n                        change [speed x v] by ((-8.5) + (<(PHANTOM ARMOR?) = [1]> * (-3)))\n                    end\n                end\n            end\n            change [frame v] by (.2)\n            point in direction (-90)\n            if <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n                if <(slide time2) = [1]> then\n                    broadcast (slide v)\n                end\n            end\n        end\n        if <>> then\n            if <(getting ouched ?) = [0]> then\n                if <(On Snowboard?) = [1]> then\n                    change [speed x v] by ((4) + (<(PHANTOM ARMOR?) = [1]> * (-3)))\n                else\n                    if <(frame) < [1]> then\n                        change [speed x v] by ((5) + (<(PHANTOM ARMOR?) = [1]> * (3)))\n                    else\n                        change [speed x v] by ((8.5) + (<(PHANTOM ARMOR?) = [1]> * (3)))\n                    end\n                end\n            end\n            change [frame v] by (.2)\n            point in direction (90)\n            if <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n                if <(slide time2) = [1]> then\n                    broadcast (slide v)\n                end\n            end\n        end\n        if <<(Ice Physics?) = [1]> and <(falling?) < [3]>> then\n            set [speed x v] to ((speed x) * (.6))\n        else\n            set [speed x v] to ((speed x) * (.4))\n        end\n        change y by (speed y)\n        Walk (direction) (speed x)\n        if <<<^> and <(getting ouched ?) = [0]>> and <<(item (Megaman Costume) of [special weapon energy v]) > [0]> and <<(Megaman Costume) = [9]> and <(Collide with ladder) = [0]>>>> then\n            set [using fusion wings? v] to [1]\n            change [speed y v] by (1)\n            if <(speed y) > [3]> then\n                set [speed y v] to [3]\n            end\n        else\n            set [using fusion wings? v] to [0]\n        end\n        if <<^> and <(falling?) < [3]>> then\n            if <(getting ouched ?) = [0]> then\n                set [speed y v] to [6]\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            change [speed y v] by (-1)\n        end\n        if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(mouse y) > (y position)>>>> then\n            if <(getting ouched ?) = [0]> then\n                if <(falling?) < [3]> then\n                    set [doublejump? v] to [1]\n                    if <(JUMP KEY) = [1]> then\n                        set [speed y v] to [7]\n                    end\n                end\n            end\n        else\n            change [speed y v] by (-1.1)\n        end\n    end\nend\n\ndefine Walk (direction) (speed)\npoint in direction (direction)\nchange x by (speed)\nset [slope v] to [0]\nrepeat until <<(slope) = [8]> or <<not <touching (ground v)?>> and <<not <touching (misc objects v)?>> and <(Collide with ladder) = [0]>>>>\n    change [slope v] by (1)\n    change y by (1)\nend\nif <(slope) = [8]> then\n    set [speed x v] to [0]\n    change x by ((0) - (speed))\n    change y by ((0) - (slope))\nend\n\nwhen flag clicked\nset [fallback_x v] to [0]\nswitch costume to (idle v)\nset size to (200) %\nset size to (100) %\nset [falling v] to [0]\nset [speed y v] to [0]\nset [canmove? v] to [0]\nset [dead: v] to [0]\nset [health v] to [1]\ngo to x: (0) y: (-120)\nhide\n\nwhen flag clicked\nset volume to (60) %\nset [canmove? v] to [0]\nset [frame v] to [0]\n\nwhen flag clicked\nset rotation style [left-right v]\nset [speed v] to [3]\n\nwhen flag clicked\nset size to (200) %\nset [speed v] to [1]\nforever\n    if <key (left arrow v) pressed?> then\n        set [speed v] to [-3]\n    end\n    if <key (right arrow v) pressed?> then\n        set [speed v] to [-3]\n    end\nend\n\nwhen I receive [die v]\nset [speed v] to [1]\n\ndefine Touch Ground <up?>\nchange [falling? v] by (1)\nrepeat until <<not <touching (ground v)?>> and <not <<touching (misc objects v)?> and <(Collide with ladder) = [0]>>>>\n    if <up?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [falling? v] to [0]\n    end\n    set [speed y v] to [0]\nend\n\nwhen I receive [die v]\nset [canmove? v] to [0]\n\nwhen I receive [knockback v]\nset [knock v] to [15]\nif <(direction) = [90]> then\n    repeat (5)\n        change [knock v] by (-.8)\n        Walk [90] ((knock) * (-1))\n    end\nelse\n    repeat (5)\n        change [knock v] by (-.8)\n        Walk [-90] (knock)\n    end\nend\n\ndefine Scrolling Blocks\nchange [scroll x v] by ((x position) - (Fallback_X))\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 (Fallback_X)\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 I receive [teleportin v]\nset [a v] to [0]\nhide\nwait (.1) seconds\nset [speed y v] to [1]\nset [canmove? v] to [0]\ngo to [front v] layer\ngo to x: (0) y: (150)\nwait (1) seconds\nset [ghost v] effect to (100)\nshow\nif <(STAGE #) = [4]> then\n    repeat (12)\n        change y by (-20)\n    end\nelse\n    repeat (11)\n        change y by (-20)\n    end\nend\nif <(STAGE #) = [8]> then\n    repeat until <<touching (ground v)?> or <touching (misc objects v)?>>\n        change y by (-20)\n    end\nelse\n    repeat until <touching (ground v)?>\n        change y by (-20)\n    end\nend\nset x to (0)\nchange y by (-15)\nfindground\nwait (.6) seconds\nstart sound [Mega Man 5 SFX \(21\) v]\nset [a v] to [1]\nset [canmove? v] to [1]\n\nwhen flag clicked\nset [fightstart? v] to [0]\n\nwhen I receive [transition effect v]\nrepeat (15)\n    reset timer\nend\n\nwhen I receive [battle begin v]\nset [canmove? v] to [0]\nwait (2) seconds\nset [canmove? v] to [1]\n\nwhen I receive [ready v]\nset [canmove? v] to [0]\nhide\n\nwhen I receive [fwd_10 v]\nWalk (direction) [10]\n\nwhen I receive [bck_10 v]\nWalk (direction) [-10]\n\nwhen I receive [teleportin v]\nset [jump key v] to [0]\nforever\n    set [jump key v] to [0]\n    wait until <<<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)>>>>\n    set [jump key v] to [1]\n    wait until <not <<<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)>>>>>\nend\n\nwait (.05) seconds\nset [jump key v] to [0]\n\nwhen I receive [teleportin v]\nset [ladder climb alternate v] to [1]\nforever\n    if <<(JUMP KEY) = [1]> or <<<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 <(Ladder Climb Alternate) = [1]> then\n            set [ladder climb alternate v] to [2]\n        else\n            if <(Ladder Climb Alternate) = [2]> then\n                set [ladder climb alternate v] to [3]\n            else\n                if <(Ladder Climb Alternate) = [3]> then\n                    set [ladder climb alternate v] to [4]\n                else\n                    set [ladder climb alternate v] to [1]\n                end\n            end\n        end\n        wait (.05) seconds\n    end\nend\n\nwhen I receive [player_moveup v]\nchange y by (8)\n\nwhen I receive [player_movedown v]\nchange y by (-8)\n\nwhen I receive [disable movement v]\nset [canmove? v] to [0]\n\nwhen I receive [enable movement v]\nset [canmove? v] to [1]\n\nwhen I receive [teleportin v]\nwait (2) seconds\nforever\n    wait (1) seconds\n    wait until <<(y position) < [-155]> or <(y position) > [190]>>\n    if <(y position) > [190]> then\n        if <(CanMove?) = [1]> then\n            if <<(Collide with ladder) = [1]> and <(JUMP KEY) = [1]>> then\n                broadcast (Transition Up v)\n                wait (2) seconds\n                if <(STAGE #) = [2]> then\n                    set [checkpoint # v] to [2]\n                end\n            end\n        end\n    end\n    if <(y position) < [-155]> then\n        if <<(STAGE #) = [6]> and <<(Scroll Y) = [2263]> and <(Scroll X) = [4590]>>> then\n            broadcast (Transition Down v)\n            wait (.3) seconds\n        else\n            if <<(STAGE #) = [4]> and <<(Scroll X) < [200]> and <<(Scroll Y) > [-2000]> and <(Scroll Y) < [-800]>>>> then\n                broadcast (Transition Down v)\n                wait (.3) seconds\n                if <(Scroll Y) < [-1300]> then\n                    wait (1) seconds\n                    broadcast (Megaman walk to left v)\n                    set [scroll x min v] to [0]\n                    set [scroll x max v] to [0]\n                else\n                    set [scroll x max v] to (Scroll X Min)\n                end\n            else\n                if <<(STAGE #) = [4]> and <<(Scroll X) > [2850]> and <(Scroll Y) > [-3000]>>> then\n                    broadcast (Transition Down v)\n                    wait (.3) seconds\n                    set [scroll x min v] to [3050]\n                else\n                    if <<(STAGE #) = [4]> and <<<(Scroll X) > [1400]> and <(Scroll Y) > [-500]>> and <not <<(Scroll Y) = [-1720]> and <(Scroll X) = [0]>>>>> then\n                        broadcast (Transition Down v)\n                        wait (.3) seconds\n                        if <(Scroll Y) < [-400]> then\n                            set [scroll x min v] to [1480]\n                            set [checkpoint # v] to [2]\n                        else\n                            set [scroll x min v] to [1555]\n                        end\n                    else\n                        if <<<(STAGE #) = [8]> and <<(Scroll X) = [7075]> or <(Scroll Y) > [400]>>> or <<(STAGE #) = [3]> and <<(Scroll Y) = [430]> and <(Scroll X) < [2500]>>>> then\n                            broadcast (Transition Down v)\n                            wait (.3) seconds\n                        else\n                            if <<(STAGE #) = [8]> and <<<not <(Scroll X) < [4500]>> and <not <(Scroll X) > [7075]>>> and <not <(Scroll Y) < [0]>>>> then\n                                broadcast (Transition Down v)\n                                wait (.3) seconds\n                                if <(Checkpoint #) = [1]> then\n                                    set [checkpoint # v] to [2]\n                                    broadcast (Regenerate misc Objects v)\n                                end\n                            else\n                                if <<(STAGE #) = [9]> and <(Scroll X) = [0]>> then\n                                    broadcast (Transition Down v)\n                                    wait (.3) seconds\n                                else\n                                    if <(CanMove?) = [1]> then\n                                        if <<(STAGE #) = [7]> and <<<(Scroll X) > [1700]> and <(Scroll Y) > [-20]>> and <(Scroll X) < [2200]>>> then\n                                            broadcast (Transition Down v)\n                                            set [scroll x min v] to [1722]\n                                            wait (.3) seconds\n                                        else\n                                            if <<(Collide with ladder) = [1]> and <<<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                                                broadcast (Transition Down v)\n                                                wait (.3) seconds\n                                            else\n                                                set [health v] to [28]\n                                                set [sliding?2 v] to [0]\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [player_moveleft v]\nchange x by (-10)\n\nwhen I receive [teleportin v]\nforever\n    if <(STAGE #) = [4]> then\n        if <(Scroll X) = [1480]> then\n            if <<(x position) < [-165]> and <(HAS CREDIT CARD?) = [0]>> then\n                set x to (-165)\n            end\n        end\n        if <(Scroll X) = [5110]> then\n            if <(x position) < [-190]> then\n                set x to (-190)\n            end\n        end\n    end\n    if <(STAGE #) = [8]> then\n        if <(Scroll X) = [8480]> then\n            if <(x position) < [-180]> then\n                set x to (-180)\n            end\n            if <(x position) > [195]> then\n                set x to (195)\n            end\n        end\n        if <(Scroll X) = [6510]> then\n            if <(x position) < [-180]> then\n                set x to (-180)\n            end\n        end\n    end\n    if <(STAGE #) = [1]> then\n        if <(Scroll X) = [980]> then\n            if <(x position) < [-190]> then\n                set x to (-190)\n            end\n            if <(Checkpoint #) = [3]> then\n                if <(x position) > [180]> then\n                    set x to (180)\n                end\n            end\n        end\n        if <<<(Scroll X) = [1460]> and <(Scroll Y) < [1250]>> or <<<(Scroll X) = [1440]> or <(Scroll X) = [1920]>> and <(Scroll Y) = [2600]>>> then\n            if <(x position) < [-190]> then\n                set x to (-190)\n            end\n        end\n    end\nend\n\ndefine findground\nswitch costume to (idle3 v)\nif <(STAGE #) = [8]> then\n    repeat until <not <<touching (ground v)?> or <touching (misc objects v)?>>>\n        set [speed x v] to [0]\n        set [speed y v] to [0]\n        change y by (.5)\n    end\nelse\n    repeat until <not <touching (ground v)?>>\n        set [speed x v] to [0]\n        set [speed y v] to [0]\n        change y by (.5)\n    end\nend\n\nwhen I receive [player_moveright v]\nchange x by (10)\n\nwhen I receive [teleportin v]\nset [using fusion wings? v] to [0]\nforever\n    if <<(Transition) = [0]> and <(CanMove?) = [1]>> then\n        if <<(x position) < [-230]> and <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n            if <<<(round (Scroll Y)) = [2263]> and <(round (Scroll X)) = [4590]>> and <(STAGE #) = [6]>> then\n                set [scroll x max v] to [4590]\n                broadcast (Transition Left v)\n                wait (2) seconds\n                set [scroll x min v] to [3590]\n            else\n                if <<<(round (Scroll Y)) = [768]> and <(round (Scroll X)) = [1000]>> and <(STAGE #) = [1]>> then\n                    set [scroll x max v] to [1000]\n                    broadcast (Transition Left v)\n                    wait (2) seconds\n                else\n                    if <<<(round (Scroll Y)) = [2170]> and <(round (Scroll X)) = [1460]>> and <(STAGE #) = [1]>> then\n                        set [scroll y min v] to [2170]\n                        broadcast (Transition Left v)\n                        wait (2) seconds\n                    else\n                        if <<<(round (Scroll Y)) = [0]> and <(round (Scroll X)) = [500]>> and <(STAGE #) = [4]>> then\n                            set [scroll x max v] to [500]\n                            broadcast (Transition Left v)\n                            wait (2) seconds\n                        else\n                            if <<<(round (Scroll Y)) = [0]> and <(round (Scroll X)) = [0]>> and <(STAGE #) = [4]>> then\n                                set [scroll x max v] to [0]\n                                broadcast (Transition Left v)\n                                wait (2) seconds\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [teleportin v]\nforever\n    set [scroll y v] to (round (Scroll Y))\n    if <<(Transition) = [0]> and <(CanMove?) = [1]>> then\n        if <<(x position) > [230]> and <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n            if <<<(round (Scroll Y)) = [0]> and <<(round (Scroll X)) = [3590]> or <(round (Scroll X)) = [4090]>>> and <(STAGE #) = [6]>> then\n                set [checkpoint # v] to [2]\n                if <(round (Scroll X)) = [4090]> then\n                    broadcast (Transition Right v)\n                    wait (2) seconds\n                    wait until <(y position) < [-25]>\n                    set [scroll y max v] to [1833]\n                else\n                    broadcast (Transition Right v)\n                    wait (2) seconds\n                end\n            else\n                if <<<(round (Scroll Y)) = [-3010]> and <(round (Scroll X)) = [3050]>> and <(STAGE #) = [4]>> then\n                    broadcast (Transition Right v)\n                    wait (2) seconds\n                    set [scroll x max v] to [4150]\n                else\n                    if <<<(round (Scroll Y)) = [-860]> and <(round (Scroll X)) = [1555]>> and <(STAGE #) = [4]>> then\n                        broadcast (Transition Right v)\n                        wait (2) seconds\n                        set [scroll x max v] to [3050]\n                    else\n                        if <<<(round (Scroll Y)) = [0]> and <(round (Scroll X)) = [-500]>> and <(STAGE #) = [4]>> then\n                            broadcast (Transition Right v)\n                            wait (2) seconds\n                            set [scroll x max v] to [0]\n                        else\n                            if <<<(round (Scroll Y)) = [0]> and <(round (Scroll X)) = [0]>> and <(STAGE #) = [4]>> then\n                                broadcast (Transition Right v)\n                                wait (2) seconds\n                                set [scroll x max v] to [1555]\n                            else\n                                if <<<(round (Scroll Y)) = [430]> and <(round (Scroll X)) = [2500]>> and <(STAGE #) = [3]>> then\n                                    broadcast (Transition Right v)\n                                    wait (2) seconds\n                                    set [checkpoint # v] to [2]\n                                    set [scroll x max v] to [3039]\n                                else\n                                    if <<<(round (Scroll Y)) = [-430]> and <(round (Scroll X)) = [4500]>> and <(STAGE #) = [8]>> then\n                                        broadcast (Transition Right v)\n                                        wait (2) seconds\n                                        set [scroll x max v] to [6030]\n                                    else\n                                        if <<<(round (Scroll Y)) = [0]> and <<(round (Scroll X)) = [4000]> or <(round (Scroll X)) = [7075]>>> and <(STAGE #) = [8]>> then\n                                            if <(round (Scroll X)) = [7075]> then\n                                                broadcast (Transition Right v)\n                                                wait (2) seconds\n                                                set [scroll x max v] to [8000]\n                                            else\n                                                broadcast (Transition Right v)\n                                                wait (2) seconds\n                                            end\n                                        else\n                                            if <<<(round (Scroll Y)) = [0]> and <(round (Scroll X)) = [4790]>> and <(STAGE #) = [7]>> then\n                                                broadcast (Transition Right v)\n                                                wait (2) seconds\n                                                broadcast (Disable Movement v)\n                                                set [checkpoint # v] to [4]\n                                                broadcast (Bosscutscene v)\n                                            else\n                                                if <<<(round (Scroll Y)) = [0]> and <(round (Scroll X)) = [2222]>> and <(STAGE #) = [7]>> then\n                                                    broadcast (Transition Right v)\n                                                    wait (2) seconds\n                                                    broadcast (Start_Thunderstorm v)\n                                                    set [scroll x max v] to [4790]\n                                                else\n                                                    if <<<(round (Scroll Y)) = [-430]> and <(round (Scroll X)) = [1722]>> and <(STAGE #) = [7]>> then\n                                                        broadcast (Transition Right v)\n                                                        wait (2) seconds\n                                                        set [scroll x max v] to [2222]\n                                                        set [checkpoint # v] to [2]\n                                                    else\n                                                        if <<<(round (Scroll Y)) = [768]> and <(round (Scroll X)) = [0]>> and <(STAGE #) = [1]>> then\n                                                            broadcast (Transition Right v)\n                                                            set [scroll y min v] to [768]\n                                                            set [checkpoint # v] to [2]\n                                                            wait (2) seconds\n                                                        else\n                                                            if <<(round (Scroll X)) = [7012]> and <(STAGE #) = [2]>> then\n                                                                broadcast (Transition Right v)\n                                                                wait (2) seconds\n                                                                broadcast (Disable Movement v)\n                                                                broadcast (Bosscutscene v)\n                                                            else\n                                                                if <<<(round (Scroll Y)) = [768]> and <(round (Scroll X)) = [500]>> and <(STAGE #) = [1]>> then\n                                                                    if <not <(Checkpoint #) = [3]>> then\n                                                                        broadcast (Transition Right v)\n                                                                        wait (2) seconds\n                                                                        set [scroll x max v] to [2830]\n                                                                        set [checkpoint # v] to [2]\n                                                                    end\n                                                                else\n                                                                    if <<<(round (Scroll Y)) = [430]> and <(round (Scroll X)) = [3954]>> and <(STAGE #) = [2]>> then\n                                                                        if <not <(Checkpoint #) = [3]>> then\n                                                                            broadcast (Transition Right v)\n                                                                            wait (2) seconds\n                                                                            set [scroll x max v] to [7012]\n                                                                            set [checkpoint # v] to [2]\n                                                                        end\n                                                                    end\n                                                                end\n                                                            end\n                                                        end\n                                                    end\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [fwd_4 v]\nWalk (direction) [4]\n\nwhen I receive [bck_4 v]\nWalk (direction) [-4]\n\nwhen I receive [bossgatetransition v]\nrepeat (20)\n    change x by (3)\nend\n\nwhen I receive [back_1 v]\nchange x by (-2)\n\nwhen I receive [up 7 v]\nchange y by (2)\n\nwhen I receive [left 5 v]\nif <not <(x position) < [-200]>> then\n    Walk (direction) ((a) / (-1))\nend\n\nwhen I receive [ready v]\nforever\n    if <(CanMove?) = [1]> then\n        Tick <<key (left arrow v) pressed?> or <key (a v) pressed?>> <(JUMP KEY) = [1]> <<key (right arrow v) pressed?> or <key (d v) pressed?>> <<key (s v) pressed?> or <key (down arrow v) pressed?>>\n    end\nend\n\nwhen I receive [ready v]\nforever\n    Scrolling Blocks\nend\n\nwhen I receive [teleportin v]\nset [sliding?2 v] to [0]\nset [slide time2 v] to [1]\nforever\n    if <(SLIDING?2) = [1]> then\n        switch costume to (idle4 v)\n    else\n        switch costume to (idle3 v)\n    end\nend\n\nTouch Ground <(speed y) > [0]>\n\nwhen I receive [teleportin v]\nforever\n    if <(PHANTOM ARMOR?) = [1]> then\n        wait until <<<(DOUBLEJUMP?) = [1]> and <(cd) = [0]>> and <<(falling?) > [3]> and <not <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(mouse y) > (y position)>>>>>>>\n        wait until <<<<(falling?) < [4]> or <(falling?) > [3]>> and <(cd) = [0]>> 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)>>>>>\n        if <<<<(falling?) > [3]> and <(getting ouched ?) = [0]>> and <(cd) = [0]>> and <(Collide with ladder) = [0]>> then\n            broadcast (DOUBLE JUMP FX v)\n            set [doublejump? v] to [0]\n            set [speed y v] to [7]\n        end\n    end\nend\n\nwhen I receive [movingplatformdown v]\nchange [speed y v] by ((speed) * (2))\nTouch Ground <(speed y) > [0]>\n\nwhen I receive [changespeedx v]\nchange [speed x v] by (a)\n\nwhen I receive [ready v]\nset [fallback_x v] to [0]\n\nwhen I receive [snowboard fall back v]\nrepeat (80)\n    change [fallback_x v] by (-2)\n    change x by (-4)\nend\n\nwhen I receive [back you go v]\nchange [speed x v] by (-3)\n\nwhen I receive [@hop off snowboard v]\nrepeat (40)\n    change [fallback_x v] by (4)\n    change x by (4)\nend\n\nwhen I receive [@change y according to a v]\nchange y by (@A)\n\nwhen I receive [jump boost v]\nchange [speed y v] by (8)\n\nwhen I receive [teleportin v]\nset [cd v] to [0]\nforever\n    wait until <(@HTBX_GLOBAL XY?) = [1]>\n    set [cd v] to [1]\n    repeat until <(@HTBX_GLOBAL XY?) = [0]>\n        set [doublejump? v] to [1]\n    end\n    wait (.4) seconds\n    set [cd v] to [0]\nend\n\nwhen I receive [teleportin v]\nforever\n    Walk (direction) []\nend\n\n@border\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\nshow\nforever\n    go to [front v] layer\nend\n\nwhen I start as a clone\nif <(zx) = [1]> then\n    switch costume to (costume4 v)\n    clear graphic effects\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\nif <(zx) = [0]> then\n    switch costume to (pick random (2) to (3))\n    set [x v] to (pick random (-3) to (3))\n    set [y v] to (pick random (-3) to (3))\n    set size to (200) %\n    go to [front v] layer\n    show\n    repeat until <(y position) < [-175]>\n        change x by (x)\n        change [x v] by (-1)\n        change y by (y)\n        change [y v] by (-1)\n    end\n    delete this clone\nend\n\ndefine e\nset [zx v] to [0]\ngo to x: (200) y: (200)\nhide\nrepeat (13)\n    create clone of (_myself_ v)\n    change y by (-32)\nend\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\nshow\n\nwhen I receive [bass ram into wall v]\nset [zx v] to [0]\nbroadcast (ScreenShake v)\ne\n\nwhen I receive [ready v]\nset [zx v] to [1]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(zx) = [1]> then\n    forever\n        go to [front v] layer\n    end\nend\n\n@HP drops\n\nwhen flag clicked\nclear graphic effects\nhide\n\nwhen I start as a clone\npoint in direction (90)\nset [level_x v] to (PROJ X)\nset [level_y v] to (PROJ Y)\nswitch costume to (PROJECTILE NAME)\ngo to [front v] layer\nshow\nif <(costume [number v]) = [9]> then\n    switch costume to (health v)\nend\nif <(costume [number v]) = [1]> then\n    forever\n        switch costume to (health v)\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n    end\nend\nif <(costume [number v]) = [3]> then\n    forever\n        switch costume to (health3 v)\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n    end\nend\nif <(costume [number v]) = [6]> then\n    forever\n        switch costume to (wen v)\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n    end\nend\nif <(costume [number v]) = [8]> then\n    forever\n        switch costume to (wen3 v)\n        wait (.1) seconds\n        next costume\n        wait (.1) seconds\n    end\nend\n\nwhen I start as a clone\nwait (5) seconds\nrepeat (3)\n    clear graphic effects\n    wait (.1) seconds\n    set [ghost v] effect to (100)\n    wait (.1) seconds\nend\ndelete this clone\n\nwhen I start as a clone\nforever\n    set x to ((Level_X) - (Scroll X))\n    set y to ((Level_Y) - (Scroll Y))\n    if <<([abs v] of ((Level_X) - (Scroll X)) ) > [250]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [200]>> then\n        hide\n        delete this clone\n    else\n        show\n    end\nend\n\nwhen I start as a clone\nclear graphic effects\nwait (.1) seconds\nwait until <touching (hitbox v)?>\nif <(costume [number v]) < [3]> then\n    set [ghost v] effect to (100)\n    repeat (1)\n        if <(HEALTH) > [1]> then\n            broadcast (Heal v)\n            change [health v] by (-1)\n        end\n    end\nelse\n    if <(costume [number v]) < [5]> then\n        set [ghost v] effect to (100)\n        repeat (3)\n            if <(HEALTH) > [1]> then\n                broadcast (Heal v)\n                change [health v] by (-1)\n            end\n        end\n    else\n        if <(costume [number v]) < [6]> then\n            set [ghost v] effect to (100)\n            if <(LIVES) < [8]> then\n                change [lives v] by (1)\n            end\n            start sound [25 - 1up v]\n        else\n            if <(costume [number v]) < [8]> then\n                set [ghost v] effect to (100)\n                repeat (4)\n                    if <<not <(Megaman Costume) = [1]>> and <(item ((Megaman Costume) + (0)) of [special weapon energy v]) < [27]>> then\n                        broadcast (Spec_Weap_Replenish v)\n                        replace item ((Megaman Costume) + (0)) of [special weapon energy v] with ((item ((Megaman Costume) + (0)) of [special weapon energy v]) + (1))\n                    end\n                end\n            else\n                set [ghost v] effect to (100)\n                repeat (10)\n                    if <<not <(Megaman Costume) = [1]>> and <(item ((Megaman Costume) + (0)) of [special weapon energy v]) < [27]>> then\n                        broadcast (Spec_Weap_Replenish v)\n                        replace item ((Megaman Costume) + (0)) of [special weapon energy v] with ((item ((Megaman Costume) + (0)) of [special weapon energy v]) + (1))\n                    end\n                end\n            end\n        end\n    end\nend\ndelete this clone\n\nwhen I start as a clone\nset [y v] to [0]\nrepeat until <<touching (ground v)?> or <touching (misc objects v)?>>\n    change [level_y v] by (y)\n    change [y v] by (-2)\nend\nrepeat until <<not <touching (ground v)?>> and <not <touching (misc objects v)?>>>\n    change [level_y v] by (3)\nend\n\nwhen I start as a clone\nwait until <(HEALTH) > [14]>\ndelete this clone\n\n@life counter\n\nwhen flag clicked\nset [clone v] to [0]\nhide\nforever\n    set [ghost v] effect to (pick random (5) to (15))\nend\n\nwhen I receive [teleportin v]\nset [y v] to [0]\nrepeat (10)\n    go to x: (-999) y: (-143)\n    switch costume to (1up v)\n    go to [front v] layer\nend\nshow\nrepeat (9)\n    change [y v] by (1.9)\n    change x by (y)\nend\nrepeat (7)\n    change [y v] by (-2)\n    change x by (y)\nend\nbroadcast (Display amount of lives v)\nwait (1) seconds\nset [y v] to [0]\nrepeat (15)\n    change [y v] by (-2)\n    change x by (y)\nend\nhide\n\nwhen I start as a clone\nset [clone v] to [1]\nif <(costume [number v]) = [2]> then\n    set [level_x v] to (((Scroll X) + ([x position v] of [hitbox v])) + (pick random (-35) to (35)))\n    set [level_y v] to (((Scroll Y) + ([y position v] of [hitbox v])) + (-50))\n    go to [front v] layer\n    set [y v] to [0]\n    repeat (10)\n        change [y v] by (2)\n        change [level_y v] by (y)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [3]> then\n    set [level_x v] to (((Scroll X) + ([x position v] of [hitbox v])) + ())\n    set [level_y v] to (((Scroll Y) + ([y position v] of [hitbox v])) + (0))\n    go to [front v] layer\n    set [y v] to [0]\n    repeat (10)\n        change [y v] by (-.1)\n        change [level_y v] by (y)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\ngo to [front v] layer\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)) ) > [450]>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [double jump fx v]\nif <(clone) = [0]> then\n    start sound [knight_jump v]\n    doublejump\nend\n\ndefine doublejump\nswitch costume to (costume1 v)\ncreate clone of (_myself_ v)\nswitch costume to (costume1 v)\ncreate clone of (_myself_ v)\nswitch costume to (costume2 v)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(costume [number v]) = [3]> then\n    switch costume to (costume2 v)\n    repeat (2)\n        wait (.05) seconds\n        next costume\n    end\n    wait (.05) seconds\n    delete this clone\nend\n\n@SPCWEP EN.\n\nwhen I receive [battle begin v]\ngo to [front v] layer\n\nwhen I receive [teleportin v]\nset [health v] to [1]\npoint in direction (180)\ngo to x: (-150) y: (128)\nclear graphic effects\nset size to (250) %\nset [ghost v] effect to (100)\nshow\nforever\n    switch costume to ([abs v] of ((item (Megaman Costume) of [special weapon energy v]) + (-28)) )\n    set [color v] effect to (66)\n    if <(Megaman Costume) = [1]> then\n        set [ghost v] effect to (100)\n    else\n        if <<<(Show stage select stars?) = [0]> and <(At Stage Select) = [0]>> and <([canmove? v] of [hitbox v]) = [1]>> then\n            set [ghost v] effect to (0)\n        else\n            set [ghost v] effect to (100)\n        end\n    end\nend\n\nwhen I receive [spec_weap_replenish v]\nstart sound [Mega Man 5 SFX \(16\) v]\nrepeat (2)\n    set [brightness v] effect to (50)\n    wait (.1) seconds\n    set [brightness v] effect to (0)\n    wait (.1) seconds\nend\n\nwhen I receive [bossdie v]\nhide\ndelete this clone\n\nwhen I receive [enable movement v]\nshow\n\nwhen I receive [teleportin v]\nrepeat (100)\n    go to [front v] layer\nend\n\nwhen flag clicked\nhide\nrepeat (50)\n    go to [front v] layer\nend\n\nwhen I receive [autoscroller v]\nshow\n\n@Special Weapons\n\nwhen flag clicked\nset [@deltawall_active v] to [0]\nset rotation style [left-right v]\nset [clone v] to [0]\nhide\n\nwhen I receive [fire special weapon v]\nclear graphic effects\nif <<(Megaman Costume) = [1]> and <(PHANTOM ARMOR?) = [1]>> then\n    point in direction ([direction v] of [hitbox v])\n    set [level_x v] to (([x position v] of [hitbox v]) + ((Scroll X) + (([sin v] of (direction) ) * (25))))\n    set [level_y v] to (([y position v] of [hitbox v]) + ((Scroll Y) + (([cos v] of (direction) ) * (25))))\n    switch costume to (chs v)\n    create clone of (_myself_ v)\nelse\n    if <(item (Megaman Costume) of [special weapon energy v]) > [0]> then\n        if <(clone) = [0]> then\n            if <not <(Megaman Costume) = [5]>> then\n                point in direction ([direction v] of [hitbox v])\n            end\n            if <<(Megaman Costume) = [5]> and <(@Deltawall_Active) = [0]>> then\n                if <(item (Megaman Costume) of [special weapon energy v]) > [2]> then\n                    set [@deltawall_active v] to [1]\n                    replace item (Megaman Costume) of [special weapon energy v] with ((item (Megaman Costume) of [special weapon energy v]) + (-3))\n                    start sound [enchantress_fireball v]\n                    point in direction (90)\n                    set [level_x v] to (([x position v] of [hitbox v]) + ((Scroll X) + (([sin v] of (direction) ) * (45))))\n                    set [level_y v] to (([y position v] of [hitbox v]) + ((Scroll Y) + (([cos v] of (direction) ) * (25))))\n                    switch costume to (firewall v)\n                    create clone of (_myself_ v)\n                    wait (0) seconds\n                    point in direction (-90)\n                    set [level_x v] to (([x position v] of [hitbox v]) + ((Scroll X) + (([sin v] of (direction) ) * (45))))\n                    set [level_y v] to (([y position v] of [hitbox v]) + ((Scroll Y) + (([cos v] of (direction) ) * (25))))\n                    switch costume to (firewall v)\n                    create clone of (_myself_ v)\n                    broadcast (Deltatask v)\n                end\n            end\n            if <<(Megaman Costume) = [6]> or <(Megaman Costume) = [4]>> then\n                if <(item (Megaman Costume) of [special weapon energy v]) > [1]> then\n                    replace item (Megaman Costume) of [special weapon energy v] with ((item (Megaman Costume) of [special weapon energy v]) + (-2))\n                    point in direction ([direction v] of [mega man v])\n                    set [level_x v] to (([x position v] of [hitbox v]) + ((Scroll X) + (([sin v] of (direction) ) * (45))))\n                    set [level_y v] to (([y position v] of [hitbox v]) + ((Scroll Y) + (([cos v] of (direction) ) * (25))))\n                    if <(Megaman Costume) = [4]> then\n                        switch costume to (boomerang v)\n                    else\n                        switch costume to (psisickle v)\n                    end\n                    create clone of (_myself_ v)\n                end\n            end\n            if <(Megaman Costume) = [8]> then\n                if <(item (Megaman Costume) of [special weapon energy v]) > [2]> then\n                    replace item (Megaman Costume) of [special weapon energy v] with ((item (Megaman Costume) of [special weapon energy v]) + (-3))\n                    start sound [enchantress_fireblocks_die v]\n                    repeat (15)\n                        if <([direction v] of [mega man v]) = [90]> then\n                            point in direction ((90) + (([sin v] of ((timer) * (500)) ) * (15)))\n                        else\n                            point in direction ((-90) + (([sin v] of ((timer) * (500)) ) * (-15)))\n                        end\n                        set [level_x v] to (([x position v] of [hitbox v]) + ((Scroll X) + (([sin v] of (direction) ) * (45))))\n                        set [level_y v] to (([y position v] of [hitbox v]) + ((Scroll Y) + (([cos v] of (direction) ) * (25))))\n                        switch costume to (burnerflame v)\n                        create clone of (_myself_ v)\n                    end\n                end\n            end\n            if <(Megaman Costume) = [3]> then\n                if <(item (Megaman Costume) of [special weapon energy v]) > [0]> then\n                    replace item (Megaman Costume) of [special weapon energy v] with ((item (Megaman Costume) of [special weapon energy v]) + (-1))\n                    if <([direction v] of [mega man v]) = [90]> then\n                        point in direction (60)\n                        repeat (3)\n                            set [level_x v] to (([x position v] of [hitbox v]) + ((Scroll X) + (([sin v] of (direction) ) * (25))))\n                            set [level_y v] to (([y position v] of [hitbox v]) + ((Scroll Y) + (([cos v] of (direction) ) * (25))))\n                            start sound [knight_slash v]\n                            switch costume to (beta v)\n                            create clone of (_myself_ v)\n                            turn right (30) degrees\n                        end\n                    else\n                        point in direction (-60)\n                        repeat (3)\n                            set [level_x v] to (([x position v] of [hitbox v]) + ((Scroll X) + (([sin v] of (direction) ) * (25))))\n                            set [level_y v] to (([y position v] of [hitbox v]) + ((Scroll Y) + (([cos v] of (direction) ) * (25))))\n                            start sound [knight_slash v]\n                            switch costume to (beta v)\n                            create clone of (_myself_ v)\n                            turn right (-30) degrees\n                        end\n                    end\n                end\n            end\n            if <(Megaman Costume) = [7]> then\n                if <(item (Megaman Costume) of [special weapon energy v]) > [4]> then\n                    replace item (Megaman Costume) of [special weapon energy v] with ((item (Megaman Costume) of [special weapon energy v]) + (-5))\n                    clear graphic effects\n                    go to x: (0) y: (0)\n                    go to [front v] layer\n                    show\n                    repeat (3)\n                        repeat (3)\n                            set [level_y v] to (Scroll Y)\n                            set [level_x v] to (([x position v] of [hitbox v]) + (((Scroll X) + (([sin v] of ([direction v] of [hitbox v]) ) * (0))) + (pick random (-200) to (200))))\n                            change [ghost v] effect by (2)\n                            switch costume to (proto v)\n                            create clone of (_myself_ v)\n                        end\n                    end\n                    hide\n                end\n            end\n            if <(Megaman Costume) = [2]> then\n                if <(item (Megaman Costume) of [special weapon energy v]) > [2]> then\n                    set [level_x v] to (([x position v] of [hitbox v]) + ((Scroll X) + (([sin v] of ([direction v] of [hitbox v]) ) * (0))))\n                    set [level_y v] to (([y position v] of [hitbox v]) + ((Scroll Y) + ((<([falling? v] of [hitbox v]) > [1]> * (0)) + (0))))\n                    replace item (Megaman Costume) of [special weapon energy v] with ((item (Megaman Costume) of [special weapon energy v]) + (-3))\n                    switch costume to (omega chaser v)\n                    create clone of (_myself_ v)\n                    wait (.1) seconds\n                    switch costume to (bolt2 v)\n                    create clone of (_myself_ v)\n                    wait (.1) seconds\n                    switch costume to (bolt3 v)\n                    create clone of (_myself_ v)\n                end\n            end\n            if <(Megaman Costume) = [9]> then\n                set [level_x v] to (([x position v] of [hitbox v]) + ((Scroll X) + (([sin v] of ([direction v] of [hitbox v]) ) * (40))))\n                set [level_y v] to (([y position v] of [hitbox v]) + ((Scroll Y) + ((<([falling? v] of [hitbox v]) > [1]> * (10)) + (-5))))\n                switch costume to (bassbeam v)\n                if <(item (Megaman Costume) of [special weapon energy v]) > [0]> then\n                    replace item (Megaman Costume) of [special weapon energy v] with ((item (Megaman Costume) of [special weapon energy v]) + (-1))\n                end\n                create clone of (_myself_ v)\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nset [clone v] to [1]\n\nwhen I start as a clone\nforever\n    set x to ((Level_X) - (Scroll X))\n    set y to ((Level_Y) - (Scroll Y))\n    if <<([abs v] of ((Level_X) - (Scroll X)) ) > [250]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [200]>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I start as a clone\nclear graphic effects\ngo to [front v] layer\nshow\nif <(costume [number v]) = [26]> then\n    start sound [raiment_projectile v]\n    forever\n        switch costume to (psisickle v)\n        repeat (3)\n            wait (.01) seconds\n            next costume\n        end\n        wait (.01) seconds\n    end\nend\nif <(costume [number v]) = [30]> then\n    set [x v] to [0]\n    start sound [cutter v]\n    forever\n        if <(x) = [1]> then\n            switch costume to (boomerang5 v)\n        else\n            switch costume to (boomerang v)\n        end\n        wait (.04) seconds\n        if <(x) = [1]> then\n            switch costume to (boomerang6 v)\n        else\n            switch costume to (boomerang2 v)\n        end\n        wait (.04) seconds\n        if <(x) = [1]> then\n            switch costume to (boomerang7 v)\n        else\n            switch costume to (boomerang3 v)\n        end\n        wait (.04) seconds\n        if <(x) = [1]> then\n            switch costume to (boomerang8 v)\n        else\n            switch costume to (boomerang4 v)\n        end\n        wait (.04) seconds\n    end\nend\nif <(costume [number v]) = [14]> then\n    forever\n        switch costume to (chs v)\n        repeat (5)\n            wait (.01) seconds\n            next costume\n        end\n        wait (.01) seconds\n    end\nend\nif <(costume [number v]) = [12]> then\n    forever\n        switch costume to (beta v)\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n    end\nend\nif <(costume [number v]) = [20]> then\n    wait (0.04) seconds\n    forever\n        switch costume to (firewall v)\n        wait (0) seconds\n        next costume\n        wait (0) seconds\n        next costume\n        wait (0) seconds\n    end\nend\nif <(costume [number v]) = [23]> then\n    forever\n        switch costume to (burnerflame v)\n        wait (0) seconds\n        next costume\n        wait (0) seconds\n        next costume\n        wait (0) seconds\n    end\nend\nif <(costume [number v]) = [1]> then\n    switch costume to (bassbeam v)\n    start sound [blackknight_fireball v]\n    repeat (5)\n        wait (.05) seconds\n        next costume\n        change [brightness v] effect by (15)\n    end\n    delete this clone\nend\nif <<(costume [number v]) = [7]> or <<(costume [number v]) = [9]> or <(costume [number v]) = [8]>>> then\n    wait (.05) seconds\n    switch costume to (omega chaser v)\n    start sound [tinkertank_ball v]\n    forever\n        switch costume to (omega chaser v)\n        repeat (2)\n            wait (.05) seconds\n            next costume\n        end\n        wait (.05) seconds\n    end\nend\nif <(costume [number v]) = [10]> then\n    switch costume to (bolt v)\n    set size to (300) %\n    start sound (pick random (4) to (6))\n    clear graphic effects\n    show\n    repeat (10)\n        turn right (180) degrees\n        go to [front v] layer\n        change [brightness v] effect by (10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [20]> then\n    set rotation style [all around v]\n    set [y v] to [0]\n    repeat until <(@Deltawall_Active) = [3]>\n        turn left (15) degrees\n        set [level_x v] to (((Scroll X) + ([x position v] of [mega man v])) + ((([sin v] of (direction) ) * (50)) + (([sin v] of (y) ) * (5))))\n        set [level_y v] to (((Scroll Y) + ([y position v] of [mega man v])) + ((([cos v] of (direction) ) * (50)) + (([cos v] of (y) ) * (5))))\n        change [y v] by (15)\n    end\n    set [y v] to [0]\n    repeat (50)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n        change [y v] by (4)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [30]> then\n    set [y v] to [5]\n    repeat until <<(y) > [30]> or <<touching (enemies v)?> or <<touching (boss v)?> or <<touching (c'mon! not more enemies v)?> or <touching (boss 2: electric boogaloo v)?>>>>>\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n        change [y v] by (1)\n    end\n    if <(y) > [30]> then\n        repeat (4)\n            change [ghost v] effect by (25)\n        end\n        delete this clone\n    end\n    set [y v] to [0]\n    start sound [shovel_upgrade_charge_ready v]\n    set [x v] to [1]\n    wait (.05) seconds\n    repeat until <touching (hitbox v)?>\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n        point towards (hitbox v)\n        change [y v] by (3)\n    end\n    set [ghost v] effect to (100)\n    repeat (3)\n        if <(HEALTH) > [1]> then\n            broadcast (Heal v)\n            change [health v] by (-1)\n        end\n    end\n    delete this clone\nend\nif <(costume [number v]) = [1]> then\n    forever\n        point in direction ([direction v] of [hitbox v])\n        set [level_x v] to (([x position v] of [hitbox v]) + ((Scroll X) + (([sin v] of ([direction v] of [hitbox v]) ) * (40))))\n        set [level_y v] to (([y position v] of [hitbox v]) + ((Scroll Y) + ((<([falling? v] of [hitbox v]) > [1]> * (10)) + (-5))))\n    end\nend\nif <(costume [number v]) = [26]> then\n    set rotation style [left-right v]\n    Sickle AI\nend\nif <<(costume [number v]) = [12]> or <(costume [number v]) = [23]>> then\n    if <(costume [number v]) = [23]> then\n        set rotation style [left-right v]\n    else\n        set rotation style [all around v]\n    end\n    set [y v] to [0]\n    repeat (50)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n        change [y v] by (1)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [14]> then\n    set [y v] to [10]\n    repeat (50)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n        change [y v] by (3)\n    end\n    delete this clone\nend\nif <<(costume [number v]) = [7]> or <<(costume [number v]) = [9]> or <(costume [number v]) = [8]>>> then\n    if <(costume [number v]) = [7]> then\n        point in direction (-45)\n    end\n    if <(costume [number v]) = [8]> then\n        point in direction (0)\n    end\n    if <(costume [number v]) = [9]> then\n        point in direction (45)\n    end\n    set [y v] to [0]\n    repeat (7)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n        change [y v] by (3)\n    end\n    wait (.2) seconds\n    set [y v] to [0]\n    point towards (mouse-pointer v)\n    repeat (50)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n        change [y v] by (5)\n    end\n    delete this clone\nend\n\nwhen flag clicked\nforever\n    if <<(item (Megaman Costume) of [special weapon energy v]) > [0]> and <(Using Fusion Wings?) = [1]>> then\n        replace item (Megaman Costume) of [special weapon energy v] with ((item (Megaman Costume) of [special weapon energy v]) + (-1))\n        wait (1.5) seconds\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [23]> then\n    wait (.5) seconds\n    repeat (4)\n        change [ghost v] effect by (25)\n    end\n    delete this clone\nend\n\nwhen I receive [teleportin v]\nset [@deltawall_active v] to [0]\n\nwhen I receive [deltatask v]\nwait until <not <<mouse down?> or <key (space v) pressed?>>>\nset [@deltawall_active v] to [2]\nwait until <<(getting ouched ?) = [1]> or <<key (space v) pressed?> or <mouse down?>>>\nset [@deltawall_active v] to [3]\nif <not <(@Deltawall_Active) = [0]>> then\n    start sound [shovel_upgrade_charge_ready v]\nend\nwait (.1) seconds\nwait until <not <<mouse down?> or <key (space v) pressed?>>>\nset [@deltawall_active v] to [0]\n\nwhen I receive [die v]\nset [@deltawall_active v] to [0]\ndelete this clone\n\nwhen I receive [bosscutscene v]\nset [@deltawall_active v] to [0]\ndelete this clone\n\ndefine Sickle AI\nset [y v] to [0]\nset [x v] to [0]\nrepeat until <<(x) > [25]> or <<touching (enemies v)?> or <<touching (boss v)?> or <<touching (c'mon! not more enemies v)?> or <touching (boss 2: electric boogaloo v)?>>>>>\n    set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n    set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (y)))\n    change [y v] by (1)\n    change [x v] by (1)\nend\nif <(x) > [25]> then\n    repeat (4)\n        change [ghost v] effect by (25)\n    end\n    delete this clone\nelse\n    start sound [raiment_projectile v]\n    turn left (90) degrees\n    Sickle AI\nend\n\nwhen I receive [weapon get v]\ndelete this clone\n\n@Sp Wep Aura\n\nwhen flag clicked\nclear graphic effects\nhide\nforever\n    if <<<(Show stage select stars?) = [0]> and <(At Stage Select) = [0]>> and <<([canmove? v] of [hitbox v]) = [1]> and <not <(Megaman Costume) = [1]>>>> then\n        create clone of (_myself_ v)\n        wait (.2) seconds\n    end\nend\n\nwhen I start as a clone\nclear graphic effects\ngo to (mega man v)\ngo to [front v] layer\nchange x by (pick random (-35) to (35))\nchange y by (-30)\nif <(Megaman Costume) = [1]> then\n    delete this clone\nend\nshow\nset [y v] to [0]\nrepeat (20)\n    change [y v] by (1)\n    change y by (y)\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\nwhen I start as a clone\nif <(Megaman Costume) = [4]> then\n    switch costume to (boomerang v)\nend\nif <(Megaman Costume) = [6]> then\n    forever\n        switch costume to (deathsickle v)\n        wait (0) seconds\n        repeat (3)\n            next costume\n            wait (0) seconds\n        end\n    end\nend\nif <(Megaman Costume) = [2]> then\n    forever\n        switch costume to (omega chaser v)\n        repeat (2)\n            wait (.05) seconds\n            next costume\n        end\n        wait (.05) seconds\n    end\nend\nif <(Megaman Costume) = [3]> then\n    forever\n        switch costume to (beta v)\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n    end\nend\nif <(Megaman Costume) = [9]> then\n    forever\n        switch costume to (bass1 v)\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n    end\nend\nif <(Megaman Costume) = [7]> then\n    forever\n        switch costume to (proto1 v)\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n    end\nend\nif <(Megaman Costume) = [8]> then\n    forever\n        switch costume to (burnerflame v)\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n    end\nend\nif <(Megaman Costume) = [5]> then\n    forever\n        switch costume to (blaze1 v)\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n    end\nend\n\nwhen flag clicked\ngo to x: (-181) y: (-128)\nclear graphic effects\nhide\nforever\n    wait until <<(Show stage select stars?) = [0]> and <<([canmove? v] of [hitbox v]) = [1]> and <not <(Megaman Costume) = [1]>>>>\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    show\n    repeat (4)\n        change [ghost v] effect by (-25)\n        switch costume to ((Megaman Costume) + (8))\n    end\n    repeat until <not <<(Show stage select stars?) = [0]> and <<([canmove? v] of [hitbox v]) = [1]> and <not <(Megaman Costume) = [1]>>>>>\n        switch costume to ((Megaman Costume) + (8))\n    end\n    repeat (4)\n        change [ghost v] effect by (25)\n    end\n    hide\nend\n\n@Boss 2: electric boogaloo\n\nwhen flag clicked\nhide\n\nwhen I receive [bosscutscene v]\nset [boss_invincible? v] to [0]\nset rotation style [left-right v]\nset size to (200) %\nclear graphic effects\npoint in direction (-90)\nstop [other scripts in sprite v]\nif <(STAGE #) = [6]> then\n    set [bossbattle phase v] to [0]\n    go to [front v] layer\n    point in direction (-90)\n    go to x: (150) y: (300)\n    switch costume to (future1 v)\n    clear graphic effects\n    show\n    set [y v] to [-1.8]\n    repeat (17)\n        change [y v] by (-1)\n        change y by (y)\n    end\n    set [alt boss? v] to [1]\n    broadcast (Delta Idle Anim v)\nend\nif <(STAGE #) = [3]> then\n    wait (1) seconds\n    set [bossbattle phase v] to [0]\n    go to [front v] layer\n    point in direction (-90)\n    go to x: (172) y: (-99)\n    set [alt boss? v] to [1]\n    switch costume to (skullman1 v)\n    start sound [dr_teleport v]\n    clear graphic effects\n    show\n    repeat (2)\n        wait (.05) seconds\n        next costume\n    end\n    wait (.2) seconds\n    switch costume to (skullman5 v)\n    wait (.1) seconds\n    switch costume to (skullman4 v)\n    wait (.9) seconds\n    switch costume to (skullman3 v)\nend\nif <(STAGE #) = [4]> then\n    if <(Checkpoint #) = [2]> then\n        broadcast (Delta Idle Anim v)\n        set [bossbattle phase v] to [0]\n        go to [front v] layer\n        point in direction (-90)\n        go to x: (127) y: (-110)\n        wait (.05) seconds\n        set [alt boss? v] to [1]\n        set [brightness v] effect to (100)\n        start sound [thunder_03 v]\n        hide\n        repeat (25)\n            point in direction (90)\n            create clone of (_myself_ v)\n            point in direction (-90)\n            create clone of (_myself_ v)\n        end\n        set [major boss? v] to [1]\n        show\n        repeat (10)\n            wait (.05) seconds\n            change [brightness v] effect by (-10)\n        end\n    end\nend\n\nwhen I receive [init_battle v]\nwait (1) seconds\nclear graphic effects\nforever\n    if <<<touching (mega man v)?> and <<touching color (#fae0c1)?> and <not <touching (hitbox v)?>>>> or <touching (special weapons v)?>> then\n        if <not <(BOSS_INVINCIBLE?) = [0]>> then\n            start sound [cling v]\n            set [ghost v] effect to (90)\n            wait (.05) seconds\n            set [ghost v] effect to (0)\n            wait (.1) seconds\n        else\n            if <touching (special weapons v)?> then\n                set [universal hold v] to [0]\n                if <<(PHANTOM ARMOR?) = [1]> and <(Megaman Costume) = [1]>> then\n                    broadcast (Boss 4 DMG v)\n                    create clone of (boss hp v)\n                    set [dmg # v] to [4]\n                    set [dmg_x v] to ((Scroll X) + (x position))\n                    set [dmg_y v] to ((Scroll Y) + (y position))\n                    create clone of (dmg v)\n                    repeat (4)\n                        set [ghost v] effect to (90)\n                        wait (.05) seconds\n                        set [ghost v] effect to (0)\n                        wait (.1) seconds\n                    end\n                else\n                    if <<<(STAGE #) = [4]> and <(Megaman Costume) = [6]>> or <<<(STAGE #) = [6]> and <(Megaman Costume) = [4]>> or <<(STAGE #) = [3]> and <(Megaman Costume) = [3]>>>> then\n                        broadcast (BossWeaknessDMG v)\n                        create clone of (boss hp v)\n                        set [dmg # v] to [5]\n                        set [dmg_x v] to ((Scroll X) + (x position))\n                        set [dmg_y v] to ((Scroll Y) + (y position))\n                        create clone of (dmg v)\n                        repeat (4)\n                            set [ghost v] effect to (90)\n                            wait (.05) seconds\n                            set [ghost v] effect to (0)\n                            wait (.1) seconds\n                        end\n                    else\n                        broadcast (Boss get oofed v)\n                        create clone of (boss hp v)\n                        set [dmg # v] to [2]\n                        set [dmg_x v] to ((Scroll X) + (x position))\n                        set [dmg_y v] to ((Scroll Y) + (y position))\n                        create clone of (dmg v)\n                        repeat (4)\n                            set [ghost v] effect to (90)\n                            wait (.05) seconds\n                            set [ghost v] effect to (0)\n                            wait (.1) seconds\n                        end\n                    end\n                end\n            else\n                broadcast (BossDMG v)\n                create clone of (boss hp v)\n                if <(Universal Hold) > [40]> then\n                    change [hp v] by (-3)\n                    set [dmg # v] to [3]\n                    set [dmg_x v] to ((Scroll X) + (x position))\n                    set [dmg_y v] to ((Scroll Y) + (y position))\n                    create clone of (dmg v)\n                else\n                    change [hp v] by (-1)\n                    set [dmg # v] to [1]\n                    set [dmg_x v] to ((Scroll X) + (x position))\n                    set [dmg_y v] to ((Scroll Y) + (y position))\n                    create clone of (dmg v)\n                end\n                repeat (4)\n                    set [ghost v] effect to (90)\n                    wait (.05) seconds\n                    set [ghost v] effect to (0)\n                    wait (.1) seconds\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [init_battle v]\nwait (1) seconds\nclear graphic effects\nforever\n    if <<touching (hitbox v)?> and <(takingdmg) = [0]>> then\n        change [health v] by (3)\n        broadcast (KNOCKBACK v)\n        broadcast (TAKE DMG v)\n        wait (3) seconds\n    end\nend\n\nwhen I receive [haha u lose v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [ready v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [delta idle anim v]\nif <(STAGE #) = [6]> then\n    set [y v] to [0]\n    forever\n        switch costume to (future1 v)\n        repeat (2)\n            change [y v] by (8)\n            set y to (([sin v] of (y) ) * (25))\n        end\n        next costume\n        repeat (2)\n            change [y v] by (8)\n            set y to (([sin v] of (y) ) * (25))\n        end\n    end\nelse\n    forever\n        switch costume to (doc1 v)\n        repeat (2)\n            wait (.05) seconds\n            next costume\n        end\n        wait (.02) seconds\n    end\nend\n\nrepeat (2)\n    set y to (7)\nend\n\nwhen I start as a clone\ngo to [front v] layer\nswitch costume to (costume1 v)\nshow\nset [y v] to [0]\nrepeat until <([abs v] of (x position) ) > [200]>\n    move (y) steps\n    change [y v] by (2)\nend\ndelete this clone\n\nwhen I receive [battle begin v]\nstop [other scripts in sprite v]\nset [boss_invincible? v] to [0]\nwait (.1) seconds\nif <(STAGE #) = [6]> then\n    broadcast (Init_battle v)\n    wait (2) seconds\n    set [x v] to [60]\n    set [y v] to [0]\n    forever\n        repeat (pick random (50) to (100))\n            switch costume to ((25) + <((round ((timer) * (15))) mod (2)) = [1]>)\n            set x to (([sin v] of (x) ) * (180))\n            set y to (([sin v] of (y) ) * (25))\n            change [x v] by (([costume # v] of [boss hp v]) / (3))\n            change [y v] by (9)\n            point towards (mega man v)\n        end\n        if <<(pick random (1) to (3)) = [1]> and <([costume # v] of [boss hp v]) > [6]>> then\n            Boss Attack [2] []\n        else\n            Boss Attack [1] []\n        end\n    end\nend\nif <(STAGE #) = [3]> then\n    broadcast (Init_battle v)\n    wait (2) seconds\n    wait until <key (any v) pressed?>\n    Boss Attack [4] []\n    switch costume to (skullman3 v)\n    wait (.3) seconds\n    forever\n        Boss Attack [1] []\n        repeat (50)\n            if <(Bossattack_Release) = [1]> then\n                if <([costume # v] of [boss hp v]) > [24]> then\n                    Boss Attack [4] []\n                end\n                Boss Attack [1] []\n            end\n        end\n        switch costume to (skullman3 v)\n        wait (.1) seconds\n        Boss Attack [3] []\n        if <([costume # v] of [boss hp v]) > [13]> then\n            Boss Attack [2] []\n        end\n        if <<(pick random (1) to ([ceiling v] of (([abs v] of ((25) + ([costume # v] of [boss hp v])) ) / (2)) )) = [1]> or <([costume # v] of [boss hp v]) > [20]>> then\n            Boss Attack [4] []\n        end\n        wait (.1) seconds\n        switch costume to (skullman3 v)\n        Boss Attack [3] []\n        wait (.1) seconds\n        switch costume to (skullman3 v)\n        wait (.4) seconds\n    end\nend\nif <<(STAGE #) = [4]> and <(Checkpoint #) = [2]>> then\n    broadcast (Init_battle v)\n    wait (1) seconds\n    forever\n        Boss Attack [1] []\n        set [boss_invincible? v] to [1]\n        broadcast (Screen Blink v)\n        set [darkness v] to [0]\n        set [brightness v] effect to (100)\n        start sound [thunder_03 v]\n        broadcast (@Killoff devils v)\n        hide\n        repeat (15)\n            point in direction (90)\n            create clone of (_myself_ v)\n            point in direction (-90)\n            create clone of (_myself_ v)\n        end\n        repeat (4)\n            change [darkness v] by (-25)\n        end\n        wait (.1) seconds\n        broadcast (ScreenShake v)\n        set [y v] to [.5]\n        repeat (5)\n            wait (y) seconds\n            Boss Attack [2] [1]\n            change [y v] by (-.1)\n        end\n        wait (2) seconds\n        Boss Attack [2] [2]\n        wait (1.5) seconds\n        go to [front v] layer\n        point in direction (-90)\n        go to x: (x position) y: (-110)\n        wait (.05) seconds\n        set [brightness v] effect to (100)\n        start sound [thunder_03 v]\n        broadcast (ScreenShake v)\n        switch costume to (doc1 v)\n        hide\n        repeat (25)\n            point in direction (90)\n            create clone of (_myself_ v)\n            point in direction (-90)\n            create clone of (_myself_ v)\n        end\n        show\n        set [darkness v] to [-100]\n        repeat (10)\n            wait (.05) seconds\n            change [darkness v] by (10)\n            change [brightness v] effect by (-10)\n        end\n        wait (.5) seconds\n        start sound [shovel_upgrade_charge_slash v]\n        set [boss_invincible? v] to [2]\n        broadcast (@Create Devils v)\n        repeat (4)\n            set [brightness v] effect to (80)\n            wait (.05) seconds\n            set [brightness v] effect to (0)\n            wait (.05) seconds\n        end\n        repeat (3)\n            repeat (3)\n                Boss Attack [1] []\n            end\n            point towards (mega man v)\n            Boss Attack [3] [25]\n        end\n        repeat (2)\n            Boss Attack [4] [0]\n            wait (.2) seconds\n        end\n        wait (.4) seconds\n        switch costume to (doc1 v)\n        wait (.5) seconds\n    end\nend\n\ndefine Boss Attack (attack) (variation)\nif <(STAGE #) = [6]> then\n    if <(attack) = [1]> then\n        switch costume to (futurethrow1 v)\n        wait (.1) seconds\n        next costume\n        point towards (mega man v)\n        set [proj direction v] to (direction)\n        set [proj x v] to (((Scroll X) + (x position)) + (([sin v] of (direction) ) * (25)))\n        set [proj y v] to ((Scroll Y) + (y position))\n        set [projectile name v] to [futurescyth]\n        broadcast (@CREATE ALT PROJECTILE v)\n        wait (.1) seconds\n        switch costume to (futurenoscyth1 v)\n        repeat (2)\n            wait (.1) seconds\n            next costume\n        end\n        wait until <(Bossattack_Release) = [0]>\n        switch costume to (future1 v)\n        wait (.2) seconds\n        switch costume to (futurechant1 v)\n        start sound [cutter v]\n        repeat (2)\n            wait (.1) seconds\n            next costume\n        end\n        wait (.1) seconds\n        switch costume to (future1 v)\n    end\n    if <(attack) = [2]> then\n        switch costume to (futurethind2 v)\n        wait (.1) seconds\n        next costume\n        point towards (mega man v)\n        repeat (8)\n            set [proj direction v] to (direction)\n            set [proj x v] to (((Scroll X) + (x position)) + (([sin v] of (direction) ) * (90)))\n            set [proj y v] to (((Scroll Y) + (y position)) + (([cos v] of (direction) ) * (90)))\n            set [projectile name v] to [psisickle]\n            broadcast (@CREATE ALT PROJECTILE v)\n            wait (0) seconds\n            turn right (45) degrees\n        end\n    end\nend\nif <(STAGE #) = [3]> then\n    if <(attack) = [4]> then\n        set [boss_invincible? v] to [1]\n        point towards (mega man v)\n        start sound [dr_teleport v]\n        switch costume to (skullman2 v)\n        wait (.05) seconds\n        switch costume to (skullman1 v)\n        wait (.05) seconds\n        repeat (4)\n            change [ghost v] effect by (25)\n        end\n        hide\n        go to (mega man v)\n        set y to (-99)\n        wait (1) seconds\n        show\n        start sound [dr_teleport v]\n        repeat (4)\n            change [ghost v] effect by (-25)\n        end\n        point towards (mega man v)\n        clear graphic effects\n        set [boss_invincible? v] to [0]\n        repeat (2)\n            wait (.05) seconds\n            next costume\n        end\n    end\n    if <(attack) = [3]> then\n        set [y v] to ((distance to [hitbox v]) / (12))\n        set [x v] to ((distance to [hitbox v]) / (30))\n        switch costume to (skulljump1 v)\n        point towards (mega man v)\n        repeat (3)\n            change y by (y)\n            move (x) steps\n            change [y v] by (-1.5)\n            if <(x position) > [200]> then\n                set x to (200)\n            end\n            if <(x position) < [-200]> then\n                set x to (-200)\n            end\n        end\n        repeat until <(y position) < [-80]>\n            change y by (y)\n            move (x) steps\n            change [y v] by (-1.5)\n            if <(x position) > [200]> then\n                set x to (200)\n            end\n            if <(x position) < [-200]> then\n                set x to (-200)\n            end\n        end\n        set y to (-99)\n        switch costume to (skullman3 v)\n    end\n    if <(attack) = [2]> then\n        switch costume to (skullbarrier1 v)\n        wait (.4) seconds\n        next costume\n        point in direction (-90)\n        repeat (5)\n            set [proj direction v] to (direction)\n            set [proj x v] to (((Scroll X) + (x position)) + (([sin v] of (direction) ) * (25)))\n            set [proj y v] to ((Scroll Y) + (y position))\n            set [projectile name v] to [present]\n            broadcast (@CREATE ALT PROJECTILE v)\n            wait (.1) seconds\n            turn right (-45) degrees\n        end\n        wait (.2) seconds\n        switch costume to (skullman3 v)\n        point towards (mega man v)\n    end\n    if <(attack) = [1]> then\n        switch costume to (skullman5 v)\n        repeat (2)\n            wait (.1) seconds\n            next costume\n        end\n        point towards (mega man v)\n        set [proj direction v] to (direction)\n        set [proj x v] to (((Scroll X) + (x position)) + (([sin v] of (direction) ) * (25)))\n        set [proj y v] to ((Scroll Y) + (y position))\n        set [projectile name v] to [boomerang]\n        broadcast (@CREATE ALT PROJECTILE v)\n        wait (.1) seconds\n    end\nend\nif <(STAGE #) = [4]> then\n    if <(attack) = [4]> then\n        switch costume to (docthrow1 v)\n        wait (.1) seconds\n        next costume\n        point towards (mega man v)\n        set [proj direction v] to (direction)\n        set [proj x v] to ((Scroll X) + (x position))\n        set [proj y v] to ((Scroll Y) + (y position))\n        set [projectile name v] to [met]\n        broadcast (@CREATE ALT PROJECTILE v)\n        wait (.2) seconds\n    end\n    if <(attack) = [3]> then\n        set [y v] to (variation)\n        start sound [enemy_large_land v]\n        switch costume to (docjump v)\n        repeat (10)\n            change y by (y)\n            move (7) steps\n            change [y v] by (-1.5)\n            if <(x position) > [200]> then\n                set x to (200)\n            end\n            if <(x position) < [-200]> then\n                set x to (-200)\n            end\n        end\n        repeat until <(y position) < [-100]>\n            change y by (y)\n            move (7) steps\n            change [y v] by (-1.5)\n            if <(x position) > [200]> then\n                set x to (200)\n            end\n            if <(x position) < [-200]> then\n                set x to (-200)\n            end\n        end\n        start sound [enemy_large_land v]\n        set y to (-110)\n        switch costume to (doc1 v)\n    end\n    if <(attack) = [2]> then\n        if <(variation) = [1]> then\n            go to (random position v)\n            set y to (pick random (125) to (150))\n            point towards (mega man v)\n            set [proj direction v] to (direction)\n            set [proj x v] to ((Scroll X) + (x position))\n            set [proj y v] to ((Scroll Y) + (y position))\n            set [projectile name v] to [wilyorb]\n            broadcast (@CREATE ALT PROJECTILE v)\n        else\n            go to (random position v)\n            set y to (pick random (125) to (150))\n            point towards (mega man v)\n            repeat (2)\n                set [bossattack_release v] to [0]\n                set [proj direction v] to [90]\n                set [proj x v] to ((Scroll X) + (x position))\n                set [proj y v] to ((Scroll Y) + (y position))\n                set [projectile name v] to [altorb]\n                broadcast (@CREATE ALT PROJECTILE v)\n                wait (.4) seconds\n            end\n            set [y v] to [0]\n            repeat (150)\n                change [y v] by (4)\n                move (([sin v] of (y) ) * ((([costume # v] of [boss hp v]) / (2)) + (4))) steps\n                point towards (mega man v)\n            end\n            set [bossattack_release v] to [1]\n        end\n    end\n    if <(attack) = [1]> then\n        set [y v] to [0]\n        repeat until <<<touching (mega man v)?> or <touching (special weapons v)?>> or <(y) > [1]>>\n            if <([x position v] of [mega man v]) < (x position)> then\n                point in direction (-90)\n            else\n                point in direction (90)\n            end\n            switch costume to (doc4 v)\n            change [y v] by (1)\n            repeat (2)\n                if <not <<touching (mega man v)?> or <touching (special weapons v)?>>> then\n                    start sound [enemy_large_land v]\n                    repeat (3)\n                        repeat (3)\n                            if <not <<touching (mega man v)?> or <touching (special weapons v)?>>> then\n                                if <(direction) = [90]> then\n                                    change x by (3)\n                                else\n                                    change x by (-3)\n                                end\n                                if <<touching (mega man v)?> or <touching (special weapons v)?>> then\n                                    change [y v] by (5)\n                                end\n                            end\n                        end\n                        if <not <<touching (special weapons v)?> or <touching (mega man v)?>>> then\n                            next costume\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [bossdie v]\nif <(STAGE #) = [3]> then\n    stop [other scripts in sprite v]\n    broadcast (@Alpha Escape v)\n    switch costume to (skullman1 v)\n    start sound [dr_teleport v]\n    clear graphic effects\n    show\n    repeat (4)\n        set [brightness v] effect to (100)\n        wait (.05) seconds\n        clear graphic effects\n        wait (.05) seconds\n    end\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    hide\nend\nif <<(Checkpoint #) = [2]> and <(STAGE #) = [4]>> then\n    stop [other scripts in sprite v]\n    set [bossbattle phase v] to [0]\n    go to [front v] layer\n    set [brightness v] effect to (100)\n    start sound [thunder_03 v]\n    hide\n    set [has credit card? v] to [0]\n    set [darkness v] to [0]\n    repeat (15)\n        point in direction (90)\n        create clone of (_myself_ v)\n        point in direction (-90)\n        create clone of (_myself_ v)\n    end\n    set [alt boss? v] to [0]\nelse\n    stop [other scripts in sprite v]\n    hide\nend\n\nwhen I receive [stage selected v]\nset size to (200) %\nwait (1.5) seconds\nif <(STAGE #) = [6]> then\n    go to [front v] layer\n    point in direction (90)\n    go to x: (0) y: (300)\n    switch costume to (future1 v)\n    clear graphic effects\n    show\n    set [y v] to [-1.8]\n    repeat (17)\n        change [y v] by (-1)\n        change y by (y)\n    end\n    repeat (10)\n        switch costume to (future1 v)\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n    end\n    switch costume to (futurechant1 v)\n    wait (.05) seconds\n    repeat (2)\n        next costume\n        wait (.05) seconds\n    end\nend\nif <(STAGE #) = [3]> then\n    point in direction (90)\n    go to x: (0) y: (999)\n    switch costume to (skulljump1 v)\n    set size to (200) %\n    clear graphic effects\n    go to [front v] layer\n    set [y v] to [-1.8]\n    show\n    repeat (12)\n        change [y v] by (-2)\n        change y by (y)\n    end\n    set y to (13)\n    switch costume to (skullman3 v)\n    wait (.2) seconds\n    switch costume to (skullman5 v)\n    wait (.1) seconds\n    repeat (4)\n        switch costume to (skullman6 v)\n        wait (.05) seconds\n        next costume\n        wait (.05) seconds\n    end\n    switch costume to (skullman5 v)\n    wait (.1) seconds\n    switch costume to (skullbarrier1 v)\n    wait (.1) seconds\n    switch costume to (skullbarrier2 v)\nend\n\n@what? more projectiles?\n\nwhen flag clicked\nset size to (200) %\nhide\n\nwhen I receive [stage select v]\ndelete this clone\n\nwhen I receive [bossdie v]\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <<touching (hitbox v)?> and <(takingdmg) = [0]>> then\n        if <(INVINCIBILITY) = [0]> then\n            change [health v] by (1)\n            broadcast (TAKE DMG v)\n            broadcast (KNOCKBACK v)\n            if <<not <(STAGE #) = [3]>> and <not <(STAGE #) = [6]>>> then\n                stop [other scripts in sprite v]\n                switch costume to (enemeexp1 v)\n                repeat (4)\n                    wait (0) seconds\n                    next costume\n                end\n                wait (0) seconds\n                delete this clone\n            end\n        end\n    end\nend\n\nwhen I receive [@create alt 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 [internal timer v] to [0]\nrepeat until <(internal timer) > [1]>\n    wait (6) seconds\n    change [internal timer v] by (1)\nend\ndelete this clone\n\nwhen I start as a clone\nforever\n    set x to ((Level_X) - (Scroll X))\n    set y to ((Level_Y) - (Scroll Y))\n    if <<([abs v] of ((Level_X) - (Scroll X)) ) > [350]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [200]>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I start as a clone\nset [clone v] to [1]\nset rotation style [left-right v]\npoint in direction (PROJ DIRECTION)\ngo to [front v] layer\nshow\nif <(costume [number v]) = [32]> then\n    start sound [shoot v]\n    set [x v] to [11]\n    set [y v] to [0]\n    repeat (4)\n        change [level_x v] by (([sin v] of (direction) ) * (x))\n        change [level_y v] by ((([cos v] of (direction) ) * (x)) + (y))\n    end\n    repeat until <<touching (hitbox v)?> or <touching (ground v)?>>\n        change [level_x v] by (([sin v] of (direction) ) * (x))\n        change [level_y v] by ((([cos v] of (direction) ) * (x)) + (y))\n    end\n    Explosion\nend\nif <(costume [number v]) = [41]> then\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [45]> then\n    set [x v] to [3]\n    wait (1) seconds\n    point towards (mega man v)\n    repeat (10)\n        repeat (2)\n            change [level_x v] by (([sin v] of (direction) ) * (x))\n            change [level_y v] by (([cos v] of (direction) ) * (x))\n            change [x v] by (3)\n        end\n        set [proj x v] to (Level_X)\n        set [proj y v] to (Level_Y)\n        set [proj direction v] to (direction)\n        set [projectile name v] to [deathsickle]\n        broadcast (@CREATE ALT PROJECTILE v)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [33]> then\n    set [x v] to [3]\n    set [bossattack_release v] to [1]\n    repeat (25)\n        change [level_x v] by (([sin v] of (direction) ) * (x))\n        change [level_y v] by (([cos v] of (direction) ) * (x))\n        point towards (mega man v)\n        change [x v] by (.5)\n    end\n    repeat until <touching (boss 2: electric boogaloo v)?>\n        change [x v] by (.2)\n        change [level_x v] by (([sin v] of (direction) ) * (x))\n        change [level_y v] by (([cos v] of (direction) ) * (x))\n        point towards (boss 2: electric boogaloo v)\n        change [x v] by (.2)\n    end\n    set [bossattack_release v] to [0]\n    delete this clone\nend\nif <(costume [number v]) = [31]> then\n    switch costume to (enemeexp1 v)\n    repeat (4)\n        wait (0) seconds\n        next costume\n    end\n    wait (0) seconds\n    set [x v] to [8]\n    set [y v] to [10]\n    switch costume to (scannonshot v)\n    repeat until <<touching (hitbox v)?> or <touching (ground v)?>>\n        change [level_x v] by (([sin v] of (direction) ) * (x))\n        change [level_y v] by ((([cos v] of (direction) ) * (x)) + (y))\n        point towards (mega man v)\n        change [y v] by (-1)\n    end\n    Explosion\nend\nif <(costume [number v]) = [23]> then\n    start sound [raiment_projectile v]\n    set [x v] to [5]\n    set [y v] to [20]\n    repeat until <<touching (hitbox v)?> or <touching (ground v)?>>\n        change [level_x v] by (([sin v] of (direction) ) * (x))\n        change [level_y v] by ((([cos v] of (direction) ) * (x)) + (y))\n        change [y v] by (-1.5)\n    end\n    start sound [plague_component_globe_explode v]\n    stop [other scripts in sprite v]\n    switch costume to (alphax1 v)\n    repeat (4)\n        if <<touching (hitbox v)?> and <(takingdmg) = [0]>> then\n            if <(INVINCIBILITY) = [0]> then\n                change [health v] by (1)\n                broadcast (TAKE DMG v)\n                broadcast (KNOCKBACK v)\n            end\n        end\n        wait (0) seconds\n        next costume\n    end\n    wait (0) seconds\n    delete this clone\nend\nif <(costume [number v]) = [15]> then\n    start sound [cutter v]\n    set [x v] to [9]\n    repeat until <touching (hitbox v)?>\n        point towards (hitbox v)\n        change [level_x v] by (([sin v] of (direction) ) * (x))\n        change [level_y v] by (([cos v] of (direction) ) * (x))\n    end\n    set [y v] to [1]\n    start sound [menu_back v]\n    wait (.1) seconds\n    repeat until <touching (boss 2: electric boogaloo v)?>\n        point towards (boss 2: electric boogaloo v)\n        change [level_x v] by (([sin v] of (direction) ) * (x))\n        change [level_y v] by (([cos v] of (direction) ) * (x))\n        change [x v] by (1)\n    end\n    set [bossattack_release v] to [0]\n    repeat (3)\n        start sound [Mega Man 5 SFX \(16\) v]\n        point towards (boss 2: electric boogaloo v)\n        change [level_x v] by (([sin v] of (direction) ) * (x))\n        change [level_y v] by (([cos v] of (direction) ) * (x))\n        change [x v] by (1)\n    end\n    broadcast (Boss Heal v)\n    delete this clone\nend\nif <(costume [number v]) = [14]> then\n    set [x v] to [0]\n    repeat (5)\n        change [level_y v] by (x)\n        change [x v] by (-3)\n    end\n    repeat until <<touching (ground v)?> or <touching (_edge_ v)?>>\n        change [level_y v] by (x)\n        change [x v] by (-2)\n    end\n    if <touching (ground v)?> then\n        start sound [Mega Man 6 SRX \(67\) v]\n        switch costume to (enemeexp1 v)\n        repeat (4)\n            wait (0) seconds\n            next costume\n        end\n        wait (0) seconds\n        delete this clone\n    else\n        repeat (10)\n            change [level_y v] by (x)\n            change [x v] by (-1)\n        end\n        delete this clone\n    end\nend\nif <(costume [number v]) = [12]> then\n    set [x v] to [10]\n    repeat (50)\n        change [level_x v] by (([sin v] of (direction) ) * (x))\n        change [level_y v] by (([cos v] of (direction) ) * (x))\n        change [x v] by (.1)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [1]> then\n    set [x v] to [0]\n    start sound [plague_sparkler_explode v]\n    wait (.3) seconds\n    set [y v] to [0]\n    repeat (150)\n        change [level_x v] by ((([sin v] of (direction) ) * (x)) + (([sin v] of (y) ) * (25)))\n        change [level_y v] by ((([cos v] of (direction) ) * (x)) + (([cos v] of (y) ) * (25)))\n        change [x v] by (.1)\n        change [y v] by (15)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [4]> then\n    set [x v] to [0]\n    start sound [raiment_projectile v]\n    set [y v] to [0]\n    repeat until <(Bossattack_Release) = [1]>\n        set [level_x v] to (((Scroll X) + ([x position v] of [boss 2: electric boogaloo v])) + (([sin v] of (y) ) * (45)))\n        set [level_y v] to (((Scroll Y) + ([y position v] of [boss 2: electric boogaloo v])) + (([cos v] of (y) ) * (45)))\n        change [y v] by (15)\n    end\n    point towards (mega man v)\n    start sound [plague_sparkler_explode v]\n    repeat (50)\n        change [level_x v] by (([sin v] of (direction) ) * (x))\n        change [level_y v] by (([cos v] of (direction) ) * (x))\n        change [x v] by (5)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [23]> then\n    wait (.05) seconds\n    forever\n        switch costume to (present v)\n        repeat (2)\n            wait (.05) seconds\n            next costume\n        end\n        wait (.05) seconds\n    end\nend\nif <(costume [number v]) = [15]> then\n    set [y v] to [0]\n    wait (.05) seconds\n    forever\n        if <(Y) = [0]> then\n            switch costume to (boomerang v)\n        else\n            switch costume to (boomerang5 v)\n        end\n        wait (.05) seconds\n        if <(Y) = [0]> then\n            switch costume to (boomerang2 v)\n        else\n            switch costume to (boomerang6 v)\n        end\n        wait (.05) seconds\n        if <(Y) = [0]> then\n            switch costume to (boomerang3 v)\n        else\n            switch costume to (boomerang6 v)\n        end\n        wait (.05) seconds\n        if <(Y) = [0]> then\n            switch costume to (boomerang4 v)\n        else\n            switch costume to (boomerang8 v)\n        end\n        wait (.05) seconds\n    end\nend\nif <(costume [number v]) = [1]> then\n    wait (.05) seconds\n    switch costume to (enemeexp1 v)\n    repeat (4)\n        wait (0) seconds\n        next costume\n    end\n    wait (0) seconds\n    forever\n        switch costume to (wilyorb v)\n        repeat (2)\n            wait (0) seconds\n            next costume\n        end\n        wait (0) seconds\n    end\nend\nif <(costume [number v]) = [4]> then\n    forever\n        switch costume to (altorb v)\n        repeat (2)\n            wait (0) seconds\n            next costume\n        end\n        wait (0) seconds\n    end\nend\nif <(costume [number v]) = [12]> then\n    start sound [Mega Man 2 SFX \(21\) v]\n    forever\n        switch costume to (met v)\n        wait (0) seconds\n        next costume\n        wait (0) seconds\n    end\nend\nif <(costume [number v]) = [33]> then\n    start sound [raiment_projectile v]\n    forever\n        switch costume to (futurescyth v)\n        wait (0) seconds\n        repeat (7)\n            next costume\n            wait (0) seconds\n        end\n    end\nend\nif <(costume [number v]) = [45]> then\n    start sound [plague_sparkler_explode v]\n    forever\n        switch costume to (psisickle v)\n        wait (.04) seconds\n        repeat (3)\n            next costume\n            wait (0.04) seconds\n        end\n    end\nend\nif <(costume [number v]) = [41]> then\n    forever\n        switch costume to (deathsickle v)\n        wait (.04) seconds\n        repeat (3)\n            next costume\n            wait (0.04) seconds\n        end\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [15]> then\n    set [bossattack_release v] to [0]\n    forever\n        if <<<<touching (mega man v)?> and <touching color (#fae0c1)?>> and <not <touching (hitbox v)?>>> or <touching (special weapons v)?>> then\n            stop [other scripts in sprite v]\n            switch costume to (enemeexp1 v)\n            start sound [Mega Man 6 SRX \(19\) v]\n            repeat (4)\n                wait (0) seconds\n                next costume\n            end\n            wait (0) seconds\n            set [bossattack_release v] to [1]\n            delete this clone\n        end\n    end\nend\n\nwhen I receive [ready v]\ndelete this clone\n\ndefine Explosion\nstart sound [plague_component_globe_explode v]\nstop [other scripts in sprite v]\nswitch costume to (enemeexp1 v)\nrepeat (4)\n    set x to ((Level_X) - (Scroll X))\n    set y to ((Level_Y) - (Scroll Y))\n    if <<touching (hitbox v)?> and <(takingdmg) = [0]>> then\n        if <(INVINCIBILITY) = [0]> then\n            change [health v] by (1)\n            broadcast (TAKE DMG v)\n            broadcast (KNOCKBACK v)\n        end\n    end\n    wait (0) seconds\n    next costume\nend\nwait (0) seconds\ndelete this clone\n\n@c'mon! not more enemies\n\ndefine Create Enemy (what enemy ) (x) (y) (attribute)\ngo to [front v] layer\nset size to (200) %\nset rotation style [left-right v]\nswitch costume to (what enemy )\nset [attr v] to (attribute)\nset [level_x v] to (x)\nset [level_y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [die v]\nwait (3) seconds\ndelete this clone\n\nwhen I start as a clone\nshow\nset rotation style [left-right v]\n\nwhen I start as a clone\nrepeat (10)\n    go to [front v] layer\nend\n\nwhen I start as a clone\nwait (.1) seconds\nforever\n    wait until <<(HP) < [1]> or <<(HP) > [0]> and <<<<touching (mega man v)?> and <touching color (#fae0c1)?>> and <not <touching (hitbox v)?>>> or <touching (special weapons v)?>>>>\n    if <(HP) < [1]> then\n        die\n    else\n        if <<<(costume [number v]) > [81]> and <(costume [number v]) < [84]>> or <<<<(costume [number v]) > [20]> and <(costume [number v]) < [23]>> or <(costume [number v]) = [24]>> and <<<([x position v] of [mega man v]) < (x position)> and <(direction) = [-90]>> or <<(x position) < ([x position v] of [mega man v])> and <(direction) = [90]>>>>> then\n            start sound [cling v]\n            set [ghost v] effect to (100)\n            wait (.1) seconds\n            clear graphic effects\n            wait (.05) seconds\n        else\n            if <(Megaman Costume) > [1]> then\n                change [hp v] by (-2)\n                set [dmg # v] to [2]\n            else\n                if <(Universal Hold) > [20]> then\n                    if <<(PHANTOM ARMOR?) = [1]> and <(Universal Hold) > [20]>> then\n                        change [hp v] by (-4)\n                        set [dmg # v] to [4]\n                    else\n                        change [hp v] by (-3)\n                        set [dmg # v] to [3]\n                    end\n                else\n                    change [hp v] by (-1)\n                    set [dmg # v] to [1]\n                end\n            end\n            set [dmg_x v] to (Level_X)\n            set [dmg_y v] to (Level_Y)\n            create clone of (dmg v)\n            if <(HP) < [1]> then\n                die\n            else\n                if <(Megaman Costume) = [8]> then\n                    start sound [SE \[11\] v]\n                    set [brightness v] effect to (100)\n                    wait (0) seconds\n                    clear graphic effects\n                    wait (0) seconds\n                else\n                    start sound [SE \[11\] v]\n                    set [brightness v] effect to (100)\n                    wait (.1) seconds\n                    clear graphic effects\n                    wait (.05) seconds\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nset [zx v] to [0]\nset [clone v] to [1]\nif <(costume [number v]) = [31]> then\n    wait (.1) seconds\n    set [x v] to (Level_X)\n    set [y v] to (Level_Y)\n    set [zx v] to [1]\n    set [zy v] to [0]\n    set [hp v] to [1]\n    forever\n        if <(ENEMY ONSCREEN?) = [1]> then\n            point in direction (-90)\n            change [level_x v] by (([sin v] of (direction) ) * (4))\n            if <((round ((timer) * (25))) mod (8)) = [1]> then\n                start sound [SE \[4\]2 v]\n            end\n            change [level_y v] by (([sin v] of (Zy) ) * (2))\n            change [zy v] by (6)\n            if <(HP) < [1]> then\n                start sound [Mega Man 6 SRX \(19\) v]\n                switch costume to (enemeexp1 v)\n                repeat (4)\n                    wait (0) seconds\n                    next costume\n                end\n                wait (0) seconds\n                set [level_x v] to (x)\n                set [level_y v] to (y)\n                set [ghost v] effect to (100)\n                wait (.5) seconds\n                set [hp v] to [0]\n                wait until <(ENEMY ONSCREEN?) = [0]>\n                set [hp v] to [0]\n                set [zy v] to [0]\n                wait until <(ENEMY ONSCREEN?) = [1]>\n                switch costume to (uf v)\n                clear graphic effects\n                set [hp v] to [1]\n            end\n        end\n        if <(ENEMY ONSCREEN?) = [0]> then\n            set [level_x v] to (x)\n            set [level_y v] to (y)\n            set [ghost v] effect to (100)\n            set [hp v] to [0]\n            wait (.5) seconds\n            wait until <(ENEMY ONSCREEN?) = [0]>\n            set [zy v] to [0]\n            wait until <(ENEMY ONSCREEN?) = [1]>\n            switch costume to (uf v)\n            clear graphic effects\n            set [hp v] to [1]\n        end\n    end\nend\nif <(costume [number v]) = [25]> then\n    wait (.1) seconds\n    set [x v] to (Level_X)\n    set [y v] to (Level_Y)\n    set [zx v] to [1]\n    set [hp v] to [1]\n    forever\n        if <(ENEMY ONSCREEN?) = [1]> then\n            point towards (mega man v)\n            change [level_x v] by (([sin v] of (direction) ) * (2))\n            change [level_y v] by (([cos v] of (direction) ) * (2))\n            if <(HP) < [1]> then\n                start sound [Mega Man 6 SRX \(19\) v]\n                switch costume to (enemeexp1 v)\n                repeat (4)\n                    wait (0) seconds\n                    next costume\n                end\n                wait (0) seconds\n                set [level_x v] to (x)\n                set [level_y v] to (y)\n                set [ghost v] effect to (100)\n                wait (.5) seconds\n                switch costume to (telly v)\n                wait (.5) seconds\n                if <(ENEMY ONSCREEN?) = [1]> then\n                    start sound [heirloom_ghostglove_03 v]\n                end\n                set [hp v] to [1]\n                repeat (4)\n                    set [ghost v] effect to (100)\n                    wait (0) seconds\n                    set [ghost v] effect to (0)\n                    wait (0) seconds\n                end\n            end\n        end\n    end\nend\nif <(costume [number v]) = [21]> then\n    switch costume to (rjoe v)\n    set [hp v] to [4]\n    set [x v] to (Level_Y)\n    forever\n        repeat until <<(ENEMY ONSCREEN?) = [1]> and <<(distance to [mega man v]) < [200]> or <touching (mega man v)?>>>\n            if <([x position v] of [mega man v]) < (x position)> then\n                point in direction (-90)\n            else\n                point in direction (90)\n            end\n        end\n        switch costume to (rjoe v)\n        if <([x position v] of [mega man v]) < (x position)> then\n            point in direction (-90)\n        else\n            point in direction (90)\n        end\n        repeat (2)\n            wait (.05) seconds\n            next costume\n        end\n        repeat (5)\n            wait (.05) seconds\n            set [proj direction v] to (direction)\n            set [proj x v] to ((Level_X) + (([sin v] of (direction) ) * (35)))\n            set [proj y v] to ((Level_Y) + (-7))\n            set [projectile name v] to [rjoeshot]\n            broadcast (@CREATE ALT PROJECTILE v)\n        end\n        wait (.05) seconds\n        switch costume to (rjoe2 v)\n        wait (.05) seconds\n        switch costume to (rjoe v)\n        wait (pick random (.2) to (1)) seconds\n        switch costume to (rjoe4 v)\n        set [y v] to (((([y position v] of [mega man v]) - (y position)) / (15)) + (5))\n        repeat (4)\n            change [level_y v] by (y)\n            change [y v] by (-1)\n        end\n        repeat until <((Level_Y) + (-10)) < (x)>\n            change [level_y v] by (y)\n            change [y v] by (-1)\n        end\n        set [level_y v] to (x)\n        switch costume to (rjoe v)\n        wait (pick random (.6) to (2)) seconds\n    end\nend\nif <(costume [number v]) = [1]> then\n    set [hp v] to [5]\n    point towards (mega man v)\n    set [x v] to [0]\n    forever\n        set [level_x v] to (((Scroll X) + ([x position v] of [boss 2: electric boogaloo v])) + (([sin v] of (x) ) * (55)))\n        set [level_y v] to (((Scroll Y) + ([y position v] of [boss 2: electric boogaloo v])) + (([cos v] of (x) ) * (55)))\n        change [x v] by (5)\n    end\nend\nif <(costume [number v]) = [17]> then\n    set [hp v] to [2]\n    wait until <(ENEMY ONSCREEN?) = [1]>\n    set [x v] to [0]\n    point in direction (-90)\n    set [y v] to [0]\n    repeat (75)\n        change [x v] by ((a) * (-.03))\n        change [level_x v] by (x)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [9]> then\n    set [hp v] to [15]\n    wait until <(ENEMY ONSCREEN?) = [1]>\n    set [x v] to [0]\n    set [y v] to [0]\n    repeat (25)\n        change [x v] by ((a) * (.03))\n        change [level_x v] by (x)\n    end\n    repeat (5)\n        repeat (8)\n            change [level_x v] by (x)\n        end\n        start sound [Mega Man 6 SRX \(36\) v]\n        set [proj direction v] to [90]\n        set [proj x v] to (Level_X)\n        set [proj y v] to ((Level_Y) + (-35))\n        set [projectile name v] to [tellybomb]\n        broadcast (@CREATE ALT PROJECTILE v)\n    end\n    repeat (35)\n        set [x v] to [0]\n        change [x v] by (-1)\n        change [level_x v] by (x)\n    end\n    wait (1) seconds\n    delete this clone\nend\n\nwhen flag clicked\nset [clone v] to [0]\nset size to (200) %\nhide\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)) ) > [300]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [200]>> then\n        set [enemy onscreen? v] to [0]\n        hide\n    else\n        set [enemy onscreen? v] to [1]\n        show\n    end\nend\n\nwhen I receive [@create devils v]\nif <(clone) = [1]> then\n    delete this clone\nend\nif <(clone) = [0]> then\n    repeat (2)\n        go to [front v] layer\n        set size to (200) %\n        set rotation style [left-right v]\n        switch costume to (devil v)\n        set [attr v] to [0]\n        set [level_x v] to ((Scroll X) + ([x position v] of [boss 2: electric boogaloo v]))\n        set [level_y v] to ((Scroll Y) + ([y position v] of [boss 2: electric boogaloo v]))\n        create clone of (_myself_ v)\n        wait (.9) seconds\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [31]> then\n    forever\n        if <(HP) > [0]> then\n            switch costume to (uf v)\n        end\n        repeat (3)\n            wait (.1) seconds\n            if <(HP) > [0]> then\n                next costume\n            end\n        end\n        wait (.1) seconds\n    end\nend\nif <(costume [number v]) = [25]> then\n    forever\n        if <(HP) > [0]> then\n            switch costume to (telly v)\n        end\n        repeat (5)\n            wait (.1) seconds\n            if <(HP) > [0]> then\n                next costume\n            end\n        end\n        wait (.1) seconds\n    end\nend\nif <(costume [number v]) = [9]> then\n    forever\n        switch costume to (bigtelly v)\n        repeat (7)\n            wait (.05) seconds\n            next costume\n        end\n    end\nend\nif <(costume [number v]) = [1]> then\n    forever\n        wait (1.5) seconds\n        switch costume to (devil v)\n        repeat (2)\n            wait (.05) seconds\n            next costume\n        end\n        start sound [Mega Man 5 SFX \(9\) v]\n        set [proj direction v] to (direction)\n        set [proj x v] to ((Scroll X) + (x position))\n        set [proj y v] to ((Scroll Y) + (y position))\n        point towards (mega man v)\n        set [projectile name v] to [bullet]\n        broadcast (CREATE PROJECTILE v)\n        wait (.05) seconds\n        switch costume to (devil2 v)\n        wait (.05) seconds\n        switch costume to (devil v)\n    end\nend\nif <(costume [number v]) = [18]> then\n    set [hp v] to [6]\n    point towards (mega man v)\n    set [x v] to [-90]\n    forever\n        if <(ENEMY ONSCREEN?) = [1]> then\n            switch costume to (scannon v)\n            wait (1) seconds\n            if <<([x position v] of [mega man v]) < (x position)> and <(x) = [90]>> then\n                switch costume to (scannon3 v)\n                wait (.1) seconds\n                switch costume to (scannon v)\n                set [x v] to [-90]\n                point in direction (x)\n                wait (.4) seconds\n            end\n            if <<(x position) < ([x position v] of [mega man v])> and <(x) = [-90]>> then\n                switch costume to (scannon3 v)\n                wait (.1) seconds\n                switch costume to (scannon v)\n                set [x v] to [90]\n                point in direction (x)\n                wait (.4) seconds\n            end\n            start sound [Mega Man 6 SRX \(36\) v]\n            set [proj direction v] to (direction)\n            set [proj x v] to ((Level_X) + (([sin v] of (direction) ) * (35)))\n            set [proj y v] to ((Level_Y) + (35))\n            set [projectile name v] to [scannonshot]\n            broadcast (@CREATE ALT PROJECTILE v)\n            wait (.02) seconds\n            switch costume to (scannon2 v)\n            wait (.1) seconds\n            switch costume to (scannon v)\n            wait (1) seconds\n        end\n    end\nend\n\nwhen I receive [@killoff devils v]\nif <(clone) = [1]> then\n    switch costume to (edeath1 v)\n    repeat (3)\n        wait (0) seconds\n        set x to ((Level_X) - (Scroll X))\n        set y to ((Level_Y) - (Scroll Y))\n        next costume\n    end\n    wait (0) seconds\n    delete this clone\nend\n\nwhen I start as a clone\nwait (1) seconds\nforever\n    wait until <<<touching (hitbox v)?> and <(takingdmg) = [0]>> and <(HP) > [0]>>\n    broadcast (KNOCKBACK v)\n    change [health v] by (2)\n    broadcast (TAKE DMG v)\n    wait (1) seconds\nend\n\nwhen I receive [ready v]\ndelete this clone\n\nwhen I receive [snowboard fall back v]\nif <(clone) = [0]> then\n    Create Enemy [penguin] [4800] [405] [0]\n    Create Enemy [penguin] [8000] [400] [0]\n    Create Enemy [penguin] [9000] [400] [0]\n    Create Enemy [penguin] [6300] [396] [0]\n    Create Enemy [bigtelly] [7500] [550] [0]\nend\n\nwhen I receive [die v]\nwait (3) seconds\ndelete this clone\n\nwhen I receive [load enemies v]\nif <[1] = [1]> then\n    delete this clone\nend\nif <(STAGE #) = [6]> then\n    if <(clone) = [0]> then\n        Create Enemy [scannon] [400] [-17] [0]\n        Create Enemy [rjoe] [1100] [-70] [0]\n        Create Enemy [rjoe] [2000] [25] [0]\n        Create Enemy [scannon] [2515] [80] [0]\n        Create Enemy [telly] [3000] [80] [0]\n        Create Enemy [uf] [1800] [80] [0]\n        Create Enemy [uf] [2000] [15] [0]\n        Create Enemy [uf] [2200] [35] [0]\n        Create Enemy [scannon] [4575] [398] [0]\n        Create Enemy [telly] [4350] [1200] [0]\n        Create Enemy [telly] [4850] [1200] [0]\n        Create Enemy [uf] [4850] [1600] [0]\n        Create Enemy [rjoe] [3650] [2347] [0]\n        Create Enemy [scannon] [4046] [3100] [0]\n        Create Enemy [uf] [4300] [3150] [0]\n        Create Enemy [uf] [4800] [3100] [0]\n        Create Enemy [uf] [5400] [3000] [0]\n        Create Enemy [uf] [6000] [3000] [0]\n        Create Enemy [uf] [6600] [3000] [0]\n        Create Enemy [uf] [7150] [3150] [0]\n    end\nend\n\ndefine die\nif <(Zx) = [0]> then\n    start sound [Mega Man 6 SRX \(19\) v]\n    if <(pick random (1) to (2)) = [1]> then\n        if <(pick random (1) to (10)) = [1]> then\n            set [proj x v] to (Level_X)\n            set [proj y v] to (Level_Y)\n            set [projectile name v] to [1up]\n            create clone of (hp drops v)\n        else\n            if <(pick random (1) to (2)) = [1]> then\n                if <(pick random (1) to (3)) = [1]> then\n                    set [proj x v] to (Level_X)\n                    set [proj y v] to (Level_Y)\n                    set [projectile name v] to [wen]\n                    create clone of (hp drops v)\n                else\n                    set [proj x v] to (Level_X)\n                    set [proj y v] to (Level_Y)\n                    set [projectile name v] to [wen3]\n                    create clone of (hp drops v)\n                end\n            else\n                if <(pick random (1) to (3)) = [1]> then\n                    set [proj x v] to (Level_X)\n                    set [proj y v] to (Level_Y)\n                    set [projectile name v] to [health3]\n                    create clone of (hp drops v)\n                else\n                    set [proj x v] to (Level_X)\n                    set [proj y v] to (Level_Y)\n                    set [projectile name v] to [health]\n                    create clone of (hp drops v)\n                end\n            end\n        end\n        if <(costume [number v]) < [4]> then\n            change [boss_invincible? v] by (-1)\n        end\n        if <(Zx) = [1]> then\n    end\nend\n\n@stage select text\n\nwhen I start as a clone\nshow\nswitch costume to (letter)\ngo to x: (-124) y: (167)\nforever\n    wait until <(go?) = [0]>\n    wait until <(go?) = [1]>\n    change x by (17.2)\n    if <(x position) > [132]> then\n        delete this clone\n    end\nend\n\nwhen I receive [stage select v]\nforever\n    set [go? v] to [1]\n    set [letter v] to [t]\n    create clone of (_myself_ v)\n    wait (0) seconds\n    set [go? v] to [0]\n    wait (.3) seconds\n    set [go? v] to [1]\n    set [letter v] to [c]\n    create clone of (_myself_ v)\n    wait (0) seconds\n    set [go? v] to [0]\n    wait (.3) seconds\n    set [go? v] to [1]\n    set [letter v] to [e]\n    create clone of (_myself_ v)\n    wait (0) seconds\n    set [go? v] to [0]\n    wait (.3) seconds\n    set [go? v] to [1]\n    set [letter v] to [l]\n    create clone of (_myself_ v)\n    wait (0) seconds\n    set [go? v] to [0]\n    wait (.3) seconds\n    set [go? v] to [1]\n    set [letter v] to [e]\n    create clone of (_myself_ v)\n    wait (0) seconds\n    set [go? v] to [0]\n    wait (.3) seconds\n    set [go? v] to [1]\n    set [letter v] to [s]\n    create clone of (_myself_ v)\n    wait (0) seconds\n    set [go? v] to [0]\n    wait (.3) seconds\n    set [go? v] to [1]\n    set [letter v] to [ ]\n    create clone of (_myself_ v)\n    wait (0) seconds\n    set [go? v] to [0]\n    wait (.3) seconds\n    set [go? v] to [1]\n    set [letter v] to [e]\n    create clone of (_myself_ v)\n    wait (0) seconds\n    set [go? v] to [0]\n    wait (.3) seconds\n    set [go? v] to [1]\n    set [letter v] to [g]\n    create clone of (_myself_ v)\n    wait (0) seconds\n    set [go? v] to [0]\n    wait (.3) seconds\n    set [go? v] to [1]\n    set [letter v] to [a]\n    create clone of (_myself_ v)\n    wait (0) seconds\n    set [go? v] to [0]\n    wait (.3) seconds\n    set [go? v] to [1]\n    set [letter v] to [t]\n    create clone of (_myself_ v)\n    wait (0) seconds\n    set [go? v] to [0]\n    wait (.3) seconds\n    set [go? v] to [1]\n    set [letter v] to [s]\n    create clone of (_myself_ v)\n    wait (0) seconds\n    set [go? v] to [0]\n    wait (.3) seconds\n    repeat (3)\n        set [go? v] to [1]\n        wait (0) seconds\n        set [go? v] to [0]\n        wait (.3) seconds\n    end\nend\n\nwhen flag clicked\nset size to (200) %\nhide\n\nwhen I receive [robot master intro v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@how to play\n\nwhen flag clicked\nhide\n\nwhen I receive [how to play v]\ngo to x: (0) y: (0)\nclear graphic effects\nset [ghost v] effect to (100)\nswitch costume to (costume1 v)\ngo to [front v] layer\nshow\nset [able to select? v] to [0]\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (-10)\nend\nwait until <<key (space v) pressed?> or <mouse down?>>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [able to select? v] to [1]\nhide\n\n@Bass vision\n\nwhen flag clicked\nset rotation style [left-right v]\nhide\n\nwhen I receive [teleportin v]\nforever\n    if <(Using Fusion Wings?) = [1]> then\n        clear graphic effects\n        set [brightness v] effect to (100)\n        set [ghost v] effect to (100)\n        repeat (4)\n            change [ghost v] effect by (-25)\n            change [brightness v] effect by (-25)\n            go to (hitbox v)\n            set size to (200) %\n            point in direction (90)\n            show\n        end\n        repeat until <(Using Fusion Wings?) = [0]>\n            go to (hitbox v)\n            clear graphic effects\n            set size to (200) %\n            point in direction (90)\n            show\n        end\n    else\n        clear graphic effects\n        hide\n    end\nend\n\nwhen I receive [teleportin v]\nforever\n    if <(Using Fusion Wings?) = [1]> then\n        switch costume to (bassfly5 v)\n        repeat (3)\n            wait (.05) seconds\n            next costume\n        end\n        wait (.05) seconds\n    end\nend\n\n