secret passage -the platformer-
@Stage\n\nwhen flag clicked\nset [scroll y min v] to [-0]\nset [scroll x min v] to [0]\nset [scroll y max v] to [0]\nset [music v] to [3]\nset [kill v] to [0]\n\nwhen I receive [game start v]\nset [kill v] to [1]\nset [scroll y min v] to [-0]\nset [scroll x min v] to [0]\nset [scroll y max v] to [0]\nset [scroll y min v] to [-0]\nset [scroll x min v] to [0]\nset [scroll x max v] to [2000]\nset [scroll y max v] to [0]\nset [boss fight? v] to [0]\nbroadcast (Teleportin v)\nstop all sounds\nwait (.02) seconds\nset [kill v] to [0]\nset volume to (100) %\nforever\n    if <(BOSS FIGHT?) = [1]> then\n        if <(DefeatedBowser?) = [1]> then\n            play sound [Bonus Level v] until done\n        else\n            play sound [Baby Bowser - Yoshis Island v] until done\n        end\n    else\n        play sound [Super Mario World - Overworld v] until done\n    end\nend\n\nwhen I receive [teleportin v]\nset [scroll y min v] to [0]\nset [scroll x min v] to [0]\nset [scroll y min v] to [0]\nset [scroll x max v] to [2720]\n\nwait (.2) seconds\n\nwhen I receive [teleportin v]\nif <(BOSS FIGHT?) = [1]> then\n    set [kill v] to [1]\n    set [scroll y v] to [0]\n    repeat (10)\n        set [scroll y min v] to [0]\n        set [scroll x min v] to [0]\n        set [scroll y min v] to [0]\n    end\n    set [scroll x max v] to [550]\nelse\n    set [kill v] to [1]\n    set [scroll y v] to [0]\n    repeat (10)\n        set [scroll y min v] to [0]\n        set [scroll x min v] to [0]\n        set [scroll y min v] to [0]\n    end\n    set [scroll x max v] to [3300]\nend\n\nforever\n    play sound [Mega Man IV - Dive Man v] until done\nend\n\nset [scroll y min v] to [-4000]\n\nset [scroll x max v] to [5000]\n\nwhen I receive [fortressdoorexplosion\ v]\nset [scroll x max v] to [6000]\n\nwhen I receive [teleportin v]\nset volume to (100) %\nif <(CHECKPOINT #) = [2]> then\n    set [music v] to [7]\n    stop all sounds\nelse\n    if <[] = [1]> then\n        set [music v] to [5]\n    else\n        set [music v] to [3]\n    end\n    stop all sounds\nend\n\nwhen I receive [bossgate #1 v]\nrepeat (10)\n    change volume by (-10)\nend\nset [music v] to [5]\n\nwhen I receive [teleportin v]\nstop all sounds\nrepeat (10)\n    change volume by (-10)\nend\nif <[] = [1]> then\n    set [music v] to [5]\nelse\n    set [music v] to [3]\nend\nstop all sounds\nrepeat (10)\n    change volume by (10)\nend\n\nwhen I receive [grenade man run v]\nset [scroll x min v] to [4560]\nset [scroll x max v] to [20000]\n\nwhen I receive [ghost man fight v]\nrepeat (10)\n    change volume by (-10)\nend\nset [music v] to [4]\nstop all sounds\nrepeat (10)\n    change volume by (10)\nend\n\nwait until <([y position v] of [hitbox v]) < [50]>\n\nwhen I receive [die v]\nrepeat (10)\n    change volume by (-10)\nend\n\nwhen I receive [bowser die v]\nrepeat (10)\n    change volume by (-10)\nend\n\nset [scroll y min v] to [-0]\nset [scroll x min v] to [0]\nset [scroll y max v] to [0]\nset [scroll x max v] to [2000]\nwait (1) seconds\nwait until <[] > [4560]>\nif <not <(CHECKPOINT #) = [2]>> then\n    set [scroll x min v] to [4560]\n    set [scroll x max v] to [8000]\n    broadcast (BOSSGATE #1 v)\nend\n\nwhen flag clicked\nwait (.2) seconds\nbroadcast (SetUp v)\nbroadcast (GAME START v)\n\nwhen flag clicked\nforever\n    wait until <(Invincibility Frame) = [1]>\n    wait (2) seconds\n    set [invincibility frame v] to [0]\nend\n\n@ground\n\nwhen I receive [setup v]\nshow\nset size to (200) %\nclear graphic effects\ngo to x: (0) y: (0)\nset [level_x v] to [0]\nswitch costume to (costume1 v)\nCreate\nhide\n\nwhen I receive [level loop v]\nforever\n    set [ghost v] effect to (100)\n    set x to ((Level_X) - (Scroll X))\n    set y to ((Level_Y) - ([ceiling v] of (Scroll Y) ))\n    if <<([abs v] of ((Level_X) - (Scroll X)) ) > [570]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [475]>> then\n        hide\n    else\n        show\n    end\nend\n\ndefine Create\nset [level_y v] to [0]\nset [level_x v] to [0]\nswitch costume to (donut v)\nrepeat (7)\n    create clone of (_myself_ v)\n    change [level_x v] by (540)\n    next costume\nend\n\ndefine Create\n\nwhen I receive [setup v]\nbroadcast (GAME START v)\nforever\n    broadcast (Level Loop v)\nend\n\nwhen I start as a clone\ngo to [front v] layer\n\nwhen I receive [bossgate #1 v]\n\nif <(costume [number v]) = [10]> then\n    start sound [Mega Man 5 SFX \(15\) v]\n    switch costume to (costume13 v)\nend\nif <(costume [number v]) = [12]> then\n    switch costume to (costume14 v)\nend\n\nwhen I receive [teleportin v]\nif <(costume [number v]) = [13]> then\n    switch costume to (costume10 v)\nend\nif <(costume [number v]) = [14]> then\n    switch costume to (costume11 v)\nend\n\nwhen I receive [grenade man run v]\n\nif <(costume [number v]) = [13]> then\n    start sound [Mega Man 5 SFX \(15\) v]\n    switch costume to (costume10 v)\nend\nif <(costume [number v]) = [14]> then\n    switch costume to (costume11 v)\nend\n\nrepeat (6)\n    create clone of (_myself_ v)\n    change [level_y v] by (-416)\n    next costume\nend\nchange [level_y v] by (416)\nswitch costume to (costume4 v)\n\nswitch costume to (costume15 v)\nrepeat (3)\n    create clone of (_myself_ v)\n    change [level_x v] by (500)\n    next costume\nend\nchange [level_y v] by (450)\nchange [level_x v] by (9999)\n\nwhen I receive [teleportin v]\ndelete this clone\n\nwhen I receive [teleportin v]\nwait (.01) seconds\nif <(BOSS FIGHT?) = [1]> then\n    if <(DefeatedBowser?) = [1]> then\n        set [brightness v] effect to (15)\n        set size to (200) %\n        switch costume to (bonusroom v)\n        set [level_y v] to [0]\n        set [level_x v] to [0]\n        repeat (2)\n            create clone of (_myself_ v)\n            change [level_x v] by (540)\n            next costume\n        end\n        change [level_x v] by (540)\n    else\n        set [brightness v] effect to (15)\n        set size to (200) %\n        switch costume to (room1 v)\n        set [level_y v] to [0]\n        set [level_x v] to [0]\n        repeat (2)\n            create clone of (_myself_ v)\n            change [level_x v] by (540)\n            next costume\n        end\n        change [level_x v] by (540)\n    end\nelse\n    set [brightness v] effect to (15)\n    set size to (200) %\n    switch costume to (donut v)\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    repeat (7)\n        create clone of (_myself_ v)\n        change [level_x v] by (540)\n        next costume\n    end\n    change [level_x v] by (540)\nend\n\n@Level_Art\n\nwhen I receive [setup v]\nshow\ngo to x: (0) y: (0)\nset [level_x v] to [0]\nswitch costume to (grenade v)\nCreate\nhide\n\ndefine Create\n\nrepeat (20)\n    create clone of (_myself_ v)\n    change [level_x v] by (500)\nend\n\ndefine Find Costume Number\nset [level costumes v] to [1]\nswitch costume to ((1) / (1))\nnext costume\nrepeat until <(costume [number v]) = [1]>\n    change [level costumes v] by (1)\n    next costume\nend\n\nwhen I receive [level loop v]\nforever\n    set x to ((Level_X) - (Scroll X))\n    set y to ((Level_Y) - (Scroll Y))\n    if <<([abs v] of ((Level_X) - (Scroll X)) ) > [510]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [400]>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    broadcast (Level Loop v)\nend\n\nchange [level_x v] by (480)\n\nchange [level_x v] by (480)\n\nset [level_y v] to [-150]\n\nchange [level_x v] by (540)\n\nchange [level_y v] by (-448)\n\nwhen I start as a clone\nforever\n    set [brightness v] effect to (10)\nend\n\nwait (.5) seconds\nset [brightness v] effect to (20)\nwait (.5) seconds\n\nwhen I start as a clone\n\nforever\n    switch costume to (bgtomahawk5 v)\n    repeat (3)\n        wait (.05) seconds\n        next costume\n    end\n    wait (.05) seconds\nend\n\nrepeat (20)\n    change [brightness v] effect by (.4)\nend\nrepeat (20)\n    change [brightness v] effect by (-.4)\nend\n\nwhen I receive [die v]\nset [boss fight? v] to [0]\n\nwhen I receive [teleportin v]\ndelete this clone\n\nwhen I receive [teleportin v]\nwait (.01) seconds\nif <(BOSS FIGHT?) = [1]> then\n    if <(DefeatedBowser?) = [1]> then\n        set [brightness v] effect to (15)\n        set size to (200) %\n        switch costume to (bonusroom v)\n        set [level_y v] to [0]\n        set [level_x v] to [0]\n        repeat (2)\n            create clone of (_myself_ v)\n            change [level_x v] by (540)\n            next costume\n        end\n        change [level_x v] by (540)\n    else\n        set [brightness v] effect to (15)\n        set size to (200) %\n        switch costume to (room1 v)\n        set [level_y v] to [0]\n        set [level_x v] to [0]\n        repeat (2)\n            create clone of (_myself_ v)\n            change [level_x v] by (540)\n            next costume\n        end\n        change [level_x v] by (540)\n    end\nelse\n    set [brightness v] effect to (15)\n    set size to (200) %\n    switch costume to (donut1 v)\n    set [level_y v] to [0]\n    set [level_x v] to [0]\n    repeat (7)\n        create clone of (_myself_ v)\n        change [level_x v] by (540)\n        next costume\n    end\n    change [level_x v] by (540)\nend\n\nset [brightness v] effect to (15)\nset size to (200) %\nswitch costume to (donut1 v)\nset [level_y v] to [0]\nset [level_x v] to [0]\nrepeat (6)\n    create clone of (_myself_ v)\n    change [level_x v] by (540)\n    next costume\nend\n\nwhen I receive [screenshake v]\nrepeat (1)\n    set [level_y v] to [15]\n    wait (.02) seconds\n    set [level_y v] to [0]\n    wait (.02) seconds\nend\nrepeat (1)\n    set [level_y v] to [5]\n    wait (.02) seconds\n    set [level_y v] to [0]\n    wait (.02) seconds\nend\nrepeat (1)\n    set [level_y v] to [2]\n    wait (.02) seconds\n    set [level_y v] to [0]\n    wait (.02) seconds\nend\n\n@border\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (costume4 v)\ngo to [front v] layer\nclear graphic effects\nshow\n\nwhen I receive [intro v]\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\n    go to [front v] layer\nend\nclear graphic effects\nhide\n\nset [brightness v] effect to (-100)\ngo to [front v] layer\nshow\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nclear graphic effects\n\nwhen I receive [die v]\nwait (4) seconds\nswitch costume to (costume3 v)\nset [ghost v] effect to (100)\ngo to [front v] layer\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [carrying object? v] to [0]\nhide\n\nwhen I receive [subworldpipe v]\nwait (0) seconds\nset [boss fight? v] to [1]\nswitch costume to (costume3 v)\nset [ghost v] effect to (100)\ngo to [front v] layer\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (1) seconds\nbroadcast (Teleportin v)\nwait (1) seconds\nset [carrying object? v] to [0]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [fadeout v]\nswitch costume to (costume3 v)\nset [ghost v] effect to (100)\ngo to [front v] layer\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (1) seconds\nbroadcast (Teleportin v)\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@vile\n\nwhen flag clicked\nbroadcast (INTRO v)\n\nbroadcast (GAME START v)\nbroadcast (SetUp v)\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nswitch costume to (reee v)\npoint in direction (90)\nset size to (100) %\ngo to x: (12) y: (999)\nrepeat (3)\n    change y by (-40)\nend\nrepeat (2)\n    change y by (-30)\nend\nrepeat (2)\n    change y by (-20)\nend\nrepeat (2)\n    change y by (-10)\nend\nstart sound [mario_coin_sound v]\nrepeat (3)\n    show\n    wait (.5) seconds\n    hide\n    wait (.2) seconds\nend\ndelete this clone\n\nwhen I receive [flame sword v]\npoint in direction (90)\ngo to [front v] layer\nswitch costume to (icon v)\nset size to (150) %\nrepeat (3)\n    go to (hitbox v)\n    change y by (40)\n    show\n    wait (.2) seconds\n    hide\n    wait (.2) seconds\nend\n\nstart sound [Mega Man 5 SFX \(42\) v]\nset volume to (100) %\nstart sound [a-ha-take-on-me-cut-mp3_rnSXv7Z v]\nswitch costume to (vile3 v)\nset size to (250) %\ngo to x: (-225) y: (-43)\npoint in direction (90)\nset rotation style [left-right v]\ngo to [front v] layer\nshow\nrepeat (10)\n    go to [front v] layer\n    change x by (30)\nend\nrepeat (6)\n    change x by (15)\nend\nrepeat (4)\n    change x by (5)\nend\nswitch costume to (vile1 v)\nstart sound [Mega Man 5 SFX \(21\)3 v]\nwait (.2) seconds\nstart sound [Mega Man 5 SFX \(21\)3 v]\nswitch costume to (vile2 v)\npoint in direction (-90)\ncreate clone of (_myself_ v)\nwait (2) seconds\nswitch costume to (vile3 v)\nrepeat (12)\n    go to [front v] layer\n    change x by (-30)\nend\nrepeat (8)\n    change x by (-15)\nend\nrepeat (5)\n    change x by (-5)\nend\nhide\nrepeat (10)\n    change volume by (-10)\nend\nbroadcast (INTRO v)\n\nwhen I receive [teleportin v]\nwait (.02) seconds\nif <<(BOSS FIGHT?) = [1]> and <(DefeatedBowser?) = [0]>> then\n    show\n    go to x: (98) y: (-184)\n    go to [front v] layer\n    clear graphic effects\n    set [brightness v] effect to (10)\n    forever\n        switch costume to (la1 v)\n        repeat (3)\n            wait (0) seconds\n            next costume\n        end\n        wait (0) seconds\n    end\nelse\n    hide\nend\n\n@toenail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nswitch costume to (costume2 v)\nshow\nforever\n    go to [front v] layer\nend\n\nwhen I receive [yay v]\nwait (2) seconds\nif <(HARD MODE?) = [0]> then\n    switch costume to (after hardmode v)\n    set [hard mode? v] to [1]\nelse\n    switch costume to (pre hardmode v)\nend\nset [ghost v] effect to (100)\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\ngo to [front v] layer\nshow\nforever\n    go to x: ((mouse x) / (30)) y: ((mouse y) / (30))\nend\n\nset [hard mode? v] to [0]\n\n@its a me Mario\n\nwhen I receive [bossgate #1 v]\nwait (1) seconds\npoint in direction (90)\nset y to (-113)\nswitch costume to (idlegun v)\nrepeat (3)\n    wait (.25) seconds\n    point in direction (-90)\n    wait (.25) seconds\n    point in direction (90)\nend\n\nwhen flag clicked\nset [health v] to [1]\nset [health v] to [1]\n\nwhen flag clicked\nset size to (200) %\nset [speed v] to [1]\nforever\n    if <(CanMove?) = [1]> then\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(mouse x) < (x position)>>>> then\n            point in direction (-90)\n            set [speed v] to [-4]\n        end\n        if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(x position) < (mouse x)>>>> then\n            point in direction (90)\n            set [speed v] to [-4]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(CanMove?) = [1]> and <(gotohitbox?) = [1]>> then\n        go to x: ([x position v] of [hitbox v]) y: (([y position v] of [hitbox v]) + (-12))\n    end\nend\n\nwhen I receive [die v]\nset [speed v] to [1]\n\nwhen I start as a clone\nset rotation style [left-right v]\nchange y by (-25)\ngo to [front v] layer\nswitch costume to (smoke1 v)\nshow\nrepeat (3)\n    wait (0) seconds\n    next costume\nend\nwait (0) seconds\ndelete this clone\n\nwhen flag clicked\nset [sliding? v] to [0]\nset [flame sword? v] to [0]\nforever\n    if <<(CanMove?) = [1]> and <<key (space v) pressed?> or <mouse down?>>> then\n        if <(Carrying Object?) = [1]> then\n            wait (1) seconds\n        else\n            if <(Mario's Universally acceptable HP) = [3]> then\n                set [canmove? v] to [0]\n                if <([falling? v] of [hitbox v]) > [1]> then\n                    switch costume to (firecarry3 v)\n                else\n                    switch costume to (firecarry1 v)\n                end\n                set [fireballdirection v] to (direction)\n                create clone of (fireball v)\n                wait (.02) seconds\n                set [canmove? v] to [1]\n                wait until <<not <key (space v) pressed?>> and <not <mouse down?>>>\n            end\n        end\n    end\n    if <<(CanMove?) = [1]> and <(You spin me right round) = [1]>> then\n        if <(Mario's Universally acceptable HP) = [3]> then\n            set [fireballdirection v] to [90]\n            create clone of (fireball v)\n            wait (.01) seconds\n            set [fireballdirection v] to [-90]\n            create clone of (fireball v)\n            wait until <(You spin me right round) = [0]>\n        end\n    end\nend\n\nwhen flag clicked\nset rotation style [left-right v]\nif <(animations: editmode>2) = [1]> then\n    set [speed v] to [28]\nelse\n    set [speed v] to [3]\nend\n\nwhen flag clicked\nforever\n    if <<key (space v) pressed?> or <mouse down?>> then\n        set [animations: using gun?2 v] to [1]\n    else\n        set [animations: using gun?2 v] to [0]\n    end\nend\n\ndefine Do (what?)\nif <<(CanMove?) = [1]> and <(SLIDING?) = [0]>> then\n    if <(Mario's Universally acceptable HP) = [3]> then\n        if <(Carrying Object?) = [1]> then\n            if <(what?) = [Walk]> then\n                if <not <(dead:) = [1]>> then\n                    switch costume to (firecarry1 v)\n                    repeat (2)\n                        if <([falling? v] of [hitbox v]) > [1]> then\n                            switch costume to (firecarry3 v)\n                        else\n                            wait (.05) seconds\n                            next costume\n                        end\n                    end\n                    wait (.05) seconds\n                end\n            end\n        else\n            if <(what?) = [Walk]> then\n                if <not <(dead:) = [1]>> then\n                    switch costume to (fire1 v)\n                    repeat (2)\n                        if <([falling? v] of [hitbox v]) > [1]> then\n                            switch costume to (firejump v)\n                        else\n                            wait (0.02) seconds\n                            next costume\n                        end\n                    end\n                    wait (.02) seconds\n                end\n            end\n        end\n    else\n        if <(Carrying Object?) = [1]> then\n            if <(what?) = [Walk]> then\n                if <not <(dead:) = [1]>> then\n                    switch costume to (carry1 v)\n                    repeat (2)\n                        if <([falling? v] of [hitbox v]) > [1]> then\n                            switch costume to (carry3 v)\n                        else\n                            wait (.05) seconds\n                            next costume\n                        end\n                    end\n                    wait (.05) seconds\n                end\n            end\n        else\n            if <(what?) = [Walk]> then\n                if <not <(dead:) = [1]>> then\n                    switch costume to (m1 v)\n                    repeat (2)\n                        if <([falling? v] of [hitbox v]) > [1]> then\n                            switch costume to (mariojump v)\n                        else\n                            wait (0.02) seconds\n                            next costume\n                        end\n                    end\n                    wait (.02) seconds\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\n\nwhen flag clicked\nset [you spin me right round v] to [0]\nset rotation style [left-right v]\nforever\n    if <(CanMove?) = [1]> then\n        if <(Mario's Universally acceptable HP) = [3]> then\n            if <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n                if <(Carrying Object?) = [1]> then\n                    switch costume to (firecarryduck v)\n                else\n                    switch costume to (fireduck v)\n                end\n            else\n                if <(You spin me right round) = [1]> then\n                    switch costume to (firespin1 v)\n                    wait (.02) seconds\n                    switch costume to (firespin3 v)\n                    wait (.02) seconds\n                    switch costume to (firespin2 v)\n                    wait (.02) seconds\n                    switch costume to (firespin4 v)\n                    wait (.02) seconds\n                else\n                    if <([falling? v] of [hitbox v]) > [1]> then\n                        if <(Carrying Object?) = [1]> then\n                            switch costume to (firecarry3 v)\n                        else\n                            if <([speed y v] of [hitbox v]) < [-2]> then\n                                switch costume to (firefall v)\n                            else\n                                switch costume to (firejump v)\n                            end\n                        end\n                    else\n                        if <<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(x position) < (mouse x)>>>> or <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(mouse x) < (x position)>>>>> then\n                            Do [Walk]\n                        else\n                            if <<not <<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(x position) < (mouse x)>>>> or <<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(mouse x) < (x position)>>>> or <key (up arrow v) pressed?>>>> and <(Holding?) = [0]>> then\n                                if <(Carrying Object?) = [1]> then\n                                    switch costume to (firecarry1 v)\n                                else\n                                    switch costume to (fire1 v)\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        else\n            if <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n                if <(Carrying Object?) = [1]> then\n                    switch costume to (carryduck v)\n                else\n                    switch costume to (mduck v)\n                end\n            else\n                if <(You spin me right round) = [1]> then\n                    switch costume to (mspin1 v)\n                    wait (.02) seconds\n                    switch costume to (mspin3 v)\n                    wait (.02) seconds\n                    switch costume to (mspin2 v)\n                    wait (.02) seconds\n                    switch costume to (mspin4 v)\n                    wait (.02) seconds\n                else\n                    if <([falling? v] of [hitbox v]) > [1]> then\n                        if <(Carrying Object?) = [1]> then\n                            switch costume to (carry3 v)\n                        else\n                            if <([speed y v] of [hitbox v]) < [-2]> then\n                                switch costume to (mariofall v)\n                            else\n                                switch costume to (mariojump v)\n                            end\n                        end\n                    else\n                        if <<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(x position) < (mouse x)>>>> or <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(mouse x) < (x position)>>>>> then\n                            Do [Walk]\n                        else\n                            if <<not <<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(x position) < (mouse x)>>>> or <<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(mouse x) < (x position)>>>> or <key (up arrow v) pressed?>>>> and <(Holding?) = [0]>> then\n                                if <(Carrying Object?) = [1]> then\n                                    switch costume to (carry1 v)\n                                else\n                                    switch costume to (m1 v)\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nswitch costume to (jumpgun v)\n\nwhen I receive [jumphigh v]\nchange [speed y v] by (50)\n\nwhen I receive [intro over v]\nrepeat (10)\n    show\nend\n\nwhen I receive [jumpup v]\nchange [speed y v] by (30)\n\nwhen I start as a clone\nrepeat until <touching (_edge_ v)?>\n    if <<<key (left arrow v) pressed?> or <key (right arrow v) pressed?>> or <<key (a v) pressed?> or <key (d v) pressed?>>> then\n        move (-10) steps\n    end\nend\ndelete this clone\n\ndefine death\nstart sound [smw_death v]\n\nwhen flag clicked\nset [section at v] to [1]\n\nwhen I start as a clone\nforever\n    show\nend\n\nwhen flag clicked\nset volume to (100) %\nswitch costume to (idle v)\nset size to (200) %\nclear graphic effects\nset [falling v] to [0]\nset [speed y v] to [0]\nset [canmove? v] to [0]\nset [holding? v] to [0]\nset [inshell? v] to [0]\nset [dead: v] to [0]\nset [health v] to [1]\ngo to x: (0) y: (-120)\npoint in direction (90)\nset volume to (100) %\n\nwhen I receive [die v]\nset [canmove? v] to [0]\nhide\ndeath\nwait (5) seconds\nswitch costume to (idle v)\nbroadcast (Teleportin v)\n\nwhen I start as a clone\nwait until <touching (_edge_ v)?>\ndelete this clone\n\nwhen I receive [take dmg v]\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 (0) seconds\n    set [ghost mode? v] to [0]\n    set [ghost v] effect to (0)\n    wait (0) seconds\nend\nset [getting ouched ? v] to [0]\nset [canmove? v] to [1]\nset [takingdmg v] to [0]\n\nwhen flag clicked\nset [getting ouched ? v] to [0]\nset [takingdmg v] to [0]\n\nwhen I receive [blink v]\nrepeat (3)\n    set [ghost v] effect to (100)\n    wait (.05) seconds\n    if <<touching (ghost wall v)?> and <(GHOST MODE?) = [1]>> then\n        set [ghost v] effect to (50)\n    else\n        set [ghost mode? v] to [0]\n        set [ghost v] effect to (0)\n    end\n    wait (.05) seconds\nend\n\nwhen I receive [teleportin v]\nif <(clone?) = [0]> then\n    set [gotohitbox? v] to [0]\n    hide\n    wait (.1) seconds\n    set [canmove? v] to [0]\n    switch costume to (break v)\n    show\n    set y to (-132)\n    set [gotohitbox? v] to [1]\n    switch costume to (tele2 v)\n    broadcast (blink v)\n    change [scroll x v] by (0)\n    set [canmove? v] to [1]\nend\n\ngo to [front v] layer\n\nmove (10) steps\n\nif <(costume [number v]) = [18]> then\n    forever\n        set [brightness v] effect to (100)\n        wait (.1) seconds\n        clear graphic effects\n        wait (.1) seconds\n    end\nend\n\nwhen I receive [teleportin v]\nshow\n\nwhen flag clicked\nhide\n\nwhen I receive [heal v]\nrepeat (3)\n    set [ghost v] effect to (100)\n    wait (.1) seconds\n    set [ghost v] effect to (0)\n    wait (.1) seconds\nend\n\nwhen I receive [teleportin v]\nclear graphic effects\n\nwhen I receive [grenade man flee v]\nset [canmove? v] to [1]\n\nwhen I start as a clone\nclear graphic effects\n\nwhen I receive [teleportin v]\nrepeat (10)\n    clear graphic effects\nend\n\nwhen I receive [battle begin v]\nset [canmove? v] to [1]\n\nwhen I receive [kill v]\nset [canmove? v] to [0]\ndelete this clone\n\ncreate clone of (_myself_ v)\n\nwhen I receive [teleportin v]\nif <(clone?) = [0]> then\n    wait (3) seconds\n    wait until <(y position) < [-180]>\n    if <(Mario's Universally acceptable HP) > [0]> then\n        broadcast (die v)\n    end\nend\n\nwhen I start as a clone\ngo to [front v] layer\n\nwhen I start as a clone\nset [clone? v] to [1]\n\nwhen I receive [bossdie v]\nwait (1) seconds\nset [canmove? v] to [0]\npoint in direction (90)\nswitch costume to (jumpgun v)\nglide (.25) secs to x: (-100) y: (-113)\nswitch costume to (idlegun v)\n\nwhen I receive [kaboom v]\nwait (2) seconds\nstart sound [Mega Man II - Victory v]\nswitch costume to (idle v)\n\nwhen I start as a clone\nset volume to (50) %\n\nwhen flag clicked\nset [gotohitbox? v] to [0]\n\nwhen flag clicked\nset [carrying object? v] to [0]\n\nif <(getting ouched ?) = [1]> then\n    if <(BLADE ?) = [1]> then\n        switch costume to (costume8 v)\n    else\n        switch costume to (takedmg v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<<key (a v) pressed?> or <key (d v) pressed?>> or <<key (right arrow v) pressed?> or <key (left arrow v) pressed?>>> and <([falling? v] of [hitbox v]) < [2]>> then\n        if <<not <key (down arrow v) pressed?>> and <not <key (s v) pressed?>>> then\n            if <<(You spin me right round) = [0]> and <(CanMove?) = [1]>> then\n                create clone of (_myself_ v)\n                wait (.1) seconds\n            end\n        end\n    end\nend\n\nwhen I receive [subworldpipe v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen flag clicked\nclear graphic effects\n\nwhen flag clicked\nset [mario's universally acceptable hp v] to [2]\n\nwhen I receive [teleportin v]\nwait (.02) seconds\nif <(ClownCarAlive?) = [0]> then\n    set [mario's universally acceptable hp v] to [2]\nend\n\nwhen I receive [firemariotransform v]\nstart sound [powerup v]\nrepeat (3)\n    set [mario's universally acceptable hp v] to [2]\n    wait (.1) seconds\n    set [mario's universally acceptable hp v] to [3]\n    wait (.1) seconds\nend\n\nwhen I receive [mario get hurt v]\nif <(Invincibility Frame) = [0]> then\n    if <(Mario's Universally acceptable HP) = [1]> then\n        broadcast (die v)\n    else\n        change [mario's universally acceptable hp v] by (-1)\n        set [invincibility frame v] to [1]\n        start sound [reserved-item v]\n        repeat (5)\n            set [ghost v] effect to (100)\n            wait (.1) seconds\n            clear graphic effects\n            wait (.1) seconds\n        end\n    end\n    set [invincibility frame v] to [0]\nend\nwait (.1) seconds\nclear graphic effects\n\nwhen flag clicked\nset [invincibility frame v] to [0]\n\nwhen I receive [die v]\nset [mario's universally acceptable hp v] to [0]\nset [gotohitbox? v] to [0]\nset [canmove? v] to [0]\nswitch costume to (mariodie v)\nshow\nrepeat (5)\n    switch costume to (mariodie v)\n    change y by (5)\nend\nrepeat (5)\n    switch costume to (mariodie v)\n    change y by (10)\nend\nrepeat (5)\n    switch costume to (mariodie v)\n    change y by (5)\nend\nrepeat (5)\n    switch costume to (mariodie v)\n    change y by (-10)\nend\nrepeat until <(y position) < [-170]>\n    switch costume to (mariodie v)\n    change y by (-20)\nend\nhide\n\nwhen I receive [bowser die v]\nset [canmove? v] to [0]\nset [gotohitbox? v] to [0]\nrepeat until <(y position) < [-90]>\n    change y by (-10)\nend\nset y to (-101)\nif <(Mario's Universally acceptable HP) = [3]> then\n    switch costume to (fire1 v)\nelse\n    switch costume to (m1 v)\nend\nwait (3) seconds\nset [clowncaralive? v] to [0]\nplay sound [BowserVictory v] until done\nif <(Mario's Universally acceptable HP) = [3]> then\n    switch costume to (firevictory v)\nelse\n    switch costume to (victory v)\nend\nset [boss fight? v] to [0]\nwait (1) seconds\nbroadcast (fadeout v)\n\n@hitbox\n\nwhen I receive [you win v]\n\ndefine Tick <<> <^> <>>\nif <(CanMove?) = [1]> then\n    change [speed y v] by (-.7)\n    change y by (speed y)\n    Touch Ground <(speed y) > [0]>\n    if <<<key (z v) pressed?> and <(falling?) < [3]>> and <(Carrying Object?) = [0]>> then\n        set [speed y v] to [10]\n        set [you spin me right round v] to [1]\n    end\n    if <<not <key (down arrow v) pressed?>> and <not <key (s v) pressed?>>> then\n        if <<> then\n            change [speed x v] by (-2)\n            point in direction (-90)\n        end\n        if <>> then\n            change [speed x v] by (2)\n            point in direction (90)\n        end\n    end\n    Walk (direction) (speed x)\n    set [speed x v] to ((speed x) * (.8))\n    change y by (speed y)\n    Touch Ground <(speed y) > [0]>\n    if <<^> and <(falling?) < [3]>> then\n        set [speed y v] to [8]\n    end\n    if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(mouse y) > (y position)>>>> then\n        if <(falling?) < [3]> then\n            set [speed y v] to [10]\n            if <(You spin me right round) = [0]> then\n                start sound [jump v]\n            end\n        end\n    else\n        change [speed y v] by (-1)\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)?> or <<touching (ghost wall v)?> and <(GHOST MODE?) = [0]>>>>>\n    change [slope v] by (1)\n    change y by (1)\nend\nif <(slope) = [8]> then\n    change x by ((0) - (speed))\n    change y by ((0) - (slope))\nend\n\nwhen flag clicked\nwait until <(Health) < [1]>\nstop [other scripts in sprite v]\nbroadcast (game over v)\n\nwhen flag clicked\nswitch costume to (idle v)\nset size to (200) %\nset size to (100) %\nset [falling v] to [0]\nset [speed y v] to [0]\nset [canmove? v] to [0]\nset [holding? v] to [0]\nset [inshell? v] to [0]\nset [dead: v] to [0]\nset [health v] to [1]\ngo to x: (0) y: (-120)\nhide\nforever\n    if <<(CanMove?) = [1]> and <(TRANSITION) = [0]>> then\n        Tick <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(mouse x) < (x position)>>>> <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(y position) < (mouse y)>>>> <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(x position) < (mouse x)>>>>\n    end\nend\n\nwhen I receive [jumpup v]\nchange [speed y v] by (30)\n\nwhen I receive [jumphigh v]\nchange [speed y v] by (50)\n\nwhen flag clicked\nset volume to (60) %\nset [frame v] to [0]\n\nwhen flag clicked\nforever\n    if <key (space v) pressed?> then\n        set [using gun? v] to [1]\n    else\n        set [using gun? v] to [0]\n    end\nend\n\nwhen flag clicked\nset rotation style [left-right v]\nif <(editmode>) = [1]> then\n    set [speed v] to [28]\nelse\n    set [speed v] to [3]\nend\n\nwhen flag clicked\n\nchange [scroll x v] by (10)\n\nwhen flag clicked\nset [canmove? v] to [0]\n\nforever\n    if <key (r v) pressed?> then\n        go to x: (0) y: (-120)\n        set [speed y v] to [0]\n        broadcast (Teleportin v)\n        wait (10) seconds\n    end\nend\n\nwhen flag clicked\nset size to (150) %\nset [speed v] to [1]\nforever\n    if <key (left arrow v) pressed?> then\n        set [speed v] to [-3]\n    end\n    if <key (right arrow v) pressed?> then\n        set [speed v] to [-3]\n    end\nend\n\nwhen I receive [die v]\nset [speed v] to [1]\n\nforever\n    if <(slope) = [8]> then\n        change [scroll x v] by ((0) - ((speed) * (2)))\n        change y by (((0) - (slope)) * (2))\n        set [slope v] to [0]\n    end\nend\n\ndefine Touch Ground <up?>\nchange [falling? v] by (1)\nrepeat until <not <<touching (ground v)?> or <touching (phase through platforms v)?>>>\n    if <up?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [falling? v] to [0]\n    end\n    set [speed y v] to [0]\nend\n\nwhen I receive [die v]\nset [canmove? v] to [0]\n\ndefine Touch Ground <up?>\n\ngo to x: (-172) y: (-81)\n\nchange x by (1)\n\nwhen flag clicked\n\nwhen flag clicked\n\nwhen I receive [knockback v]\nif <(direction) = [90]> then\n    repeat (3)\n        Walk [90] [-15]\n    end\n    repeat (3)\n        Walk [90] [-8]\n    end\nelse\n    repeat (3)\n        Walk [90] [15]\n    end\n    repeat (3)\n        Walk [90] [8]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (ladder v)?> then\n        set [climbing on ladder v] to [1]\n    else\n        set [climbing on ladder v] to [0]\n    end\nend\n\nwhen I receive [teleportin v]\n\nwhen I receive [rushjump v]\nset [speed y v] to [25]\n\nwhen I receive [take dmg v]\nstart sound [Mega Man 5 SFX \(6\) v]\nset [takingdmg v] to [1]\nset [canmove? v] to [0]\nwait (.4) seconds\nset [canmove? v] to [1]\nset [takingdmg v] to [0]\n\nbroadcast (Teleportin v)\n\ndefine Scrolling Blocks\nchange [scroll x v] by (x position)\nif <(Scroll X) < (Scroll X Min)> then\n    set [scroll x v] to (Scroll X Min)\nelse\n    if <(Scroll X) > (Scroll X Max)> then\n        set [scroll x v] to (Scroll X Max)\n    else\n        set x to (0)\n    end\nend\nchange [scroll y v] by (y position)\nif <(Scroll Y) < (Scroll Y Min)> then\n    set [scroll y v] to (Scroll Y Min)\nelse\n    if <(Scroll Y) > (Scroll Y Max)> then\n        set [scroll y v] to (Scroll Y Max)\n    else\n        set y to (0)\n    end\nend\n\nwhen flag clicked\nforever\n    Scrolling Blocks\nend\n\nwhen I receive [teleportin v]\nhide\nwait (.1) seconds\nif <(CHECKPOINT #) = [1]> then\n    set [scroll y v] to [250]\nelse\n    set [scroll y v] to [250]\nend\nset [speed y v] to [10]\nrepeat (5)\n    if <(CHECKPOINT #) = [1]> then\nend\nset [canmove? v] to [0]\ngo to [front v] layer\nchange y by (0)\nset [ghost v] effect to (100)\nshow\nset y to (-100)\nset x to (0)\nchange y by (25)\nset [canmove? v] to [1]\n\nset y to (0)\n\nwait (.2) seconds\n\nif <(FIGHTSTART?) = [1]> then\n    set [scroll y v] to [3810]\nend\n\nbroadcast (Teleportin v)\n\nbroadcast (Teleportin v)\n\nwhen flag clicked\nset [sliding? v] to [0]\n\nwhen flag clicked\nforever\n    if <(SLIDING?) = [1]> then\n        switch costume to (idle2 v)\n    else\n        switch costume to (idle v)\n    end\nend\n\nwhen flag clicked\nset [sliding? v] to [0]\nset [slide time v] to [0]\nforever\n    if <(slide time) > [13]> then\n        set [sliding? v] to [0]\n    end\n    if <not <<<key (s v) pressed?> or <key (down arrow v) pressed?>> or <<mouse down?> and <<(distance to [mouse-pointer v]) > [20]> and <(mouse y) < (y position)>>>>> then\n        if <(slide time) > [0]> then\n            change [slide time v] by (-1)\n            set [sliding? v] to [0]\n        end\n    end\nend\n\nwhen I receive [bossgate #1 v]\nset [canmove? v] to [0]\nset y to (-102)\n\nwhen I receive [bossdie v]\nset [canmove? v] to [0]\n\nwhen I receive [moveplatform v]\nchange x by (5)\n\nwhen I receive [moveplatformup v]\nchange y by (5)\n\nwhen I receive [battle begin v]\nset [canmove? v] to [1]\n\nwhen I receive [ghost man fight v]\nset [canmove? v] to [0]\n\nwhen I receive [kill v]\nset [canmove? v] to [0]\n\nset [speed y v] to [5]\n\nset [speed y v] to [10]\n\nwhen flag clicked\nset [checkpoint # v] to [0]\nset [fightstart? v] to [0]\n\nwait (1) seconds\nforever\n    wait until <(FLAME SWORD?) = [1]>\n    set [canmove? v] to [0]\n    wait until <(FLAME SWORD?) = [0]>\n    set [canmove? v] to [1]\nend\n\nif <(CHECKPOINT #) = [2]> then\n    set [scroll x v] to [5100]\nelse\n    if <(CHECKPOINT #) = [1]> then\n        set [scroll x v] to [4100]\n        set [scroll y v] to [-2300]\n    end\nend\n\nwhen I receive [slide v]\nif <(falling?) < [3]> then\n    start sound [Mega Man 6 SRX \(9\) v]\n    set [slide time v] to [1]\n    repeat (10)\n        set [canmove? v] to [1]\n        set [sliding? v] to [1]\n        if <(direction) = [90]> then\n            Walk (direction) [8]\n        else\n            Walk (direction) [-8]\n        end\n    end\n    set [canmove? v] to [1]\n    set [sliding? v] to [0]\n    wait (.2) seconds\n    set [slide time v] to [0]\nend\nwait (1) seconds\n\nset [climbing on ladder v] to [1]\n\nset [climbing on ladder v] to [0]\n\nset [speed y v] to [0]\n\nwhen flag clicked\nset [slide time v] to [0]\n\nwhen I receive [we have returned v]\nset [canmove? v] to [0]\n\nforever\n    wait until <(falling?) > [3]>\n    start sound [jump v]\n    wait until <(falling?) < [2]>\nend\n\nwhen flag clicked\nwait (.02) seconds\nforever\n    wait until <(You spin me right round) = [1]>\n    start sound [spin v]\n    wait until <(falling?) > [2]>\n    wait until <(falling?) < [3]>\n    set [you spin me right round v] to [0]\nend\n\nwhen flag clicked\n\nwhen I receive [extra jump v]\nstart sound [kick v]\nset [speed y v] to [10]\n\nforever\n\nif <(y position) < [-173]> then\n    set y to (100)\n    set [scroll y v] to [100]\n    wait (1) seconds\nend\n\nwhen I receive [teleportin v]\nforever\n    wait until <<<(y position) > [-50]> and <(y position) < [50]>> and <<(Scroll X) > [3299]> and <<(x position) > [92]> and <(x position) < [123]>>>>\n    set [canmove? v] to [0]\n    start sound [pipe v]\n    broadcast (SUBWORLDPIPE v)\n    wait (5) seconds\nend\n\nwhen I receive [firemariotransform v]\nset [canmove? v] to [0]\nwait (.6) seconds\nset [canmove? v] to [1]\n\nwhen I receive [bowser die v]\nset [canmove? v] to [0]\n\n@Level_Background\n\nwhen I receive [setup v]\nshow\ngo to x: (0) y: (0)\nset [level_x v] to [0]\nswitch costume to (grenade v)\nCreate\nhide\n\ndefine Create\nset [brightness v] effect to (15)\nset size to (200) %\nswitch costume to (hill1 v)\nset [level_y v] to [0]\nset [level_x v] to [0]\nrepeat (10)\n    create clone of (_myself_ v)\n    change [level_x v] by (480)\n    next costume\n    create clone of (_myself_ v)\n    change [level_x v] by (540)\n    next costume\nend\n\nrepeat (20)\n    create clone of (_myself_ v)\n    change [level_x v] by (500)\nend\n\ndefine Find Costume Number\nset [level costumes v] to [1]\nswitch costume to ((1) / (1))\nnext costume\nrepeat until <(costume [number v]) = [1]>\n    change [level costumes v] by (1)\n    next costume\nend\n\nwhen I receive [level loop v]\nforever\n    set x to ((Level_X) - (Scroll X))\n    set y to ((Level_Y) - (Scroll Y))\n    if <<([abs v] of ((Level_X) - (Scroll X)) ) > [510]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [400]>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    broadcast (Level Loop v)\nend\n\nchange [level_x v] by (480)\n\nchange [level_x v] by (480)\n\nset [level_y v] to [-150]\n\nchange [level_x v] by (540)\n\nchange [level_y v] by (-448)\n\nwhen I start as a clone\nforever\n    set [brightness v] effect to (10)\nend\n\nwait (.5) seconds\nset [brightness v] effect to (20)\nwait (.5) seconds\n\nswitch costume to (ghsot v)\n\nbroadcast (blink v)\n\nwhen I start as a clone\n\nforever\n    switch costume to (bgtomahawk5 v)\n    repeat (3)\n        wait (.05) seconds\n        next costume\n    end\n    wait (.05) seconds\nend\n\nrepeat (20)\n    change [brightness v] effect by (.4)\nend\nrepeat (20)\n    change [brightness v] effect by (-.4)\nend\n\n@enemies\n\nwhen I receive [setup v]\nshow\ngo to x: (0) y: (0)\nset [level_x v] to [0]\nswitch costume to (koop1 v)\nhide\n\ndefine Create\nset [brightness v] effect to (15)\nset size to (200) %\nswitch costume to (koop1 v)\nset [level_y v] to [-131]\nset y to (-131)\nset [level_x v] to [500]\ncreate clone of (_myself_ v)\nset [level_x v] to [1500]\ncreate clone of (_myself_ v)\nset [level_x v] to [2200]\ncreate clone of (_myself_ v)\nswitch costume to (fireflower v)\nset [level_y v] to [-85]\nset [level_x v] to [800]\ncreate clone of (_myself_ v)\nset [level_x v] to [9999]\n\nwhen I receive [level loop v]\nforever\n    if <(kil) = [0]> 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)) ) > [240]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [400]>> then\n            set [onscreen v] to [0]\n            hide\n        else\n            set [onscreen v] to [1]\n            show\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    set [brightness v] effect to (10)\nend\n\nwhen I start as a clone\nset [clone v] to [1]\nset [invincible? v] to [0]\nset [oooooooooooof v] to [0]\nset rotation style [left-right v]\nif <(costume [number v]) = [1]> then\n    switch costume to (koop1 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 <(oooooooOOooof) = [1]>\n        switch costume to (koop1 v)\n        if <(oooooooOOooof) = [0]> then\n            wait (.15) seconds\n        end\n        next costume\n        if <(oooooooOOooof) = [0]> then\n            wait (.15) seconds\n        end\n    end\n    set [proj x v] to (Level_X)\n    set [proj y v] to (Level_Y)\n    if <(You spin me right round) = [1]> then\n        spindie\n    end\n    set [invincible? v] to [1]\n    broadcast (SpawnShell v)\n    switch costume to (koophit v)\n    repeat (3)\n        if <(direction) = [90]> then\n            change [level_x v] by (20)\n        else\n            change [level_x v] by (-20)\n        end\n    end\n    repeat (6)\n        if <(direction) = [90]> then\n            change [level_x v] by (10)\n        else\n            change [level_x v] by (-10)\n        end\n    end\n    repeat (6)\n        if <(direction) = [90]> then\n            change [level_x v] by (6)\n        else\n            change [level_x v] by (-6)\n        end\n    end\n    set [invincible? v] to [0]\n    repeat (15)\n        if <(direction) = [90]> then\n            change [level_x v] by (2)\n        else\n            change [level_x v] by (-2)\n        end\n    end\n    wait (.5) seconds\n    repeat until <<([y position v] of [hitbox v]) > ((y position) + (20))> and <(distance to [hitbox v]) < [50]>>\n        switch costume to (koop3 v)\n        if <(direction) = [90]> then\n            change [level_x v] by (5)\n        else\n            change [level_x v] by (-5)\n        end\n        wait (.1) seconds\n        next costume\n        if <(direction) = [90]> then\n            change [level_x v] by (5)\n        else\n            change [level_x v] by (-5)\n        end\n        wait (.1) seconds\n    end\n    broadcast (extra jump v)\n    if <(You spin me right round) = [1]> then\n        spindie\n    end\n    switch costume to (koop5 v)\n    wait (.5) seconds\n    delete this clone\nend\n\nwhen I start as a clone\nset rotation style [left-right v]\nif <(costume [number v]) = [1]> then\n    repeat until <<([y position v] of [hitbox v]) > ((y position) + (20))> and <(distance to [hitbox v]) < [50]>>\n        if <(direction) = [90]> then\n            change [level_x v] by (2)\n        else\n            change [level_x v] by (-2)\n        end\n    end\n    broadcast (extra jump v)\n    set [oooooooooooof v] to [1]\nend\n\nwhen I start as a clone\nset rotation style [left-right v]\nforever\n    if <not <(costume [number v]) = [12]>> then\n        repeat until <touching (ground v)?>\n            if <(onscreen) = [1]> then\n                change [level_y v] by (-1)\n            end\n        end\n    end\nend\n\ndefine spindie\nstop [other scripts in sprite v]\nstart sound [super-stomp v]\nswitch costume to (smoke1 v)\nrepeat (4)\n    set x to ((Level_X) - (Scroll X))\n    set y to ((Level_Y) - (Scroll Y))\n    wait (0) seconds\n    next costume\nend\nwait (0) seconds\ndelete this clone\n\nwhen I receive [subworldpipe v]\ndelete this clone\n\nwhen I start as a clone\nif <(costume [number v]) = [12]> then\n    switch costume to (fireflower v)\n    forever\n        point in direction (90)\n        wait (.2) seconds\n        point in direction (-90)\n        wait (.2) seconds\n    end\nend\nif <(costume [number v]) = [15]> then\n    forever\n        switch costume to (coin1 v)\n        repeat (3)\n            wait (.02) seconds\n            next costume\n        end\n        wait (.02) seconds\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [12]> then\n    wait (.1) seconds\n    wait until <touching (its a me mario v)?>\n    broadcast (FireMarioTransform v)\n    delete this clone\nend\n\nwhen I receive [teleportin v]\ndelete this clone\n\nwhen I receive [teleportin v]\nwait (0) seconds\nif <(BOSS FIGHT?) = [0]> then\n    Create\nend\nif <<(BOSS FIGHT?) = [1]> and <(DefeatedBowser?) = [1]>> then\n    switch costume to (switch1 v)\n    set [level_y v] to [-131]\n    set [level_x v] to [250]\n    create clone of (_myself_ v)\n    set [level_x v] to [9999]\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [1]> then\n    wait until <touching (fireball v)?>\n    spindie\nend\n\nwhen I start as a clone\nset [kil v] to [0]\nwait until <<touching (koopashell v)?> and <not <(costume [number v]) > [11]>>>\nif <(Invincible?) = [0]> then\n    set [kil v] to [1]\n    stop [other scripts in sprite v]\n    start sound [kick v]\n    point in direction (-90)\n    set rotation style [all around v]\n    repeat (3)\n        change x by (5)\n        change y by (5)\n    end\n    repeat (3)\n        change x by (5)\n        change y by (-5)\n    end\n    repeat (3)\n        change x by (5)\n        change y by (-10)\n    end\n    repeat until <touching (_edge_ v)?>\n        change x by (5)\n        change y by (-20)\n    end\n    change x by (5)\n    change y by (-20)\n    delete this clone\nend\n\nwhen I start as a clone\nforever\n    if <<(Level_X) > [2390]> and <(Level_X) < [2405]>> then\n        turn right (180) degrees\n        change [level_x v] by (-15)\n    end\n    if <<(Level_X) > [2715]> and <(Level_X) < [2730]>> then\n        turn right (180) degrees\n        change [level_x v] by (15)\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [13]> then\n    wait (.5) seconds\n    wait until <<([y position v] of [hitbox v]) > ((y position) + (30))> and <(distance to [hitbox v]) < [50]>>\n    start sound [switch v]\n    switch costume to (switch2 v)\n    broadcast (extra jump v)\n    broadcast (SCREENSHAKE v)\n    broadcast (CoinRain v)\nend\n\nwhen I receive [coinrain v]\nif <(clone) = [0]> then\n    switch costume to (coin1 v)\n    repeat (300)\n        create clone of (_myself_ v)\n        wait (.02) seconds\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [15]> then\n    point in direction (90)\n    set [level_y v] to [200]\n    set [level_x v] to (pick random (150) to (350))\n    if <(pick random (1) to (2)) = [1]> then\n        repeat until <(Level_Y) < [-140]>\n            change [level_x v] by (2)\n            change [level_y v] by (y)\n            change [y v] by (-1)\n        end\n        set [level_y v] to [-150]\n        forever\n            change [level_x v] by (2)\n        end\n    else\n        repeat until <(Level_Y) < [-140]>\n            change [level_x v] by (-2)\n            change [level_y v] by (y)\n            change [y v] by (-1)\n        end\n        set [level_y v] to [-150]\n        forever\n            change [level_x v] by (-2)\n        end\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [15]> then\n    wait until <touching (its a me mario v)?>\n    stop [other scripts in sprite v]\n    set [ghost v] effect to (100)\n    start sound [coin v]\n    repeat (8)\n        set x to ((Level_X) - (Scroll X))\n        set y to ((Level_Y) - (Scroll Y))\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [15]> then\n    wait (3) seconds\n    repeat (5)\n        set [ghost v] effect to (100)\n        wait (.05) seconds\n        set [ghost v] effect to (0)\n        wait (.05) seconds\n    end\n    delete this clone\nend\n\n@phase through platforms\n\nwhen I receive [setup v]\nshow\ngo to x: (0) y: (0)\nset [level_x v] to [0]\nswitch costume to (-61 v)\nCreate\nhide\n\ndefine Create\nset [brightness v] effect to (15)\nset size to (200) %\nswitch costume to (-61 v)\nset [level_y v] to [0]\nset [level_x v] to [540]\nrepeat (2)\n    create clone of (_myself_ v)\n    next costume\nend\nchange [level_x v] by (540)\nrepeat (2)\n    create clone of (_myself_ v)\n    next costume\nend\nrepeat (3)\n    change [level_x v] by (540)\n    create clone of (_myself_ v)\n    next costume\nend\nchange [level_x v] by (999)\n\nwhen I receive [level loop v]\nforever\n    set [ghost v] effect to (100)\n    set [level_y v] to (costume [name v])\n    set x to ((Level_X) - (Scroll X))\n    set y to (0)\n    if <([y position v] of [hitbox v]) > (Level_Y)> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I start as a clone\nwait (1) seconds\nwait until <(BOSS FIGHT?) = [1]>\ndelete this clone\n\nwhen I receive [teleportin v]\nwait (1) seconds\nif <(BOSS FIGHT?) = [0]> then\n    Create\nend\n\nwhen I receive [teleportin v]\ndelete this clone\n\n@Bowser\n\nwhen flag clicked\nset [defeatedbowser? v] to [0]\nset [clowncaralive? v] to [0]\nhide\n\nwhen I receive [die v]\nwait (.02) seconds\nstop [other scripts in sprite v]\nset [clowncaralive? v] to [0]\nrepeat (20)\n    change size by (-10)\nend\nhide\n\nwhen I receive [subworldpipe v]\nforever\n    set x to ((Level_X) - (Scroll X))\n    set y to ((Level_Y) - (Scroll Y))\n    if <<([abs v] of ((Level_X) - (Scroll X)) ) > [305]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [245]>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [subworldpipe v]\nif <(DefeatedBowser?) = [0]> then\n    set [clowncaralive? v] to [1]\n    set [level_x v] to [0]\n    set [clowncarloop v] to [1]\n    set [level_y v] to [500]\n    set [clowncar hp v] to [20]\n    set size to (200) %\n    wait (3) seconds\n    set rotation style [left-right v]\n    start sound [clowncar-moveout-thenin v]\n    point in direction (-90)\n    wait (2) seconds\n    repeat (90)\n        change [level_y v] by (-5)\n    end\n    forever\n        repeat (2)\n            set [y v] to [0]\n            set [clowncarloop v] to [1]\n            repeat (80)\n                point towards (its a me mario v)\n                set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n                change [y v] by (1)\n            end\n            set [projectile name v] to [mace]\n            create clone of (_myself_ v)\n            wait (5) seconds\n        end\n        start sound [clowncar-moveout v]\n        repeat (40)\n            change size by (-5)\n            change [level_y v] by (5)\n        end\n        broadcast (SCREENSHAKE v)\n        start sound [shatter v]\n        clear graphic effects\n        set [proj x v] to [-200]\n        set [proj y v] to [-200]\n        set [projectile name v] to [podobo]\n        create clone of (_myself_ v)\n        repeat (7)\n            wait (.25) seconds\n            change [proj x v] by (150)\n            create clone of (_myself_ v)\n        end\n        repeat (11)\n            wait (.25) seconds\n            create clone of (_myself_ v)\n            change [proj x v] by (-135)\n        end\n        wait (1) seconds\n        set [level_x v] to (([x position v] of [hitbox v]) + (Scroll X))\n        set [level_y v] to [250]\n        set [clowncarloop v] to [0]\n        set size to (200) %\n        set rotation style [left-right v]\n        start sound [clowncar-reenter v]\n        point in direction (-90)\n        repeat (39)\n            switch costume to (i am going to kill you then kill you again v)\n            change [level_y v] by (-5)\n            point towards (its a me mario v)\n        end\n        set [y v] to [0]\n        repeat (5)\n            change [y v] by (5)\n            change [level_y v] by (y)\n        end\n        repeat until <(Level_Y) < [-50]>\n            point towards (its a me mario v)\n            change [y v] by (-3)\n            change [level_y v] by (y)\n        end\n        broadcast (SCREENSHAKE v)\n        start sound [bullet v]\n        set [level_y v] to [-60]\n        if <(x position) > ([x position v] of [hitbox v])> then\n            repeat until <(x position) < ([x position v] of [hitbox v])>\n                set [y v] to [0]\n                repeat (5)\n                    change [y v] by (5)\n                    change [level_x v] by (-5)\n                    change [level_y v] by (y)\n                end\n                repeat until <(Level_Y) < [-50]>\n                    point towards (its a me mario v)\n                    change [level_x v] by (-5)\n                    change [y v] by (-3)\n                    change [level_y v] by (y)\n                    if <touching (hitbox v)?> then\n                        broadcast (Mario Get Hurt v)\n                    end\n                end\n                broadcast (SCREENSHAKE v)\n                start sound [bullet v]\n                set [level_y v] to [-60]\n                wait (.05) seconds\n            end\n        else\n            repeat until <(x position) > ([x position v] of [hitbox v])>\n                set [y v] to [0]\n                repeat (5)\n                    change [y v] by (5)\n                    change [level_x v] by (5)\n                    change [level_y v] by (y)\n                end\n                repeat until <(Level_Y) < [-50]>\n                    point towards (its a me mario v)\n                    change [level_x v] by (5)\n                    change [y v] by (-3)\n                    change [level_y v] by (y)\n                    if <touching (hitbox v)?> then\n                        broadcast (Mario Get Hurt v)\n                    end\n                end\n                broadcast (SCREENSHAKE v)\n                start sound [bullet v]\n                set [level_y v] to [-60]\n                wait (.05) seconds\n            end\n        end\n        set [clowncarloop v] to [1]\n        set [level_y v] to [-60]\n        start sound [clowncar-moveout v]\n        repeat (13)\n            change [level_y v] by (10)\n        end\n        set [y v] to [0]\n        set [clowncarloop v] to [1]\n        repeat (80)\n            point towards (its a me mario v)\n            set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (y)))\n            change [y v] by (1)\n        end\n        set [clowncarloop v] to [0]\n        wait (.06) seconds\n        switch costume to (a'ight lets have a look v)\n        repeat (2)\n            wait (.2) seconds\n            next costume\n        end\n        set [projectile name v] to [saw]\n        repeat (2)\n            create clone of (_myself_ v)\n            wait (1) seconds\n        end\n        set [projectile name v] to [flower]\n        create clone of (_myself_ v)\n        wait (.5) seconds\n        set [projectile name v] to [saw]\n        create clone of (_myself_ v)\n        wait (.5) seconds\n        set [clowncarloop v] to [1]\n    end\nend\nset [level_y v] to [9999]\n\nwhen I receive [subworldpipe v]\n\nwhen I start as a clone\nif <(PROJECTILE NAME) = [mace]> then\n    set rotation style [all around v]\n    switch costume to (mace1 v)\n    start sound [unknown1 v]\n    set [y v] to [0]\n    repeat (6)\n        wait (.3) seconds\n        next costume\n    end\n    repeat (11)\n        start sound [saw v]\n        change [y v] by (3)\n        turn right (y) degrees\n        switch costume to (mace8 v)\n        wait (0) seconds\n        turn right (y) degrees\n        next costume\n        wait (0) seconds\n    end\n    repeat (6)\n        wait (.05) seconds\n        switch costume to ((costume [number v]) + (-1))\n    end\n    delete this clone\nend\nif <(PROJECTILE NAME) = [podobo]> then\n    set rotation style [all around v]\n    forever\n        switch costume to (podobo1 v)\n        wait (.05) seconds\n        switch costume to (podobo2 v)\n        wait (.05) seconds\n    end\nend\nif <(PROJECTILE NAME) = [saw]> then\n    set rotation style [left-right v]\n    forever\n        start sound [saw v]\n        switch costume to (saw1 v)\n        wait (.05) seconds\n        switch costume to (saw2 v)\n        wait (.05) seconds\n    end\nend\nif <(PROJECTILE NAME) = [flower]> then\n    set rotation style [left-right v]\n    forever\n        switch costume to (fireflower v)\n        wait (.05) seconds\n        switch costume to (fireflower2 v)\n        wait (.05) seconds\n    end\nend\n\nwhen I receive [die v]\ndelete this clone\n\nwhen I start as a clone\nclear graphic effects\ngo to [front v] layer\nset size to (200) %\nif <(PROJECTILE NAME) = [podobo]> then\n    set [level_x v] to (PROJ X)\n    set [level_y v] to (PROJ Y)\nelse\n    if <(PROJECTILE NAME) = [saw]> then\n        change [level_y v] by (25)\n    end\nend\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)) ) > [305]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [250]>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I start as a clone\nwait (.2) seconds\nforever\n    if <<(costume [number v]) = [33]> or <(costume [number v]) = [34]>> then\n        wait until <touching (hitbox v)?>\n        broadcast (FireMarioTransform v)\n        wait (.5) seconds\n        delete this clone\n    else\n        wait until <touching (hitbox v)?>\n        broadcast (Mario Get Hurt v)\n        repeat (10)\n            set [brightness v] effect to (50)\n            wait (.02) seconds\n            set [brightness v] effect to (0)\n            wait (.02) seconds\n        end\n    end\nend\n\nwhen I start as a clone\nif <(PROJECTILE NAME) = [flower]> then\n    set [y v] to [20]\n    point towards (its a me mario v)\n    repeat until <(Level_Y) < [-100]>\n        change [y v] by (-2)\n        change [level_y v] by (y)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (5)))\n    end\n    set [level_y v] to [-113]\n    wait (1) seconds\n    repeat (10)\n        set [ghost v] effect to (100)\n        wait (.02) seconds\n        set [ghost v] effect to (0)\n        wait (.02) seconds\n    end\n    delete this clone\nend\nif <(PROJECTILE NAME) = [saw]> then\n    set [y v] to [15]\n    point towards (its a me mario v)\n    repeat until <(Level_Y) < [-110]>\n        change [y v] by (-2)\n        change [level_y v] by (y)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (5)))\n    end\n    set [level_y v] to [-120]\n    wait (0) seconds\n    if <(x position) > ([x position v] of [hitbox v])> then\n        set [y v] to [0]\n        repeat (50)\n            change [y v] by (-1)\n            change [level_x v] by (y)\n        end\n    else\n        set [y v] to [0]\n        repeat (50)\n            change [y v] by (1)\n            change [level_x v] by (y)\n        end\n    end\n    delete this clone\nend\nif <(PROJECTILE NAME) = [podobo]> then\n    wait (.02) seconds\n    point in direction (90)\n    start sound [podoboo v]\n    repeat (10)\n        change [level_y v] by (25)\n    end\n    repeat (5)\n        change [level_y v] by (15)\n    end\n    repeat (5)\n        change [level_y v] by (5)\n    end\n    point in direction (-90)\n    repeat (5)\n        change [level_y v] by (-5)\n    end\n    repeat (5)\n        change [level_y v] by (-20)\n    end\n    repeat (5)\n        change [level_y v] by (-30)\n    end\n    delete this clone\nend\n\nwhen I receive [subworldpipe v]\nforever\n    if <(clowncarloop) = [1]> then\n        repeat (10)\n            if <(clowncarloop) = [1]> then\n                switch costume to (clowncar v)\n                repeat (2)\n                    next costume\n                end\n            end\n        end\n        if <(clowncarloop) = [1]> then\n            switch costume to (clowncar v)\n            repeat (3)\n                next costume\n            end\n        end\n    end\nend\n\nwhen I receive [subworldpipe v]\nwait (1) seconds\nforever\n    wait until <touching (fireball v)?>\n    change [clowncar hp v] by (-1)\n    start sound [map-castle-demolish v]\n    repeat (15)\n        set [ghost v] effect to (50)\n        wait (.02) seconds\n        set [ghost v] effect to (0)\n        wait (.02) seconds\n    end\nend\n\nwhen I receive [subworldpipe v]\nwait (1) seconds\nif <(DefeatedBowser?) = [0]> then\n    wait until <(ClownCar HP) < [1]>\n    broadcast (Bowser Die v)\n    set [defeatedbowser? v] to [1]\n    stop [other scripts in sprite v]\n    repeat (2)\n        start sound [map-castle-demolish v]\n        switch costume to (die1 v)\n        repeat (2)\n            set x to ((Level_X) - (Scroll X))\n            set y to ((Level_Y) - (Scroll Y))\n            show\n            set [brightness v] effect to (5)\n            wait (.02) seconds\n            set [brightness v] effect to (0)\n            wait (.02) seconds\n        end\n        switch costume to (die2 v)\n        start sound [map-castle-demolish v]\n        repeat (2)\n            set x to ((Level_X) - (Scroll X))\n            set y to ((Level_Y) - (Scroll Y))\n            show\n            set [brightness v] effect to (5)\n            wait (.02) seconds\n            set [brightness v] effect to (0)\n            wait (.02) seconds\n        end\n    end\n    start sound [boss-defeat v]\n    repeat (20)\n        change size by (-5)\n    end\n    hide\nend\n\nwhen I receive [bowser die v]\ndelete this clone\n\n@fireball\n\nwhen I start as a clone\nset [brightness v] effect to (10)\nset [clone v] to [1]\nstart sound [fireball v]\nforever\n    wait (.1) seconds\n    next costume\nend\n\nwhen flag clicked\nset [level_x v] to [0]\nset [level_y v] to [999999]\nhide\n\nwhen I receive [level loop v]\nforever\n    if <(clone) = [1]> then\n        set x to ((Level_X) - (Scroll X))\n        set y to ((Level_Y) - (Scroll Y))\n        if <<([abs v] of ((Level_X) - (Scroll X)) ) > [250]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [400]>> then\n            set [onscreen v] to [0]\n            delete this clone\n        else\n            set [onscreen v] to [1]\n            show\n        end\n    end\nend\n\nwhen I start as a clone\ngo to [front v] layer\nset [level_x v] to (([x position v] of [hitbox v]) + (Scroll X))\nset [level_y v] to (([y position v] of [hitbox v]) + (-15))\nif <(FireBallDirection) = [-90]> then\n    point in direction (-105)\nelse\n    point in direction (105)\nend\nif <(direction) = [-105]> then\n    repeat (50)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (15)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (15)))\n        if <touching (ground v)?> then\n            turn left (-30) degrees\n            set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (15)))\n            set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (15)))\n            repeat (10)\n                set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (15)))\n                set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (15)))\n            end\n            turn left (30) degrees\n            set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (15)))\n            set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (15)))\n        end\n    end\n    delete this clone\nelse\n    repeat (25)\n        set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (15)))\n        set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (15)))\n        if <touching (ground v)?> then\n            turn left (30) degrees\n            set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (15)))\n            set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (15)))\n            repeat (10)\n                set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (15)))\n                set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (15)))\n            end\n            turn left (-30) degrees\n            set [level_x v] to ((Level_X) + (([sin v] of (direction) ) * (15)))\n            set [level_y v] to ((Level_Y) + (([cos v] of (direction) ) * (15)))\n        end\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nwait until <<touching (enemies v)?> or <touching (bowser v)?>>\nwait (.03) seconds\ndelete this clone\n\n@KoopaShell\n\nwhen flag clicked\nhide\n\nwhen I receive [level loop v]\nforever\n    if <(clone) = [1]> then\n        set x to ((Level_X) - (Scroll X))\n        set y to ((Level_Y) - (Scroll Y))\n        if <<([abs v] of ((Level_X) - (Scroll X)) ) > [240]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [400]>> then\n            set [onscreen v] to [0]\n            if <(Being Carried?) = [1]> then\n                set [ghost v] effect to (99)\n            else\n                delete this clone\n            end\n        else\n            set [onscreen v] to [1]\n            clear graphic effects\n            show\n        end\n    end\nend\n\nwhen I receive [spawnshell v]\nif <(clone) = [0]> then\n    switch costume to (shell1 v)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\ngo to [front v] layer\nset [level_x v] to (PROJ X)\nset [level_y v] to (PROJ Y)\nset [clone v] to [1]\nset [speed y v] to [1]\nset [being carried? v] to [0]\nforever\n    if <not <touching (ground v)?>> then\n        if <(Being Carried?) = [1]> then\n            set [speed y v] to [1]\n        else\n            change [speed y v] by (-1)\n        end\n    end\n    change [level_y v] by (speed y)\n    if <touching (ground v)?> then\n        if <(BOSS FIGHT?) = [1]> then\n            if <(DefeatedBowser?) = [1]> then\n                set [level_y v] to [-161]\n            else\n                set [level_y v] to [-130]\n            end\n        else\n            if <<(Level_X) < [2417]> or <(Level_X) > [2707]>> then\n                set [level_y v] to [-155]\n            else\n                set [level_y v] to [-27]\n            end\n        end\n    end\nend\n\ndefine Walk (direction) (speed)\npoint in direction (direction)\nchange [level_x v] by (speed)\nset [slope v] to [0]\nrepeat until <<(slope) = [8]> or <not <touching (ground v)?>>>\n    change [slope v] by (1)\n    change [level_y v] by (1)\nend\nif <(slope) = [8]> then\n    change y by ((0) - (slope))\nend\n\ndefine Touch Ground <up?>\nchange [falling? v] by (1)\nrepeat until <not <touching (ground v)?>>\n    if <up?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [falling? v] to [0]\n    end\n    set [speed y v] to [0]\nend\n\nchange [level_y v] by (1)\n\nchange [level_y v] by (-1)\n\nwhen I start as a clone\nforever\n    set rotation style [left-right v]\n    switch costume to (shell1 v)\n    wait (.5) seconds\n    wait until <<touching (hitbox v)?> and <(Carrying Object?) = [0]>>\n    set [carrying object? v] to [1]\n    set [being carried? v] to [1]\n    repeat until <<key (space v) pressed?> or <mouse down?>>\n        set [level_y v] to (([y position v] of [hitbox v]) + (-15))\n        if <([direction v] of [hitbox v]) = [90]> then\n            point in direction (90)\n            set [level_x v] to ((([x position v] of [hitbox v]) + (Scroll X)) + (25))\n        else\n            point in direction (-90)\n            set [level_x v] to ((([x position v] of [hitbox v]) + (Scroll X)) + (-25))\n        end\n    end\n    set [carrying object? v] to [0]\n    set [being carried? v] to [0]\n    start sound [kick v]\n    set [speed y v] to [0]\n    repeat until <<([y position v] of [hitbox v]) > ((y position) + (35))> and <(distance to [hitbox v]) < [50]>>\n        next costume\n        if <(direction) = [90]> then\n            Walk (direction) [8]\n        else\n            Walk (direction) [-8]\n        end\n        if <<(Level_X) > [2390]> and <(Level_X) < [2405]>> then\n            turn right (180) degrees\n            Walk (direction) [-20]\n        end\n        if <<(Level_X) > [2715]> and <(Level_X) < [2745]>> then\n            point in direction (90)\n            Walk (direction) [20]\n        end\n    end\n    broadcast (extra jump v)\n    change y by (10)\n    start sound [kick v]\nend\n\nturn left (180) degrees\nchange [level_x v] by (speed)\n\nTouch Ground <(speed y) > [0]>\n\nchange [level_x v] by ((0) - (speed))\n\nwhen I receive [teleportin v]\ndelete this clone\n\n
Use arrow keys, avoid spikes, saws, enemies, bosses and lava. Survive 30 seconds in the boss battle as your outside forces are slowly taking care of him!\nuse s key to skip.\nNEW GAME: https://scratch.mit.edu/projects/601752581/