Words - a platformer    #games  #all

Instructions: Super Mario A Platformer\n\nMobile version:\nhttps://scratch.mit.edu/projects/727237703/ \n\nUse r to reset the level\nUse m to mute/unmute the music\n\nTurboWarp: turbowarp.org/725772510\n\n-Use the arrows to move\n-Dont touch the spikes\n\nI hope you like the game!\n100 likes = Minecraft A Platformer Fan Edition\n400 likes = Super Mario Jumper\n1700 likes = Super Mario A Platformer 2

@Stage\n\nwhen flag clicked\nset [clonecount v] to [0]\nif <<(debug) = [1]> and <key (s v) pressed?>> then\n    set [title v] to [0]\nelse\n    set [title v] to [1]\nend\nbroadcast (greenFlag v)\n\nwhen I receive [music v]\nif <not <<(music) = [16]> and <<(current) = [43]> and <(gameHalf) < [2]>>>> then\n    stop all sounds\nend\nset volume to (musicVol) %\nif <not <(music) = [0]>> then\n    play sound ([floor v] of (music) ) until done\n    forever\n        if <(music) = [0]> then\n            stop [this script v]\n        end\n        play sound ([ceiling v] of (music) ) until done\n    end\nend\n\nwhen I receive [loadlevel v]\nif <[introlevels v] contains ((current) + (1))?> then\n    if <(current) = [42]> then\n        switch backdrop to (full-stars v)\n    else\n        switch backdrop to ((item # of ((current) + (1)) in [introlevels v]) - (1))\n    end\n    repeat (10)\n        change volume by ((0) - ((musicVol) / (10)))\n    end\n    set [music v] to [0]\n    stop all sounds\n    broadcast (music v)\n    set volume to (musicVol) %\nend\nif <[introlevels v] contains (current)?> then\n    switch backdrop to (item # of (current) in [introlevels v])\n    if <(died) = [0]> then\n        set [music v] to (item (item # of (current) in [introlevels v]) of [muslist v])\n        broadcast (music v)\n    end\nend\n\nwhen I receive [changevol v]\nset volume to (musicVol) %\n\nset [musicvol v] to [100]\nbroadcast (changeVol v)\n\nset [musicvol v] to [50]\nbroadcast (changeVol v)\n\nwhen I receive [musicfade v]\nrepeat (10)\n    change volume by ((0) - ((musicVol) / (10)))\nend\nset [music v] to [0]\nstop all sounds\nbroadcast (music v)\nwait (0) seconds\nset volume to (musicVol) %\n\nset [music v] to (item (14) of [muslist v])\nbroadcast (music v)\n\nset [music v] to [16]\nbroadcast (music v)\nwait (1) seconds\nset [music v] to [0]\n\nset [music v] to [1]\nbroadcast (music v)\n\nwhen I receive [greenflag v]\nif <(title) = [1]> then\n    set [debug v] to [0]\n    if <<key (any v) pressed?> or <(mobileActive) > [0]>> then\n        set [music v] to [17]\n        broadcast (music v)\n        broadcast (titleStart v)\n        broadcast (menuLoop v)\n    else\n        if <(read) = [0]> then\n            erase all\n            set [read v] to [1]\n            set [brightness v] effect to (-100)\n            switch backdrop to (read v)\n            repeat (15)\n                change [brightness v] effect by ((100) / (15))\n            end\n            clear graphic effects\n            wait (1.8) seconds\n            repeat (15)\n                change [brightness v] effect by ((0) - ((100) / (15)))\n            end\n            clear graphic effects\n            set [brightness v] effect to (-100)\n        end\n        if <(username) = [TriforceMayhem]> then\n            set [read v] to [0]\n        end\n        set [music v] to [17]\n        broadcast (music v)\n        broadcast (titleStart v)\n        switch backdrop to (dark v)\n        wait (3.6) seconds\n        set [brightness v] effect to (-100)\n        switch backdrop to ((17) + <<(current) = [43]> and <(gameHalf) = [1]>>)\n        repeat (15)\n            change [brightness v] effect by ((100) / (15))\n        end\n        clear graphic effects\n        wait (1.8) seconds\n        repeat (15)\n            change [brightness v] effect by ((0) - ((100) / (15)))\n        end\n        clear graphic effects\n        set [brightness v] effect to (-100)\n        wait (0.6) seconds\n        switch backdrop to (full-stars-clouds v)\n        repeat (15)\n            change [brightness v] effect by ((100) / (15))\n        end\n        clear graphic effects\n    end\nend\n\nwhen backdrop switches to [mtn-brown-night v]\nif <(visualBgLite) = [on]> then\n    switch backdrop to (mtn-brown-nightacc v)\nend\n\nwhen backdrop switches to [plateau v]\nif <(visualBgLite) = [on]> then\n    switch backdrop to (plateauacc v)\nend\n\nwhen backdrop switches to [tower v]\nif <(visualBgLite) = [on]> then\n    switch backdrop to (toweracc v)\nend\n\nwhen backdrop switches to [full-stars v]\nif <(visualBgLite) = [on]> then\n    switch backdrop to (full-starsacc v)\nend\n\nwhen backdrop switches to [halftime v]\nif <(visualBgLite) = [on]> then\n    switch backdrop to (halftimeacc v)\nend\n\nwhen backdrop switches to [mtn-brown-nightrees-tall v]\nif <(visualBgLite) = [on]> then\n    switch backdrop to (mtn-brown-nightrees-tallacc v)\nend\n\nwhen backdrop switches to [full-stars-clouds v]\nif <(visualBgLite) = [on]> then\n    switch backdrop to (full-stars-cloudsacc v)\nend\n\nwhen backdrop switches to [full-stars-clouds-flare v]\nif <(visualBgLite) = [on]> then\n    switch backdrop to (full-stars-clouds-flareacc v)\nend\n\n@hitbox\n\ndefine VarReset\nset [xv v] to [0]\nset [yv v] to [0]\nset [ycol v] to [2]\nset [hitpoints v] to [3]\nbroadcast (hurtDisp v)\npoint in direction (90)\nif <(current) = [50]> then\n    go to x: (0) y: (0)\nelse\n    go to x: (-216) y: (-172)\n    if <<<(current) = [4]> or <(current) = [8]>> or <<(current) = [12]> or <(current) = [47]>>> then\n        change y by (128)\n    end\n    if <(current) = [5]> then\n        change x by (48)\n        change y by (180)\n    end\n    if <(current) = [13]> then\n        change x by (-16)\n    end\n    if <(current) = [21]> then\n        change x by (16)\n    end\nend\nif <<(current) = [35]> or <(current) = [42]>> then\n    change x by (32)\nend\nif <<(current) = [38]> or <(current) = [39]>> then\n    set x to (-176)\nend\nif <(current) = [41]> then\n    set x to (0)\nend\nrepeat until <not <touching (_edge_ v)?>>\n    change y by (1)\nend\nrepeat until <touching (ground v)?>\n    change y by (16)\n    if <touching (_edge_ v)?> then\n        stop [this script v]\n    end\nend\nif <(current) = [37]> then\n    set x to (176)\nend\nrepeat until <not <touching (ground v)?>>\n    change y by (16)\nend\nif <(current) = [17]> then\n    set y to (-91)\nend\nif <(current) = [37]> then\n    go to x: (200) y: (-172)\n    point in direction (-90)\n    set [yv v] to [70]\n    start sound [Jump2 v]\nend\nif <(current) = [38]> then\n    go to x: (-200) y: (-172)\n    point in direction (90)\n    set [yv v] to [86]\n    start sound [Jump2 v]\nend\nif <(current) = [39]> then\n    go to x: (-200) y: (-172)\n    point in direction (90)\n    set [yv v] to [70]\n    start sound [Jump2 v]\nend\nif <(current) = [40]> then\n    go to x: (200) y: (-172)\n    point in direction (-90)\n    set [yv v] to [6]\n    start sound [Jump2 v]\nend\nif <(current) = [41]> then\n    go to x: (200) y: (-172)\n    point in direction (-90)\n    set [yv v] to [22]\n    start sound [Jump2 v]\nend\n\nwhen I receive [levelstart v]\nset [color v] to [1]\nshow\nVarReset\nif <(current) = [42]> then\n    set [enabled v] to [1]\n    hide\n    start sound [Jump2 v]\n    broadcast (finalJumpUp v) and wait\n    show\n    set [enabled v] to [0]\nend\nbroadcast (render v)\nforever\n    if <(gameHalf) > [0]> then\n        change [color v] by (colorSpeed)\n        if <(color) > [7.999]> then\n            set [color v] to [1]\n        end\n    end\n    broadcast (updateObj v)\n    if <(enabled) = [0]> then\n        Inputs\n    else\n        if <(enabled) = [2]> then\n            Function <> <> <>\n        end\n    end\n    if <not <(enabled) = [1]>> then\n        if <<touching (water v)?> or <touching (risingswamp v)?>> then\n            create clone of (_myself_ v)\n            set [died v] to [1]\n            set [ghost v] effect to (100)\n            start sound ((4) + <(current) = [46]>)\n            set [hitpoints v] to [0]\n            broadcast (hurtDisp v)\n            set [retimer v] to [30]\n            set [repressed v] to [1]\n            repeat until <<(reTimer) < [1]> or <<<key (any v) pressed?> or <mouse down?>> and <(rePressed) = [0]>>>\n                broadcast (updateObj v)\n                change [retimer v] by (-1)\n                if <not <<key (any v) pressed?> or <mouse down?>>> then\n                    set [repressed v] to [0]\n                end\n            end\n            broadcast (transitionLoad v)\n            set [enabled v] to [1]\n        end\n        if <(y position) < [-178]> then\n            set [died v] to [1]\n            set [ghost v] effect to (100)\n            set [hitpoints v] to [0]\n            broadcast (hurtDisp v)\n            broadcast (transitionLoad v)\n            set [enabled v] to [1]\n        end\n    end\n    if <<(died) = [1]> or <(hitInvul) > [0]>> then\n        set [ghost v] effect to (100)\n    else\n        set [ghost v] effect to (0)\n    end\n    if <<(jumpColor) = [1]> and <(current) = [42]>> then\n        set [enabled v] to [2]\n        change [yv v] by (1.4)\n        change y by ((0) - (yV))\n        set [xv v] to [0]\n        point towards (boss6 v)\n        move (yV) steps\n    end\nend\n\nwhen I receive [varreset v]\nVarReset\n\ndefine Floor\nset [ycol v] to [3]\nif <(yV) < [-1.6]> then\n    if <(gameHalf) = [0]> then\n        start sound [smalljump v]\n    else\n        start sound [quietding2 v]\n    end\nend\nset [yv v] to [0]\nset [p v] to [0]\nrepeat until <<not <[collidabes v] contains [true]?>> or <(p) > [24]>>\n    change y by (1)\n    change [p v] by (1)\n    updateTouch\nend\nif <<(jumpColor) = [1]> or <(jumpLights) > [0]>> then\n    set [jumpcolor v] to [0]\n    set [jumplights v] to [0]\nend\n\ndefine Wall\nset [p v] to [3]\nset x to (round (x position))\nchange y by (p)\nupdateTouch\nif <<[collidabes v] contains [true]?> or <(yV) > [0]>> then\n    if <touching (lightpanel v)?> then\n        set [jumpcolor v] to [0.2]\n    end\n    change y by ((0) - (p))\n    updateTouch\n    set [p v] to [0]\n    if <(x position) > (lastx)> then\n        repeat until <<not <[collidabes v] contains [true]?>> or <(p) > [15]>>\n            change x by (-1)\n            change [p v] by (1)\n            updateTouch\n        end\n    else\n        repeat until <<not <[collidabes v] contains [true]?>> or <(p) > [15]>>\n            change x by (1)\n            change [p v] by (1)\n            updateTouch\n        end\n    end\n    if <(jumpColor) = [0]> then\n        set [xv v] to [0]\n    else\n        if <([abs v] of (xV) ) > [3]> then\n            set [xv v] to ((([abs v] of (xV) ) / (xV)) * (3))\n        end\n    end\nend\n\ndefine Ceiling\nset [yv v] to [0]\nset [p v] to [0]\nrepeat until <<not <[collidabes v] contains [true]?>> or <(p) > [15]>>\n    change y by (-1)\n    change [p v] by (1)\n    updateTouch\nend\n\ndefine Function <left> <right> <jump>\nset [animate? v] to [0]\nif <(yCol) > [0]> then\n    set [jumpcolor v] to [0]\nend\nif <<<left> and <right>> and <(yCol) > [0]>> then\n    if <(xV) > [0]> then\n        change [xv v] by (-0.8)\n        if <[0] > (xV)> then\n            set [xv v] to [0]\n        end\n    else\n        change [xv v] by (0.8)\n        if <(xV) > [0]> then\n            set [xv v] to [0]\n        end\n    end\nelse\n    if <<left> or <right>> then\n        if <left> then\n            point in direction (-90)\n            change [xv v] by (-0.5)\n            set [animate? v] to [1]\n            if <[-4] > (xV)> then\n                set [xv v] to [-4]\n            end\n        end\n        if <right> then\n            point in direction (90)\n            change [xv v] by (0.5)\n            set [animate? v] to [1]\n            if <(xV) > [4]> then\n                set [xv v] to [4]\n            end\n        end\n    else\n        if <[25] > (hitInvul)> then\n            if <(xV) > [0]> then\n                change [xv v] by (-0.8)\n                if <[0] > (xV)> then\n                    set [xv v] to [0]\n                end\n            else\n                change [xv v] by (0.8)\n                if <(xV) > [0]> then\n                    set [xv v] to [0]\n                end\n            end\n        end\n    end\nend\nchange x by (xV)\nif <([abs v] of (xV) ) > [1.5]> then\n    set [animate? v] to [1]\nend\nif <(x position) > [232]> then\n    set x to (232)\n    set [xv v] to [0]\nend\nif <[-232] > (x position)> then\n    set x to (-232)\n    set [xv v] to [0]\nend\nif <touching (lift v)?> then\n    change x by (-16)\n    if <touching (lift v)?> then\n        change x by (16)\n        LiftSide [1]\n    else\n        change x by (32)\n        if <touching (lift v)?> then\n            change x by (-16)\n            LiftSide [-1]\n        else\n            change x by (-16)\n        end\n    end\nend\nupdateTouch\nif <[collidabes v] contains [true]?> then\n    Wall\nend\nset [lastx v] to (x position)\nmove (1) steps\nif <<touching (lightpanel v)?> or <(jumpLights) > [0]>> then\n    if <[0.1] > (jumpColor)> then\n        set [jumpcolor v] to [0.1]\n    end\nend\nmove (-1) steps\nupdateTouch\nif <not <[collidabes v] contains [true]?>> then\n    change [yv v] by (-0.8)\n    if <[-16] > (yV)> then\n        set [yv v] to [-16]\n    end\n    change [ycol v] by (-1)\nend\nif <<key (g v) pressed?> and <(debug) = [1]>> then\n    set [yv v] to [0]\nend\nchange x by (([abs v] of (xV) ) / (xV))\nif <<touching (lightpanel v)?> and <<(yCol) < [1]> and <(jumpColor) > [0.1]>>> then\n    if <(yV) < [-1.5]> then\n        set [yv v] to [-1.5]\n    end\n    set [jumpcolor v] to [0.3]\nend\nchange x by ((0) - (([abs v] of (xV) ) / (xV)))\nif <<(jumpLights) > [0]> or <(jumpColor) = [0.3]>> then\n    set [jumppotential v] to [1]\nelse\n    set [jumppotential v] to [0]\nend\nchange y by (yV)\nupdateTouch\nif <(yV) > [0]> then\n    if <[collidabes v] contains [true]?> then\n        Ceiling\n    end\nelse\n    change y by (-1)\n    updateTouch\n    if (item (2) of [collidabes v]) then\n        change x by (liftSend)\n        if <touching (ground v)?> then\n            change x by ((0) - (([abs v] of (liftSend) ) / (liftSend)))\n            if <touching (ground v)?> then\n                change x by ((0) - (([abs v] of (liftSend) ) / (liftSend)))\n            end\n        end\n    end\n    set [liftsend v] to [0]\n    if <[collidabes v] contains [true]?> then\n        Floor\n    else\n        change y by (1)\n    end\nend\nif <<(jumpPotential) = [0]> and <(j) = [16]>> then\n    set [j v] to [0]\nend\nif <(yCol) > [0]> then\n    set [j v] to [16]\n    set [jumppotential v] to [0]\nend\nif <<jump> and <<(jumpBuffer) = [-1]> and <(jumpPotential) < [0.1]>>> then\n    set [jumpbuffer v] to [3]\nend\nif <<(j) > [0]> and <<jump> or <<(jumpBuffer) > [0]> and <(yCol) < [1]>>>> then\n    if <(j) = [16]> then\n        start sound [Jump2 v]\n        set [yv v] to [9.5]\n        set [ycol v] to [0]\n        set [jumpbuffer v] to [0]\n        replace item (10) of [collidabes v] with [1]\n        if <(jumpColor) = [0.3]> then\n            set [xv v] to (((0) - (([abs v] of (xV) ) / (xV))) * (5))\n            set [jumpcolor v] to [1]\n            if <[1] > (jumpLights)> then\n                set [jumppotential v] to [0]\n            end\n            set [ycol v] to [-1]\n        else\n            if <(jumpLights) > [0]> then\n                set [jumpcolor v] to [1]\n                if <(current) = [42]> then\n                    start sound [Randomize8 v]\n                end\n                change [jumplights v] by (-1)\n                if <[1] > (jumpLights)> then\n                    set [jumppotential v] to [0]\n                end\n                set [ycol v] to [-1]\n            end\n        end\n    end\n    change [yv v] by (0.2)\n    change [j v] by (-1)\nelse\n    set [j v] to [0]\n    if <<(yV) > [6]> and <not <<(jumpColor) = [1]> and <(current) = [42]>>>> then\n        set [yv v] to [6]\n    end\nend\nif <<(jumpPotential) > [0]> and <<not <[collidabes v] contains [1]?>> or <(jumpBuffer) > [0]>>> then\n    set [j v] to [16]\nend\nif <(jumpBuffer) > [-1]> then\n    if <not <<(jumpBuffer) = [0]> and <jump>>> then\n        change [jumpbuffer v] by (-1)\n    end\nend\nif <jump> then\n    replace item (10) of [collidabes v] with [1]\nelse\n    replace item (10) of [collidabes v] with [0]\nend\nif <(y position) > [186]> then\n    set y to (186)\nend\nbroadcast (render v)\n\ndefine updateTouch\nreplace item (1) of [collidabes v] with <touching (ground v)?>\nreplace item (2) of [collidabes v] with <touching (lift v)?>\nreplace item (3) of [collidabes v] with <touching (semisolid v)?>\nreplace item (4) of [collidabes v] with <touching (ice v)?>\nreplace item (5) of [collidabes v] with <touching (chonkstalactite v)?>\nif <(blocks1) = [0]> then\n    replace item (6) of [collidabes v] with <touching (blocks1 v)?>\nelse\n    replace item (6) of [collidabes v] with [false]\nend\nif <(blocks2) = [0]> then\n    replace item (7) of [collidabes v] with <touching (blocks2 v)?>\nelse\n    replace item (7) of [collidabes v] with [false]\nend\nreplace item (8) of [collidabes v] with <touching (blocks3 v)?>\nreplace item (9) of [collidabes v] with <touching (castlegate v)?>\n\ndefine LiftSide (number)\nset [p v] to [0]\nset x to (round (x position))\nrepeat until <not <touching (lift v)?>>\n    change x by (number)\n    if <touching (ground v)?> then\n        change [p v] by (1)\n        if <(p) > [3]> then\n            say [crash] for (0.1) seconds\n            VarReset\n        end\n    end\nend\n\nwhen I start as a clone\nchange [clonecount v] by (1)\nswitch costume to (splash v)\nif <<(current) = [19]> or <(current) = [46]>> then\n    hide\n    set size to (1000) %\n    set y to ([y position v] of [risingswamp v])\n    set size to (100) %\n    show\n    water2\nelse\n    water\nend\nwait (0) seconds\ngo to [front v] layer\nrepeat (6)\n    next costume\n    wait (0) seconds\nend\nchange [clonecount v] by (-1)\ndelete this clone\n\ndefine water\nrepeat until <not <touching (water v)?>>\n    change y by (1)\nend\nrepeat until <touching (water v)?>\n    change y by (-0.1)\nend\n\ndefine Inputs\nFunction <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <(mobileLeft) = [1]>> <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <(mobileRight) = [1]>> <<<<key (up arrow v) pressed?> or <key (z v) pressed?>> or <<key (w v) pressed?> or <key (space v) pressed?>>> or <<key (x v) pressed?> or <(mobileUp) = [1]>>>\n\nwhen I receive [zswampsnap v]\nif <(costume [number v]) > [3]> then\n    hide\n    set size to (1000) %\n    set y to ([y position v] of [risingswamp v])\n    set size to (100) %\n    show\n    water2\nend\n\nwhen I receive [sceneb v]\nstop [other scripts in sprite v]\nhide\n\ndefine water2\nrepeat until <not <touching (risingswamp v)?>>\n    change y by (16)\nend\nrepeat until <touching (risingswamp v)?>\n    change y by (-4)\nend\nrepeat until <not <touching (risingswamp v)?>>\n    change y by (1)\nend\nrepeat until <touching (risingswamp v)?>\n    change y by (-0.1)\nend\n\nwhen I receive [scenec v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [titlestart v]\nstop [other scripts in sprite v]\nhide\n\nset [debug v] to [0]\n\nwhen I receive [scened v]\nset [enabled v] to [1]\nrepeat (20)\n    Function <> <[] = []> <[] = []>\n    broadcast (updateObj v)\nend\nrepeat (21)\n    Function <> <[] = []> <>\n    broadcast (updateObj v)\nend\nrepeat (5)\n    Function <> <> <>\n    broadcast (updateObj v)\nend\nFunction <[] = []> <> <>\nrepeat (5)\n    Function <> <> <>\n    broadcast (updateObj v)\nend\n\nwhen I receive [returntomonke v]\nset [enabled v] to [1]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [greenflag v]\nset [enabled v] to [1]\nstop [other scripts in sprite v]\nhide\n\n@spriteBody\n\nwhen flag clicked\npoint in direction (90)\nhide\n\nwhen I receive [render v]\nif <(isClone) = [0]> then\n    if <(died) = [1]> then\n        hide\n    else\n        show\n    end\n    point in direction ([direction v] of [hitbox v])\n    go to (hitbox v)\n    if <(yCol) > [3]> then\n        if <(round (((round (y position)) + (-4)) / (16))) = (((round (y position)) + (-4)) / (16))> then\n    end\n    if <<(yCol) > [0]> and <(animate?) = [1]>> then\n        set [animspeed v] to (([abs v] of (xV) ) / (12))\n        if <(animspeed) < [0.2]> then\n            set [animspeed v] to [0.2]\n        end\n        change [animsprite v] by (animspeed)\n        if <[3.99] < (animsprite)> then\n            set [animsprite v] to [0]\n        end\n        switch costume to ((9) + ([floor v] of (animsprite) ))\n    else\n        if <(yV) > [0.9]> then\n            switch costume to (cstoneup v)\n        else\n            if <[-0.9] > (yV)> then\n                if <(jumpColor) = [0.3]> then\n                    switch costume to (cstonewall v)\n                else\n                    switch costume to (cstonedown v)\n                end\n            else\n                switch costume to (cstoneidle v)\n            end\n        end\n    end\n    if <(gameHalf) > [0]> then\n        if <(jumpColor) > [0]> then\n            switch costume to ([floor v] of (color) )\n            if <<[1] > (yCol)> and <(jumpColor) > [0.99]>> then\n                set [isclone v] to [1]\n                change [clonecount v] by (1)\n                create clone of (_myself_ v)\n                set [isclone v] to [0]\n            end\n        else\n            switch costume to ((8) + ((12) * (shield)))\n        end\n    end\n    if <(hitInvul) > [0]> then\n        if <(visualHitFlash) = [1]> then\n            if <((hitInvul) mod (2)) = [0]> then\n                set [ghost v] effect to (100)\n            else\n                set [ghost v] effect to (0)\n            end\n        else\n            set [ghost v] effect to (30)\n        end\n        if <<(hitInvul) > [26]> and <((hitInvul) mod (2)) = [0]>> then\n            switch costume to (splash v)\n        end\n        change [hitinvul v] by (-1)\n        if <(yCol) > [2]> then\n            set [enabled v] to [0]\n        end\n    else\n        clear graphic effects\n    end\n    go to [front v] layer\n    go [backward v] (7) layers\n    broadcast (renderEyes v)\nend\n\nwhen I receive [sceneb v]\nstop [other scripts in sprite v]\nhide\n\nset [visualtrail v] to [1]\n\nset [visualtrail v] to [2]\n\nset [visualtrail v] to [3]\n\nset [colorspeed v] to [0.25]\n\nwhen I receive [updateobj v]\nif <(isClone) > [0]> then\n    if <(visualTrail) = [2]> then\n        switch costume to ([floor v] of (color) )\n    else\n        if <(visualTrail) = [1]> then\n            next costume\n            if <(costume [number v]) > [7]> then\n                switch costume to (corange v)\n            end\n        end\n    end\n    if <not <<key (n v) pressed?> and <(debug) = [1]>>> then\n        change [ghost v] effect by (8)\n        change [isclone v] by (1)\n        if <(isClone) > [20]> then\n            change [clonecount v] by (-1)\n            delete this clone\n        end\n    end\nend\n\nwhen I receive [finaljumpup v]\nshow\npoint in direction (90)\nset [yv v] to [12.4]\nset [ycol v] to [0]\ngo to x: (-184) y: (-172)\nrepeat (20)\n    broadcast (updateObj v)\n    change [yv v] by (-0.8)\n    change y by (yV)\n    broadcast (renderEyes v)\nend\n\nwhen I receive [scenec v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [titlestart v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [returntomonke v]\nstop [other scripts in sprite v]\nhide\n\n@spriteEyes\n\nwhen I receive [rendereyes v]\ngo to (spritebody v)\nif <(died) = [1]> then\n    hide\nelse\n    show\nend\nif <<(yCol) > [0]> and <(animate?) = [1]>> then\n    switch costume to (([floor v] of (animsprite) ) + (1))\nelse\n    if <(yV) > [0.9]> then\n        switch costume to (up v)\n    else\n        if <[-0.9] > (yV)> then\n            switch costume to (down v)\n        else\n            switch costume to (cidle v)\n            if <(yCol) > [0]> then\n                change [blink v] by (1)\n                if <(blink) > (blinktime)> then\n                    switch costume to (cblink v)\n                    if <<(blink) > ((blinktime) + (1))> or <<(enabled) = [2]> and <(hitInvul) > [0]>>> then\n                        set [blink v] to [0]\n                        set [blinktime v] to (pick random (40) to (120))\n                    end\n                end\n            else\n                set [blink v] to [0]\n            end\n        end\n    end\n    if <<(jumpColor) = [0.3]> and <(yV) < [0]>> then\n        point in direction ((([abs v] of (xV) ) / (xV)) * (90))\n        switch costume to (cwall v)\n    end\nend\nif <(hitInvul) > [0]> then\n    if <(visualHitFlash) = [1]> then\n        if <((hitInvul) mod (2)) = [0]> then\n            set [ghost v] effect to (0)\n        else\n            set [ghost v] effect to (100)\n        end\n    else\n        set [ghost v] effect to (30)\n    end\n    if <(hitInvul) > [25]> then\n        switch costume to (cdamage v)\n    end\nelse\n    clear graphic effects\nend\ngo to [front v] layer\ngo [backward v] (5) layers\nif <(distance to [secret v]) < [0.040]> then\n    point towards (secret v)\n    move (1) steps\nend\nif <not <(jumpColor) = [0.3]>> then\n    point in direction ([direction v] of [spritebody v])\nend\nif <[1] > (jumpColor)> then\n    set [jumpcolor v] to [0]\nend\n\nwhen I receive [sceneb v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [scenec v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [titlestart v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [returntomonke v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [greenflag v]\nstop [other scripts in sprite v]\nhide\n\n@ground\n\nwhen I receive [loadlevel v]\ngo [backward v] (100) layers\nswitch costume to (current)\ngo to x: (0) y: (-4)\nset size to (1600) %\nshow\nif <<(current) = [30]> or <(current) = [37]>> then\n    set [ghost v] effect to (100)\nelse\n    clear graphic effects\nend\n\nwhen I receive [sceneb v]\ngo to x: (0) y: (-4)\nset size to (1600) %\nshow\nswitch costume to (midway v)\n\nwhen I receive [scenebunload v]\nhide\n\nwhen [c v] key pressed\n\nset [ghost v] effect to (100)\n\nwhen I receive [scenecpedistal v]\ngo to x: (0) y: (-4)\nset size to (1600) %\nshow\nswitch costume to (midway v)\n\nwhen I receive [scenec v]\ngo to x: (0) y: (-4)\nset size to (1600) %\nshow\nswitch costume to (42 v)\n\nwhen I receive [titlestart v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [credits v]\nhide\n\nwhen I receive [returntomonke v]\nhide\n\nwhen I receive [scenea v]\ngo to x: (0) y: (-4)\nset size to (1600) %\nshow\nswitch costume to (beginning v)\n\nwhen I receive [greenflag v]\nstop [other scripts in sprite v]\nhide\n\n@foreGround\n\nwhen I receive [loadlevel v]\nswitch costume to (current)\ngo to x: (0) y: (0)\nshow\nbroadcast (levelstart v)\n\nwhen I receive [sceneb v]\ngo to x: (0) y: (0)\nshow\nswitch costume to (midway v)\nswitch backdrop to (mtn-brown-noontrees-tall v)\n\nwhen I receive [scenebmedalsplode v]\nstart sound [bigdie2 v]\nset [blocks1 v] to [1]\nrepeat (10)\n    go to x: (0) y: (0)\n    change x by (pick random (-2) to (2))\nend\ngo to x: (0) y: (0)\n\nwhen I receive [scenebunload v]\nhide\n\nwhen I receive [scenecpedistal v]\ngo to x: (0) y: (0)\nshow\nswitch costume to (midway v)\nswitch backdrop to (mtn-brown-morning-tall v)\n\nwhen I receive [scenec v]\ngo to x: (0) y: (0)\nshow\nswitch costume to (42 v)\n\nwhen I receive [greenflag v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [credits v]\nhide\n\nwhen I receive [returntomonke v]\nhide\n\nwhen I receive [scenea v]\ngo to x: (0) y: (0)\nshow\nswitch costume to (beginning v)\n\nwhen I receive [sceneaspike v]\nstart sound [quake v]\nrepeat (30)\n    go to x: (0) y: (0)\n    change x by (pick random (-1) to (1))\nend\nrepeat (97)\n    go to x: (0) y: (0)\n    change x by (pick random (-2) to (2))\nend\ngo to x: (0) y: (0)\n\nwhen I receive [titlestart v]\nstop [other scripts in sprite v]\nhide\n\n@goal\n\nwhen I receive [levelstart v]\nchange [clonecount v] by (-1)\nhide\ndelete this clone\n\nwhen I start as a clone\nchange [clonecount v] by (1)\nif <(goalAnim) = [-1]> then\n    switch costume to ((10) + (((gameHalf) - (([floor v] of ((current) / (43)) ) * (2))) * (5)))\n    set [isblock v] to [1]\n    change y by (-16)\n    show\n    go to [front v] layer\n    go [backward v] (6) layers\nelse\n    change x by (pick random (1) to (-1))\n    change y by (pick random (1) to (-1))\n    switch costume to (particle v)\n    set size to (pick random (50) to (100)) %\n    repeat (5)\n        change size by (15)\n    end\n    repeat (5)\n        change size by (-15)\n    end\n    change [clonecount v] by (-1)\n    delete this clone\nend\n\nwhen I receive [levelstart v]\nclear graphic effects\nwait (0) seconds\nchange [clonecount v] by (1)\ngoto (item (current) of [goals v])\nset [goalanim v] to [-1]\nif <<(gameHalf) = [0]> or <(current) > [41]>> then\n    switch costume to (base v)\nelse\n    switch costume to (spin v)\nend\nif <<[introlevels v] contains ((current) + (1))?> or <<(item # of (current) in [medallionfragments v]) > [0]> and <((item # of (current) in [medallionfragments v]) mod (2)) = [0]>>> then\n    if <[introlevels v] contains ((current) + (1))?> then\nelse\n    set volume to (100) %\n    if <(current) = [49]> then\n        broadcast (musicFade v)\n    else\n        create clone of (_myself_ v)\n    end\n    animate\nend\n\ndefine animate\nshow\nset size to (100) %\nif <<(gameHalf) = [0]> or <(current) > [41]>> then\n    set [goalanim v] to [0]\n    if <(backdrop [number v]) = [2]> then\n        switch costume to (backing v)\n        stamp\n    end\n    switch costume to (base v)\n    forever\n        change [goalanim v] by (1)\n        create clone of (_myself_ v)\n        if <(goalAnim) > ((eyeWait) - (3))> then\n            next costume\n        end\n        if <(goalAnim) > (eyeWait)> then\n            set [goalanim v] to [0]\n            set [eyewait v] to (pick random (6) to (42))\n            switch costume to (base v)\n        end\n        if <touching (hitbox v)?> then\n            hide\n            set [enabled v] to [2]\n            if <<[introlevels v] contains ((current) + (1))?> or <(current) = [49]>> then\n                set volume to ([volume v] of [_stage_ v]) %\n                start sound [Interesting Find v]\n                repeat (75)\n            else\n                start sound [Paralyze v]\n            end\n            repeat (30)\n            if <(current) = [49]> then\n                broadcast (sceneD v)\n            else\n                change [current v] by (1)\n                broadcast (transitionLoad v)\n                if <(debug) = [2]> then\n                    set [debug v] to [-2]\n                end\n            end\n            stop [this script v]\n        end\n    end\nelse\n    set [goalanim v] to [1]\n    forever\n        change [goalanim v] by (1)\n        if <(goalAnim) > [8]> then\n            set [goalanim v] to [1]\n        end\n        switch costume to ((round ((goalAnim) / (2))) + (5))\n        if <touching (hitbox v)?> then\n            hide\n            set [enabled v] to [1]\n            if <[introlevels v] contains ((current) + (1))?> then\n                start sound [Interesting Find v]\n                repeat (90)\n            else\n                start sound [Pickup_Coin v]\n            end\n            repeat (15)\n            change [current v] by (1)\n            broadcast (transitionLoad v)\n            if <(debug) = [2]> then\n                set [debug v] to [-2]\n            end\n            stop [this script v]\n        end\n    end\nend\n\nset [gamehalf v] to [0]\n\nset [gamehalf v] to [1]\n\ndefine goto (tile)\ngo to x: (((((tile) - (1)) mod (30)) * (16)) - (232)) y: ((-172) + (([floor v] of (((tile) - (1)) / (30)) ) * (16)))\n\nwhen I receive [updateobj v]\nif <(isblock) > [0]> then\n    change [isblock v] by (1)\n    if <(isblock) > [83]> then\n        if <((isblock) mod (2)) = [0]> then\n            next costume\n        end\n        if <(isblock) > [91]> then\n            switch costume to ((10) + (((gameHalf) - (([floor v] of ((current) / (43)) ) * (2))) * (5)))\n            set [isblock v] to [1]\n        end\n    end\nend\n\nwhen I receive [goalshow v]\nif <[1] > (isblock)> then\n    show\n    animate\nend\n\nwhen I receive [sceneb v]\nhide\n\nwhen I receive [transitionload v]\nstop [other scripts in sprite v]\n\nwhen I receive [titlestart v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [sceneacollect v]\nset [ghost v] effect to (100)\nrepeat (30)\n    change x by (1)\n    change x by (-1)\nend\nchange [current v] by (1)\nbroadcast (transitionLoad v)\nclear graphic effects\nhide\nstop [this script v]\n\nwhen I receive [sceneadarkeye v]\nshow\ngo to x: (232) y: (-124)\nanimate\n\nwhen I receive [greenflag v]\nstop [other scripts in sprite v]\nhide\n\n@lift\n\nwhen I receive [updateobj v]\nif <[3] > (costume [number v])> then\n    switch costume to ((costume [number v]) + (2))\nend\nset send\nif <(isClone) > [0]> then\n    change [clock v] by ((0) - ((clock) / ([abs v] of (clock) )))\n    if <([abs v] of (clock) ) = [0]> then\n        if <(costume [number v]) = [3]> then\n            set [clock v] to [-90]\n        else\n            set [clock v] to [90]\n        end\n    else\n        if <([abs v] of (clock) ) = [16]> then\n            if <(costume [number v]) = [3]> then\n                switch costume to (^2 v)\n            else\n                switch costume to (%2 v)\n            end\n        end\n        if <[32] < ([abs v] of (clock) )> then\n            change x by (send)\n        end\n        change y by (2)\n        if <touching (hitbox v)?> then\n            set [liftsend v] to (send)\n            broadcast (liftSend v)\n        end\n        change y by (-2)\n    end\nend\n\nwhen I start as a clone\nchange [clonecount v] by (1)\nset [isclone v] to [1]\nif <(costume [number v]) = [3]> then\n    set [clock v] to [-61]\n    change x by (1)\nelse\n    set [clock v] to [61]\nend\n\ndefine create\ngo [backward v] (100) layers\nshow\nset [i v] to [0]\nset [clock v] to []\nrepeat until <(i) > (length of (item (current) of [lifts v]))>\n    change [i v] by (1)\n    if <(letter (i) of (item (current) of [lifts v])) = [;]> then\n        goto (clock)\n        set [clock v] to []\n        change [i v] by (2)\n        switch costume to (letter ((i) - (1)) of (item (current) of [lifts v]))\n        create clone of (_myself_ v)\n    else\n        set [clock v] to (join (clock) (letter (i) of (item (current) of [lifts v])))\n    end\nend\nset [clock v] to [0]\ngo to x: (0) y: (0)\nset [clock v] to [0]\nhide\n\nadd [192;3;288;4;] to [lifts v]\n\nwhen I receive [loadlevel v]\nwait (0) seconds\nchange [clonecount v] by (1)\ncreate\n\nwhen I receive [loadlevel v]\nchange [clonecount v] by (-1)\ndelete this clone\n\ndefine goto (tile)\ngo to x: (((((tile) - (1)) mod (30)) * (16)) - (232)) y: ((-172) + (([floor v] of (((tile) - (1)) / (30)) ) * (16)))\n\ndefine set send\nif <[80] < ([abs v] of (clock) )> then\n    set [send v] to (((clock) / ([abs v] of (clock) )) * (1))\nelse\n    if <[40] < ([abs v] of (clock) )> then\n        set [send v] to (((clock) / ([abs v] of (clock) )) * (2))\n    else\n        if <[32] < ([abs v] of (clock) )> then\n            set [send v] to (((clock) / ([abs v] of (clock) )) * (1))\n        else\n            set [send v] to [0]\n        end\n    end\nend\n\nchange [clock v] by (-2)\nset send\nchange [clock v] by (2)\n\n@water\n\nwhen I start as a clone\nwaterfill\n\nwhen I receive [updateobj v]\nif <(water) > [0]> then\n    if <[5] > (water)> then\n        change [water v] by (0.1666666666666667)\n        if <(water) > [4.99]> then\n            set [water v] to [1]\n        end\n    else\n        if <[10] > (water)> then\n            change [water v] by (0.1666666666666667)\n            if <(water) > [9.99]> then\n                set [water v] to [6]\n            end\n        else\n            change [water v] by (0.6666666666666667)\n            if <(water) > [15.99]> then\n                set [water v] to [12]\n            end\n        end\n    end\n    switch costume to ([floor v] of (water) )\n    if <(costume [number v]) > [11]> then\n        show\n        stamp\n        hide\n    end\nend\n\nwhen I receive [loadlevel v]\nchange [clonecount v] by (-1)\ndelete this clone\n\nwhen I receive [loadlevel v]\nwait (0) seconds\nshow\nchange [clonecount v] by (1)\ncreate\nif <(current) = [4]> then\n    go to x: (0) y: (-60)\n    switch costume to (waterfall5 v)\n    create clone of (_myself_ v)\nend\nif <<(current) = [3]> or <(current) = [5]>> then\n    erase all\nend\nswitch costume to (water v)\nhide\n\ndefine goto (tile)\ngo to x: (((((tile) - (1)) mod (30)) * (16)) - (232)) y: ((-172) + (([floor v] of (((tile) - (1)) / (30)) ) * (16)))\n\ndefine create\nif <(backdrop [number v]) = [3]> then\n    switch costume to (swamp5 v)\nelse\n    switch costume to (water5 v)\nend\nset [water v] to [0]\nset [i v] to [0]\nset [n v] to []\nrepeat until <(i) > (length of (item (current) of [waters v]))>\n    change [i v] by (1)\n    if <(letter (i) of (item (current) of [waters v])) = [;]> then\n        goto (n)\n        set [n v] to []\n        change [i v] by (2)\n        repeat (letter ((i) - (1)) of (item (current) of [waters v]))\n            create clone of (_myself_ v)\n            change x by (16)\n        end\n    else\n        set [n v] to (join (n) (letter (i) of (item (current) of [waters v])))\n    end\nend\n\ndefine waterfill\nchange [clonecount v] by (1)\nset [n v] to (costume [number v])\nshow\nif <not <(costume [number v]) = [16]>> then\n    set [water v] to (y position)\n    change y by (-16)\n    switch costume to (detect v)\n    repeat until <<touching (ground v)?> or <touching (_edge_ v)?>>\n        switch costume to (n)\n        stamp\n        change y by (-16)\n        switch costume to (detect v)\n    end\n    switch costume to (n)\n    stamp\n    set y to (water)\nelse\n    go [backward v] (1000) layers\nend\nset [water v] to ((n) - (4))\nswitch costume to ([floor v] of (water) )\n\nwhen I receive [sceneb v]\nchange [clonecount v] by (-1)\ndelete this clone\n\nwhen I receive [sceneb v]\nwait (0) seconds\nchange [clonecount v] by (1)\n\n@text\n\ndefine Display (txt) at x: (x) y: (y) C: (c)\nif <(c) = [1]> then\n    go to x: (((letter (1) of (size)) * (4)) - ((length of (txt)) * ((letter (1) of (size)) * (4)))) y: (y)\nelse\n    go to x: (x) y: (y)\nend\nset [ltr v] to [0]\nshow\nrepeat (length of (txt))\n    change [ltr v] by (1)\n    switch costume to (letter (ltr) of (txt))\n    stamp\n    move ((letter (1) of (size)) * (8)) steps\nend\nhide\nswitch costume to (ō v)\n\nDisplay [yakō] at x: (0) y: (5) C: (1)\nDisplay [yami] at x: (0) y: (-5) C: (1)\n\nwhen I receive [scenebpressj v]\nset [ghost v] effect to (100)\nerase all\nrepeat (25)\n    erase all\n    change [ghost v] effect by (-4)\n    Display [press jump] at x: (0) y: (-156) C: (1)\nend\nwait until <<<<key (up arrow v) pressed?> or <key (z v) pressed?>> or <<key (w v) pressed?> or <key (space v) pressed?>>> or <<key (x v) pressed?> or <mouse down?>>>\nbroadcast (musicFade v)\nrepeat (25)\n    erase all\n    change [ghost v] effect by (4)\n    Display [press jump] at x: (0) y: (-156) C: (1)\nend\nrepeat (5)\n    wait (0) seconds\nend\nset [gamehalf v] to [1]\nbroadcast (transitionLoad v)\n\ndefine music menu <l> <r> <u> <d>\nif <(pressed) = [0]> then\n    if <u> then\n        change [select v] by (-1)\n        if <(select) < [1]> then\n            set [select v] to (length of [musnames v])\n        end\n        set [pressed v] to [1]\n    end\n    if <d> then\n        change [select v] by (1)\n        if <(select) > (length of [musnames v])> then\n            set [select v] to [1]\n        end\n        set [pressed v] to [1]\n    end\nend\nif <(other) = [0]> then\n    if <r> then\n        if <(music) = (item (select) of [muslist v])> then\n            set [music v] to [0]\n            broadcast (music v)\n            set [pressed v] to [1]\n        else\n            set [music v] to (item (select) of [muslist v])\n            stop all sounds\n            broadcast (music v)\n            set [pressed v] to [1]\n        end\n    end\n    if <l> then\n        start sound [back v]\n        set [menu v] to [-1]\n        broadcast (menuSwitch v)\n        set [select v] to [4]\n    end\nend\nif <(menu) = [4]> then\n    erase all\n    go to x: (0) y: (120)\n    switch costume to (soundtrack v)\n    show\n    stamp\n    hide\n    set [modif v] to [16]\n    set [other v] to (([floor v] of (((modif) * ((length of [musnames v]) / (2))) + ((modif) / (2))) ) - (36))\n    set y to (other)\n    repeat (length of [musnames v])\n        change y by ((0) - (modif))\n        Display (item ([abs v] of (((y position) - (other)) / (modif)) ) of [musnames v]) at x: (-80) y: (y position) C: (0)\n        if <[0] = [1]> then\n            Display ([abs v] of (((y position) - (other)) / (modif)) ) at x: (104) y: (y position) C: (0)\n            Display (item ([abs v] of (((y position) - (other)) / (modif)) ) of [muslist v]) at x: (136) y: (y position) C: (0)\n        end\n    end\n    if <(music) = (item (select) of [muslist v])> then\n        Display [back ↔ stop] at x: (-80) y: (-174) C: (0)\n    else\n        Display [back ↔ play] at x: (-80) y: (-174) C: (0)\n    end\n    Display [∇     2021] at x: (162) y: (-174) C: (0)\n    Display [>] at x: (-96) y: ((other) - ((select) * (modif))) C: (0)\nend\nif <<u> or <d>> then\n    set [pressed v] to [1]\nelse\n    set [pressed v] to [0]\nend\nif <<l> or <r>> then\n    set [other v] to [1]\nelse\n    set [other v] to [0]\nend\n\ndefine menus <left> <right> <up> <down>\nif <(menu) = [1]> then\n    main menu <left> <right> <up> <down>\n    switch backdrop to (full-stars-clouds v)\nend\nif <(menu) = [2]> then\n    challenge menu <left> <right>\n    switch backdrop to (full-stars-clouds-flare v)\nend\nif <(menu) = [3]> then\n    settings menu <left> <right> <up> <down>\n    switch backdrop to (mtn-brown-night v)\nend\nif <(menu) = [4]> then\n    music menu <left> <right> <up> <down>\n    switch backdrop to (plateau v)\nend\n\ndefine main menu <l> <r> <u> <d>\nif <(pressed) = [0]> then\n    if <u> then\n        change [select v] by (-1)\n        if <(select) < [1]> then\n            set [select v] to [4]\n        end\n        set [pressed v] to [1]\n        start sound [move v]\n    end\n    if <d> then\n        change [select v] by (1)\n        if <(select) > [4]> then\n            set [select v] to [1]\n        end\n        set [pressed v] to [1]\n        start sound [move v]\n    end\nend\nif <r> then\n    if <(select) > [1]> then\n        start sound [select v]\n        set [menu v] to ((0) - ((select) - (0)))\n        broadcast (menuSwitch v)\n        set [other v] to [1]\n        set [select v] to [1]\n    else\n        set [music v] to [0]\n        stop all sounds\n        start sound [Pickup_Coin2 v]\n        set [died v] to [0]\n        set [gamehalf v] to [0]\n        set [current v] to [1]\n        if <(select) = [2]> then\n            set [current v] to [43]\n            set [gamehalf v] to [2]\n        else\n            if <not <(debug) = [1]>> then\n                if <key (6 v) pressed?> then\n                    set [current v] to [36]\n                    set [gamehalf v] to [1]\n                else\n                    if <key (5 v) pressed?> then\n                        set [current v] to [29]\n                        set [gamehalf v] to [1]\n                    else\n                        if <key (4 v) pressed?> then\n                            set [current v] to [22]\n                            set [gamehalf v] to [1]\n                        else\n                            if <key (3 v) pressed?> then\n                                set [current v] to [15]\n                            else\n                                if <key (2 v) pressed?> then\n                                    set [current v] to [8]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        stop [other scripts in sprite v]\n        set [menu v] to [0]\n        if <<not <key (1 v) pressed?>> and <(current) = [1]>> then\n            set [current v] to [0]\n            wait (0.8) seconds\n            broadcast (transitionLoad v)\n        else\n            set [clonecount v] to [0]\n            wait (0.8) seconds\n            broadcast (transitionLoad v)\n        end\n        stop [this script v]\n    end\nend\nif <<u> or <d>> then\n    set [pressed v] to [1]\nelse\n    set [pressed v] to [0]\nend\nif <(menu) = [1]> then\n    erase all\n    go to x: (0) y: (120)\n    switch costume to (starlight v)\n    show\n    stamp\n    hide\n    if <(mobileActive) > [0]> then\n        Display [mobile mode is on! press any key to turn it back off] at x: (0) y: (72) C: (1)\n        Display [tap a quadrant of the screen to move the circle pad] at x: (0) y: (56) C: (1)\n    end\n    set [other v] to [-40]\n    set y to (other)\n    set [modif v] to [24]\n    Display [start] at x: (-60) y: (y position) C: (0)\n    change y by ((0) - (modif))\n    Display [challenge levels] at x: (-60) y: (y position) C: (0)\n    change y by ((0) - (modif))\n    Display [settings] at x: (-60) y: (y position) C: (0)\n    change y by ((0) - (modif))\n    Display [soundtrack] at x: (-60) y: (y position) C: (0)\n    change y by ((0) - (modif))\n    Display [→ select] at x: (-60) y: (-174) C: (0)\n    Display [∇     2021] at x: (162) y: (-174) C: (0)\n    set y to ((other) - (((select) - (1)) * (modif)))\n    Display [>] at x: (-76) y: (y position) C: (0)\nend\n\nwhen I receive [menuswitched v]\nset [menu v] to ([abs v] of (menu) )\nif <(menu) = [2]> then\n    set [record v] to [0]\n    decompile\nend\n\ndefine settings menu <l> <r> <u> <d>\nif <([floor v] of (select) ) = (select)> then\n    if <(pressed) = [0]> then\n        if <u> then\n            change [select v] by (-1)\n            if <(select) < [1]> then\n                set [select v] to [5]\n            end\n            set [pressed v] to [1]\n            start sound [move v]\n        end\n        if <d> then\n            change [select v] by (1)\n            if <(select) > [5]> then\n                set [select v] to [1]\n            end\n            set [pressed v] to [1]\n            start sound [move v]\n        end\n    end\nelse\n    tune <u> <d>\nend\nif <(other) = [0]> then\n    if <r> then\n        if <([floor v] of (select) ) = (select)> then\n            change [select v] by (0.1)\n            start sound [select v]\n        else\n            set [select v] to ([floor v] of (select) )\n            start sound [select v]\n        end\n    end\n    if <l> then\n        if <([floor v] of (select) ) = (select)> then\n            start sound [back v]\n            set [menu v] to [-1]\n            broadcast (menuSwitch v)\n            set [select v] to [3]\n        else\n            set [select v] to ([floor v] of (select) )\n            start sound [select v]\n        end\n    end\nend\nif <(menu) = [3]> then\n    erase all\n    go to x: (0) y: (120)\n    switch costume to (settings v)\n    show\n    stamp\n    hide\n    set [other v] to [-16]\n    set y to (other)\n    set [modif v] to [24]\n    if <(select) = [1.1]> then\n        Display (musicVol) at x: (-36) y: (y position) C: (0)\n    else\n        Display [music volume] at x: (-52) y: (y position) C: (0)\n    end\n    change y by ((0) - (modif))\n    if <(select) = [2.1]> then\n        Display (visualTrail) at x: (-36) y: (y position) C: (0)\n    else\n        Display [trail effect] at x: (-52) y: (y position) C: (0)\n    end\n    change y by ((0) - (modif))\n    if <(select) = [3.1]> then\n        Display (visualLightsUI) at x: (-36) y: (y position) C: (0)\n    else\n        Display [jump lights ui] at x: (-52) y: (y position) C: (0)\n    end\n    change y by ((0) - (modif))\n    if <(select) = [4.1]> then\n        Display (visualLumens) at x: (-36) y: (y position) C: (0)\n    else\n        Display [block style] at x: (-52) y: (y position) C: (0)\n    end\n    change y by ((0) - (modif))\n    if <(select) = [5.1]> then\n        Display (visualBgLite) at x: (-36) y: (y position) C: (0)\n    else\n        Display [lite backgrounds] at x: (-52) y: (y position) C: (0)\n    end\n    change y by ((0) - (modif))\n    if <([floor v] of (select) ) = (select)> then\n        Display [back ↔ select] at x: (-52) y: (-174) C: (0)\n    else\n        Display [↔ confirm] at x: (-52) y: (-174) C: (0)\n    end\n    if <not <(select) = [3.1]>> then\n        Display [∇     2021] at x: (162) y: (-174) C: (0)\n    end\n    set y to ((other) - ((([floor v] of (select) ) - (1)) * (modif)))\n    if <([floor v] of (select) ) = (select)> then\n        Display [>] at x: (-68) y: (y position) C: (0)\n    else\n        Display [↕] at x: (-52) y: (y position) C: (0)\n    end\nend\nif <<u> or <d>> then\n    set [pressed v] to [1]\nelse\n    set [pressed v] to [0]\nend\nif <<l> or <r>> then\n    set [other v] to [1]\nelse\n    set [other v] to [0]\nend\n\nwhen I receive [titlestart v]\nset size to (100) %\nif <not <<key (any v) pressed?> or <(mobileActive) > [0]>>> then\n    set [menu v] to [0]\n    set [select v] to [1]\n    erase all\n    wait (6.3) seconds\n    set [ghost v] effect to (100)\n    go to x: (0) y: (140)\n    repeat (20)\n        change y by (-1)\n        change [ghost v] effect by (-5)\n        erase all\n        switch costume to (starlight v)\n        show\n        stamp\n        hide\n    end\n    set [ghost v] effect to (100)\n    wait (1) seconds\n    repeat (20)\n        change [ghost v] effect by (-5)\n        set [other v] to [-40]\n        set y to (other)\n        set [modif v] to [24]\n        Display [start] at x: (-60) y: (y position) C: (0)\n        change y by ((0) - (modif))\n        Display [challenge levels] at x: (-60) y: (y position) C: (0)\n        change y by ((0) - (modif))\n        Display [settings] at x: (-60) y: (y position) C: (0)\n        change y by ((0) - (modif))\n        Display [soundtrack] at x: (-60) y: (y position) C: (0)\n        change y by ((0) - (modif))\n        Display [→ select] at x: (-60) y: (-174) C: (0)\n        Display [∇     2021] at x: (162) y: (-174) C: (0)\n        set y to ((other) - (((select) - (1)) * (modif)))\n    end\n    wait (0.15) seconds\n    set [menu v] to [1]\n    set [select v] to [1]\n    broadcast (menuLoop v)\nelse\n    set [mobileactive v] to [0]\nend\n\nwhen I receive [menuloop v]\nforever\n    menus <<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<(last key pressed) = [escape]> and <key (any v) pressed?>>> or <<<(last key pressed) = [backspace]> and <key (any v) pressed?>> or <(mobileLeft) = [1]>>> <<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<(last key pressed) = [enter]> and <key (any v) pressed?>>> or <<<key (z v) pressed?> or <key (space v) pressed?>> or <(mobileRight) = [1]>>> <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <(mobileUp) = [1]>> <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <(mobileDown) = [1]>>\n    if <(menu) = [0]> then\n        stop [this script v]\n    end\nend\n\ndefine tune <u> <d>\nif <(select) = [1.1]> then\n    if <d> then\n        change [musicvol v] by (-1)\n        if <(musicVol) < [0]> then\n            set [musicvol v] to [0]\n        else\n            start sound [move v]\n        end\n        broadcast (changeVol v)\n    end\n    if <u> then\n        change [musicvol v] by (1)\n        if <(musicVol) > [100]> then\n            set [musicvol v] to [100]\n        else\n            start sound [move v]\n        end\n        broadcast (changeVol v)\n    end\nelse\n    if <(pressed) = [0]> then\n        if <(select) = [2.1]> then\n            if <d> then\n                change [visualtrail v] by (-1)\n                if <(visualTrail) < [1]> then\n                    set [visualtrail v] to [1]\n                else\n                    start sound [move v]\n                end\n            end\n            if <u> then\n                change [visualtrail v] by (1)\n                if <(visualTrail) > [3]> then\n                    set [visualtrail v] to [3]\n                else\n                    start sound [move v]\n                end\n            end\n        else\n            if <(select) = [3.1]> then\n                if <d> then\n                    change [visuallightsui v] by (-1)\n                    if <(visualLightsUI) < [1]> then\n                        set [visuallightsui v] to [1]\n                    else\n                        start sound [move v]\n                    end\n                end\n                if <u> then\n                    change [visuallightsui v] by (1)\n                    if <(visualLightsUI) > [3]> then\n                        set [visuallightsui v] to [3]\n                    else\n                        start sound [move v]\n                    end\n                end\n            else\n                if <(select) = [4.1]> then\n                    if <d> then\n                        change [visuallumens v] by (-1)\n                        if <(visualLumens) < [1]> then\n                            set [visuallumens v] to [1]\n                        else\n                            start sound [move v]\n                        end\n                    end\n                    if <u> then\n                        change [visuallumens v] by (1)\n                        if <(visualLumens) > [3]> then\n                            set [visuallumens v] to [3]\n                        else\n                            start sound [move v]\n                        end\n                    end\n                else\n                    if <(select) = [5.1]> then\n                        if <d> then\n                            if <(visualBgLite) = [off]> then\n                        end\n                        if <u> then\n                            if <(visualBgLite) = [off]> then\n                                set [visualbglite v] to [on]\n                                start sound [move v]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    broadcast (menuEffects v)\nend\n\ndefine draw credits\nset [menu v] to [0]\nrepeat (length of [credits v])\n    change [menu v] by (1)\n    if <<(menu) = (length of [credits v])> or <<(menu) = [1]> or <(menu) = [18]>>> then\n        set size to (200) %\n    else\n        set size to (100) %\n    end\n    if <<((select) - ((menu) * (modif))) > [-180]> and <((select) - ((menu) * (modif))) < [180]>> then\n        set [ghost v] effect to (([floor v] of (([abs v] of ((select) - ((menu) * (modif))) ) / (170)) ) * ((([abs v] of ((select) - ((menu) * (modif))) ) - (170)) * (10)))\n        Display (item (menu) of [credits v]) at x: ((-200) + (((size) - (100)) / (25))) y: ((select) - ((menu) * (modif))) C: <(menu) = (length of [credits v])>\n    end\nend\n\nwhen I receive [credits v]\nwait (0.2) seconds\nset [modif v] to [24]\nset [select v] to [-180]\nrepeat ((180) + ((length of [credits v]) * (modif)))\n    change [select v] by (1)\n    erase all\n    draw credits\nend\nwait (2.4) seconds\nclear graphic effects\nrepeat (20)\n    erase all\n    change [ghost v] effect by (5)\n    Display [thank you for playing] at x: (0) y: (0) C: (1)\nend\nwait (0.2) seconds\nset size to (100) %\nset [other v] to [156]\nset [modif v] to [12]\nset [ghost v] effect to (100)\nrepeat (22)\n    erase all\n    change [ghost v] effect by (-5)\n    draw footnote\nend\nset [ghost v] effect to (100)\nwait (1.6) seconds\nrepeat (22)\n    change [ghost v] effect by (-1.5)\n    Display [press any key to return to the title screen] at x: (-200) y: ((other) - ((modif) * (26))) C: (0)\nend\nwait until <<key (any v) pressed?> or <mouse down?>>\nbroadcast (musicFade v)\nbroadcast (reset v)\nclear graphic effects\n\nwhen I receive [scenec v]\nstop [other scripts in sprite v]\nerase all\n\ninsert [] at (40) of [credits v] \n\ndefine draw footnote\nDisplay [this game has been through a lot.] at x: (-200) y: ((other) - ((modif) * (0))) C: (0)\nDisplay [initially starting in late 2018, it was soon dropped] at x: (-200) y: ((other) - ((modif) * (2))) C: (0)\nDisplay [because of scratch 3's initial bugginess.] at x: (-200) y: ((other) - ((modif) * (3))) C: (0)\nDisplay [this in turn sucked all motivation out of me for] at x: (-200) y: ((other) - ((modif) * (4))) C: (0)\nDisplay [the rest of 2019.] at x: (-200) y: ((other) - ((modif) * (5))) C: (0)\nDisplay [during this downtime i acquainted myself much] at x: (-200) y: ((other) - ((modif) * (7))) C: (0)\nDisplay [better with platformer game and boss design, which] at x: (-200) y: ((other) - ((modif) * (8))) C: (0)\nDisplay [was an incredibly great thing looking back.] at x: (-200) y: ((other) - ((modif) * (9))) C: (0)\nDisplay [fast forward around 2020 and i start experimenting with] at x: (-200) y: ((other) - ((modif) * (11))) C: (0)\nDisplay [making pixel platformers work in scratch 3.] at x: (-200) y: ((other) - ((modif) * (12))) C: (0)\nDisplay [nightlight for scratch 3 gets its surface collision] at x: (-200) y: ((other) - ((modif) * (13))) C: (0)\nDisplay [fixed, and after the gmtk jam concluded,] at x: (-200) y: ((other) - ((modif) * (14))) C: (0)\nDisplay [i restarted starlight.] at x: (-200) y: ((other) - ((modif) * (15))) C: (0)\nDisplay [once moving platforms were in working condition again,] at x: (-200) y: ((other) - ((modif) * (17))) C: (0)\nDisplay [i had consistent motivation all the way up to the last] at x: (-200) y: ((other) - ((modif) * (18))) C: (0)\nDisplay [few levels, where i worked on other things for a month.] at x: (-200) y: ((other) - ((modif) * (19))) C: (0)\nDisplay [but after, i was able to resume and finish the game.] at x: (-200) y: ((other) - ((modif) * (20))) C: (0)\nDisplay [starlight was a rollercoaster to develop, but] at x: (-200) y: ((other) - ((modif) * (22))) C: (0)\nDisplay [rollercoasters in the end are fun and exhilerating.] at x: (-200) y: ((other) - ((modif) * (23))) C: (0)\nDisplay [i sincerely hope you enjoyed playing starlight.] at x: (-200) y: ((other) - ((modif) * (24))) C: (0)\n\nwhen I receive [updateobj v]\nif <<(current) > [42]> and <(gameHalf) = [2]>> then\n    if <<(enabled) = [0]> and <(timer) < [108000]>> then\n        change [timer v] by (1)\n    end\n    set [tmin v] to ([floor v] of ((timer) / (1800)) )\n    set [tsec v] to (([floor v] of ((timer) / (30)) ) - (([floor v] of ((timer) / (1800)) ) * (60)))\n    set [tsmil v] to (([floor v] of ((timer) * ((100) / (30))) ) - (([floor v] of ((timer) / (30)) ) * (100)))\n    erase all\n    set [tmin v] to (join (letter ((1) - (([floor v] of ((tmin) / (10)) ) / ([floor v] of ((tmin) / (10)) ))) of [0]) (tmin))\n    set [tsec v] to (join (letter ((1) - (([floor v] of ((tsec) / (10)) ) / ([floor v] of ((tsec) / (10)) ))) of [0]) (tsec))\n    set [tsmil v] to (join (letter ((1) - (([floor v] of ((tsmil) / (10)) ) / ([floor v] of ((tsmil) / (10)) ))) of [0]) (tsmil))\n    set size to (200) %\n    clear graphic effects\n    if <<not <(enabled) = [0]>> and <(current) = [49]>> then\n        if <(record) < [0]> then\n            change [record v] by (0.5)\n            change [select v] by (record)\n        end\n        change [other v] by (1)\n        if <<(other) > [5]> and <(modif) < [8]>> then\n            Display (join (join (tmin) [:]) (join (join (tsec) [:]) (tsmil))) at x: (0) y: (select) C: (1)\n            if <(other) > [10]> then\n                set [other v] to [0]\n                change [modif v] by (1)\n            end\n        end\n    else\n        Display (join (join (tmin) [:]) (join (join (tsec) [:]) (tsmil))) at x: (0) y: (166) C: (1)\n        set [record v] to [0]\n        set [select v] to [166]\n        set [other v] to [0]\n        set [modif v] to [0]\n    end\n    set size to (100) %\nend\n\ndefine challenge menu <l> <r>\nif <(other) = [0]> then\n    if <r> then\n        set [music v] to [0]\n        stop all sounds\n        start sound [Pickup_Coin2 v]\n        set [died v] to [0]\n        set [current v] to [43]\n        set [gamehalf v] to [2]\n        stop [other scripts in sprite v]\n        set [menu v] to [0]\n        set [clonecount v] to [0]\n        wait (0.8) seconds\n        broadcast (transitionLoad v)\n        stop [this script v]\n    end\n    if <l> then\n        start sound [back v]\n        set [menu v] to [-1]\n        broadcast (menuSwitch v)\n        set [select v] to [2]\n    end\nend\nif <(menu) = [2]> then\n    draw timeattack\nend\nif <<l> or <r>> then\n    set [other v] to [1]\nelse\n    set [other v] to [0]\nend\n\ndefine draw timeattack\nerase all\ngo to x: (0) y: (120)\nif <(record) > [0]> then\n    switch costume to (new record! v)\nelse\n    switch costume to (challenge v)\nend\nshow\nstamp\nhide\nset [modif v] to [22]\nset [other v] to (([floor v] of (((modif) * ((length of [topuser v]) / (2))) + ((modif) / (2))) ) - (36))\nset y to (other)\nrepeat (length of [topuser v])\n    change y by ((0) - (modif))\n    Display (item ([abs v] of (((y position) - (other)) / (modif)) ) of [topuser v]) at x: ((-8) - ((length of (item ([abs v] of (((y position) - (other)) / (modif)) ) of [topuser v])) * (8))) y: (y position) C: (0)\n    if <<([abs v] of (((y position) - (other)) / (modif)) ) = ((record) + (1))> and <(record) > [0]>> then\n        Display [>] at x: ((-24) - ((length of (item ([abs v] of (((y position) - (other)) / (modif)) ) of [topuser v])) * (8))) y: (y position) C: (0)\n    end\nend\nset y to (other)\nrepeat (length of [toptime v])\n    change y by ((0) - (modif))\n    Display (item ([abs v] of (((y position) - (other)) / (modif)) ) of [toptime v]) at x: (8) y: (y position) C: (0)\nend\nDisplay [back ↔ start] at x: (-44) y: (-174) C: (0)\nDisplay [∇     2021] at x: (162) y: (-174) C: (0)\nDisplay [note: for unknown reasons, times won't save at the moment] at x: (1) y: (162) C: (1)\n\ndefine compile\nset [select v] to [1]\nreplace item (1) of [topuser v] with []\nrepeat (10)\n    change [select v] by (1)\n    set [other v] to [0]\n    repeat (length of (item (select) of [topuser v]))\n        change [other v] by (1)\n        switch costume to (letter (other) of (item (select) of [topuser v]))\n        set [modif v] to (costume [number v])\n        if <(modif) < [10]> then\n            set [modif v] to (join [0] (modif))\n        end\n        replace item (1) of [topuser v] with (join (item (1) of [topuser v]) (modif))\n    end\n    replace item (1) of [topuser v] with (join (item (1) of [topuser v]) [00])\nend\nset [☁ topuser v] to (item (1) of [topuser v])\nset [select v] to [0]\nset [modif v] to []\nrepeat (10)\n    change [select v] by (1)\n    if <(item (select) of [topdata v]) = [------]> then\n        replace item (select) of [topdata v] with [000000]\n    end\n    set [modif v] to (join (modif) (item (select) of [topdata v]))\nend\nset [☁ toptime v] to (modif)\n\ndefine decompile\nset [select v] to [0]\nset [modif v] to []\ndelete all of [topuser v]\nadd [user] to [topuser v]\nrepeat ((length of (☁ TOPUSER)) / (2))\n    change [select v] by (2)\n    set [other v] to (join (letter ((select) - (1)) of (☁ TOPUSER)) (letter (select) of (☁ TOPUSER)))\n    if <(other) = [00]> then\n        add (modif) to [topuser v]\n        set [modif v] to []\n    else\n        switch costume to (other)\n        set [modif v] to (join (modif) (costume [name v]))\n    end\nend\nset [select v] to [0]\nset [modif v] to []\ndelete all of [topdata v]\ndelete all of [toptime v]\nadd [time] to [toptime v]\nrepeat ((length of (☁ TOPTIME)) / (6))\n    repeat (6)\n        change [select v] by (1)\n        set [modif v] to (join (modif) (letter (select) of (☁ TOPTIME)))\n    end\n    if <(modif) = [000000]> then\n        add [------] to [topdata v]\n    else\n        add (modif) to [topdata v]\n    end\n    set [modif v] to []\n    change [select v] by (-6)\n    repeat (6)\n        change [select v] by (1)\n        set [modif v] to (join (modif) (letter (select) of (☁ TOPTIME)))\n        if <<((select) mod (2)) = [0]> and <not <((select) mod (6)) = [0]>>> then\n            set [modif v] to (join (modif) [:])\n        end\n    end\n    if <(modif) = [00:00:00]> then\n        add [--:--:--] to [toptime v]\n    else\n        add (modif) to [toptime v]\n    end\n    set [modif v] to []\nend\n\ndefine insert\nset [tjoin v] to (join (tmin) (join (tsec) (tsmil)))\nset [record v] to [-1]\nset [select v] to [0]\nrepeat (10)\n    change [select v] by (1)\n    if <<(tjoin) < (item (select) of [topdata v])> or <(item (select) of [topdata v]) = [------]>> then\n        set [record v] to (select)\n        set [select v] to [0]\n        set [modif v] to []\n        set [other v] to (username)\n        if <(username) = []> then\n            set [other v] to [time not saved!]\n        end\n        repeat (length of (other))\n            change [select v] by (1)\n            if <[lowerlist v] contains (letter (select) of (other))?> then\n                set [modif v] to (join (modif) (item (item # of (letter (select) of (other)) in [lowerlist v]) of [lowerlist v]))\n            else\n                set [modif v] to (join (modif) (letter (select) of (other)))\n            end\n        end\n        insert (modif) at ((record) + (1)) of [topuser v] \n        insert (tjoin) at (record) of [topdata v] \n        insert (join (tmin) (join [:] (join (tsec) (join [:] (tsmil))))) at ((record) + (1)) of [toptime v] \n        delete (length of [toptime v]) of [toptime v]\n        delete (length of [topuser v]) of [topuser v]\n        delete (length of [topdata v]) of [topdata v]\n        stop [this script v]\n    end\nend\n\ndefine reset lists\ndelete all of [topuser v]\ndelete all of [topdata v]\nadd [] to [topuser v]\nrepeat (10)\n    add [--] to [topuser v]\n    add [------] to [topdata v]\nend\n\nreset lists\ncompile\ndecompile\nset [record v] to [0]\n\ninsert\ncompile\ndecompile\n\nwhen I receive [scened v]\nset [record v] to [-6.5]\n\nwhen I receive [returntomonke v]\nset [menu v] to [-2]\nbroadcast (menuSwitch v)\nset [music v] to [17]\nbroadcast (music v)\nrepeat (40)\n    menus <> <> <> <>\nend\ninsert\ncompile\ndecompile\nstart sound ((3) - <(record) > [0]>)\nrepeat (20)\n    menus <> <> <> <>\nend\nbroadcast (menuLoop v)\n\nwhen I receive [greenflag v]\nset [menu v] to [1]\nset [select v] to [1]\n\n@Trianull\n\nwhen I start as a clone\nshow\nset [vel v] to [8]\nrepeat (17)\n    change [vel v] by (-0.7)\n    change y by (vel)\nend\nrepeat until <(timer) > [3.2]>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen I receive [titlestart v]\nif <not <<key (any v) pressed?> or <(mobileActive) > [0]>>> then\n    reset timer\n    clear graphic effects\n    hide\n    go to x: (0) y: (-16)\n    set size to (300) %\n    switch costume to (costume1 v)\n    clone [3]\n    wait (0.8) seconds\n    clone [1]\n    wait (0.8) seconds\n    clone [4]\n    wait (0.8) seconds\n    set size to (200) %\n    change y by (-28)\n    clone [1]\n    switch costume to (costume1 v)\nend\n\ndefine clone (#)\nrepeat (#)\n    next costume\n    create clone of (_myself_ v)\nend\n\n@zone1\n\nwhen I receive [zoneintro v]\ngo to x: (-65) y: (0)\nset [vel v] to [13.5]\nshow\nrepeat (7)\n    go to [front v] layer\n    change x by (vel)\n    change [vel v] by (-1.5)\nend\nset x to (0)\nwait (2.4) seconds\nset [vel v] to [0]\nrepeat (8)\n    change x by (vel)\n    change [vel v] by (-2.5)\nend\nset [enabled v] to [0]\nhide\n\nwhen I receive [zoneintro v]\nswitch costume to (zoneblue1 v)\nrepeat (144)\n    switch costume to ((costume [number v]) - (3))\nend\n\nwhen I receive [greenflag v]\nhide\n\nwhen I receive [titlestart v]\nhide\n\n@zone2\n\nwhen I receive [zoneintro v]\nswitch costume to (zCount)\nset [palette v] to (costume [number v])\ngo to [front v] layer\ngo to x: (0) y: (-65)\nshow\nset [vel v] to [13.5]\nrepeat (7)\n    change y by (vel)\n    change [vel v] by (-1.5)\nend\nset y to (0)\nwait (1.9) seconds\nset [vel v] to [0]\nrepeat (8)\n    change y by (vel)\n    change [vel v] by (-2.5)\nend\nhide\nset [zonedelay v] to [0]\n\nwhen I receive [greenflag v]\ndelete (all) of [introlevels v]\nadd [1] to [introlevels v]\nadd [8] to [introlevels v]\nadd [15] to [introlevels v]\nadd [22] to [introlevels v]\nadd [29] to [introlevels v]\nadd [36] to [introlevels v]\nadd [43] to [introlevels v]\nhide\n\ndefine findLevel\nset [zcount v] to [0]\nrepeat (length of [introlevels v])\n    change [zcount v] by (1)\n    if <(item (zCount) of [introlevels v]) = (current)> then\n        broadcast (zoneIntro v)\n    end\nend\n\nwhen I receive [levelstart v]\nset [zonedelay v] to [1]\nif <<[introlevels v] contains (current)?> and <(died) = [0]>> then\n    set [timer v] to [0]\n    set [enabled v] to [2]\n    repeat (5)\n    findLevel\nelse\n    set [zonedelay v] to [0]\n    set [animate? v] to [0]\n    set [enabled v] to [0]\n    set [died v] to [0]\nend\n\nwhen I receive [titlestart v]\nhide\n\n@secret\n\nsay (((((y position) + (172)) / (16)) * (30)) + ((((x position) + (232)) / (16)) + (1))) for (2) seconds\n\nchange y by (16)\n\nwhen I receive [updateobj v]\nif <(costume [number v]) < [4]> then\n    if <<(((round (distance to [spritebody v])) * (9)) - (272)) < [100]> and <(costume [number v]) = [3]>> then\n        set [ghost v] effect to (((round (distance to [spritebody v])) * (9)) - (272))\n        show\n        if <(distance to [spritebody v]) < [12]> then\n            broadcast (playSecret v)\n            hide\n            switch costume to (unit v)\n            replace item (item # of (current) in [showin v]) of [showin v] with [0]\n        end\n    else\n        if <(costume [number v]) = [3]> then\n            hide\n            clear graphic effects\n        end\n    end\nend\n\ngoto [572]\n\ngoto [92]\n\nwhen I receive [loadlevel v]\nif <[showin v] contains (current)?> then\n    goto (item (item # of (current) in [showin v]) of [secrets v])\n    change y by (8)\nend\nswitch costume to ((1) + ((2) * ((item # of (current) in [showin v]) / (item # of (current) in [showin v]))))\n\nchange x by (16)\n\nchange x by (-16)\n\nchange y by (-16)\n\nclear graphic effects\nshow\n\nwhen I receive [playsecret v]\nset [musicvol v] to ((musicVol) / (2))\nbroadcast (changeVol v)\ncalcspin\nstart sound ((6) - (spin))\nif <(spin) = [0]> then\n    set [enabled v] to [2]\n    wait until <(yCol) > [0]>\n    clone\n    repeat until <(radius) < [0.001]>\n        change [radius v] by (-2)\n    end\n    start sound [secret7 v]\n    set [shield v] to [1]\n    broadcast (hurtDisp v)\n    set [enabled v] to [0]\nend\nwait (5.25) seconds\nset [musicvol v] to ((musicVol) * (2))\nbroadcast (changeVol v)\n\ngoto [225]\n\ngoto [599]\n\ndefine goto (tile)\ngo to x: (((((tile) - (1)) mod (30)) * (16)) - (232)) y: ((-172) + (([floor v] of (((tile) - (1)) / (30)) ) * (16)))\n\nwhen I receive [titlestart v]\nhide\n\nwhen I start as a clone\nclear graphic effects\nshow\nrepeat until <(radius) < [0.001]>\n    go to (hitbox v)\n    change x by ((radius) * ([sin v] of ((sequence) + (spin)) ))\n    change y by ((radius) * ([cos v] of ((sequence) + (spin)) ))\n    change [spin v] by (16)\n    change [radius v] by (-2)\n    switch costume to ((4) + (([floor v] of ((radius) / (10)) ) mod (2)))\nend\ndelete this clone\n\ndefine clone\nswitch costume to (unit v)\nset [radius v] to [120]\nset [spin v] to [0]\nset [sequence v] to [0]\nrepeat (6)\n    create clone of (_myself_ v)\n    change [sequence v] by (60)\nend\n\ndefine calcspin\nset [spin v] to [0]\nset [radius v] to [0]\nrepeat (6)\n    change [radius v] by (1)\n    if <(item (radius) of [showin v]) > [0]> then\n        change [spin v] by (1)\n    end\nend\n\nchange y by (-8)\nstart sound (item # of (((((y position) + (172)) / (16)) * (30)) + ((((x position) + (232)) / (16)) + (1))) in [secrets v])\n\ndelete all of [showin v]\nadd [0] to [showin v]\nadd [0] to [showin v]\nadd [0] to [showin v]\nadd [0] to [showin v]\nadd [0] to [showin v]\nadd [38] to [showin v]\nset [shield v] to [0]\nbroadcast (hurtDisp v)\nbroadcast (transitionLoad v)\n\nset [shield v] to [0]\ndelete all of [showin v]\nadd [4] to [showin v]\nadd [8] to [showin v]\nadd [18] to [showin v]\nadd [25] to [showin v]\nadd [34] to [showin v]\nadd [38] to [showin v]\n\nwhen I receive [greenflag v]\nhide\n\n@transition\n\nwhen I receive [transitionload v]\nclear graphic effects\ngo to [front v] layer\ngo to x: (0) y: (0)\nswitch costume to (transition v)\nshow\nrepeat (9)\n    next costume\n    go to [front v] layer\nend\nerase all\nif <<(gameHalf) = [0]> and <(current) = [0]>> then\n    broadcast (sceneA v)\nelse\n    if <<(gameHalf) = [0]> and <(current) = [22]>> then\n        broadcast (sceneB v)\n    else\n        if <<(gameHalf) = [1]> and <(current) = [43]>> then\n            broadcast (sceneC v)\n        else\n            broadcast (loadLevel v)\n        end\n    end\nend\nerase all\nwait (0) seconds\nrepeat (9)\n    switch costume to ((costume [number v]) - (1))\n    go to [front v] layer\nend\nhide\nif <<<(gameHalf) = [0]> and <(current) = [0]>> or <<<(gameHalf) = [0]> and <(current) = [22]>> or <<(gameHalf) = [1]> and <(current) = [43]>>>> then\n    show\n    switch costume to (transitionb v)\n    repeat (15)\n        next costume\n        go to [front v] layer\n    end\nelse\n    if <(username) = [TriforceMayhem]> then\n        set [debug v] to [1]\n    else\n        set [debug v] to [2]\n    end\nend\n\nwhen [p v] key pressed\nif <<<(debug) > [0]> and <(current) < [43]>> or <(debug) = [1]>> then\n    if <<key (left arrow v) pressed?> and <(current) > [1]>> then\n        change [current v] by (-1)\n        set [died v] to [1]\n        set [enabled v] to [1]\n        broadcast (transitionLoad v)\n        if <(debug) = [2]> then\n            set [debug v] to [-2]\n        end\n    else\n        if <<key (right arrow v) pressed?> and <not <<(current) = [42]> or <(current) = [49]>>>> then\n            change [current v] by (1)\n            if <not <(debug) = [2]>> then\n                set [died v] to [1]\n            end\n            set [enabled v] to [1]\n            broadcast (transitionLoad v)\n            if <(debug) = [2]> then\n                set [debug v] to [-2]\n            end\n        else\n            if <key (down arrow v) pressed?> then\n                set [died v] to [1]\n                set [enabled v] to [1]\n                broadcast (transitionLoad v)\n                if <(debug) = [2]> then\n                    set [debug v] to [-2]\n                end\n            else\n                if <key (up arrow v) pressed?> then\n                    set [enabled v] to [1]\n                    broadcast (transitionLoad v)\n                    if <(debug) = [2]> then\n                        set [debug v] to [-2]\n                    end\n                end\n            end\n        end\n    end\nend\n\nswitch costume to (_starlight3 v)\ngo to [front v] layer\nshow\nstop [all v]\n\nwhen [1 v] key pressed\nif <(debug) = [1]> then\n    set [gamehalf v] to [0]\n    set [current v] to [1]\n    set [died v] to [0]\n    set [enabled v] to [1]\n    broadcast (transitionLoad v)\nend\n\nwhen [2 v] key pressed\nif <(debug) = [1]> then\n    set [gamehalf v] to [0]\n    set [current v] to [8]\n    set [died v] to [0]\n    set [enabled v] to [1]\n    broadcast (transitionLoad v)\nend\n\nwhen [3 v] key pressed\nif <(debug) = [1]> then\n    set [gamehalf v] to [0]\n    set [current v] to [15]\n    set [died v] to [0]\n    set [enabled v] to [1]\n    broadcast (transitionLoad v)\nend\n\nwhen [4 v] key pressed\nif <(debug) = [1]> then\n    set [gamehalf v] to [1]\n    set [current v] to [22]\n    set [died v] to [0]\n    set [enabled v] to [1]\n    broadcast (transitionLoad v)\nend\n\nwhen [5 v] key pressed\nset [gamehalf v] to [1]\nif <(debug) = [1]> then\n    set [current v] to [29]\n    set [died v] to [0]\n    set [enabled v] to [1]\n    broadcast (transitionLoad v)\nend\n\nwhen [6 v] key pressed\nif <(debug) = [1]> then\n    set [gamehalf v] to [1]\n    set [current v] to [36]\n    set [died v] to [0]\n    set [enabled v] to [1]\n    broadcast (transitionLoad v)\nend\n\nwhen [7 v] key pressed\nif <(debug) = [1]> then\n    set [gamehalf v] to [2]\n    set [current v] to [43]\n    set [died v] to [0]\n    set [enabled v] to [1]\n    broadcast (transitionLoad v)\nend\n\nshow\nswitch costume to (transitionb v)\nrepeat (15)\n    next costume\n    go to [front v] layer\nend\n\nwhen I receive [scenebunload v]\nif <<(gameHalf) = [0]> and <(current) = [22]>> then\n    show\n    switch costume to (transitionb16 v)\n    repeat (15)\n        switch costume to ((costume [number v]) - (1))\n        go to [front v] layer\n    end\n    hide\nend\n\nset [gamehalf v] to [0]\n\nset [gamehalf v] to [1]\n\nshow\nswitch costume to (transitionb16 v)\nrepeat (15)\n    switch costume to ((costume [number v]) - (1))\n    go to [front v] layer\nend\nhide\n\nwhen I receive [scenectransition v]\nshow\nswitch costume to (transitionb16 v)\nrepeat (15)\n    switch costume to ((costume [number v]) - (1))\n    go to [front v] layer\nend\nhide\ngo to [front v] layer\ngo to x: (0) y: (0)\nswitch costume to (transition v)\nshow\nrepeat (9)\n    next costume\n    go to [front v] layer\nend\nerase all\nswitch backdrop to (mtn-brown-nightrees-tall v)\nbroadcast (sceneCpedistal v)\nerase all\nwait (0) seconds\nrepeat (9)\n    switch costume to ((costume [number v]) - (1))\n    go to [front v] layer\nend\nhide\nshow\nswitch costume to (transitionb v)\nrepeat (15)\n    next costume\n    go to [front v] layer\nend\n\nwhen I receive [menuswitch v]\nclear graphic effects\nchange [brightness v] effect by (19)\nset [color v] effect to (-8)\ngo to [front v] layer\ngo to x: (0) y: (0)\nswitch costume to (transition v)\nshow\nrepeat (9)\n    next costume\n    go to [front v] layer\nend\nerase all\nbroadcast (menuSwitched v)\nwait (0) seconds\nrepeat (9)\n    switch costume to ((costume [number v]) - (1))\n    go to [front v] layer\nend\nhide\nclear graphic effects\n\nwhen I receive [titlestart v]\nclear graphic effects\nhide\n\nwhen I receive [sceneccredtransition v]\nshow\nswitch costume to (transitionb16 v)\nrepeat (15)\n    switch costume to ((costume [number v]) - (1))\n    go to [front v] layer\nend\nhide\ngo to [front v] layer\ngo to x: (0) y: (0)\nswitch costume to (transition v)\nshow\nrepeat (9)\n    next costume\n    go to [front v] layer\nend\nerase all\nswitch backdrop to (sun-in-sky v)\nbroadcast (credits v)\nerase all\nwait (0) seconds\nrepeat (9)\n    switch costume to ((costume [number v]) - (1))\n    go to [front v] layer\nend\nhide\n\nwhen I receive [scened v]\nshow\nswitch costume to (transitionb v)\nrepeat (15)\n    next costume\n    go to [front v] layer\nend\n\nwhen I receive [sceneacollect v]\nrepeat (15)\n    change y by (1)\n    change y by (-1)\nend\nshow\nswitch costume to (transitionb16 v)\nrepeat (15)\n    switch costume to ((costume [number v]) - (1))\n    go to [front v] layer\nend\nhide\n\nwhen I receive [greenflag v]\nhide\n\n@semisolid\n\ndefine create\nshow\nset [i v] to [0]\nset [n v] to []\nset [semisolid v] to [1]\nset [ghost v] effect to (100)\nrepeat until <(i) > (length of (item (current) of [semisolids v]))>\n    change [i v] by (1)\n    if <(letter (i) of (item (current) of [semisolids v])) = [;]> then\n        goto (n)\n        set [n v] to []\n        change [i v] by (2)\n        switch costume to (letter ((i) - (1)) of (item (current) of [semisolids v]))\n        change [clonecount v] by (1)\n        if <(y position) > ([y position v] of [hitbox v])> then\n            set [solidmode v] to [1]\n        else\n            set [solidmode v] to [0]\n            hide\n        end\n        create clone of (_myself_ v)\n    else\n        set [n v] to (join (n) (letter (i) of (item (current) of [semisolids v])))\n    end\nend\nset [ghost v] effect to (0)\nset [semisolid v] to [0]\nhide\n\nwhen I receive [updateobj v]\nif <(semisolid) = [1]> then\n    if <(solidMode) = [0]> then\n        if <(([y position v] of [hitbox v]) - (8)) > ((y position) + (7.999))> then\n            set [solidmode v] to [1]\n            show\n        end\n    else\n        if <(y position) > ([y position v] of [hitbox v])> then\n            set [solidmode v] to [0]\n            hide\n        end\n    end\nend\nif <(current) > [42]> then\n    clear graphic effects\nend\n\ndefine goto (tile)\ngo to x: (((((tile) - (1)) mod (30)) * (16)) - (232)) y: ((-172) + (([floor v] of (((tile) - (1)) / (30)) ) * (16)))\n\nwhen I receive [loadlevel v]\nchange [clonecount v] by (-1)\ndelete this clone\n\nwhen I receive [loadlevel v]\nwait (0) seconds\nchange [clonecount v] by (1)\ncreate\n\n@boss1\n\ndefine charge\nset [charge v] to [1]\nset [brightness v] effect to (0)\nswitch costume to (charge v)\nstart sound [darkness v]\nrepeat (12)\n    point in direction ((90) * ((([x position v] of [hitbox v]) - (x position)) / ([abs v] of (([x position v] of [hitbox v]) - (x position)) )))\n    switch costume to (particle v)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    switch costume to (charge v)\nend\nrepeat (8)\nset [brightness v] effect to (50)\nrepeat ((boss1: hits) * (18))\n    if <<touching (hitbox v)?> and <(yV) < [-1.6]>> then\n        set [brightness v] effect to (0)\n        set [yv v] to [8]\n        change [boss1: hits v] by (-1)\n        if <(boss1: hits) = [0]> then\n            set [boss1: stunned v] to [1]\n            set [music v] to [0]\n            stop all sounds\n            start sound [biggerdie v]\n            stop [this script v]\n        else\n            start sound [ouch v]\n            set [boss1: stunned v] to [1]\n            stop [this script v]\n        end\n    end\nend\nset [brightness v] effect to (0)\nset [bdash v] to [1]\nset [boss1: ycol v] to [0]\nif <(pick random (1) to (3)) = [3]> then\n    set [boss1: yv v] to [10]\n    start sound [QuietJump v]\n    repeat until <(boss1: yV) < [1]>\n        if <<touching (hitbox v)?> and <(hitInvul) = [0]>> then\n            set [hitamount v] to [2]\n            broadcast (hurt v)\n        end\n    end\nend\nset [boss1: xv v] to (((direction) / (90)) * (9))\nstart sound [evil2 v]\n\ndefine physics\nswitch costume to (hitbox v)\nif <(boss1: moving) = [0]> then\n    if <(boss1: xV) > [0]> then\n        change [boss1: xv v] by (-0.3)\n        if <[0] > (boss1: xV)> then\n            set [boss1: xv v] to [0]\n        end\n    else\n        change [boss1: xv v] by (0.3)\n        if <(boss1: xV) > [0]> then\n            set [boss1: xv v] to [0]\n        end\n    end\nelse\n    if <(boss1: moving) = [-1]> then\n        point in direction (-90)\n        change [boss1: xv v] by (-0.5)\n        if <(boss1: hits) > [0]> then\n            if <(boss1: xV) < [-3.75]> then\n                set [boss1: xv v] to [-3.75]\n            end\n        else\n            if <(boss1: xV) < [-4.25]> then\n                set [boss1: xv v] to [-4.25]\n            end\n        end\n    else\n        point in direction (90)\n        change [boss1: xv v] by (0.5)\n        if <(boss1: hits) > [0]> then\n            if <(boss1: xV) > [3.75]> then\n                set [boss1: xv v] to [3.75]\n            end\n        else\n            if <(boss1: xV) > [4.25]> then\n                set [boss1: xv v] to [4.25]\n            end\n        end\n    end\nend\nif <[0] < (boss1: hits)> then\n    if <(x position) > [232]> then\n        set x to (232)\n        set [boss1: xv v] to [0]\n    end\n    if <[-232] > (x position)> then\n        set x to (-232)\n        set [boss1: xv v] to [0]\n    end\nend\nchange [boss1: yv v] by (-0.8)\nchange y by (boss1: yV)\nif <touching (ground v)?> then\n    surface (boss1: yV)\n    set [boss1: yv v] to [0]\nend\nchange y by (-2)\nif <touching (ground v)?> then\n    set [boss1: ycol v] to [1]\nelse\n    set [boss1: ycol v] to [0]\nend\nchange y by (2)\nchange x by (boss1: xV)\nif <touching (ground v)?> then\n    wall (boss1: xV)\n    set [boss1: xv v] to [0]\n    if <(boss1: yCol) = [1]> then\n        set [boss1: yv v] to [9]\n        start sound [QuietJump v]\n    end\nend\nif <(bDash) = [1]> then\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nchange [clonecount v] by (1)\nswitch costume to (particle v)\nchange x by (pick random (4) to (-4))\nchange y by (pick random (4) to (-4))\nset size to (pick random (75) to (125)) %\nrepeat (5)\n    change size by (15)\nend\nrepeat (5)\n    change size by (-15)\nend\nchange [clonecount v] by (-1)\ndelete this clone\n\ndefine wall (xv)\nwhile <touching (ground v)?>\n    change x by ((0) - ((xv) / ([abs v] of (xv) )))\nend\n\nwhen I receive [levelstart v]\nwait (0) seconds\nchange [clonecount v] by (1)\nstop [other scripts in sprite v]\nif <(current) = [7]> then\n    go to x: (216) y: (-60)\n    point in direction (90)\n    set size to (100) %\n    switch costume to (idle v)\n    clear graphic effects\n    show\n    set [boss1: hits v] to [-1]\n    set [bdash v] to [0]\n    set [charge v] to [0]\n    set [boss1: xv v] to [0]\n    set [boss1: yv v] to [0]\n    set [boss1: stunned v] to [0]\n    set [boss1: animsprite v] to [0]\n    set [boss1: moving v] to [-1]\n    set [clock v] to [0]\n    set [enabled v] to [1]\n    repeat (30)\n    switch costume to (run4 v)\n    set [music v] to [4.5]\n    broadcast (music v)\n    repeat (1)\n    point in direction (-90)\n    repeat (1)\n    switch costume to (mad v)\n    repeat (18)\n    set [enabled v] to [0]\n    set [boss1: hits v] to [3]\nelse\n    switch costume to (particle v)\nend\n\ndefine surface (yv)\nwhile <touching (ground v)?>\n    change y by (1)\nend\n\nwhen I receive [updateobj v]\nif <not <(costume [number v]) = [18]>> then\n    if <[0] < (boss1: hits)> then\n        if <(boss1: stunned) = [0]> then\n            physics\n            if <(charge) = [0]> then\n                change [clock v] by (1)\n                if <([x position v] of [hitbox v]) > (x position)> then\n                    set [boss1: moving v] to [1]\n                else\n                    set [boss1: moving v] to [-1]\n                end\n                if <<(distance to [hitbox v]) < [13]> and <<(hitInvul) = [0]> and <(died) = [0]>>> then\n                    set [hitamount v] to [1]\n                    broadcast (hurtme v)\n                end\n                anim\n            else\n                switch costume to (charge v)\n                set [boss1: moving v] to [0]\n                if <(bDash) = [1]> then\n                    switch costume to (lunge v)\n                    if <<([abs v] of (boss1: xV) ) < [0.1]> and <(boss1: yCol) = [1]>> then\n                        set [charge v] to [0]\n                        set [bdash v] to [0]\n                    end\n                    if <<(distance to [hitbox v]) < [13]> and <<(hitInvul) = [0]> and <(died) = [0]>>> then\n                        set [hitamount v] to [2]\n                        broadcast (hurtme v)\n                    end\n                end\n            end\n            if <<(clock) > ((150) / (boss1: hits))> and <(charge) = [0]>> then\n                set [clock v] to [0]\n                broadcast (zboss1charge v)\n            end\n        else\n            change [boss1: stunned v] by (1)\n            if <((boss1: stunned) mod (2)) = [0]> then\n                switch costume to (hurt v)\n            else\n                switch costume to (idle v)\n            end\n            if <(boss1: stunned) > [24]> then\n                set [boss1: stunned v] to [0]\n                set [charge v] to [0]\n            end\n        end\n    else\n        if <(boss1: hits) = [0]> then\n            if <(boss1: stunned) = [0]> then\n                if <not <(x position) > [239]>> then\n                    set [bdash v] to [1]\n                    physics\n                    set [boss1: moving v] to [1]\n                    anim\n                else\n                    broadcast (goalShow v)\n                    switch costume to (particle v)\n                    hide\n                end\n            else\n                change [boss1: stunned v] by (1)\n                if <[64] > (boss1: stunned)> then\n                    if <((boss1: stunned) mod (2)) = [0]> then\n                        switch costume to (endhurt v)\n                    else\n                        switch costume to (end2 v)\n                    end\n                else\n                    if <[70] > (boss1: stunned)> then\n                        switch costume to (particle v)\n                        create clone of (_myself_ v)\n                        create clone of (_myself_ v)\n                        switch costume to ((boss1: stunned) - (54))\n                    else\n                        if <[98] > (boss1: stunned)> then\n                            switch costume to (end6 v)\n                        else\n                            if <[100] > (boss1: stunned)> then\n                                switch costume to (end7 v)\n                            else\n                                if <[106] > (boss1: stunned)> then\n                                    switch costume to (mad v)\n                                else\n                                    set [boss1: stunned v] to [0]\n                                    set [charge v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine anim\nif <<(boss1: yCol) > [0]> and <not <(boss1: moving) = [0]>>> then\n    set [boss1: animspeed v] to ([abs v] of ((boss1: xV) / (12)) )\n    if <(animspeed) < [0.2]> then\n        set [boss1: animspeed v] to [0.2]\n    end\n    change [boss1: animsprite v] by (boss1: animspeed)\n    if <[3.99] < (boss1: animsprite)> then\n        set [boss1: animsprite v] to [0]\n    end\n    switch costume to (([floor v] of (boss1: animsprite) ) + (1))\nelse\n    if <(boss1: yV) > [0.9]> then\n        switch costume to (madup v)\n    else\n        if <[-0.9] > (boss1: yV)> then\n            switch costume to (maddown v)\n        else\n            switch costume to (mad v)\n        end\n    end\nend\n\nwhen I receive [zboss1charge v]\ncharge\n\nwhen I receive [levelstart v]\nchange [clonecount v] by (-1)\nhide\ndelete this clone\n\nwhen I receive [titlestart v]\nhide\n\nwhen I receive [greenflag v]\nhide\n\n@ice\n\nwhen I start as a clone\nchange [clonecount v] by (1)\nclear graphic effects\nif <[5] > (costume [number v])> then\n    set [clock v] to [-1]\nelse\n    if <<(costume [number v]) = [6]> or <<(costume [number v]) = [10]> or <(costume [number v]) = [11]>>> then\n        set [clock v] to [1]\n    else\n        set [clock v] to (pick random (0) to (-5))\n    end\nend\n\nwhen I receive [updateobj v]\nif <<(clock) = [0]> or <<(costume [number v]) > [4]> and <[24] > (costume [number v])>>> then\n    if <(costume [number v]) > [4]> then\n        change [clock v] by (-0.7)\n        if <(clock) > [14]> then\n            set [clock v] to [14]\n        end\n        change y by (clock)\n        if <touching (_edge_ v)?> then\n            if <<touching (water v)?> and <<(costume [number v]) = [11]> or <(costume [number v]) = [6]>>> then\n                start sound [splash v]\n                set [clock v] to [-1]\n                up\n            end\n            change [clonecount v] by (-1)\n            delete this clone\n        end\n    end\nelse\n    if <[24] > (costume [number v])> then\n        if <(costume [number v]) > [2]> then\n            change y by (1.5)\n            if <touching (hitbox v)?> then\n                if <(clock) = [-1]> then\n                    set [clock v] to [1]\n                    next costume\n                    start sound [Laser_Shoot2 v]\n                end\n                if <(clock) = [2]> then\n                    set [clock v] to [3]\n                end\n            else\n                if <(clock) = [1]> then\n                    set [clock v] to [2]\n                end\n            end\n            change y by (-1.5)\n            if <(clock) > [2]> then\n                change [clock v] by (1)\n                if <(clock) > [8]> then\n                    switch costume to (bshard1 v)\n                    shatter [13]\n                    start sound [Explosion2 v]\n                    change [clonecount v] by (-1)\n                    delete this clone\n                end\n            end\n        else\n            change y by (1.5)\n            if <<([charges v] of [candle v]) = (([floor v] of ([charges v] of [candle v]) ) + (0.1))> and <<<(distance to [candle v]) < [18]> or <<(distance to [hitbox v]) < [18]> and <((y position) + (2)) > ([y position v] of [hitbox v])>>> and <<[5] > (costume [number v])> and <<[1] > (clock)> and <([charges v] of [candle v]) > [0.5]>>>>> then\n                change [hitamount v] by (1)\n                broadcast (zcandleDischarge v)\n                set [clock v] to [-1]\n                start sound [melt v]\n                switch costume to (&m v)\n            else\n                if <<touching (hitbox v)?> and <[1] > (clock)>> then\n                    set [clock v] to [1]\n                    next costume\n                    start sound [Laser_Shoot v]\n                end\n            end\n            change y by (-1.5)\n            if <(clock) > [0]> then\n                change [clock v] by (1)\n                if <(clock) > [20]> then\n                    switch costume to (sshard1 v)\n                    shatter [5]\n                    start sound [Explosion v]\n                    change [clonecount v] by (-1)\n                    delete this clone\n                end\n            end\n        end\n    else\n        if <[32] > (costume [number v])> then\n            switch costume to (([abs v] of ([floor v] of ((clock) / (2)) ) ) + (23))\n            change [clock v] by (-1)\n            if <[-16] > (clock)> then\n                change [clonecount v] by (-1)\n                delete this clone\n            end\n        else\n            change [clock v] by (-1)\n            change [ghost v] effect by (5)\n            if <[-20] > (clock)> then\n                change [clonecount v] by (-1)\n                delete this clone\n            end\n        end\n    end\nend\n\nset [color v] effect to (88)\n\ndefine shatter (number)\nrepeat (number)\n    create clone of (_myself_ v)\n    next costume\nend\n\nswitch costume to (& v)\nset [clock v] to [0]\nshow\ngo to x: (-72) y: (-76)\nrepeat (10)\n    create clone of (_myself_ v)\n    change x by (16)\nend\nchange y by (64)\nrepeat (10)\n    create clone of (_myself_ v)\n    change x by (16)\nend\nhide\n\nwhen I receive [loadlevel v]\nchange [clonecount v] by (-1)\ndelete this clone\n\nwhen I receive [loadlevel v]\nwait (0) seconds\nshow\nchange [clonecount v] by (1)\ncreate\nhide\ngo to x: (232) y: (-172)\n\nswitch costume to (bigice v)\nshow\ngo to x: (-72) y: (-76)\ncreate clone of (_myself_ v)\nhide\n\nswitch costume to (& v)\n\ndefine create\nshow\nset [i v] to [0]\nset [n v] to []\nset [ghost v] effect to (100)\nrepeat until <(i) > (length of (item (current) of [ices v]))>\n    change [i v] by (1)\n    if <(letter (i) of (item (current) of [ices v])) = [;]> then\n        goto (n)\n        set [n v] to []\n        change [i v] by (2)\n        switch costume to (letter ((i) - (1)) of (item (current) of [ices v]))\n        change [i v] by (2)\n        repeat (letter ((i) - (1)) of (item (current) of [ices v]))\n            create clone of (_myself_ v)\n            if <(costume [number v]) = [3]> then\n                change x by (32)\n            else\n                change x by (16)\n            end\n        end\n    else\n        set [n v] to (join (n) (letter (i) of (item (current) of [ices v])))\n    end\nend\nset [ghost v] effect to (0)\nhide\n\ndefine goto (tile)\ngo to x: (((((tile) - (1)) mod (30)) * (16)) - (232)) y: ((-172) + (([floor v] of (((tile) - (1)) / (30)) ) * (16)))\n\nset [clock v] to [0]\nshow\ngo to x: (-136) y: (36)\nrepeat (5)\n    create clone of (_myself_ v)\n    change x by (16)\nend\nchange y by (64)\nhide\n\ndefine up\nswitch costume to (splash v)\nrepeat until <not <touching (water v)?>>\n    change y by (1)\nend\nchange y by (-1)\n\n@hp/flash\n\nwhen I receive [hurtme v]\nif <(shield) = [1]> then\n    if <(hitAmount) = [0.5]> then\n        set [hitamount v] to [0]\n    else\n        set [hitamount v] to ((round (hitAmount)) / (2))\n    end\nend\nchange [hitpoints v] by ((0) - (hitAmount))\nif <(hitAmount) > [0.33]> then\nif <(hitPoints) > [3]> then\n    set [hitpoints v] to [3]\nend\nif <[0.1] > (hitPoints)> then\n    start sound [bigdie2 v]\n    set [hitpoints v] to [0]\n    set [died v] to [1]\n    set [enabled v] to [1]\n    broadcast (render v)\n    broadcast (hurtDisp v)\n    explode\n    set [retimer v] to [60]\n    set [repressed v] to [1]\n    repeat until <<(reTimer) < [1]> or <<<key (any v) pressed?> or <mouse down?>> and <(rePressed) = [0]>>>\n        broadcast (updateObj v)\n        change [retimer v] by (-1)\n        if <not <<key (any v) pressed?> or <mouse down?>>> then\n            set [repressed v] to [0]\n        end\n    end\n    broadcast (transitionLoad v)\n    stop [this script v]\nend\nbroadcast (hurtDisp v)\nif <(hitAmount) < [0]> then\n    start sound [upgrade v]\nelse\n    if <(hitAmount) > [0.33]> then\n        start sound [Chk v]\n        set [hitinvul v] to [30]\n        set [yv v] to [3]\n        set [xv v] to ((0) - (([direction v] of [hitbox v]) / (25)))\n        repeat (10)\n            set [enabled v] to [0]\n        end\n        set [enabled v] to [0]\n    else\n        start sound [Pickup_Coin4 v]\n    end\nend\n\nset [hitamount v] to [1]\ngo to x: (-226) y: (-166)\n\nwhen I receive [hurtdisp v]\nswitch costume to (join (hitPoints) [])\nif <(shield) = [1]> then\n    switch costume to (join [s] (costume [name v]))\nend\n\nset [hitamount v] to [0]\n\nset [hitamount v] to [-1]\n\nwhen I receive [updateobj v]\nif <(isClone) > [0]> then\n    change [isclone v] by (-0.03)\n    move (isClone) steps\n    if <(isClone) < [0.1]> then\n        change [clonecount v] by (-1)\n        delete this clone\n    end\n    if <<([abs v] of (x position) ) > [239]> or <([abs v] of (y position) ) > [179]>> then\n        change [clonecount v] by (-1)\n        delete this clone\n    end\n    next costume\n    if <(costume [number v]) > [8]> then\n        switch costume to (explode1 v)\n    end\nelse\n    if <([costume # v] of [transition v]) < [11]> then\n        if <touching (spritebody v)?> then\n            if <(isClone) > [-5]> then\n                change [isclone v] by (-1)\n                change [ghost v] effect by (10)\n            end\n        else\n            if <(isClone) < [0]> then\n                change [isclone v] by (1)\n                change [ghost v] effect by (-10)\n            else\n                clear graphic effects\n            end\n        end\n        go to [front v] layer\n        go [backward v] (2) layers\n    end\nend\n\nwhen I receive [loadlevel v]\nset [isclone v] to [0]\nchange [clonecount v] by (-1)\ndelete this clone\n\nwhen I start as a clone\nchange [clonecount v] by (1)\nset [isclone v] to [6]\nset size to (100) %\nset rotation style [don't rotate v]\n\ndefine explode\ngo to (hitbox v)\nrepeat ((360) / (22.5))\n    turn right (22.5) degrees\n    create clone of (_myself_ v)\nend\ngo to x: (-226) y: (-166)\nswitch costume to (join (hitPoints) [])\nif <(shield) = [1]> then\n    switch costume to (join [s] (costume [name v]))\nend\n\nwhen I receive [loadlevel v]\nwait (0) seconds\nchange [clonecount v] by (1)\ngo to x: (-226) y: (-166)\nset size to (200) %\nshow\n\nwhen I receive [sceneb v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [scenebnight v]\nset size to (100) %\ngo to x: (0) y: (0)\nclear graphic effects\nshow\nswitch costume to (white v)\nset [ghost v] effect to (100)\nrepeat (5)\n    change [ghost v] effect by (-20)\nend\nrepeat (2)\n    switch backdrop to (mtn-brown-nightrees-tall v)\n    wait (0) seconds\nend\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nset [ghost v] effect to (0)\nhide\n\nwhen I receive [scenebwhitefade v]\nset [music v] to [0]\nbroadcast (music v)\nset size to (100) %\ngo to x: (0) y: (0)\nclear graphic effects\nshow\nswitch costume to (white v)\nset [ghost v] effect to (100)\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nbroadcast (sceneBunload v)\nrepeat (60)\n    wait (0) seconds\nend\nrepeat (9)\n    next costume\nend\nset [music v] to [9]\nbroadcast (music v)\nrepeat (48)\n    wait (0) seconds\nend\nswitch backdrop to (halftime v)\nrepeat (25)\n    change [ghost v] effect by (4)\nend\nset [ghost v] effect to (0)\nhide\n\nbroadcast (hurtme v)\n\nwhen I receive [scenec v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [scenecday v]\ngo to [front v] layer\nset size to (100) %\ngo to x: (0) y: (0)\nclear graphic effects\nshow\nswitch costume to (white v)\nset [ghost v] effect to (100)\nrepeat (5)\n    change [ghost v] effect by (-20)\nend\nrepeat (2)\n    switch backdrop to (sunrise v)\n    wait (0) seconds\nend\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nset [ghost v] effect to (0)\nhide\nset [music v] to [16]\nbroadcast (music v)\nwait (1) seconds\nset [music v] to [0]\n\nwhen I receive [titlestart v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [reset v]\nset size to (100) %\ngo to x: (0) y: (0)\nclear graphic effects\nset [brightness v] effect to (-100)\nshow\nswitch costume to (white v)\nset [ghost v] effect to (100)\nrepeat (25)\n    change [ghost v] effect by (-4)\nend\nswitch backdrop to (dark v)\nerase all\nwait (0.5) seconds\nhide\nbroadcast (greenFlag v)\n\nwhen I receive [scenedfade v]\ngo to [front v] layer\ngo [backward v] (1) layers\nset [music v] to [0]\nbroadcast (music v)\nset size to (100) %\ngo to x: (0) y: (0)\nclear graphic effects\nshow\nswitch costume to (white v)\nset [ghost v] effect to (100)\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nstart sound [bigdie v]\nwait (1.75) seconds\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\nwait (1.75) seconds\nbroadcast (returnToMonke v)\n\nwhen I receive [menuswitched v]\nhide\n\nwhen I receive [greenflag v]\nstop [other scripts in sprite v]\nhide\n\n@spike\n\ndefine create\nset [isclone v] to [0]\nshow\nset [i v] to [0]\nset [n v] to []\nrepeat until <(i) > (length of (item (current) of [spikes v]))>\n    change [i v] by (1)\n    if <(letter (i) of (item (current) of [spikes v])) = [;]> then\n        goto (n)\n        set [n v] to []\n        change [i v] by (2)\n        point in direction (((90) * (letter ((i) - (1)) of (item (current) of [spikes v]))) + (90))\n        change [i v] by (2)\n        repeat (letter ((i) - (1)) of (item (current) of [spikes v]))\n            create clone of (_myself_ v)\n            move ((([abs v] of ((direction) - (1)) ) / ((direction) - (1))) * (16)) steps\n        end\n    else\n        set [n v] to (join (n) (letter (i) of (item (current) of [spikes v])))\n    end\nend\nset [ghost v] effect to (0)\nhide\n\ndefine goto (tile)\ngo to x: (((((tile) - (1)) mod (30)) * (16)) - (232)) y: ((-172) + (([floor v] of (((tile) - (1)) / (30)) ) * (16)))\n\nwhen I receive [loadlevel v]\nchange [clonecount v] by (-1)\ndelete this clone\n\nwhen I start as a clone\nset [costume v] to ((costume [number v]) - (1))\nset [isclone v] to [1]\nchange [clonecount v] by (1)\ngo [backward v] (1000) layers\n\nwhen I receive [updateobj v]\nif <(isClone) > [0]> then\n    change [isclone v] by ((2) / (9))\n    if <(isClone) > [4.99]> then\n        set [isclone v] to [1]\n    end\n    switch costume to ((costume) + ([floor v] of (isClone) ))\n    if <<touching (hitbox v)?> and <(died) = [0]>> then\n        set [hitamount v] to [3]\n        broadcast (hurtme v)\n    end\nend\n\nwhen I receive [loadlevel v]\nwait (0) seconds\nchange [clonecount v] by (1)\nif <[introlevels v] contains ((current) + (1))?> then\n    switch costume to ((((item # of ((current) + (1)) in [introlevels v]) - (1)) * (4)) - (3))\nend\nif <[introlevels v] contains (current)?> then\n    switch costume to (((item # of (current) in [introlevels v]) * (4)) - (3))\nend\ncreate\n\n@candle\n\ndefine setup\nset [i v] to [0]\nset [charges v] to []\nset [hitamount v] to [0]\nrepeat until <(i) > (length of (item (current) of [candles v]))>\n    change [i v] by (1)\n    if <(letter (i) of (item (current) of [candles v])) = [;]> then\n        goto (charges)\n        change [i v] by (2)\n        set [charges v] to (letter ((i) - (1)) of (item (current) of [candles v]))\n        if <not <(letter (i) of (item (current) of [candles v])) = [;]>> then\n            set [charges v] to (join (charges) (letter (i) of (item (current) of [candles v])))\n            change [i v] by (1)\n        end\n        set [hitpoints v] to [0]\n        set [candim v] to [0]\n        point in direction (90)\n        clear graphic effects\n        show\n    else\n        set [charges v] to (join (charges) (letter (i) of (item (current) of [candles v])))\n    end\nend\n\ndefine goto (tile)\ngo to x: (((((tile) - (1)) mod (30)) * (16)) - (232)) y: ((-172) + (([floor v] of (((tile) - (1)) / (30)) ) * (16)))\n\nwhen I receive [loadlevel v]\nhide\nset [charges v] to []\nsetup\n\nwhen I receive [updateobj v]\nif <(charges) = []> then\n\nwhen I receive [zcandledischarge v]\nchange [charges v] by ((0) - (hitAmount))\nset [hitamount v] to [0]\nwait (0) seconds\nif <not <([floor v] of (charges) ) = (([floor v] of (charges) ) + (0.1))>> then\n    set [charges v] to (([floor v] of (charges) ) + (0.1))\nend\n\nwhen I receive [titlestart v]\nhide\n\nwhen I receive [greenflag v]\nhide\n\n@chonkstalactite\n\nwhen I receive [loadlevel v]\nif <(current) = [12]> then\n    switch costume to (chonkstalactite2 v)\n    set [velactite v] to [1]\n    go to x: (160) y: (127)\n    show\n    go to [back v] layer\nelse\n    set [velactite v] to [2]\n    hide\nend\n\nwhen I receive [updateobj v]\nif <(velactite) < [2]> then\n    if <<(cloneCount) < [11.5]> and <(velactite) > [0]>> then\n        if <(tiltdir) = [0]> then\n            turn right (1) degrees\n        else\n            turn left (1) degrees\n        end\n        if <(direction) = [93]> then\n            set [tiltdir v] to [1]\n        end\n        if <(direction) = [87]> then\n            set [tiltdir v] to [0]\n        end\n        change [velactite v] by (-0.0333333333333333)\n        if <(velactite) < [0.01]> then\n            start sound [Explosion3 v]\n            point in direction (90)\n        end\n    else\n        if <not <(cloneCount) = (cloneCountPrev)>> then\n            set [clonecountprev v] to (cloneCount)\n            set [melttilt v] to [10]\n        end\n        if <(meltTilt) > [0]> then\n            change [melttilt v] by (-1)\n            if <<(meltTilt) = [0]> or <(cloneCount) < [12.5]>> then\n                point in direction (90)\n            else\n                if <(tiltdir) = [0]> then\n                    turn right (1) degrees\n                else\n                    turn left (1) degrees\n                end\n                if <(direction) = [93]> then\n                    set [tiltdir v] to [1]\n                end\n                if <(direction) = [87]> then\n                    set [tiltdir v] to [0]\n                end\n            end\n        end\n    end\n    if <(velactite) < [0.01]> then\n        change [velactite v] by (-0.4)\n        change y by (velactite)\n        switch costume to (chonkstalactite3 v)\n        if <<touching (hitbox v)?> and <(hitPoints) > [0]>> then\n            set [hitamount v] to [3]\n            broadcast (hurtme v)\n        end\n        if <<touching (ground v)?> and <(y position) < [120]>> then\n            switch costume to (chonkstalactite v)\n            start sound [Explosion2 v]\n            set [velactite v] to [2]\n            set y to (-23)\n        end\n        if <(costume [number v]) = [3]> then\n            switch costume to (chonkstalactite2 v)\n        end\n    end\nend\n\nwhen I receive [titlestart v]\nhide\n\nwhen I receive [greenflag v]\nhide\n\n@boss2\n\ndefine charge\nif <not <(costume [number v]) = [18]>> then\n    set [charge v] to [1]\n    set [boss2: edgetime v] to [0]\n    set [brightness v] effect to (50)\n    switch costume to (charge v)\n    start sound [darkness v]\n    repeat (12)\n        point in direction ((90) * ((([x position v] of [hitbox v]) - (x position)) / ([abs v] of (([x position v] of [hitbox v]) - (x position)) )))\n        switch costume to (particle v)\n        create clone of (_myself_ v)\n        create clone of (_myself_ v)\n        create clone of (_myself_ v)\n        switch costume to (charge v)\n        if <<touching (hitbox v)?> and <(yV) < [-1.6]>> then\n            set [yv v] to [8]\n            change [boss2: hits v] by (-1)\n            set [brightness v] effect to (0)\n            if <(boss2: hits) = [0]> then\n                set [boss2: stunned v] to [1]\n                set [music v] to [0]\n                stop all sounds\n                start sound [biggerdie v]\n                stop [this script v]\n            else\n                start sound [ouch v]\n                set [boss2: stunned v] to [1]\n                stop [this script v]\n            end\n        end\n    end\n    repeat (((2) * (boss2: hits)) + (24))\n        if <<touching (hitbox v)?> and <(yV) < [-1.6]>> then\n            set [yv v] to [8]\n            change [boss2: hits v] by (-1)\n            set [brightness v] effect to (0)\n            if <(boss2: hits) = [0]> then\n                set [boss2: stunned v] to [1]\n                set [music v] to [0]\n                stop all sounds\n                start sound [biggerdie v]\n                stop [this script v]\n            else\n                start sound [ouch v]\n                set [boss2: stunned v] to [1]\n                set [charge v] to [0]\n                stop [this script v]\n            end\n        end\n    end\n    set [brightness v] effect to (0)\n    set [boss2: dash v] to [1]\n    set [boss2: ycol v] to [0]\n    if <(pick random (1) to (3)) = [3]> then\n        set [boss2: yv v] to [10]\n        start sound [QuietJump v]\n        repeat until <(boss2: yV) < [1]>\n            if <<touching (hitbox v)?> and <(hitInvul) = [0]>> then\n                set [hitamount v] to [2]\n                broadcast (hurt v)\n            end\n        end\n    end\n    set [boss2: xv v] to (((direction) / (90)) * (9))\n    start sound [evil2 v]\nend\n\ndefine physics\nif <not <(costume [number v]) = [18]>> then\n    switch costume to (hitbox v)\n    if <(boss2: moving) = [0]> then\n        if <(boss2: xV) > [0]> then\n            change [boss2: xv v] by (-0.3)\n            if <[0] > (boss2: xV)> then\n                set [boss2: xv v] to [0]\n            end\n        else\n            change [boss2: xv v] by (0.3)\n            if <(boss2: xV) > [0]> then\n                set [boss2: xv v] to [0]\n            end\n        end\n    else\n        if <(boss2: moving) = [-1]> then\n            point in direction (-90)\n            change [boss2: xv v] by (-0.5)\n            if <(boss2: hits) > [0]> then\n                if <(boss2: xV) < [-3.75]> then\n                    set [boss2: xv v] to [-3.75]\n                end\n            else\n                if <(boss2: xV) < [-4.5]> then\n                    set [boss2: xv v] to [-4.5]\n                end\n            end\n        else\n            point in direction (90)\n            change [boss2: xv v] by (0.5)\n            if <(boss2: hits) > [0]> then\n                if <(boss2: xV) > [3.75]> then\n                    set [boss2: xv v] to [3.75]\n                end\n            else\n                if <(boss2: xV) > [4.5]> then\n                    set [boss2: xv v] to [4.5]\n                end\n            end\n        end\n    end\n    if <[0] < (boss2: hits)> then\n        if <(x position) > [232]> then\n            set x to (232)\n            set [boss2: xv v] to [0]\n        end\n        if <[-232] > (x position)> then\n            set x to (-232)\n            set [boss2: xv v] to [0]\n        end\n    end\n    change [boss2: yv v] by (-0.8)\n    change y by (boss2: yV)\n    if <touching (ground v)?> then\n        surface (boss2: yV)\n        set [boss2: yv v] to [0]\n    end\n    change y by (-2)\n    if <touching (ground v)?> then\n        set [boss2: ycol v] to [1]\n    else\n        set [boss2: ycol v] to [0]\n    end\n    change y by (2)\n    change x by (boss2: xV)\n    if <touching (ground v)?> then\n        wall (boss2: xV)\n        set [boss2: xv v] to [0]\n        if <(boss2: yCol) = [1]> then\n            set [boss2: yv v] to [9]\n            start sound [QuietJump v]\n        end\n    end\n    if <(boss2: dash) = [1]> then\n        set [oldspr v] to (costume [number v])\n        switch costume to (particle v)\n        create clone of (_myself_ v)\n        switch costume to (oldspr)\n    end\nend\n\nwhen I start as a clone\nchange [clonecount v] by (1)\nswitch costume to (particle v)\nchange x by (pick random (4) to (-4))\nchange y by (pick random (4) to (-4))\nset size to (pick random (75) to (125)) %\nrepeat (5)\n    change size by (15)\n    switch costume to (particle v)\nend\nrepeat (5)\n    change size by (-15)\n    switch costume to (particle v)\nend\nchange [clonecount v] by (-1)\ndelete this clone\n\ndefine wall (xv)\nwhile <touching (ground v)?>\n    change x by ((0) - ((xv) / ([abs v] of (xv) )))\nend\n\nwhen I receive [levelstart v]\nwait (0) seconds\nchange [clonecount v] by (1)\nstop [other scripts in sprite v]\nif <(current) = [14]> then\n    if <<(current) = [14]> and <not <(debug) = [1]>>> then\n        change [clonecount v] by (-1)\n        delete this clone\n    end\n    go to x: (0) y: (-44)\n    point in direction (90)\n    set size to (100) %\n    switch costume to (idle v)\n    clear graphic effects\n    show\n    set [boss2: hits v] to [-1]\n    set [boss2: dash v] to [0]\n    set [charge v] to [0]\n    set [boss2: xv v] to [0]\n    set [boss2: yv v] to [0]\n    set [boss2: stunned v] to [0]\n    set [boss2: animsprite v] to [0]\n    set [boss2: moving v] to [-1]\n    set [boss2: edgetime v] to [0]\n    set [clock v] to [0]\n    set [enabled v] to [1]\n    repeat (30)\n    switch costume to (run4 v)\n    set [music v] to [4.5]\n    broadcast (music v)\n    repeat (1)\n    point in direction (-90)\n    repeat (1)\n    switch costume to (end7 v)\n    repeat (18)\n    set [enabled v] to [0]\n    set [boss2: hits v] to [3]\nelse\n    switch costume to (particle v)\nend\n\ndefine surface (yv)\nwhile <touching (ground v)?>\n    change y by (1)\nend\n\nwhen I receive [updateobj v]\nif <not <(costume [number v]) = [18]>> then\n    if <[0] < (boss2: hits)> then\n        if <(boss2: stunned) = [0]> then\n            physics\n            if <(charge) = [0]> then\n                change [clock v] by (1)\n                if <<(distance to [hitbox v]) < [13]> and <<(hitInvul) = [0]> and <(died) = [0]>>> then\n                    set [hitamount v] to [1]\n                    broadcast (hurtme v)\n                end\n                if <(x position) > ([x position v] of [hitbox v])> then\n                    if <((([x position v] of [hitbox v]) + ((300) / (boss2: hits))) - (32)) > (x position)> then\n                        set [boss2: moving v] to [1]\n                        if <<([x position v] of [hitbox v]) > ((x position) - (32))> and <([abs v] of (boss2: edgetime) ) < [1]>> then\n                            set [boss2: edgetime v] to [10]\n                        end\n                    else\n                        if <(x position) > (([x position v] of [hitbox v]) + ((300) / (boss2: hits)))> then\n                            set [boss2: moving v] to [-1]\n                        else\n                            set [boss2: moving v] to [0]\n                        end\n                    end\n                else\n                    if <([x position v] of [hitbox v]) > (x position)> then\n                        if <(([x position v] of [hitbox v]) - ((300) / (boss2: hits))) > (x position)> then\n                            set [boss2: moving v] to [1]\n                            if <<((x position) + ((88) - ((boss2: hits) * (24)))) > ([x position v] of [hitbox v])> and <([abs v] of (boss2: edgetime) ) < [1]>> then\n                                set [boss2: edgetime v] to [-10]\n                            end\n                        else\n                            if <(x position) > ((([x position v] of [hitbox v]) - ((300) / (boss2: hits))) + ((88) - ((boss2: hits) * (24))))> then\n                                set [boss2: moving v] to [-1]\n                            else\n                                set [boss2: moving v] to [0]\n                            end\n                        end\n                    end\n                end\n                if <<<(x position) > [230]> or <(x position) < [-230]>> and <(boss2: yCol) > [0]>> then\n                    if <(x position) > ([x position v] of [hitbox v])> then\n                        set [boss2: edgetime v] to [30]\n                    else\n                        set [boss2: edgetime v] to [-30]\n                    end\n                    set [boss2: yv v] to [10]\n                    start sound [QuietJump v]\n                end\n                point in direction ((90) * ((([x position v] of [hitbox v]) - (x position)) / ([abs v] of (([x position v] of [hitbox v]) - (x position)) )))\n                if <not <(boss2: edgetime) = [0]>> then\n                    change [boss2: edgetime v] by ((0) - ((boss2: edgetime) / ([abs v] of (boss2: edgetime) )))\n                    set [boss2: moving v] to ((0) - ((boss2: edgetime) / ([abs v] of (boss2: edgetime) )))\n                    if <[1] > (boss2: yCol)> then\n                        point in direction ((90) * ((0) - ((boss2: edgetime) / ([abs v] of (boss2: edgetime) ))))\n                    end\n                end\n                anim\n            else\n                switch costume to (charge v)\n                set [boss2: moving v] to [0]\n                if <(boss2: dash) = [1]> then\n                    switch costume to (lunge v)\n                    if <<([abs v] of (boss2: xV) ) < [0.1]> and <(boss2: yCol) = [1]>> then\n                        set [charge v] to [0]\n                        set [boss2: dash v] to [0]\n                    end\n                    if <<(distance to [hitbox v]) < [13]> and <<(hitInvul) = [0]> and <(died) = [0]>>> then\n                        set [hitamount v] to [2]\n                        broadcast (hurtme v)\n                    end\n                end\n            end\n            if <<(clock) > ((150) / (boss2: hits))> and <(charge) = [0]>> then\n                set [clock v] to [0]\n                broadcast (zboss2charge v)\n            end\n        else\n            change [boss2: stunned v] by (1)\n            if <((boss2: stunned) mod (2)) = [0]> then\n                switch costume to (hurt v)\n            else\n                switch costume to (idle v)\n            end\n            if <(boss2: stunned) > [24]> then\n                set [boss2: stunned v] to [0]\n                set [charge v] to [0]\n            end\n        end\n    else\n        if <(boss2: hits) = [0]> then\n            if <(boss2: stunned) = [0]> then\n                if <not <(x position) > [239]>> then\n                    set [boss2: dash v] to [1]\n                    physics\n                    set [boss2: moving v] to [1]\n                    anim\n                else\n                    broadcast (goalShow v)\n                    switch costume to (particle v)\n                    hide\n                end\n            else\n                change [boss2: stunned v] by (1)\n                if <[64] > (boss2: stunned)> then\n                    if <((boss2: stunned) mod (2)) = [0]> then\n                        switch costume to (endhurt v)\n                    else\n                        switch costume to (end2 v)\n                    end\n                else\n                    if <[70] > (boss2: stunned)> then\n                        switch costume to (particle v)\n                        create clone of (_myself_ v)\n                        create clone of (_myself_ v)\n                        switch costume to ((boss2: stunned) - (54))\n                    else\n                        if <[98] > (boss2: stunned)> then\n                            switch costume to (particle v)\n                            create clone of (_myself_ v)\n                            switch costume to (end6 v)\n                        else\n                            if <[100] > (boss2: stunned)> then\n                                switch costume to (end7 v)\n                            else\n                                if <[106] > (boss2: stunned)> then\n                                    switch costume to (mad v)\n                                else\n                                    set [boss2: stunned v] to [0]\n                                    set [charge v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine anim\nif <not <(costume [number v]) = [18]>> then\n    if <<(boss2: yCol) > [0]> and <not <(boss2: moving) = [0]>>> then\n        set [boss2: animspeed v] to ([abs v] of ((boss2: xV) / (12)) )\n        if <(animspeed) < [0.2]> then\n            set [boss2: animspeed v] to [0.2]\n        end\n        change [boss2: animsprite v] by (boss2: animspeed)\n        if <[3.99] < (boss2: animsprite)> then\n            set [boss2: animsprite v] to [0]\n        end\n        switch costume to (([floor v] of (boss2: animsprite) ) + (1))\n    else\n        if <(boss2: yV) > [0.9]> then\n            switch costume to (madup v)\n        else\n            if <[-0.9] > (boss2: yV)> then\n                switch costume to (maddown v)\n            else\n                switch costume to (mad v)\n            end\n        end\n    end\nend\n\nwhen I receive [zboss2charge v]\nif <not <(costume [number v]) = [18]>> then\n    charge\nend\n\nwhen I receive [loadlevel v]\nchange [clonecount v] by (-1)\nhide\ndelete this clone\n\nwhen I receive [titlestart v]\nhide\n\nwhen I receive [greenflag v]\nhide\n\n@button\n\ndefine create\nshow\nset [i v] to [0]\nset [clock v] to []\nrepeat until <(i) > (length of (item (current) of [buttons v]))>\n    change [i v] by (1)\n    if <(letter (i) of (item (current) of [buttons v])) = [;]> then\n        goto (clock)\n        set [clock v] to []\n        change [i v] by (2)\n        switch costume to (letter ((i) - (1)) of (item (current) of [buttons v]))\n        create clone of (_myself_ v)\n    else\n        set [clock v] to (join (clock) (letter (i) of (item (current) of [buttons v])))\n    end\nend\nhide\nset [clock v] to [0]\n\nwhen I receive [updateobj v]\nif <(clock) > [0]> then\n    if <(clock) = [1]> then\n        stamp\n        set [clock v] to [2]\n    end\n    if <(costume [number v]) > [6]> then\n        if <(clock) = [2]> then\n            if <touching (hitbox v)?> then\n                start sound (costume [number v])\n                next costume\n                stamp\n                set [clock v] to [3]\n                if <(blocks3) = [1]> then\n                    set [blocks3 v] to [0]\n                else\n                    set [blocks3 v] to [1]\n                end\n            end\n        else\n            if <touching (hitbox v)?> then\n        end\n    else\n        if <touching (hitbox v)?> then\n            start sound (costume [number v])\n            next costume\n            stamp\n            set [clock v] to [0]\n        end\n        if <(costume [number v]) = [2]> then\n            set [blocks1 v] to [1]\n        end\n        if <(costume [number v]) = [4]> then\n            set [blocks2 v] to [1]\n        end\n        if <(costume [number v]) = [6]> then\n            if <(blocks3) = [1]> then\n                set [blocks3 v] to [0]\n            else\n                set [blocks3 v] to [1]\n            end\n        end\n    end\nend\nif <(life) < [10]> then\n    change [life v] by (1)\nend\n\nwhen I receive [loadlevel v]\nchange [clonecount v] by (-1)\ndelete this clone\n\nwhen I receive [loadlevel v]\nwait (0) seconds\nchange [clonecount v] by (1)\nset [blocks1 v] to [0]\nset [blocks2 v] to [0]\nset [blocks3 v] to [0]\ncreate\n\ndefine goto (tile)\ngo to x: (((((tile) - (1)) mod (30)) * (16)) - (232)) y: ((-172) + (([floor v] of (((tile) - (1)) / (30)) ) * (16)))\n\nwhen I start as a clone\nset [life v] to [0]\nchange [clonecount v] by (1)\nif <[9] > (costume [number v])> then\n    set [clock v] to [1]\nelse\n    set [clock v] to [0]\n    go to [front v] layer\n    go [backward v] (1) layers\nend\nshow\n\ndefine stamp\nswitch costume to ((costume [number v]) - (8))\nchange y by (-16)\ncreate clone of (_myself_ v)\nswitch costume to ((costume [number v]) + (8))\nchange y by (16)\nbroadcast (zbuttonStamp v)\n\nwhen I receive [zbuttonstamp v]\nif <(costume [number v]) > [8]> then\n    change y by (-4)\n    set size to (80) %\n    if <<touching (button v)?> and <[1] < (life)>> then\n        change [clonecount v] by (-1)\n        delete this clone\n    end\n    set size to (100) %\n    change y by (4)\nend\n\n@blocks1\n\ndefine goto (tile)\ngo to x: (((((tile) - (1)) mod (30)) * (16)) - (232)) y: ((-172) + (([floor v] of (((tile) - (1)) / (30)) ) * (16)))\n\ndefine create\nswitch costume to (blockstatic v)\nset [i v] to [0]\nset [block v] to []\nrepeat until <(i) > (length of (item (current) of [blocks1 v]))>\n    change [i v] by (1)\n    if <(letter (i) of (item (current) of [blocks1 v])) = [;]> then\n        goto (block)\n        if <<(block) = [100]> and <(current) = [18]>> then\n            set [ghost v] effect to (100)\n            set [block v] to []\n            set [blockcollide v] to [1]\n            create clone of (_myself_ v)\n            change y by (16)\n            create clone of (_myself_ v)\n            clear graphic effects\n            change [i v] by (2)\n        else\n            if <<(block) = [42]> and <(current) = [34]>> then\n                set [ghost v] effect to (100)\n                set [block v] to []\n                set [blockcollide v] to [1]\n                create clone of (_myself_ v)\n                clear graphic effects\n                change [i v] by (2)\n            else\n                set [block v] to []\n                change [i v] by (2)\n                if <(letter ((i) - (1)) of (item (current) of [blocks1 v])) < [4]> then\n                    point in direction ((90) * (letter ((i) - (1)) of (item (current) of [blocks1 v])))\n                    change [i v] by (2)\n                    set [blockcollide v] to [0]\n                    repeat (letter ((i) - (1)) of (item (current) of [blocks1 v]))\n                        change [blockcollide v] by (1)\n                        if <(blockCollide) = ([floor v] of ((0.4) + ([sqrt v] of (letter ((i) - (1)) of (item (current) of [blocks1 v])) )) )> then\n                            set [blockcollide v] to [0]\n                        end\n                        create clone of (_myself_ v)\n                        move (16) steps\n                    end\n                else\n                    set [blockcollide v] to [0]\n                    create clone of (_myself_ v)\n                end\n            end\n        end\n    else\n        set [block v] to (join (block) (letter (i) of (item (current) of [blocks1 v])))\n    end\nend\npoint in direction (90)\nhide\n\nwhen I start as a clone\nchange [clonecount v] by (1)\nif <(blockCollide) > [0]> then\n    set [blockcollide v] to [1]\nend\nset [isclone v] to [1]\npoint in direction (90)\nshow\n\nwhen I receive [loadlevel v]\nchange [clonecount v] by (-1)\ndelete this clone\n\nwhen I receive [loadlevel v]\nwait (0) seconds\nchange [clonecount v] by (1)\nset [isclone v] to [0]\ncreate\n\nwhen I receive [updateobj v]\nif <<(isClone) > [0]> and <(blocks1) = [1]>> then\n    set rotation style [don't rotate v]\n    switch costume to (hitbox2 v)\n    go to [front v] layer\n    change [block v] by (-0.4)\n    change y by (block)\n    if <(blockCollide) = [0]> then\n        change [block v] by (pick random (0) to (-0.2))\n        if <<(isClone) = [1]> and <touching (ground v)?>> then\n            set [isclone v] to ((([abs v] of (block) ) / (5)) + (1))\n            up\n            start sound (pick random (1) to (2))\n            set [block v] to [3]\n            turn left ((direction) - (90)) degrees\n        end\n    else\n        change [block v] by (pick random (0) to (-0.4))\n        if <touching (ground v)?> then\n            change [ghost v] effect by (25)\n            change [blockcollide v] by (1)\n            if <(blockCollide) > [5]> then\n                change [clonecount v] by (-1)\n                delete this clone\n            end\n        end\n    end\n    if <(isClone) > [1]> then\n        change x by ((isClone) - (1))\n        turn right (((isClone) - (1)) * (4)) degrees\n    else\n        turn left (0.5) degrees\n    end\n    if <<touching (water v)?> and <[2] > (blockCollide)>> then\n        set [block v] to [3]\n        set [isclone v] to [-1]\n        switch costume to (splash v)\n        start sound [splash v]\n        water\n    else\n        if <<touching (risingswamp v)?> and <[2] > (blockCollide)>> then\n            set [block v] to [3]\n            set [isclone v] to [-1]\n            switch costume to (splash v)\n            start sound [splash v]\n            water2\n        else\n            if <(y position) < [-179.5]> then\n                change [clonecount v] by (-1)\n                delete this clone\n            end\n        end\n    end\n    if <(costume [number v]) = [2]> then\n        set rotation style [all around v]\n        switch costume to (block v)\n    end\nend\nif <(isClone) < [0]> then\n    switch costume to ([floor v] of (block) )\n    change [block v] by (0.5)\n    if <([floor v] of (block) ) > [10]> then\n        change [clonecount v] by (-1)\n        delete this clone\n    end\nend\n\ndefine up\nset [block v] to [0]\nrepeat until <<not <touching (ground v)?>> or <[15] < (block)>>\n    change y by (1)\n    change [block v] by (1)\nend\nif <[15] < (block)> then\n    change y by (-16)\nend\n\ndefine water\nrepeat until <not <touching (water v)?>>\n    change y by (1)\nend\nrepeat until <touching (water v)?>\n    change y by (-0.1)\nend\n\nwhen I receive [zswampsnap v]\nif <<(costume [number v]) > [2]> and <[11] > (costume [number v])>> then\n    hide\n    set size to (1000) %\n    set y to ([y position v] of [risingswamp v])\n    set size to (100) %\n    show\n    water2\nend\n\ndefine water2\nrepeat until <not <touching (risingswamp v)?>>\n    change y by (16)\nend\nrepeat until <touching (risingswamp v)?>\n    change y by (-4)\nend\nrepeat until <not <touching (risingswamp v)?>>\n    change y by (1)\nend\nrepeat until <touching (risingswamp v)?>\n    change y by (-0.1)\nend\n\nwhen I receive [sceneb v]\nchange [clonecount v] by (-1)\ndelete this clone\n\nwhen I receive [sceneb v]\nwait (0) seconds\nchange [clonecount v] by (1)\nset [isclone v] to [0]\n\n@blocks2\n\ndefine goto (tile)\ngo to x: (((((tile) - (1)) mod (30)) * (16)) - (232)) y: ((-172) + (([floor v] of (((tile) - (1)) / (30)) ) * (16)))\n\ndefine create\nswitch costume to (block2static v)\nset [i v] to [0]\nset [block v] to []\nrepeat until <(i) > (length of (item (current) of [blocks2 v]))>\n    change [i v] by (1)\n    if <(letter (i) of (item (current) of [blocks2 v])) = [;]> then\n        goto (block)\n        if <<(block) = [100]> and <(current) = [18]>> then\n            set [ghost v] effect to (100)\n            set [block v] to []\n            set [blockcollide v] to [1]\n            create clone of (_myself_ v)\n            change y by (16)\n            create clone of (_myself_ v)\n            clear graphic effects\n            change [i v] by (2)\n        else\n            if <<(block) = [42]> and <(current) = [34]>> then\n                set [ghost v] effect to (100)\n                set [block v] to []\n                set [blockcollide v] to [1]\n                create clone of (_myself_ v)\n                clear graphic effects\n                change [i v] by (2)\n            else\n                set [block v] to []\n                change [i v] by (2)\n                if <(letter ((i) - (1)) of (item (current) of [blocks2 v])) < [4]> then\n                    point in direction ((90) * (letter ((i) - (1)) of (item (current) of [blocks2 v])))\n                    change [i v] by (2)\n                    set [blockcollide v] to [0]\n                    repeat (letter ((i) - (1)) of (item (current) of [blocks2 v]))\n                        change [blockcollide v] by (1)\n                        if <(blockCollide) = ([floor v] of ((0.4) + ([sqrt v] of (letter ((i) - (1)) of (item (current) of [blocks2 v])) )) )> then\n                            set [blockcollide v] to [0]\n                        end\n                        create clone of (_myself_ v)\n                        move (16) steps\n                    end\n                else\n                    set [blockcollide v] to [0]\n                    create clone of (_myself_ v)\n                end\n            end\n        end\n    else\n        set [block v] to (join (block) (letter (i) of (item (current) of [blocks2 v])))\n    end\nend\npoint in direction (90)\nhide\n\nwhen I start as a clone\nchange [clonecount v] by (1)\nset [isclone v] to [1]\npoint in direction (90)\nshow\n\nwhen I receive [loadlevel v]\nchange [clonecount v] by (-1)\ndelete this clone\n\nwhen I receive [loadlevel v]\nwait (0) seconds\nchange [clonecount v] by (1)\nset [isclone v] to [0]\ncreate\n\ndefine up\nset [block v] to [0]\nrepeat until <<not <touching (ground v)?>> or <[31] < (block)>>\n    change y by (1)\n    change [block v] by (1)\nend\nif <[31] < (block)> then\n    change y by (-32)\nend\n\nwhen I receive [updateobj v]\nif <<(isClone) > [0]> and <(blocks2) = [1]>> then\n    set rotation style [don't rotate v]\n    switch costume to (hitbox2 v)\n    go to [front v] layer\n    change [block v] by (-0.4)\n    change y by (block)\n    if <(blockCollide) = [0]> then\n        change [block v] by (pick random (0) to (-0.2))\n        if <<(isClone) = [1]> and <touching (ground v)?>> then\n            set [isclone v] to ((([abs v] of (block) ) / (5)) + (1))\n            up\n            start sound (pick random (1) to (2))\n            set [block v] to [3]\n            turn right ((90) - (direction)) degrees\n        end\n    else\n        change [block v] by (pick random (0) to (-0.4))\n        if <touching (ground v)?> then\n            change [ghost v] effect by (25)\n        end\n    end\n    if <(isClone) > [1]> then\n        change x by ((0) - ((isClone) - (1)))\n        turn left ((isClone) - (1)) degrees\n    else\n        turn right (0.5) degrees\n    end\n    if <<touching (water v)?> and <(blockCollide) < [2]>> then\n        set [block v] to [3]\n        set [isclone v] to [-1]\n        switch costume to (splash v)\n        start sound [splash v]\n        water\n    else\n        if <<touching (risingswamp v)?> and <(blockCollide) < [2]>> then\n            switch costume to (splash v)\n            set [block v] to (y position)\n            water2\n            if <((y position) - (16)) > (block)> then\n                start sound [splash2 v]\n                change [clonecount v] by (-1)\n                delete this clone\n            else\n                set [block v] to [3]\n                set [isclone v] to [-1]\n                start sound [splash v]\n            end\n        else\n            if <(y position) < [-179.5]> then\n                change [clonecount v] by (-1)\n                delete this clone\n            end\n        end\n    end\n    if <(costume [number v]) = [2]> then\n        go to [front v] layer\n        set rotation style [all around v]\n        switch costume to (block2 v)\n    end\nend\nif <(isClone) < [0]> then\n    switch costume to ([floor v] of (block) )\n    change [block v] by (0.5)\n    if <([floor v] of (block) ) > [10]> then\n        change [clonecount v] by (-1)\n        delete this clone\n    end\nend\n\ndefine water\nrepeat until <not <touching (water v)?>>\n    change y by (1)\nend\nrepeat until <touching (water v)?>\n    change y by (-0.1)\nend\n\ndefine water2\nrepeat until <not <touching (risingswamp v)?>>\n    change y by (16)\nend\nrepeat until <touching (risingswamp v)?>\n    change y by (-4)\nend\nrepeat until <not <touching (risingswamp v)?>>\n    change y by (1)\nend\nrepeat until <touching (risingswamp v)?>\n    change y by (-0.1)\nend\n\nwhen I receive [zswampsnap v]\nif <<(costume [number v]) > [2]> and <[11] > (costume [number v])>> then\n    hide\n    set size to (1000) %\n    set y to ([y position v] of [risingswamp v])\n    set size to (100) %\n    show\n    water2\nend\n\nwhen I receive [sceneb v]\nchange [clonecount v] by (-1)\ndelete this clone\n\nwhen I receive [sceneb v]\nwait (0) seconds\nchange [clonecount v] by (1)\nset [isclone v] to [0]\n\n@blocks3\n\ndefine goto (tile)\ngo to x: (((((tile) - (1)) mod (30)) * (16)) - (232)) y: ((-172) + (([floor v] of (((tile) - (1)) / (30)) ) * (16)))\n\nwhen I start as a clone\nif <(visualLumens) = [1]> then\n    switch costume to (block3backlight v)\n    set [ghost v] effect to (70)\n    stamp\nend\nswitch costume to ((visualLumens) * (2))\nclear graphic effects\nstamp\nnext costume\nchange [clonecount v] by (1)\nif <(mode) > [0]> then\n    set [luminescence v] to [15]\n    clear graphic effects\n    show\nelse\n    set [luminescence v] to [0]\n    set [ghost v] effect to (100)\nend\n\nwhen I receive [updateobj v]\nif <<(blocks3) = [0]> and <[0] > (mode)>> then\n    set [mode v] to ((([abs v] of (mode) ) / (mode)) * (3))\nelse\n    if <<(blocks3) = [1]> and <(mode) > [0]>> then\n        set [mode v] to ((([abs v] of (mode) ) / (mode)) * (3))\n    end\nend\nif <([abs v] of (mode) ) = [1]> then\n    change [ghost v] effect by (-5)\n    change [luminescence v] by (1)\n    if <(luminescence) = [30]> then\n        set [mode v] to ((([abs v] of (mode) ) / (mode)) * (2))\n        set [luminescence v] to [20]\n    end\nelse\n    if <(luminescence) > [0]> then\n        if <<(y position) = [-156]> and <(current) = [34]>> then\n            if <([abs v] of (mode) ) = [3]> then\n                set [luminescence v] to [0]\n                set [mode v] to (([abs v] of (mode) ) / (mode))\n            else\n                set [luminescence v] to [1]\n            end\n        else\n            if <([abs v] of (mode) ) = [3]> then\n                if <(([abs v] of (luminescence) ) mod (4)) = [0]> then\n                    change [ghost v] effect by (20)\n                    change [luminescence v] by (-4)\n                else\n                    if <(([abs v] of (luminescence) ) mod (2)) = [0]> then\n                        change [ghost v] effect by (10)\n                        change [luminescence v] by (-2)\n                    else\n                        change [ghost v] effect by (5)\n                        change [luminescence v] by (-1)\n                    end\n                end\n            else\n                change [ghost v] effect by (5)\n                change [luminescence v] by (-1)\n            end\n        end\n    else\n        hide\n    end\n    if <<(luminescence) = [0]> and <<<(blocks3) = [0]> and <(mode) > [0]>> or <<(blocks3) = [1]> and <[0] > (mode)>>>> then\n        show\n        set [mode v] to (([abs v] of (mode) ) / (mode))\n    end\nend\nif <<(y position) = [-156]> and <(current) = [34]>> then\n    set [ghost v] effect to (100)\nend\n\ndefine create\nset [i v] to [0]\nset [n v] to []\nrepeat until <(i) > (length of (item (current) of [blocks3 v]))>\n    change [i v] by (1)\n    if <(letter (i) of (item (current) of [blocks3 v])) = [;]> then\n        goto (n)\n        set [n v] to []\n        change [i v] by (2)\n        set [mode v] to ((3) - ((letter ((i) - (1)) of (item (current) of [blocks3 v])) * (2)))\n        change [i v] by (2)\n        repeat (letter ((i) - (1)) of (item (current) of [blocks3 v]))\n            create clone of (_myself_ v)\n            change x by (16)\n        end\n    else\n        set [n v] to (join (n) (letter (i) of (item (current) of [blocks3 v])))\n    end\nend\nset [mode v] to [0]\n\nwhen I receive [loadlevel v]\nchange [clonecount v] by (-1)\ndelete this clone\n\nwhen I receive [loadlevel v]\nwait (0) seconds\nchange [clonecount v] by (1)\ncreate\nswitch costume to (block3on2 v)\n\nset [visuallumens v] to [1]\n\nset [visuallumens v] to [2]\n\nset [visuallumens v] to [3]\n\n@risingSwamp\n\nwhen I receive [updateobj v]\nif <<(current) = [19]> or <(current) = [46]>> then\n    if <(enabled) < [2]> then\n        change [swampspeed v] by (0.05)\n        if <(swampSpeed) > [2.4]> then\n            set [swampspeed v] to [2.4]\n        end\n        if <(swampRise) > [0]> then\n            if <(swampTop) > (y position)> then\n                hide\n                set size to (1000) %\n                change y by (swampSpeed)\n                set size to (100) %\n                show\n                if <(y position) > (swampTop)> then\n                    hide\n                    set size to (1000) %\n                    set y to (swampTop)\n                    set size to (100) %\n                    show\n                end\n            else\n                change [swamprise v] by (1)\n                if <(swampRise) > (swampRiseMax)> then\n                    set [swampspeed v] to [0]\n                    set [swamprise v] to [-1]\n                    set [swamprisemax v] to [-63]\n                end\n            end\n        else\n            if <(y position) > [-344]> then\n                hide\n                set size to (1000) %\n                change y by ((0) - (swampSpeed))\n                set size to (100) %\n                show\n                if <[-344] > (y position)> then\n                    hide\n                    set size to (1000) %\n                    set y to (-344)\n                    set size to (100) %\n                    show\n                end\n            else\n                change [swamprise v] by (-1)\n                if <(swampRiseMax) > (swampRise)> then\n                    set [swamprise v] to [1]\n                    set [swampspeed v] to [0]\n                    set [swamprisemax v] to [31]\n                end\n            end\n        end\n    end\n    change [swampanim v] by (1)\n    if <(swampAnim) > ((4) - <(current) = [46]>)> then\n        next costume\n        set [swampanim v] to [0]\n        if <(costume [number v]) > ((<(current) = [46]> * (5)) + (4))> then\n            switch costume to ((<(current) = [46]> * (5)) + (1))\n        end\n    end\n    go to [front v] layer\n    go [backward v] (6) layers\n    broadcast (zswampSnap v)\nend\n\nwhen I receive [loadlevel v]\nswitch costume to ((<(current) = [46]> * (5)) + (1))\nset [swamprise v] to [0]\nhide\nset size to (1000) %\ngo to x: (0) y: (-344)\nset size to (100) %\nif <<(current) = [19]> or <(current) = [46]>> then\n    show\n    set [swamprise v] to [-1]\n    set [swamprisemax v] to [-59]\n    set [swamptop v] to [-120]\n    if <(current) = [46]> then\n        set [swamptop v] to [-24]\n    end\nend\n\nwhen I receive [titlestart v]\nhide\n\nwhen I receive [greenflag v]\nhide\n\n@pillars\n\nwhen I receive [loadlevel v]\nif <(current) = [21]> then\n    switch costume to (pillars v)\n    go to x: (0) y: (0)\n    show\n    stamp\n    go to x: (-152) y: (68)\n    switch costume to (pillarbuttonoff v)\n    stamp\n    go to x: (104) y: (164)\n    switch costume to (pillarbuttonoff2 v)\n    stamp\n    hide\n    switch costume to (pillars v)\nend\n\nwhen I receive [zpillarbutton v]\nif <(blocks1) = [0]> then\n    start sound [nlp8button v]\n    set [blocks1 v] to [1]\n    go to x: (-152) y: (68)\n    show\n    switch costume to (restamp v)\n    stamp\n    switch costume to (pillarbuttonon v)\n    stamp\n    hide\nelse\n    start sound [nlp8button v]\n    set [blocks2 v] to [1]\n    go to x: (104) y: (164)\n    show\n    switch costume to (restamp2 v)\n    stamp\n    switch costume to (pillarbuttonon2 v)\n    stamp\n    hide\nend\nswitch costume to (pillars v)\n\nwhen I receive [sceneb v]\nshow\ngo to x: (0) y: (0)\nswitch costume to (pillars2 v)\nstamp\nhide\nswitch costume to (pillars v)\n\nwhen I receive [scenebunload v]\nerase all\n\nwhen I receive [scenecpedistal v]\nshow\ngo to x: (0) y: (0)\nswitch costume to (pillars2 v)\nstamp\nhide\nswitch costume to (pillars v)\n\n@boss3\n\ndefine charge\nset [charge v] to [1]\nset [boss3: edgetime v] to [0]\nswitch costume to (charge v)\nstart sound [darkness v]\nrepeat ((boss3: hits) * (5))\n    point in direction ((90) * ((([x position v] of [hitbox v]) - (x position)) / ([abs v] of (([x position v] of [hitbox v]) - (x position)) )))\n    switch costume to (particle v)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    switch costume to (charge v)\n    change y by (1)\n    if <touching (ground v)?> then\n        change x by (1)\n        if <touching (ground v)?> then\n            change x by (-2)\n        end\n    end\n    change y by (-1)\nend\nbroadcast (zsummonBossBomb v)\nrepeat (32)\nrepeat (16)\nset [brightness v] effect to (50)\nrepeat (((boss3: hits) * (9)) + (9))\n    if <<touching (hitbox v)?> and <(yV) < [-1.6]>> then\n        set [yv v] to [8]\n        change [boss3: hits v] by (-1)\n        set [brightness v] effect to (0)\n        if <(boss3: hits) = [0]> then\n            set [boss3: stunned v] to [1]\n            set [music v] to [0]\n            stop all sounds\n            start sound [biggerdie v]\n            stop [this script v]\n        else\n            start sound [ouch v]\n            set [boss3: stunned v] to [1]\n            stop [this script v]\n        end\n    end\nend\nchange y by (1)\nif <touching (ground v)?> then\n    change x by (1)\n    if <touching (ground v)?> then\n        change x by (-2)\n    end\nend\nchange y by (-1)\nset [brightness v] effect to (0)\nset [boss3: ycol v] to [0]\nset [charge v] to [0]\n\ndefine physics\nswitch costume to (hitbox v)\nif <(boss3: moving) = [0]> then\n    if <(boss3: xV) > [0]> then\n        change [boss3: xv v] by (-0.3)\n        if <[0] > (boss3: xV)> then\n            set [boss3: xv v] to [0]\n        end\n    else\n        change [boss3: xv v] by (0.3)\n        if <(boss3: xV) > [0]> then\n            set [boss3: xv v] to [0]\n        end\n    end\nelse\n    if <(boss3: moving) = [-1]> then\n        point in direction (-90)\n        change [boss3: xv v] by (-0.5)\n        if <(boss3: hits) > [0]> then\n            if <(boss3: xV) < [-4]> then\n                set [boss3: xv v] to [-4]\n            end\n        else\n            if <(boss3: xV) < [-4.5]> then\n                set [boss3: xv v] to [-4.5]\n            end\n        end\n    else\n        point in direction (90)\n        change [boss3: xv v] by (0.5)\n        if <(boss3: hits) > [0]> then\n            if <(boss3: xV) > [4]> then\n                set [boss3: xv v] to [4]\n            end\n        else\n            if <(boss3: xV) > [4.5]> then\n                set [boss3: xv v] to [4.5]\n            end\n        end\n    end\nend\nif <[0] < (boss3: hits)> then\n    if <(x position) > [232]> then\n        set x to (232)\n        set [boss3: xv v] to [0]\n    end\n    if <[-232] > (x position)> then\n        set x to (-232)\n        set [boss3: xv v] to [0]\n    end\nend\nchange [boss3: yv v] by (-0.8)\nchange y by (boss3: yV)\ncollide\nif <[boss3: collidables v] contains [true]?> then\n    surface (boss3: yV)\n    set [boss3: yv v] to [0]\nend\nchange y by (-2)\ncollide\nif <[boss3: collidables v] contains [true]?> then\n    set [boss3: ycol v] to [1]\nelse\n    set [boss3: ycol v] to [0]\nend\nchange y by (2)\nchange x by (boss3: xV)\ncollide\nif <[boss3: collidables v] contains [true]?> then\n    wall (boss3: xV)\n    set [boss3: xv v] to [0]\n    if <<(boss3: yCol) = [1]> and <(charge) = [0]>> then\n        set [boss3: yv v] to [9]\n        start sound [QuietJump v]\n    end\nend\nif <(boss3: dash) = [1]> then\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nchange [clonecount v] by (1)\nswitch costume to (particle v)\nchange x by (pick random (4) to (-4))\nchange y by (pick random (4) to (-4))\nset size to (pick random (75) to (125)) %\nrepeat (5)\n    change size by (15)\nend\nrepeat (5)\n    change size by (-15)\nend\nchange [clonecount v] by (-1)\ndelete this clone\n\ndefine wall (xv)\nwhile <[boss3: collidables v] contains [true]?>\n    change x by ((0) - ((xv) / ([abs v] of (xv) )))\n    collide\nend\n\nwhen I receive [loadlevel v]\nwait (0) seconds\nchange [clonecount v] by (1)\nstop [other scripts in sprite v]\nif <(current) = [21]> then\n    go to x: (200) y: (-60)\n    point in direction (90)\n    set size to (100) %\n    switch costume to (mad v)\n    clear graphic effects\n    show\n    set [boss3: hits v] to [-1]\n    set [boss3: dash v] to [0]\n    set [charge v] to [0]\n    set [boss3: xv v] to [0]\n    set [boss3: yv v] to [0]\n    set [boss3: stunned v] to [0]\n    set [boss3: animsprite v] to [0]\n    set [boss3: moving v] to [0]\n    set [boss3: edgetime v] to [0]\n    set [clock v] to [151]\n    set [enabled v] to [1]\n    repeat (30)\n    switch costume to (run4 v)\n    set [music v] to [4.5]\n    broadcast (music v)\n    repeat (1)\n    point in direction (-90)\n    repeat (1)\n    switch costume to (end5 v)\n    repeat (18)\n    set [enabled v] to [0]\n    set [boss3: hits v] to [3]\nelse\n    switch costume to (particle v)\nend\n\ndefine surface (yv)\nwhile <[boss3: collidables v] contains [true]?>\n    change y by (1)\n    collide\nend\n\nwhen I receive [updateobj v]\nif <not <(costume [number v]) = [18]>> then\n    if <[0] < (boss3: hits)> then\n        if <(boss3: stunned) = [0]> then\n            if <touching (water v)?> then\n                start sound [splash v]\n                set [boss3: yv v] to [14]\n                if <(boss3: moving) < [0]> then\n                    set [boss3: edgetime v] to [10]\n                else\n                    set [boss3: edgetime v] to [-10]\n                end\n            end\n            physics\n            if <(blocks2) = [1]> then\n                checkjump\n            end\n            if <(charge) = [0]> then\n                change [clock v] by (1)\n                if <<(distance to [hitbox v]) < [13]> and <<(hitInvul) = [0]> and <(died) = [0]>>> then\n                    set [hitamount v] to [1]\n                    broadcast (hurtme v)\n                end\n                if <(x position) > ([x position v] of [hitbox v])> then\n                    if <((([x position v] of [hitbox v]) + (200)) - (32)) > (x position)> then\n                        set [boss3: moving v] to [1]\n                        if <<([x position v] of [hitbox v]) > ((x position) - (8))> and <([abs v] of (boss3: edgetime) ) < [1]>> then\n                            set [boss3: edgetime v] to [10]\n                        end\n                    else\n                        if <(x position) > (([x position v] of [hitbox v]) + (200))> then\n                            set [boss3: moving v] to [-1]\n                        else\n                            set [boss3: moving v] to [0]\n                        end\n                    end\n                else\n                    if <([x position v] of [hitbox v]) > (x position)> then\n                        if <(([x position v] of [hitbox v]) - (200)) > (x position)> then\n                            set [boss3: moving v] to [1]\n                            if <<((x position) + (8)) > ([x position v] of [hitbox v])> and <([abs v] of (boss3: edgetime) ) < [1]>> then\n                                set [boss3: edgetime v] to [-10]\n                            end\n                        else\n                            if <(x position) > ((([x position v] of [hitbox v]) - (200)) + (32))> then\n                                set [boss3: moving v] to [-1]\n                            else\n                                set [boss3: moving v] to [0]\n                            end\n                        end\n                    end\n                end\n                if <<<(x position) > [216]> or <(x position) < [-216]>> and <(boss3: yCol) > [0]>> then\n                    if <(x position) > ([x position v] of [hitbox v])> then\n                        set [boss3: edgetime v] to [28]\n                        set [boss3: xv v] to [0]\n                    else\n                        set [boss3: edgetime v] to [-28]\n                        set [boss3: xv v] to [0]\n                    end\n                    if <(blocks2) = [1]> then\n                        set [boss3: edgetime v] to ((boss3: edgetime) * (1.5))\n                    end\n                    set [boss3: yv v] to [10]\n                    start sound [QuietJump v]\n                end\n                point in direction ((90) * ((([x position v] of [hitbox v]) - (x position)) / ([abs v] of (([x position v] of [hitbox v]) - (x position)) )))\n                if <not <(boss3: edgetime) = [0]>> then\n                    change [boss3: edgetime v] by ((0) - ((boss3: edgetime) / ([abs v] of (boss3: edgetime) )))\n                    set [boss3: moving v] to ((0) - ((boss3: edgetime) / ([abs v] of (boss3: edgetime) )))\n                    if <[0] > (boss3: yCol)> then\n                        point in direction ((90) * ((0) - ((boss3: edgetime) / ([abs v] of (boss3: edgetime) ))))\n                    end\n                end\n                collide\n                if <[boss3: collidables v] contains [true]?> then\n                    wall (boss3: moving)\n                    set [boss3: xv v] to [0]\n                end\n                anim\n            else\n                if <<(x position) = ([x position v] of [bossbomb v])> or <(distance to [bossbomb v]) < [25]>> then\n                    switch costume to (charge v)\n                else\n                    switch costume to (lunge v)\n                end\n                set [boss3: moving v] to [0]\n            end\n            if <<(clock) > ((150) / (boss3: hits))> and <(charge) = [0]>> then\n                if <(blocks2) = [1]> then\n                    set [boss3: ysave v] to (y position)\n                    change y by (-4)\n                    if <touching (ground v)?> then\n                        change x by ((boss3: moving) * (7))\n                        if <touching (ground v)?> then\n                            set [clock v] to [0]\n                            broadcast (zboss3charge v)\n                            set [boss3: xv v] to ((boss3: xV) / (6))\n                        end\n                        change x by (((0) - (boss3: moving)) * (7))\n                    end\n                    set y to (boss3: ySave)\n                else\n                    set [clock v] to [0]\n                    broadcast (zboss3charge v)\n                end\n            end\n        else\n            change [boss3: stunned v] by (1)\n            if <(boss3: stunned) = [25]> then\n                broadcast (zbuttonBomb v)\n            end\n            if <(boss3: stunned) > [24]> then\n                switch costume to (madup v)\n            else\n                if <((boss3: stunned) mod (2)) = [0]> then\n                    switch costume to (hurt v)\n                else\n                    switch costume to (idle v)\n                end\n            end\n            if <(boss3: stunned) > [32]> then\n                set [boss3: stunned v] to [0]\n                set [charge v] to [0]\n                if <(blocks1) = [1]> then\n                    set [boss3: ysave v] to (y position)\n                    change y by (-360)\n                    if <touching (ground v)?> then\n                    set y to (boss3: ySave)\n                end\n            end\n        end\n    else\n        if <(boss3: hits) = [0]> then\n            if <(boss3: stunned) = [0]> then\n                if <not <(x position) > [236]>> then\n                    set [boss3: dash v] to [1]\n                    physics\n                    set [boss3: moving v] to [1]\n                    anim\n                    set [boss3: ysave v] to (y position)\n                    change y by (-360)\n                    change x by (3)\n                    if <touching (ground v)?> then\n                    set y to (boss3: ySave)\n                    change x by (-3)\n                else\n                    broadcast (goalShow v)\n                    switch costume to (particle v)\n                    hide\n                    stop [other scripts in sprite v]\n                    stop [this script v]\n                end\n            else\n                change [boss3: stunned v] by (1)\n                if <[64] > (boss3: stunned)> then\n                    if <((boss3: stunned) mod (2)) = [0]> then\n                        switch costume to (endhurt v)\n                    else\n                        switch costume to (end2 v)\n                    end\n                else\n                    if <[70] > (boss3: stunned)> then\n                        switch costume to (particle v)\n                        create clone of (_myself_ v)\n                        create clone of (_myself_ v)\n                        switch costume to ((boss3: stunned) - (54))\n                        start sound [breath v]\n                    else\n                        if <[98] > (boss3: stunned)> then\n                            switch costume to (particle v)\n                            create clone of (_myself_ v)\n                            create clone of (_myself_ v)\n                            if <((boss3: stunned) mod (2)) = [0]> then\n                                switch costume to (end6 v)\n                            else\n                                switch costume to (end8 v)\n                            end\n                        else\n                            if <[100] > (boss3: stunned)> then\n                                switch costume to (end7 v)\n                            else\n                                if <[106] > (boss3: stunned)> then\n                                    switch costume to (mad v)\n                                else\n                                    set [boss3: stunned v] to [0]\n                                    set [charge v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine anim\nif <<(boss3: yCol) > [0]> and <not <(boss3: moving) = [0]>>> then\n    set [boss3: animspeed v] to ([abs v] of ((boss3: xV) / (12)) )\n    if <(animspeed) < [0.2]> then\n        set [boss3: animspeed v] to [0.2]\n    end\n    change [boss3: animsprite v] by (boss3: animspeed)\n    if <[3.99] < (boss3: animsprite)> then\n        set [boss3: animsprite v] to [0]\n    end\n    switch costume to (([floor v] of (boss3: animsprite) ) + (1))\nelse\n    if <(boss3: yV) > [0.9]> then\n        switch costume to (madup v)\n    else\n        if <[-0.9] > (boss3: yV)> then\n            switch costume to (maddown v)\n        else\n            switch costume to (mad v)\n        end\n    end\nend\n\nwhen I receive [zboss3charge v]\nif <([abs v] of (x position) ) > [200]> then\n    set [boss3: xv v] to ((boss3: xV) / (2))\nend\ncharge\n\nwhen I receive [loadlevel v]\nchange [clonecount v] by (-1)\nhide\ndelete this clone\n\ndefine collide\nreplace item (1) of [boss3: collidables v] with <touching (ground v)?>\nreplace item (2) of [boss3: collidables v] with [false]\nreplace item (3) of [boss3: collidables v] with [false]\nif <(blocks1) = [0]> then\n    replace item (2) of [boss3: collidables v] with <touching (blocks1 v)?>\nend\nif <(blocks2) = [0]> then\n    replace item (3) of [boss3: collidables v] with <touching (blocks2 v)?>\nend\n\ndefine checkjump\nset [boss3: ysave v] to (y position)\nchange y by (-360)\nchange x by (3)\nrepeat (2)\n    if <touching (ground v)?> then\n    change x by (-6)\nend\nset y to (boss3: ySave)\nchange x by (9)\n\nwhen I receive [titlestart v]\nhide\n\nwhen I receive [sceneb v]\nchange [clonecount v] by (-1)\nhide\ndelete this clone\n\nwhen I receive [sceneb v]\nwait (0) seconds\nchange [clonecount v] by (1)\nstop [other scripts in sprite v]\n\nwhen I receive [greenflag v]\nhide\n\n@bossBomb\n\nwhen I start as a clone\nchange [clonecount v] by (1)\nswitch costume to ((costume [number v]) + (2))\nchange x by (pick random (3) to (-3))\nchange y by (pick random (3) to (-3))\nset size to ((size) + (pick random (-25) to (25))) %\nrepeat (5)\n    change size by (15)\nend\nrepeat (5)\n    change size by ((0) - ((size) * (0.15)))\nend\nchange [clonecount v] by (-1)\ndelete this clone\n\nwhen I receive [loadlevel v]\nhide\nchange [clonecount v] by (-1)\ndelete this clone\n\nwhen I receive [loadlevel v]\nwait (0) seconds\nchange [clonecount v] by (1)\nstop [other scripts in sprite v]\n\nwhen I receive [zbossbombflash v]\nnext costume\nif <(costume [number v]) = [3]> then\n    switch costume to (bomb v)\nend\nif <(costume [number v]) = [5]> then\n    switch costume to (particle v)\nend\n\nwhen I receive [zsummonbossbomb v]\nset size to (100) %\nshow\nswitch costume to (bomb v)\nset rotation style [don't rotate v]\npoint in direction (90)\nset [bombvel v] to [0]\nstart sound [Powerup v]\nrepeat (16)\n    change [bombvel v] by (1.5)\n    go to (boss3 v)\n    change y by (bombVel)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    change size by (2)\nend\nrepeat (6)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    change size by (3)\nend\nrepeat (6)\n    if <<touching (hitbox v)?> and <<(hitInvul) = [0]> and <(died) = [0]>>> then\n        set [hitamount v] to [1]\n        broadcast (hurtme v)\n    end\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    broadcast (zbossBombFlash v)\n    change size by (4)\nend\nstart sound [Randomize7 v]\npoint towards (hitbox v)\nset [bombvel v] to [0]\nrepeat until <touching (_edge_ v)?>\n    change [bombvel v] by (0.8)\n    move (bombVel) steps\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    broadcast (zbossBombFlash v)\n    if <<touching (hitbox v)?> and <<(hitInvul) = [0]> and <(died) = [0]>>> then\n        set [hitamount v] to [2]\n        broadcast (hurtme v)\n    end\nend\nhide\nrepeat (11)\n    broadcast (zbossBombFlash v)\nend\n\nwhen I receive [zboss3charge v]\nrepeat (([boss3: hits v] of [boss3 v]) * (5))\n    go to (boss3 v)\nend\n\ngo to x: (-152) y: (68)\nset size to (100) %\nset [bombvel v] to [4]\ngo to x: (104) y: (-124)\ngo to x: (-152) y: (-60)\n\nwhen I receive [zbuttonbomb v]\nswitch costume to (bomb v)\ngo to (boss3 v)\nif <(blocks1) = [0]> then\n    set [bombx v] to ((-152) - (x position))\nelse\n    set [bombx v] to ((104) - (x position))\nend\nstart sound [Randomize9 v]\nshow\nset size to (100) %\nif <(blocks1) = [0]> then\n    set [bombvel v] to [15.2]\nelse\n    if <(y position) = [-60]> then\n        set [bombvel v] to [19.2]\n    else\n        if <(y position) = [-92]> then\n            set [bombvel v] to [20.8]\n        else\n            set [bombvel v] to [22]\n        end\n    end\nend\nrepeat (23)\n    change size by (-1.3)\n    change [bombvel v] by (-0.8)\n    change y by (bombVel)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    change x by ((bombX) / (23))\nend\nbroadcast (zpillarButton v)\ncreate clone of (_myself_ v)\ncreate clone of (_myself_ v)\nhide\n\nwhen I receive [scenebbomb v]\nset size to (100) %\nshow\nswitch costume to (bomb v)\nset rotation style [don't rotate v]\npoint in direction (90)\nset [bombvel v] to [0]\nstart sound [Powerup v]\nrepeat (16)\n    change [bombvel v] by (1.5)\n    go to (cutyami v)\n    change y by (bombVel)\n    create clone of (_myself_ v)\n    change size by (2)\nend\nrepeat (6)\n    create clone of (_myself_ v)\n    change size by (3)\nend\nrepeat (6)\n    if <<touching (hitbox v)?> and <<(hitInvul) = [0]> and <(died) = [0]>>> then\n        set [hitamount v] to [1]\n        broadcast (hurtme v)\n    end\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    broadcast (zbossBombFlash v)\n    change size by (4)\nend\nstart sound [Randomize7 v]\npoint in direction (105)\nset [bombvel v] to [0]\nrepeat (11)\n    change [bombvel v] by (0.8)\n    move (bombVel) steps\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    broadcast (zbossBombFlash v)\n    if <<touching (hitbox v)?> and <<(hitInvul) = [0]> and <(died) = [0]>>> then\n        set [hitamount v] to [2]\n        broadcast (hurtme v)\n    end\nend\nbroadcast (sceneBmedalsplode v)\nhide\nrepeat (11)\n    broadcast (zbossBombFlash v)\nend\n\nwhen I receive [sceneb v]\nhide\n\nwhen I receive [titlestart v]\nhide\n\nwhen I receive [greenflag v]\nhide\n\n@parallaxClouds\n\nwhen I receive [updateobj v]\nif <<(backdrop [number v]) = [8]> or <(backdrop [number v]) = [23]>> then\n    go [backward v] (42069) layers\n    change [cloudscroll v] by (-2)\n    if <[-479] > (cloudScroll)> then\n        set [cloudscroll v] to [0]\n    end\n    set size to (1000) %\n    go to x: (cloudScroll) y: (-48)\n    if <(theClone) = [1]> then\n        change x by (480)\n    end\n    set size to (100) %\nend\n\nwhen I receive [loadlevel v]\nchange [clonecount v] by (-1)\nhide\ndelete this clone\n\nwhen I receive [loadlevel v]\nwait (0) seconds\nset [theclone v] to [0]\nchange [clonecount v] by (1)\nstop [other scripts in sprite v]\nif <<(backdrop [number v]) = [8]> or <(backdrop [number v]) = [23]>> then\n    go to x: (0) y: (-48)\n    set [cloudscroll v] to [0]\n    show\n    switch costume to ((1) + <(visualLumens) = [3]>)\n    create clone of (_myself_ v)\nelse\n    hide\nend\n\nwhen I start as a clone\nset [theclone v] to [1]\n\nwhen I receive [scenecday v]\nwait until <(backdrop [number v]) = [9]>\nhide\n\nwhen I receive [scenec v]\nshow\n\nwhen I receive [titlestart v]\nhide\ndelete this clone\n\nwhen I receive [greenflag v]\nhide\ndelete this clone\n\n@cutSword\n\nwhen I receive [sceneb v]\nwait (0) seconds\nchange [clonecount v] by (1)\nset size to (100) %\nswitch costume to (swordp v)\nclear graphic effects\npoint in direction (90)\ngo to x: (0) y: (24)\nshow\ngo to [front v] layer\nset [music v] to [7]\nbroadcast (music v)\ngo to [front v] layer\nrepeat (42)\n    go to [back v] layer\nend\n\nwhen I receive [loadlevel v]\nhide\n\nwhen I receive [scenebswordpull v]\nif <(costume [number v]) = [1]> then\n    if <<([clock v] of [cutyami v]) > [310]> and <[336] > ([clock v] of [cutyami v])>> then\n        turn right (11.25) degrees\n    end\n    if <<([clock v] of [cutyami v]) > [470]> and <[476] > ([clock v] of [cutyami v])>> then\n        turn right (9) degrees\n        go to [front v] layer\n        go [backward v] (12) layers\n    end\n    if <<([clock v] of [cutyami v]) > [523]> and <[528] > ([clock v] of [cutyami v])>> then\n        cloneSpin [-45]\n        if <(direction) = [-135]> then\n            broadcast (sceneBo_O v)\n        end\n        if <(direction) = [180]> then\n            broadcast (sceneBsplit v)\n        end\n    end\n    if <<([clock v] of [cutyami v]) > [542]> and <[547] > ([clock v] of [cutyami v])>> then\n        turn right (45) degrees\n    end\n    go to (cutyami v)\n    turn right (90) degrees\n    set size to (1000) %\n    move (11) steps\n    set size to (100) %\n    turn left (90) degrees\nend\n\nwhen I start as a clone\nchange [clonecount v] by (1)\ngo [backward v] (1) layers\nclear graphic effects\nswitch costume to (swordw v)\nshow\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nchange [clonecount v] by (-1)\ndelete this clone\n\ndefine cloneSpin (degrees)\nrepeat (8)\n    create clone of (_myself_ v)\n    turn right ((degrees) / (8)) degrees\nend\ncreate clone of (_myself_ v)\n\nwhen I receive [sceneb v]\nchange [clonecount v] by (-1)\ndelete this clone\n\nwhen I receive [zboss5cutsword v]\nswitch costume to (swordp v)\nshow\ngo to (boss5 v)\nset size to (1000) %\nset y to (190)\npoint in direction (-90)\nset size to (100) %\nrepeat (80)\n    set size to (1000) %\n    change y by (-3)\n    set size to (100) %\nend\nrepeat (10)\n    set size to (1000) %\n    set size to (100) %\nend\nrepeat (50)\n    set size to (1000) %\n    change y by ((([boss5: stunned v] of [boss5 v]) - (189)) / (2))\n    set size to (100) %\nend\n\nwhen I receive [scenec v]\nwait (0) seconds\nchange [clonecount v] by (1)\nset size to (100) %\nswitch costume to (swordp v)\nclear graphic effects\npoint in direction (90)\ngo to (boss6-2 v)\nset y to (-32)\nset [boss4: slicex v] to (x position)\nshow\ngo to [back v] layer\n\nwhen I receive [scenec v]\nchange [clonecount v] by (-1)\ndelete this clone\n\nwhen I receive [scenecswordpull v]\nif <(costume [number v]) = [1]> then\n    if <<([clock v] of [cutyakō v]) > [280]> and <[297] > ([clock v] of [cutyakō v])>> then\n        if <(boss4: sliceX) > [0]> then\n            turn right (11.25) degrees\n        else\n            turn right (-11.25) degrees\n        end\n    end\n    if <(backdrop [number v]) = [13]> then\n        create clone of (_myself_ v)\n    end\n    set size to (1000) %\n    go to (cutyakō v)\n    turn right (90) degrees\n    move (11) steps\n    set size to (100) %\n    turn left (90) degrees\nend\n\nbroadcast (sceneC v)\n\nwhen I receive [scenecpedistal v]\nwait (0) seconds\nset size to (1000) %\nswitch costume to (swordp v)\nclear graphic effects\npoint in direction (90)\ngo to (cutyakō v)\nchange y by (32)\nset size to (100) %\nshow\ngo to [back v] layer\n\nwhen I receive [titlestart v]\nhide\n\nwhen I receive [credits v]\nhide\n\nwhen I receive [scened v]\n\ngo to [front v] layer\ngo [backward v] (20) layers\nset size to (1000) %\ngo to x: (0) y: (256)\nset size to (100) %\nhide\nwait (1) seconds\nshow\nrepeat (20)\n    point in direction (90)\n    create clone of (_myself_ v)\n    turn right (90) degrees\n    set size to (1000) %\n    move (11) steps\n    set size to (100) %\n    turn left (90) degrees\nend\n\nwhen I receive [scenea v]\nwait (1.5) seconds\nbroadcast (sceneAspike v)\nrepeat (30)\n    move (-1) steps\n    move (1) steps\nend\nshow\nswitch costume to (sceneaspike2 v)\ngo to x: (-160) y: (-20)\nrepeat (48)\n    point in direction (9)\n    move (1) steps\n    point in direction (90)\nend\nchange x by (1)\nnext costume\nrepeat (49)\n    point in direction (9)\n    move (1) steps\n    point in direction (90)\nend\nrepeat (20)\n    move (-1) steps\n    move (1) steps\nend\nbroadcast (sceneAyami v)\n\nwhen I receive [greenflag v]\nhide\n\n@medallion\n\ndefine objects i've\nshow\nswitch costume to (medallion5 v)\ngo to x: (-10) y: (-42)\ncreate clone of (_myself_ v)\nrepeat (2)\n    change x by (-5)\n    change y by (-5)\n    create clone of (_myself_ v)\nend\nchange y by (-10)\ncreate clone of (_myself_ v)\nrepeat (3)\n    change x by (5)\n    change y by (5)\n    create clone of (_myself_ v)\nend\nchange y by (-10)\ncreate clone of (_myself_ v)\nchange x by (-5)\nchange y by (-5)\ncreate clone of (_myself_ v)\nswitch costume to (medallion v)\nchange x by (10)\ncreate clone of (_myself_ v)\nchange y by (10)\ncreate clone of (_myself_ v)\nswitch costume to (medallion9 v)\nchange x by (10)\nchange y by (10)\ncreate clone of (_myself_ v)\nrepeat (2)\n    change x by (5)\n    change y by (-5)\n    create clone of (_myself_ v)\nend\nchange y by (-10)\ncreate clone of (_myself_ v)\nrepeat (3)\n    change x by (-5)\n    change y by (5)\n    create clone of (_myself_ v)\nend\nchange y by (-10)\ncreate clone of (_myself_ v)\nchange x by (5)\nchange y by (-5)\ncreate clone of (_myself_ v)\nhide\n\nwhen I receive [sceneb v]\ndelete this clone\n\nwhen I receive [sceneb v]\nset [blocks1 v] to [0]\nset [medalvel v] to [100]\nwait (0) seconds\nobjects i've\n\nwhen I start as a clone\nset [medalx v] to ((x position) / (1))\nset [medalvel v] to ((y position) + (66))\n\nwhen I receive [updateobj v]\nif <(blocks1) = [1]> then\n    if <(medalVel) < [100]> then\n        change x by (medalX)\n        change y by (medalVel)\n        change [medalvel v] by (-0.8)\n        next costume\n        if <(((costume [number v]) - (1)) mod (4)) = [0]> then\n            switch costume to ((costume [number v]) - (4))\n        end\n    end\n    if <touching (_edge_ v)?> then\n        delete this clone\n    end\nend\n\nstart sound [pop v]\nchange [blocks1 v] by (1)\nrepeat (44)\n    broadcast (updateObj v)\nend\n\nwhen I receive [zboss4goalshow v]\nshow\nset [medalvel v] to [0]\ngo to x: (216) y: (134)\nrepeat (21)\n    change [medalvel v] by (-0.8)\n    change y by (medalVel)\n    next costume\n    if <(costume [number v]) > [4]> then\n        switch costume to (medallion v)\n    end\nend\nset [medalvel v] to [8]\nstart sound [Pickup_Coin4 v]\nrepeat (17)\n    change [medalvel v] by (-0.8)\n    change y by (medalVel)\n    next costume\n    if <(costume [number v]) > [4]> then\n        switch costume to (medallion v)\n    end\nend\nbroadcast (goalShow v)\nhide\n\nwhen I receive [zboss5goalshow v]\nshow\nswitch costume to (medallion3 v)\nset [medalvel v] to [0]\ngo to x: (224) y: (-4)\nrepeat (12)\n    change [medalvel v] by (-0.8)\n    change y by (medalVel)\n    next costume\n    if <(costume [number v]) > [4]> then\n        switch costume to (medallion v)\n    end\nend\nset [medalvel v] to [6]\nstart sound [Pickup_Coin4 v]\nrepeat (13)\n    change [medalvel v] by (-0.8)\n    change y by (medalVel)\n    next costume\n    if <(costume [number v]) > [4]> then\n        switch costume to (medallion v)\n    end\nend\nbroadcast (goalShow v)\nhide\n\nwhen I receive [scenecmedallions v]\nobjects i've\n\nwhen I receive [scenec v]\ndelete this clone\n\nwhen I receive [titlestart v]\nhide\n\nwhen I receive [credits v]\ndelete this clone\n\nwhen I receive [greenflag v]\nhide\n\n@cutYami\n\nwhen I receive [sceneb v]\nchange [clonecount v] by (1)\nset [cutyami: jumping v] to [0]\nset [cutyami: yv v] to [0]\nset [cutyami: xv v] to [4]\nset [clock v] to [0]\nwait (0) seconds\nset size to (1000) %\ngo to x: (-256) y: (-108)\npoint in direction (90)\nset size to (100) %\nshow\n\nwhen I receive [loadlevel v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I start as a clone\nchange [clonecount v] by (1)\nswitch costume to (particle v)\nchange x by (pick random (4) to (-4))\nchange y by (pick random (4) to (-4))\nset size to (pick random (75) to (125)) %\nrepeat (5)\n    change size by (15)\nend\nrepeat (5)\n    change size by (-15)\nend\nchange [clonecount v] by (-1)\ndelete this clone\n\nwhen I receive [updateobj v]\nif <<not <(costume [number v]) = [19]>> and <<(gameHalf) = [0]> and <(current) = [22]>>> then\n    change [clock v] by (1)\n    if <[60] > (clock)> then\n        if <[45] > (clock)> then\n            set [cutyami: moving v] to [1]\n            create clone of (_myself_ v)\n        end\n        create clone of (_myself_ v)\n    end\n    if <(clock) = [33]> then\n        set [cutyami: jumping v] to [1]\n        set [cutyami: yv v] to [10]\n        start sound [QuietJump v]\n    end\n    if <(clock) = [45]> then\n        set [cutyami: moving v] to [0]\n    end\n    if <(cutYami: moving) = [1]> then\n        change [cutyami: xv v] by (0.3)\n        if <(cutYami: xV) > [4]> then\n            set [cutyami: xv v] to [4]\n        end\n    else\n        if <(cutYami: moving) = [-1]> then\n            change [cutyami: xv v] by (-0.3)\n            if <[-4] > (cutYami: xV)> then\n                set [cutyami: xv v] to [-4]\n            end\n        else\n            change [cutyami: xv v] by (-0.3)\n            if <[0] > (cutYami: xV)> then\n                set [cutyami: xv v] to [0]\n            end\n        end\n    end\n    if <touching (_edge_ v)?> then\n        set size to (1000) %\n        change x by (cutYami: xV)\n        set size to (100) %\n    else\n        change x by (cutYami: xV)\n    end\n    if <(cutYami: jumping) = [1]> then\n        change [cutyami: yv v] by (-0.8)\n        change y by (cutYami: yV)\n        if <touching (ground v)?> then\n            up\n            set [cutyami: yv v] to [0]\n            set [cutyami: jumping v] to [0]\n        end\n    end\n    if <<(cutYami: jumping) = [0]> and <not <(cutYami: moving) = [0]>>> then\n        set [cutyami: animspeed v] to ([abs v] of ((cutYami: xV) / (12)) )\n        if <(animspeed) < [0.2]> then\n            set [cutyami: animspeed v] to [0.2]\n        end\n        change [cutyami: animsprite v] by (cutYami: animspeed)\n        if <[3.99] < (cutYami: animsprite)> then\n            set [cutyami: animsprite v] to [0]\n        end\n        switch costume to (([floor v] of (cutYami: animsprite) ) + (1))\n    else\n        if <(cutYami: yV) > [0.9]> then\n            switch costume to (madup v)\n        else\n            if <(cutYami: yV) < [-0.9]> then\n                switch costume to (maddown v)\n            else\n                if <(clock) < [70]> then\n                    switch costume to (mad v)\n                end\n            end\n        end\n    end\n    if <(clock) = [72]> then\n        switch costume to (charge v)\n    end\n    if <(clock) = [73]> then\n        point in direction (-90)\n    end\n    if <(clock) = [74]> then\n        switch costume to (end5 v)\n    end\n    if <(clock) = [94]> then\n        switch costume to (charge v)\n    end\n    if <(clock) = [95]> then\n        point in direction (90)\n    end\n    if <(clock) = [100]> then\n        start sound [darkness v]\n    end\n    if <<[99] < (clock)> and <(clock) < [116]>> then\n        create clone of (_myself_ v)\n        create clone of (_myself_ v)\n        create clone of (_myself_ v)\n    end\n    if <(clock) = [116]> then\n        broadcast (sceneBbomb v)\n    end\n    if <(clock) = [140]> then\n        switch costume to (end7 v)\n    end\n    if <(clock) = [170]> then\n        switch costume to (end5 v)\n    end\n    if <(clock) = [172]> then\n        switch costume to (end3 v)\n    end\n    if <(clock) = [200]> then\n        switch costume to (end5 v)\n    end\n    if <(clock) = [201]> then\n        switch costume to (end7 v)\n    end\n    if <(clock) = [202]> then\n        switch costume to (mad v)\n    end\n    if <(clock) = [208]> then\n        set [cutyami: moving v] to [1]\n        set [cutyami: jumping v] to [1]\n        set [cutyami: yv v] to [13]\n        start sound [QuietJump v]\n    end\n    if <(clock) = [222]> then\n        set [cutyami: moving v] to [0]\n    end\n    if <(clock) = [228]> then\n        set [cutyami: jumping v] to [0]\n        set [cutyami: yv v] to [0]\n        set y to (35)\n        switch costume to (mad v)\n    end\n    if <(clock) = [238]> then\n        set x to (0)\n        switch costume to (run4 v)\n    end\n    if <(clock) = [239]> then\n        point in direction (-90)\n    end\n    if <(clock) = [240]> then\n        switch costume to (mad v)\n    end\n    if <(clock) = [244]> then\n        start sound [darkness v]\n        switch costume to (charge v)\n    end\n    if <<<[243] < (clock)> and <(clock) < [301]>> or <<[360] < (clock)> and <(clock) < [390]>>> then\n        create clone of (_myself_ v)\n        create clone of (_myself_ v)\n        create clone of (_myself_ v)\n    end\n    if <<[259] < (clock)> and <(clock) < [301]>> then\n        change y by (1)\n        broadcast (sceneBswordPull v)\n    end\n    if <(clock) = [320]> then\n        set [cutyami: jumping v] to [1]\n    end\n    if <<[319] < (clock)> and <(clock) < [337]>> then\n        broadcast (sceneBswordPull v)\n        switch costume to (charge v)\n    end\n    if <(clock) = [355]> then\n        switch costume to (end5 v)\n    end\n    if <(clock) = [360]> then\n        start sound [Powerup v]\n    end\n    if <(clock) = [390]> then\n        start sound [biggerdie v]\n        broadcast (sceneBnight v)\n    end\n    if <<[385] < (clock)> and <(clock) < [460]>> then\n        switch costume to ((costume [number v]) - (1))\n        if <[10] > (costume [number v])> then\n            switch costume to (end4 v)\n        end\n    end\n    if <(clock) = [460]> then\n        switch costume to (end5 v)\n    end\n    if <(clock) = [470]> then\n        set [cutyami: moving v] to [-1]\n    end\n    if <(cutYami: xV) < [0]> then\n        broadcast (sceneBswordPull v)\n        if <not <touching (ground v)?>> then\n            set [cutyami: jumping v] to [1]\n        end\n    end\n    if <(clock) = [513]> then\n        set [cutyami: moving v] to [0]\n    end\n    if <(clock) = [515]> then\n        switch costume to (end4 v)\n        start sound [Powerup2 v]\n    end\n    if <(clock) = [516]> then\n        switch costume to (end2 v)\n    end\n    if <(clock) = [524]> then\n        switch costume to (end8 v)\n    end\n    if <<[523] < (clock)> and <(clock) < [529]>> then\n        next costume\n        broadcast (sceneBswordPull v)\n    end\n    if <(clock) = [540]> then\n        switch costume to (charge v)\n    end\n    if <(clock) = [541]> then\n        point in direction (90)\n    end\n    if <(clock) = [543]> then\n        switch costume to (end6 v)\n    end\n    if <<[542] < (clock)> and <(clock) < [547]>> then\n        switch costume to ((costume [number v]) - (1))\n        broadcast (sceneBswordPull v)\n    end\n    if <(clock) = [557]> then\n        start sound [Randomize7 v]\n    end\n    if <<[557] < (clock)> and <(clock) < [590]>> then\n        change [cutyami: xv v] by (1)\n        set size to (1000) %\n        change x by ((cutYami: xV) / (2))\n        change y by (cutYami: xV)\n        set size to (100) %\n        broadcast (sceneBswordPull v)\n        create clone of (_myself_ v)\n        create clone of (_myself_ v)\n        create clone of (_myself_ v)\n    end\n    if <(clock) = [600]> then\n        broadcast (musicFade v)\n        hide\n    end\nend\n\ndefine up\nrepeat until <not <touching (ground v)?>>\n    change y by (1)\nend\nchange y by (-1)\n\nwhen I receive [sceneb v]\nchange [clonecount v] by (-1)\ndelete this clone\n\nwhen I receive [zboss4yappear v]\nswitch costume to (maddown v)\nset size to (1000) %\ngo to x: (0) y: (188)\nset size to (100) %\nshow\npoint in direction ((90) * ((([x position v] of [hitbox v]) - (x position)) / ([abs v] of (([x position v] of [hitbox v]) - (x position)) )))\nset [cutyami: yv v] to [0]\nset [cutyami: xv v] to [0]\nrepeat (25)\n    change [cutyami: yv v] by (-0.8)\n    set size to (1000) %\n    change y by (cutYami: yV)\n    set size to (100) %\nend\ngo to x: (0) y: (-76)\nswitch costume to (end7 v)\nrepeat (10)\nstart sound [evil2 v]\nswitch costume to (end6 v)\nrepeat (6)\n    switch costume to ((costume [number v]) - (1))\nend\nrepeat (3)\n    switch costume to (end8 v)\n    repeat (1)\n    switch costume to (end2 v)\n    repeat (1)\nend\nrepeat (4)\n    next costume\nend\nswitch costume to (end7 v)\nif <(direction) = [-90]> then\n    repeat (10)\n    switch costume to (charge v)\n    repeat (1)\n    point in direction (90)\n    repeat (1)\n    switch costume to (end7 v)\nend\nrepeat (10)\nstart sound [Randomize7 v]\nset [clock v] to [0]\nrepeat (25)\n    change [clock v] by (1)\n    change [cutyami: xv v] by (1)\n    set size to (1000) %\n    change x by (cutYami: xV)\n    change y by (cutYami: xV)\n    set size to (100) %\n    broadcast (zboss4drag v)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    if <(clock) = [20]> then\n        broadcast (zboss4goalshow v)\n    end\nend\nhide\n\nwhen I receive [titlestart v]\nhide\n\nwhen I receive [sceneayami v]\ngo to x: (-184) y: (36)\npoint in direction (90)\nstart sound [darkness v]\nchange x by (32)\nrepeat (10)\n    change y by (4)\n    change x by ((0) + ((([sin v] of ((y position) * (3)) ) * ([abs v] of ((y position) - (132)) )) / (7)))\n    show\n    create clone of (_myself_ v)\n    hide\nend\nrepeat (1)\n    change y by (4)\n    change x by (-2)\n    show\n    create clone of (_myself_ v)\n    hide\nend\nrepeat (1)\n    change y by (4)\n    change x by (-0.75)\n    show\n    create clone of (_myself_ v)\n    hide\nend\nrepeat (1)\n    change y by (4)\n    change x by (0.75)\n    show\n    create clone of (_myself_ v)\n    hide\nend\nrepeat (1)\n    change y by (4)\n    change x by (2)\n    show\n    create clone of (_myself_ v)\n    hide\nend\nrepeat (7)\n    change y by (4)\n    change x by ((0) - ((([sin v] of ((y position) * (2.4)) ) * ([abs v] of ((y position) - (132)) )) / (4)))\n    show\n    create clone of (_myself_ v)\n    hide\nend\nstart sound [QuietJump v]\nstart sound [Randomize2 v]\nshow\nset [cutyami: yv v] to [8]\nrepeat (35)\n    change [cutyami: yv v] by (-0.8)\n    change x by (5)\n    change y by (cutYami: yV)\n    if <(cutYami: yV) > [0.9]> then\n        switch costume to (idleup v)\n    else\n        if <(cutYami: yV) < [-0.9]> then\n            switch costume to (idledown v)\n        else\n            switch costume to (idle v)\n        end\n    end\n    create clone of (_myself_ v)\nend\nset [cutyami: xv v] to [5]\nset y to (-124)\nswitch costume to (idle v)\nrepeat (20)\n    change [cutyami: xv v] by (-0.25)\n    change x by (cutYami: xV)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\nend\nrepeat (30)\n    change x by (1)\n    change x by (-1)\nend\nswitch costume to (idle2 v)\nrepeat (30)\n    change x by (1)\n    change x by (-1)\nend\nrepeat (1)\n    switch costume to (idle v)\nend\nrepeat (1)\n    point in direction (-90)\nend\nrepeat (1)\n    switch costume to (idle2 v)\nend\nrepeat (20)\n    change x by (1)\n    change x by (-1)\nend\nswitch costume to (end7 v)\nrepeat (20)\n    change x by (1)\n    change x by (-1)\nend\nrepeat (1)\n    switch costume to (mad v)\nend\nrepeat (1)\n    point in direction (90)\nend\nbroadcast (sceneAfollow v)\nrepeat (34)\n    if <(cutYami: xV) < [4]> then\n        change [cutyami: xv v] by (0.5)\n    end\n    set size to (1000) %\n    change x by (cutYami: xV)\n    set size to (100) %\n    create clone of (_myself_ v)\n    set [cutyami: animspeed v] to ([abs v] of ((cutYami: xV) / (12)) )\n    if <(animspeed) < [0.2]> then\n        set [cutyami: animspeed v] to [0.2]\n    end\n    change [cutyami: animsprite v] by (cutYami: animspeed)\n    if <[3.99] < (cutYami: animsprite)> then\n        set [cutyami: animsprite v] to [0]\n    end\n    switch costume to (([floor v] of (cutYami: animsprite) ) + (1))\nend\nhide\nbroadcast (sceneAdarkeye v)\n\nwhen I receive [greenflag v]\nhide\n\n@cutYakō\n\nwhen I receive [sceneb v]\nset rotation style [all around v]\npoint in direction (90)\nset [clock v] to [0]\nset [cutyakō: xv v] to [4]\nset [animsprite v] to [2]\nswitch costume to (cstoneidle v)\nset size to (1000) %\ngo to x: (-256) y: (-108)\nset size to (100) %\nshow\nrepeat (1200)\n    if <not <<(costume [number v]) = [8]> or <(costume [number v]) = [9]>>> then\n        broadcast (updateObj v)\n        change [clock v] by (1)\n        if <<<(clock) > [48]> and <[600] > (clock)>> and <(cutYakō: xV) > [0]>> then\n            change [cutyakō: xv v] by (-0.8)\n            if <[0] > (cutYakō: xV)> then\n                switch costume to (cstone4 v)\n                set [cutyakō: xv v] to [0]\n            end\n        end\n        if <<(clock) > [30]> and <[600] > (clock)>> then\n            if <touching (_edge_ v)?> then\n                set size to (1000) %\n                change x by (cutYakō: xV)\n                set size to (100) %\n            else\n                change x by (cutYakō: xV)\n            end\n        end\n        if <<(cutYakō: xV) > [0]> and <[600] > (clock)>> then\n            set [cutyakō: animspeed v] to ([abs v] of ((cutYakō: xV) / (12)) )\n            if <(animspeed) < [0.2]> then\n                set [cutyakō: animspeed v] to [0.2]\n            end\n            change [cutyakō: animsprite v] by (cutYakō: animspeed)\n            if <[3.99] < (cutYakō: animsprite)> then\n                set [cutyakō: animsprite v] to [0]\n            end\n            switch costume to (([floor v] of (cutYakō: animsprite) ) + (1))\n        else\n            if <<(clock) > [160]> and <[210] > (clock)>> then\n                if <((clock) mod (4)) = [0]> then\n                    if <((clock) mod (8)) = [0]> then\n                        next costume\n                        if <(costume [number v]) > [4]> then\n                            switch costume to (cstone1 v)\n                        end\n                    end\n                    change x by (-1)\n                end\n            end\n        end\n        if <(clock) = [700]> then\n            start sound [Randomize2 v]\n        end\n        if <<(clock) > [580]> and <[725] > (clock)>> then\n            go to x: (0) y: (-32)\n            switch costume to (starticle v)\n            create clone of (_myself_ v)\n        end\n        if <(clock) = [725]> then\n            show\n            set [cutyakō: xv v] to [7]\n            switch costume to (star3 v)\n        end\n        if <<(clock) > [725]> and <[787] > (clock)>> then\n            switch costume to (starticle v)\n            create clone of (_myself_ v)\n            switch costume to (star3 v)\n            change [cutyakō: xv v] by (-0.8)\n            change y by (cutYakō: xV)\n            if <touching (ground v)?> then\n                set [cutyakō: xv v] to (([abs v] of (cutYakō: xV) ) / (1.3))\n            end\n            change x by (-3.05)\n        end\n        if <(clock) = [787]> then\n            broadcast (sceneBwhiteFade v)\n        end\n        if <(clock) = [1050]> then\n            switch costume to (eyes2 v)\n        end\n        if <(clock) = [1052]> then\n            switch costume to (eyes v)\n        end\n        if <<(clock) > [1080]> and <[1087] > (clock)>> then\n            next costume\n        end\n        if <(clock) = [1087]> then\n            hide\n            switch costume to (cstoneo_o v)\n        end\n        if <(clock) > [1000]> then\n            wait (0) seconds\n        end\n    end\nend\nbroadcast (sceneBpressJ v)\n\nwhen I receive [scenebnight v]\nwait (1) seconds\nswitch costume to (cstoneup v)\n\nwhen I receive [scenebsplit v]\nstart sound [bigdie2 v]\nchange x by (-2)\nswitch costume to (cstoneded v)\ncreate clone of (_myself_ v)\nchange x by (5)\nswitch costume to (cstoneded2 v)\ncreate clone of (_myself_ v)\nhide\nswitch costume to (starticle v)\n\nwhen I start as a clone\nset rotation style [all around v]\nshow\nif <(costume [number v]) = [9]> then\n    repeat (20)\n        wait (0) seconds\n    end\n    repeat (8)\n        change x by (1)\n        turn right (11.25) degrees\n    end\nelse\n    if <(costume [number v]) = [12]> then\n        if <<(clock) > [700]> or <((clock) mod (3)) = [0]>> then\n            change x by (pick random (3) to (-3))\n            change y by (pick random (3) to (-3))\n            set size to (pick random (75) to (125)) %\n            repeat (20)\n                change [ghost v] effect by (5)\n            end\n        end\n        delete this clone\n    end\nend\n\nwhen I receive [sceneb v]\ndelete this clone\n\nwhen I receive [scenebo_o v]\nswitch costume to (cstoneo_o v)\n\nwhen I receive [scenebunload v]\nhide\ndelete this clone\n\nwhen I receive [scenebunload v]\nswitch costume to (eyes v)\ngo to x: (0) y: (-100)\nshow\n\nwhen I receive [loadlevel v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [scenec v]\nset [music v] to [0]\nbroadcast (music v)\nswitch backdrop to (full-stars v)\nshow\nset rotation style [left-right v]\ngo to (hitbox v)\npoint towards (boss6-2 v)\npoint in direction ((([abs v] of (direction) ) / (direction)) * (90))\nset [clock v] to [0]\nset [cutyakō: xv v] to [0]\nrepeat until <(clock) > [480]>\n    change [clock v] by (1)\n    if <(clock) < [60]> then\n        switch costume to (cwhiteidle v)\n        if <(clock) = [30]> then\n            switch costume to (cwhiteblink v)\n        end\n    else\n        if <(clock) < [190]> then\n            if <(distance to [cutsword v]) > [65]> then\n                change [cutyakō: xv v] by ((([abs v] of (direction) ) / (direction)) * (0.5))\n                if <([abs v] of (cutYakō: xV) ) > [4]> then\n                    set [cutyakō: xv v] to ((([abs v] of (cutYakō: xV) ) / (cutYakō: xV)) * (4))\n                end\n            else\n                change [cutyakō: xv v] by ((([abs v] of (direction) ) / (direction)) * (-0.8))\n                if <not <(([abs v] of (cutYakō: xV) ) / (cutYakō: xV)) = (([abs v] of (direction) ) / (direction))>> then\n                    set [cutyakō: xv v] to [0]\n                    switch costume to (cwhiteidle v)\n                    if <<(clock) > [160]> and <(clock) < [180]>> then\n                        switch costume to (cwhiteup v)\n                    end\n                    if <(clock) < [150]> then\n                        set [clock v] to [150]\n                    end\n                end\n            end\n            change x by (cutYakō: xV)\n            if <([abs v] of (cutYakō: xV) ) > [0]> then\n                set [cutyakō: animspeed v] to ([abs v] of ((cutYakō: xV) / (12)) )\n                if <(animspeed) < [0.2]> then\n                    set [cutyakō: animspeed v] to [0.2]\n                end\n                change [cutyakō: animsprite v] by (cutYakō: animspeed)\n                if <[3.99] < (cutYakō: animsprite)> then\n                    set [cutyakō: animsprite v] to [0]\n                end\n                switch costume to (([floor v] of (cutYakō: animsprite) ) + (21))\n            end\n        else\n            if <(clock) < [204]> then\n                if <(clock) = [190]> then\n                    set [cutyakō: xv v] to [11.1]\n                    start sound [Jump2 v]\n                    set [yv v] to ((([x position v] of [cutsword v]) - (x position)) / (14))\n                end\n                change [cutyakō: xv v] by (-0.8)\n                change x by (yV)\n                change y by (cutYakō: xV)\n                if <(cutYakō: xV) > [0.9]> then\n                    switch costume to (cwhiteup v)\n                else\n                    switch costume to (cwhiteidle v)\n                end\n            else\n                if <(clock) < [207]> then\n                    if <(clock) = [204]> then\n                        go to (cutsword v)\n                        change y by (11)\n                        switch costume to (cwhite3 v)\n                    end\n                    if <(clock) = [205]> then\n                        point in direction ((([abs v] of (direction) ) / (direction)) * (-1))\n                    end\n                    if <(clock) = [206]> then\n                        switch costume to (cwhiteidle v)\n                    end\n                else\n                    if <(clock) < [220]> then\n                end\n            end\n        end\n    end\n    broadcast (updateObj v)\nend\nbroadcast (sceneCtransition v)\n\nwhen I receive [scenecpedistal v]\nswitch costume to (cwhitedown v)\nset size to (1000) %\ngo to x: (0) y: (600)\npoint in direction (-90)\nset size to (100) %\nwait (1.5) seconds\nshow\nrepeat (8)\n    set size to (1000) %\n    change y by (-24)\n    set size to (100) %\n    broadcast (sceneCswordPull v)\nend\nset size to (1000) %\nchange y by (-18)\nset size to (100) %\nbroadcast (sceneCswordPull v)\nstart sound [bigdie2 v]\nstart sound [Jump2 v]\nset [cutyakō: xv v] to [6]\nrepeat (23)\n    change x by (-2.5)\n    change [cutyakō: xv v] by (-0.8)\n    change y by (cutYakō: xV)\n    if <(cutYakō: xV) > [0.9]> then\n        switch costume to (cwhiteup v)\n    else\n        if <(cutYakō: xV) < [-0.9]> then\n            switch costume to (cwhitedown v)\n        else\n            switch costume to (cwhiteidle v)\n        end\n    end\nend\nset y to (-60)\nswitch costume to (cwhite3 v)\nstart sound [quietding2 v]\nset [cutyakō: xv v] to [-2.5]\nrepeat (6)\n    change [cutyakō: xv v] by (0.5)\n    change x by (cutYakō: xV)\n    point in direction ((([abs v] of ((cutYakō: xV) + (2.5)) ) / ((cutYakō: xV) + (2.5))) * (90))\nend\nswitch costume to (cwhiteidle v)\nwait (0.5) seconds\nswitch costume to (cwhiteup v)\nwait (3) seconds\nswitch costume to (cwhiteidle v)\nwait (3) seconds\nset [cutyakō: xv v] to [0]\nset [cutyakō: animspeed v] to [0]\nset [cutyakō: animsprite v] to [0]\npoint in direction (-90)\nrepeat until <[-4] > (cutYakō: xV)>\n    change [cutyakō: xv v] by (-0.5)\n    change x by (cutYakō: xV)\n    if <([abs v] of (cutYakō: xV) ) > [0]> then\n        set [cutyakō: animspeed v] to ([abs v] of ((cutYakō: xV) / (12)) )\n        if <(animspeed) < [0.2]> then\n            set [cutyakō: animspeed v] to [0.2]\n        end\n        change [cutyakō: animsprite v] by (cutYakō: animspeed)\n        if <[3.99] < (cutYakō: animsprite)> then\n            set [cutyakō: animsprite v] to [0]\n        end\n        switch costume to (([floor v] of (cutYakō: animsprite) ) + (21))\n    end\nend\nset [cutyakō: xv v] to [0]\nset [cutyakō: animspeed v] to ((1) / (3))\nrepeat (40)\n    set size to (1000) %\n    change x by (-4)\n    set size to (100) %\n    if <touching (ground v)?> then\n    if <([abs v] of (cutYakō: xV) ) > [0]> then\n        if <[-0.9] > (cutYakō: xV)> then\n            switch costume to (cwhitedown v)\n        else\n            switch costume to (cwhiteidle v)\n        end\n    else\n        change [cutyakō: animsprite v] by (cutYakō: animspeed)\n        if <[3.99] < (cutYakō: animsprite)> then\n            set [cutyakō: animsprite v] to [0]\n        end\n        switch costume to (([floor v] of (cutYakō: animsprite) ) + (21))\n    end\nend\nhide\nwait (3) seconds\nbroadcast (sceneCcredTransition v)\n\nwhen I receive [titlestart v]\nhide\n\nwhen I receive [scenea v]\nswitch backdrop to (hills-water v)\nswitch costume to (cstoneblink v)\ngo to x: (-88) y: (-108)\npoint in direction (90)\nshow\n\nwhen I receive [sceneaspike v]\nrepeat (38)\n    change x by (1)\n    change x by (-1)\nend\nswitch costume to (cstoneo_o v)\nrepeat (3)\n    change x by (1)\n    change x by (-1)\nend\nswitch costume to (cstoneblink v)\nrepeat (10)\n    change x by (-1)\n    change x by (1)\nend\nswitch costume to (cstoneidle v)\nrepeat (25)\n    change x by (-1)\n    change x by (1)\nend\nswitch costume to (cstoneblink v)\nrepeat (15)\n    change x by (-1)\n    change x by (1)\nend\nswitch costume to (cstoneidle v)\nrepeat (69)\n    change x by (-1)\n    change x by (1)\nend\nswitch costume to (cstoneblink v)\nrepeat (2)\n    change x by (-1)\n    change x by (1)\nend\nswitch costume to (cstoneidle v)\nrepeat (81)\n    change x by (-1)\n    change x by (1)\nend\nswitch costume to (cstoneblink v)\nrepeat (2)\n    change x by (-1)\n    change x by (1)\nend\nswitch costume to (cstoneidle v)\nrepeat (49)\n    change x by (-1)\n    change x by (1)\nend\nswitch costume to (cstoneblink v)\nrepeat (2)\n    change x by (-1)\n    change x by (1)\nend\nswitch costume to (cstoneidle v)\n\nwhen I receive [sceneafollow v]\nrepeat (5)\n    change x by (-1)\n    change x by (1)\nend\ngo to x: (-88) y: (-108)\nset [cutyakō: xv v] to [0]\nrepeat (40)\n    if <(cutYakō: xV) < [4]> then\n        change [cutyakō: xv v] by (0.5)\n    end\n    change x by (cutYakō: xV)\n    if <([abs v] of (cutYakō: xV) ) > [0]> then\n        set [cutyakō: animspeed v] to ([abs v] of ((cutYakō: xV) / (12)) )\n        if <(animspeed) < [0.2]> then\n            set [cutyakō: animspeed v] to [0.2]\n        end\n        change [cutyakō: animsprite v] by (cutYakō: animspeed)\n        if <[3.99] < (cutYakō: animsprite)> then\n            set [cutyakō: animsprite v] to [0]\n        end\n        switch costume to (([floor v] of (cutYakō: animsprite) ) + (1))\n    end\nend\nset [cutyakō: xv v] to [0]\nswitch costume to (cstonedown v)\nrepeat (6)\n    change [cutyakō: xv v] by (-0.8)\n    change y by (cutYakō: xV)\n    change x by (4)\nend\nstart sound [smalljump v]\nset y to (-124)\nset [cutyakō: xv v] to [4]\nset [cutyakō: animspeed v] to ((1) / (3))\nrepeat (35)\n    change x by (4)\n    change [cutyakō: animsprite v] by (cutYakō: animspeed)\n    if <[3.99] < (cutYakō: animsprite)> then\n        set [cutyakō: animsprite v] to [0]\n    end\n    switch costume to (([floor v] of (cutYakō: animsprite) ) + (1))\nend\nstart sound [Paralyze v]\nbroadcast (sceneAcollect v)\nrepeat (4)\n    if <(cutYakō: xV) > [0]> then\n        change [cutyakō: xv v] by (-0.8)\n    end\n    change x by (cutYakō: xV)\n    if <([abs v] of (cutYakō: xV) ) > [0]> then\n        set [cutyakō: animspeed v] to ([abs v] of ((cutYakō: xV) / (12)) )\n        if <(animspeed) < [0.2]> then\n            set [cutyakō: animspeed v] to [0.2]\n        end\n        change [cutyakō: animsprite v] by (cutYakō: animspeed)\n        if <[3.99] < (cutYakō: animsprite)> then\n            set [cutyakō: animsprite v] to [0]\n        end\n        switch costume to (([floor v] of (cutYakō: animsprite) ) + (1))\n    end\nend\nswitch costume to (cstoneidle v)\n\nwhen I receive [greenflag v]\nhide\n\n@lightPanel\n\nwhen I receive [updateobj v]\nif <(isClone) > [0]> then\n    switch costume to ([floor v] of (color) )\n    if <([costume # v] of [foreground v]) = [26]> then\n        change y by ((([abs v] of (clock) ) / (clock)) * (2))\n        change [clock v] by (((0) - (([abs v] of (clock) ) / (clock))) * (2))\n        if <(clock) = [0]> then\n            if <(y position) > [0]> then\n                set [clock v] to [-176]\n            else\n                set [clock v] to [176]\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nchange [clonecount v] by (1)\nif <(current) = [26]> then\n    set [clock v] to [-176]\nend\n\nwhen I receive [loadlevel v]\nchange [clonecount v] by (-1)\ndelete this clone\n\nwhen I receive [loadlevel v]\nwait (0) seconds\nchange [clonecount v] by (1)\nset [isclone v] to [0]\ncreate\nset [isclone v] to [0]\n\ndefine create\nshow\nset [i v] to [0]\nset [n v] to []\nrepeat until <(i) > (length of (item (current) of [panels v]))>\n    change [i v] by (1)\n    if <(letter (i) of (item (current) of [panels v])) = [;]> then\n        goto (n)\n        set [n v] to []\n        change [i v] by (2)\n        point in direction (((90) * (letter ((i) - (1)) of (item (current) of [panels v]))) + (90))\n        change [i v] by (2)\n        repeat (letter ((i) - (1)) of (item (current) of [panels v]))\n            change [isclone v] by (1)\n            create clone of (_myself_ v)\n            change y by (16)\n        end\n    else\n        set [n v] to (join (n) (letter (i) of (item (current) of [panels v])))\n    end\nend\nset [ghost v] effect to (0)\nhide\nswitch costume to (x v)\n\ndefine goto (tile)\ngo to x: (((((tile) - (1)) mod (30)) * (16)) - (232)) y: ((-172) + (([floor v] of (((tile) - (1)) / (30)) ) * (16)))\n\n@jumpLight\n\ndefine goto (tile)\ngo to x: (((((tile) - (1)) mod (30)) * (16)) - (232)) y: ((-172) + (([floor v] of (((tile) - (1)) / (30)) ) * (16)))\n\nwhen I receive [loadlevel v]\nwait (0) seconds\nchange [clonecount v] by (1)\nset [isclone v] to [0]\nset size to (100) %\ncreate\n\nwhen I receive [loadlevel v]\nchange [clonecount v] by (-1)\nif <(current) = [42]> then\n    repeat (30)\n        delete this clone\n    end\nend\ndelete this clone\n\nwhen I receive [updateobj v]\nif <(isClone) > [0]> then\n    switch costume to ([floor v] of (color) )\n    if <<touching (hitbox v)?> and <<(isClone) = [1]> and <(jumpLights) < [7]>>> then\n        set [isclone v] to [2]\n        change [jumplights v] by (1)\n        start sound ((item (((([floor v] of (music) ) * (7)) - (7)) + (jumpLights)) of [lightskey v]) + (2))\n    end\n    if <<(isClone) > [1]> and <[7] > (isClone)>> then\n        change size by (20)\n        change [ghost v] effect by (20)\n        change [isclone v] by (1)\n    end\n    if <(isClone) = [7]> then\n        hide\n        set [ghost v] effect to (50)\n        if <(current) = [42]> then\n            change [clonecount v] by (-1)\n            delete this clone\n        end\n        if <(yCol) > [-1]> then\n            change [isclone v] by (1)\n            set size to (50) %\n            show\n        end\n    end\n    if <<(isClone) > [7]> and <[18] > (isClone)>> then\n        if <[13] > (isClone)> then\n            change size by (20)\n        else\n            change size by (-10)\n        end\n        change [ghost v] effect by (-5)\n        change [isclone v] by (1)\n        if <(isClone) = [18]> then\n            set [isclone v] to [1]\n        end\n    end\nend\n\ndefine create\nshow\nset [i v] to [0]\nset [n v] to []\nrepeat until <(i) > (length of (item (current) of [jumplights v]))>\n    change [i v] by (1)\n    if <(letter (i) of (item (current) of [jumplights v])) = [;]> then\n        goto (n)\n        set [n v] to []\n        create clone of (_myself_ v)\n    else\n        set [n v] to (join (n) (letter (i) of (item (current) of [jumplights v])))\n    end\nend\nhide\nswitch costume to (costume2 v)\n\nwhen I start as a clone\nchange [clonecount v] by (1)\nset [isclone v] to [1]\nset size to (100) %\nif <(current) = [42]> then\n    show\n    go to (boss6-2 v)\n    change y by (-80)\n    set [n v] to [20]\n    repeat (17)\n        change [n v] by (-1.6)\n        change y by (n)\n    end\nend\n\nwhen I receive [zboss6swordreturn v]\nif <(isClone) > [0]> then\n    set [isclone v] to [2]\nend\n\n@lightsUI\n\nwhen I start as a clone\nchange [clonecount v] by (1)\nset [isclone v] to [1]\n\nwhen I receive [loadlevel v]\nchange [clonecount v] by (-1)\ndelete this clone\n\nwhen I receive [loadlevel v]\nwait (0) seconds\nchange [clonecount v] by (1)\nset [isclone v] to [0]\nif <not <(item (current) of [jumplights v]) = []>> then\n    show\n    create clone of (_myself_ v)\nelse\n    hide\nend\n\nwhen I receive [updateobj v]\nif <<not <(item (current) of [jumplights v]) = []>> and <([costume # v] of [foreground v]) = (current)>> then\n    set size to (200) %\n    if <(visualLightsUI) = [1]> then\n        go to x: (-170) y: (-166)\n    else\n        if <(visualLightsUI) = [2]> then\n            go to x: (207) y: (-166)\n        else\n            go to (hitbox v)\n            change y by (16)\n            change x by (-20)\n            set size to (100) %\n        end\n    end\n    if <<<(isClone) = [0]> or <[1] > (jumpLights)>> and <(visualLightsUI) = [3]>> then\n        hide\n    else\n        show\n    end\n    if <(isClone) = [1]> then\n        change x by (20)\n        switch costume to ((jumpLights) + (9))\n        if <<touching (spritebody v)?> and <(visualLightsUI) < [3]>> then\n            if <(ghost) > [-5]> then\n                change [ghost v] by (-1)\n                change [ghost v] effect by (10)\n            end\n        else\n            if <(ghost) < [0]> then\n                change [ghost v] by (1)\n                change [ghost v] effect by (-10)\n            else\n                clear graphic effects\n            end\n        end\n        go to [front v] layer\n        go [backward v] (2) layers\n    else\n        switch costume to ([floor v] of (color) )\n    end\nend\n\nset [visuallightsui v] to [2]\n\nset [visuallightsui v] to [3]\n\nset [visuallightsui v] to [1]\n\nwhen I receive [titlestart v]\nhide\n\nwhen I receive [greenflag v]\nhide\n\n@medallionFragment\n\nwhen I receive [loadlevel v]\nchange [clonecount v] by (-1)\ndelete this clone\n\nwhen I receive [loadlevel v]\nreplace item (1) of [medallionfragments v] with [0]\nswitch costume to (spin v)\nwait (0) seconds\nset [isclone v] to [0]\nchange [clonecount v] by (1)\nif <<(item # of (current) in [medallionfragments v]) > [0]> and <((item # of (current) in [medallionfragments v]) mod (2)) = [0]>> then\n    replace item (1) of [medallionfragments v] with (item ((item # of (current) in [medallionfragments v]) + (1)) of [medallionfragments v])\n    create\nend\n\nwhen I start as a clone\nshow\nchange [clonecount v] by (1)\nif <<(isClone) > [0]> and <[9] > (isClone)>> then\n    forever\n        change [isclone v] by (0.4)\n        if <(isClone) > [8.75]> then\n            set [isclone v] to [1]\n        end\n        switch costume to (isClone)\n        if <touching (hitbox v)?> then\n            replace item (1) of [medallionfragments v] with ((item (1) of [medallionfragments v]) - (1))\n            if <(item (1) of [medallionfragments v]) = [0]> then\n                set [pitch v] effect to (0)\n                start sound [Randomize2 v]\n                hide\n                repeat (24)\n                    go to (goal v)\n                    change x by (pick random (5) to (-5))\n                    change y by (pick random (5) to (-5))\n                    switch costume to (sparkle4 v)\n                    set [isclone v] to [9]\n                    create clone of (_myself_ v)\n                    set [isclone v] to [1]\n                end\n                broadcast (goalShow v)\n            else\n                set [pitch v] effect to ((((0) - (item (1) of [medallionfragments v])) + (5)) * (15))\n                start sound [Pickup_Coin2 v]\n            end\n            change [clonecount v] by (-1)\n            delete this clone\n        end\n    end\nend\n\ndefine goto (tile)\ngo to x: (((((tile) - (1)) mod (30)) * (16)) - (232)) y: ((-172) + (([floor v] of (((tile) - (1)) / (30)) ) * (16)))\n\nreplace item (1) of [medallionfragments v] with ((item (1) of [medallionfragments v]) - (3))\n\nwhen I receive [updateobj v]\nif <(isClone) > [8]> then\n    switch costume to ([floor v] of (isClone) )\n    change [isclone v] by (0.25)\n    if <(isClone) > [12.5]> then\n        change [clonecount v] by (-1)\n        delete this clone\n    end\nend\n\ndefine create\nset [isclone v] to [1]\nif <(current) = [26]> then\n    goto [572]\n    create clone of (_myself_ v)\n    goto [599]\n    create clone of (_myself_ v)\n    goto [183]\n    create clone of (_myself_ v)\n    goto [209]\n    create clone of (_myself_ v)\nend\nif <(current) = [33]> then\n    goto [359]\n    create clone of (_myself_ v)\n    goto [480]\n    create clone of (_myself_ v)\n    goto [610]\n    create clone of (_myself_ v)\nend\nif <(current) = [39]> then\n    goto [307]\n    create clone of (_myself_ v)\n    goto [260]\n    create clone of (_myself_ v)\n    goto [650]\n    create clone of (_myself_ v)\n    goto [572]\n    create clone of (_myself_ v)\nend\nif <(current) = [40]> then\n    goto [36]\n    create clone of (_myself_ v)\n    goto [484]\n    create clone of (_myself_ v)\n    goto [328]\n    create clone of (_myself_ v)\n    goto [431]\n    create clone of (_myself_ v)\nend\nset [isclone v] to [0]\n\n@boss4\n\nwhen I receive [loadlevel v]\nwait (0) seconds\nstop [other scripts in sprite v]\nchange [clonecount v] by (1)\npoint in direction (90)\nswitch costume to (swordp v)\nclear graphic effects\nset size to (1000) %\ngo to x: (0) y: (280)\nset size to (100) %\nif <(current) = [28]> then\n    set [boss4: hits v] to [3]\n    set [clock v] to [0]\n    show\n    repeat (10)\n        wait (0) seconds\n    end\n    set [music v] to [10.5]\n    broadcast (music v)\n    repeat (20)\n        wait (0) seconds\n    end\n    repeat (32)\n        set size to (1000) %\n        change y by (-9)\n        set size to (100) %\n        switch costume to (swordw v)\n        create clone of (_myself_ v)\n        switch costume to (swordp v)\n    end\n    set [clock v] to [1]\nelse\n    hide\nend\n\nwhen I start as a clone\nchange [clonecount v] by (1)\ngo [backward v] (1) layers\nclear graphic effects\nshow\nif <(costume [number v]) = [2]> then\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    change [clonecount v] by (-1)\n    delete this clone\nelse\n    if <(costume [number v]) = [3]> then\n        set [clock v] to [0]\n        repeat (55)\n            change [ghost v] effect by (1.1)\n            change [clock v] by (1.5)\n            change size by (clock)\n        end\n        repeat (5)\n            set [clock v] to ((clock) / (2))\n            change size by (clock)\n        end\n        broadcast (zboss4Speen v)\n        repeat (33)\n            change [ghost v] effect by (1.5)\n        end\n        change [clonecount v] by (-1)\n        delete this clone\n    else\n        if <(costume [number v]) = [6]> then\n            point in direction (90)\n            set size to (100) %\n            if <(x position) > [0]> then\n                go to x: (144) y: (64)\n            else\n                go to x: (-144) y: (64)\n            end\n            set [ghost v] effect to (100)\n            repeat (55)\n                change [ghost v] effect by (-1.1)\n            end\n            repeat (10)\n            repeat (10)\n                change [ghost v] effect by (5)\n            end\n            change [clonecount v] by (-1)\n            delete this clone\n        else\n            if <(costume [number v]) = [8]> then\n                repeat (4)\n                    set size to (100) %\n                    hide\n                    if <(x position) > [0]> then\n                        point in direction (-90)\n                        go to x: (224) y: (64)\n                    else\n                        point in direction (90)\n                        go to x: (-224) y: (64)\n                    end\n                    repeat (2)\n                        repeat (3)\n                            switch costume to (stabaoe v)\n                            create clone of (_myself_ v)\n                            switch costume to (stabaoespawner v)\n                            move (64) steps\n                            repeat (1)\n                        end\n                        move (96) steps\n                    end\n                    repeat (15)\n                end\n                change [clonecount v] by (-1)\n                delete this clone\n            else\n                start sound [Powerup v]\n                set [ghost v] effect to (100)\n                repeat (11)\n                    change [ghost v] effect by (94.3333333333333333)\n                end\n                repeat (22)\n                    change [ghost v] effect by (-4.666666666666667)\n                end\n                set [boss4: slicex v] to (x position)\n                broadcast (zboss4stab v)\n                repeat (10)\n                    change [ghost v] effect by (10)\n                end\n                change [clonecount v] by (-1)\n                delete this clone\n            end\n        end\n    end\nend\n\ndefine spinClones (deg) (rots) (siz)\nrepeat (rots)\n    set size to (1000) %\n    turn right ((deg) / (rots)) degrees\n    set size to (siz) %\n    switch costume to (swordw v)\n    create clone of (_myself_ v)\n    switch costume to (swordp v)\n    if <<touching (hitbox v)?> and <<(hitInvul) = [0]> and <(died) = [0]>>> then\n        set [hitinvul v] to [30]\n        set [hitamount v] to [1]\n        broadcast (hurtme v)\n    end\nend\n\nwhen I receive [zboss4speen v]\nif <(current) = [49]> then\n    broadcast (sceneDfade v)\n    if <(costume [number v]) = [1]> then\n        repeat (2)\n            change size by (50)\n        end\n        start sound [Randomize4 v]\n        if <(x position) > ([x position v] of [hitbox v])> then\n            repeat (16)\n                spinClones [-22.5] [4] [200]\n            end\n        else\n            repeat (16)\n                spinClones [22.5] [4] [200]\n            end\n        end\n        repeat (10)\n        repeat (10)\n            change size by (-10)\n        end\n        repeat (10)\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\nelse\n    if <(costume [number v]) = [1]> then\n        repeat (2)\n            change size by (50)\n        end\n        start sound [Randomize2 v]\n        if <(x position) > ([x position v] of [hitbox v])> then\n            repeat (8)\n                spinClones [-45] [4] [200]\n            end\n        else\n            repeat (8)\n                spinClones [45] [4] [200]\n            end\n        end\n        repeat (10)\n        repeat (10)\n            change size by (-10)\n        end\n        repeat (10)\n        change [clock v] by (1)\n    end\nend\n\nwhen I receive [loadlevel v]\nchange [clonecount v] by (-1)\nrepeat (10)\n    delete this clone\nend\n\nwhen I receive [updateobj v]\nif <<(costume [number v]) = [1]> or <(costume [number v]) = [4]>> then\n    if <(clock) = (item (boss4: hits) of [vulnerables v])> then\n        show\n        change [clock v] by (1)\n        broadcast (zboss4Vuln v)\n    else\n        if <(clock) = [1]> then\n            switch costume to (swordp v)\n            start sound [Powerup2 v]\n            switch costume to (spinaoe v)\n            create clone of (_myself_ v)\n            switch costume to (swordp v)\n            change [clock v] by (1)\n        end\n        if <(clock) = [3]> then\n            switch costume to (swordp v)\n            change [clock v] by (1)\n            broadcast (zboss4Slice v)\n        end\n        if <(clock) = [5]> then\n            switch costume to (stabaoespawner v)\n            create clone of (_myself_ v)\n            switch costume to (swordp v)\n            change [clock v] by (1)\n            hide\n        end\n    end\nend\n\ndefine moveClones (xdir) (ydir) (amnt) (size)\nrepeat (amnt)\n    switch costume to (swordw v)\n    create clone of (_myself_ v)\n    switch costume to (swordp v)\n    set size to (1000) %\n    change x by ((xdir) / (amnt))\n    change y by ((ydir) / (amnt))\n    set size to (size) %\n    if <<touching (hitbox v)?> and <<(hitInvul) = [0]> and <(died) = [0]>>> then\n        set [hitinvul v] to [30]\n        set [hitamount v] to [1]\n        broadcast (hurtme v)\n    end\nend\n\nwhen I receive [zboss4vuln v]\nrepeat ((((boss4: hits) - (1)) * (20)) + (40))\n    switch costume to (swordg v)\n    if <<touching (hitbox v)?> and <(yV) < [-1.6]>> then\n        change [boss4: hits v] by (-1)\n        if <(boss4: hits) = [0]> then\n            start sound [ouch v]\n            set [yv v] to [8]\n            repeat (4)\n                change y by (-12)\n            end\n            set [music v] to [0]\n            stop all sounds\n            wait (0) seconds\n            start sound [bigdie2 v]\n            start sound [Randomize14 v]\n            set [clock v] to [0]\n            repeat (32)\n                switch costume to (swordr v)\n                wait (0) seconds\n                switch costume to (swordp v)\n                wait (0) seconds\n                turn left (0.2) degrees\n                change y by (-1)\n            end\n            turn right (.4) degrees\n            repeat (10)\n            broadcast (zboss4Yappear v)\n            stop [this script v]\n        else\n            start sound [ouch v]\n            set [yv v] to [8]\n            repeat (4)\n                change y by (-12.5)\n            end\n            start sound [rumble2 v]\n            repeat (12)\n                switch costume to (swordr v)\n                wait (0) seconds\n                switch costume to (swordp v)\n                wait (0) seconds\n            end\n            repeat (10)\n                change y by (5)\n            end\n            set [clock v] to [1]\n            stop [this script v]\n        end\n    end\nend\nset [clock v] to [1]\n\nwhen I receive [zboss4slice v]\ngo to x: (0) y: (-8)\nrepeat (9)\n    switch costume to (swordw v)\n    create clone of (_myself_ v)\n    switch costume to (swordp v)\n    set size to (1000) %\n    change y by (32)\n    set size to (100) %\nend\nrepeat (2)\n    set size to (1000) %\n    if <(x position) = [0]> then\n        if <([x position v] of [hitbox v]) > [0]> then\n            go to x: (42) y: (280)\n            point in direction (0)\n        else\n            go to x: (-42) y: (280)\n            point in direction (180)\n        end\n    else\n        if <(x position) > [0]> then\n            go to x: (-42) y: (280)\n            point in direction (180)\n        else\n            go to x: (42) y: (280)\n            point in direction (0)\n        end\n    end\n    set size to (200) %\n    switch costume to (sliceaoe v)\n    create clone of (_myself_ v)\n    switch costume to (swordp v)\n    start sound [Powerup2 v]\n    repeat (65)\n    start sound [Randomize3 v]\n    repeat (2)\n        moveClones [0] [-148] [4] (size)\n    end\n    repeat (2)\n    start sound [Randomize3 v]\n    repeat (2)\n        moveClones [0] [148] [4] (size)\n    end\n    repeat (6)\nend\nrepeat (6)\nif <(x position) > [0]> then\n    go to x: (-42) y: (280)\n    point in direction (180)\nelse\n    go to x: (42) y: (280)\n    point in direction (0)\nend\nif <((clock) + (1)) = (item (boss4: hits) of [vulnerables v])> then\n    point in direction (90)\n    set size to (1000) %\n    go to x: (0) y: (280)\n    set size to (100) %\n    repeat (18)\n        set size to (1000) %\n        change y by (-16)\n        set size to (100) %\n    end\nend\nchange [clock v] by (1)\n\nwhen I receive [zboss4stab v]\nif <(costume [number v]) = [1]> then\n    start sound [Randomize3 v]\n    point in direction (90)\n    set size to (1000) %\n    go to x: (boss4: sliceX) y: (280)\n    set size to (100) %\n    show\n    moveClones [0] [-272] [8] (size)\n    hide\n    change [clock v] by (1)\n    repeat (30)\n    show\n    point in direction (90)\n    set size to (1000) %\n    go to x: (0) y: (280)\n    set size to (100) %\n    repeat (18)\n        set size to (1000) %\n        change y by (-16)\n        set size to (100) %\n    end\n    change [clock v] by (1)\nend\n\nwhen I receive [zboss4drag v]\ngo to (cutyami v)\nset size to (1000) %\nturn right (90) degrees\nmove (11) steps\nturn left (90) degrees\nset size to (100) %\nif <[131] > (direction)> then\n    turn right (6) degrees\nelse\n    point in direction (135)\nend\nrepeat (1)\nhide\n\nwhen I receive [titlestart v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [scened v]\ngo to [front v] layer\ngo [backward v] (20) layers\nset size to (1000) %\ngo to x: (0) y: (256)\nset size to (100) %\nhide\nwait (2) seconds\nshow\nrepeat (20)\n    point in direction (90)\n    switch costume to (swordw v)\n    create clone of (_myself_ v)\n    switch costume to (swordp v)\n    turn right (90) degrees\n    set size to (1000) %\n    move (11) steps\n    set size to (100) %\n    turn left (90) degrees\nend\nstart sound [Powerup3 v]\nswitch costume to (spinaoe v)\ncreate clone of (_myself_ v)\nswitch costume to (swordp v)\n\nwhen I receive [returntomonke v]\nhide\n\nwhen I receive [greenflag v]\nstop [other scripts in sprite v]\nhide\n\n@castleGate\n\nwhen I receive [loadlevel v]\nhide\nif <(current) = [35]> then\n    go to [back v] layer\n    switch costume to (brick v)\n    show\n    go to x: (224) y: (-36)\n    stamp\n    switch costume to (castlegate v)\nend\n\nwhen I receive [zboss5gate v]\ngo to x: (224) y: (-36)\nchange x by (1)\nset rotation style [don't rotate v]\nrepeat (32)\n    repeat (1)\n        turn right (180) degrees\n        change y by (1)\n        move (1) steps\n    end\n    turn right (180) degrees\n    change y by (1)\n    move (1) steps\n    start sound [gate1 v]\nend\nstart sound [gate2 v]\nrepeat (15)\nbroadcast (zboss5goalshow v)\n\nwhen I receive [titlestart v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [greenflag v]\nstop [other scripts in sprite v]\nhide\n\n@boss5\n\nwhen I receive [loadlevel v]\nwait (0) seconds\nswitch costume to (particle v)\nstop [other scripts in sprite v]\nchange [clonecount v] by (1)\nif <(current) = [35]> then\n    set [boss5: hits v] to [0]\n    set [boss5: stunned v] to [0]\n    set size to (1000) %\n    go to x: (184) y: (188)\n    point in direction (-90)\n    switch costume to (idle v)\n    set size to (100) %\n    clear graphic effects\n    show\n    repeat (10)\n        wait (0) seconds\n    end\n    set [music v] to [10.5]\n    broadcast (music v)\n    repeat (10)\n        wait (0) seconds\n    end\n    set [boss5: yv v] to [0]\n    repeat (24)\n        change [boss5: yv v] by (-0.8)\n        change y by ((boss5: yV) - (0.0416666666666667))\n    end\n    repeat (6)\n    start sound [evil2 v]\n    switch costume to (end5 v)\n    repeat (5)\n        switch costume to ((costume [number v]) - (1))\n    end\n    repeat (5)\n        next costume\n    end\n    repeat (15)\n        switch costume to (mad v)\n    end\n    set [clock v] to [0]\n    set [boss5: xv v] to [0]\n    set [charge v] to [0]\n    set [boss5: hits v] to [3]\nelse\n    hide\nend\n\nwhen I receive [loadlevel v]\nchange [clonecount v] by (-1)\ndelete this clone\n\nwhen I start as a clone\nchange [clonecount v] by (1)\nswitch costume to (particle v)\nchange x by (pick random (4) to (-4))\nchange y by (pick random (4) to (-4))\nset size to (((size) / (100)) * (pick random (75) to (125))) %\nrepeat (5)\n    change size by (15)\nend\nrepeat (5)\n    change size by (-15)\nend\nchange [clonecount v] by (-1)\ndelete this clone\n\nwhen I receive [updateobj v]\nif <not <(costume [number v]) = [17]>> then\n    if <(boss5: hits) > [0]> then\n        if <(boss5: stunned) = [0]> then\n            if <(clock) < [0]> then\n                switch costume to (end5 v)\n                change [clock v] by (1)\n            else\n                point in direction ((90) * ((([x position v] of [hitbox v]) - (x position)) / ([abs v] of (([x position v] of [hitbox v]) - (x position)) )))\n                if <(charge) = [0]> then\n                    change [clock v] by (1)\n                    if <([abs v] of (boss5: xV) ) > [0.01]> then\n                        if <((clock) mod (39)) = [0]> then\n                            broadcast (zbossBullet v)\n                        end\n                    else\n                        if <((clock) mod (4)) = [0]> then\n                            broadcast (zbossBullet v)\n                        end\n                    end\n                    if <(clock) > (([abs v] of ((boss5: hits) - (4)) ) * (100))> then\n                        set [charge v] to [1]\n                        broadcast (zboss5charge v)\n                    end\n                end\n                if <(x position) > ([x position v] of [hitbox v])> then\n                    if <([x position v] of [hitbox v]) > ((x position) - (168))> then\n                        set [boss5: moving v] to [1]\n                    else\n                        if <([x position v] of [hitbox v]) < ((x position) - (184))> then\n                            set [boss5: moving v] to [-1]\n                        else\n                            set [boss5: moving v] to [0]\n                        end\n                    end\n                else\n                    if <([x position v] of [hitbox v]) < ((x position) + (168))> then\n                        set [boss5: moving v] to [-1]\n                    else\n                        if <([x position v] of [hitbox v]) > ((x position) + (184))> then\n                            set [boss5: moving v] to [1]\n                        else\n                            set [boss5: moving v] to [0]\n                        end\n                    end\n                end\n                if <not <(boss5: moving) = [0]>> then\n                    if <(boss5: moving) = ((([x position v] of [hitbox v]) - (x position)) / ([abs v] of (([x position v] of [hitbox v]) - (x position)) ))> then\n                        change [boss5: xv v] by ((boss5: moving) / (3))\n                    else\n                        change [boss5: xv v] by ((boss5: moving) / (2))\n                    end\n                    if <([abs v] of (boss5: xV) ) > [6]> then\n                        set [boss5: xv v] to ((([abs v] of (boss5: xV) ) / (boss5: xV)) * (6))\n                    end\n                else\n                    set [boss5: xv v] to ((([abs v] of (boss5: xV) ) * (([abs v] of (boss5: xV) ) / (boss5: xV))) * (0.8))\n                end\n                if <([abs v] of (boss5: xV) ) > [4]> then\n                    create clone of (_myself_ v)\n                end\n                change x by (boss5: xV)\n                if <(x position) > [200]> then\n                    set size to (150) %\n                    create clone of (_myself_ v)\n                    create clone of (_myself_ v)\n                    create clone of (_myself_ v)\n                    create clone of (_myself_ v)\n                    set size to (100) %\n                    set x to (-200)\n                    start sound [Powerup2 v]\n                end\n                if <(x position) < [-200]> then\n                    set size to (150) %\n                    create clone of (_myself_ v)\n                    create clone of (_myself_ v)\n                    create clone of (_myself_ v)\n                    create clone of (_myself_ v)\n                    set size to (100) %\n                    set x to (200)\n                    start sound [Powerup2 v]\n                end\n                set [boss5: animspeed v] to ([abs v] of ((boss5: xV) / (12)) )\n                if <(animspeed) < [0.2]> then\n                    set [boss5: animspeed v] to [0.2]\n                end\n                change [boss5: animsprite v] by (boss5: animspeed)\n                if <[3.99] < (boss5: animsprite)> then\n                    set [boss5: animsprite v] to [0]\n                end\n                if <(charge) = [0]> then\n                    if <([abs v] of (boss5: xV) ) > [0.01]> then\n                        switch costume to (([floor v] of (boss5: animsprite) ) + (1))\n                    else\n                        switch costume to (end5 v)\n                    end\n                end\n            end\n        else\n            change [boss5: stunned v] by (1)\n            if <((boss5: stunned) mod (2)) = [0]> then\n                switch costume to (hurt v)\n            else\n                switch costume to (idle v)\n            end\n            if <(boss5: stunned) > [24]> then\n                set [boss5: stunned v] to [0]\n                set [clock v] to [0]\n            end\n        end\n    else\n        if <<[250] > (boss5: stunned)> and <(boss5: stunned) > [0]>> then\n            change [boss5: stunned v] by (1)\n            if <[64] > (boss5: stunned)> then\n                if <((boss5: stunned) mod (2)) = [0]> then\n                    switch costume to (endhurt v)\n                else\n                    switch costume to (end2 v)\n                end\n            else\n                if <[66] > (boss5: stunned)> then\n                    next costume\n                    next costume\n                else\n                    if <[99] > (boss5: stunned)> then\n                        switch costume to (end6 v)\n                    else\n                        if <[100] > (boss5: stunned)> then\n                            switch costume to (end7 v)\n                        else\n                            if <(boss5: stunned) = [100]> then\n                                start sound [darkness v]\n                                broadcast (zboss5cutsword v)\n                            end\n                            if <[188] > (boss5: stunned)> then\n                                create clone of (_myself_ v)\n                                switch costume to (charge v)\n                            else\n                                if <[190] > (boss5: stunned)> then\n                                    switch costume to (mad v)\n                                else\n                                    if <(boss5: stunned) = [190]> then\n                                        start sound [Randomize7 v]\n                                    end\n                                    if <[240] > (boss5: stunned)> then\n                                        set size to (1000) %\n                                        change y by (((boss5: stunned) - (190)) / (2))\n                                        set size to (100) %\n                                        switch costume to (madup v)\n                                        create clone of (_myself_ v)\n                                        create clone of (_myself_ v)\n                                    else\n                                        if <(boss5: stunned) = [240]> then\n                                            broadcast (zboss5gate v)\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 [zboss5missilehit v]\nif <not <(costume [number v]) = [17]>> then\n    change [boss5: hits v] by (-1)\n    set [boss5: stunned v] to [1]\n    if <(boss5: hits) > [0]> then\n        start sound [ouch v]\n    else\n        set [music v] to [0]\n        stop all sounds\n        start sound [biggerdie v]\n    end\nend\n\nwhen I receive [zboss5charge v]\nif <not <(costume [number v]) = [17]>> then\n    switch costume to (end7 v)\n    start sound [darkness v]\n    repeat (12)\n        create clone of (_myself_ v)\n        create clone of (_myself_ v)\n        create clone of (_myself_ v)\n        create clone of (_myself_ v)\n    end\n    broadcast (zsummonBossMissile v)\n    set [clock v] to ((-48) - (([abs v] of (([boss5: hits v] of [boss5 v]) - (4)) ) * (120)))\n    set [charge v] to [0]\n    set [boss5: xv v] to [0]\nend\n\nwhen I receive [titlestart v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [greenflag v]\nstop [other scripts in sprite v]\nhide\n\n@bossMissile\n\nwhen I receive [zsummonbossmissile v]\nshow\nset size to (100) %\nset [mxv v] to [0]\nset [myv v] to [5]\nset [lastpos v] to [5]\npoint in direction (0)\nstart sound [Powerup v]\nrepeat (8)\n    go to (boss5 v)\n    change [lastpos v] by ((lastPos) * (0.13))\n    change y by (lastPos)\n    switch costume to (missile v)\nend\nrepeat (8)\n    go to (boss5 v)\n    change [lastpos v] by ((lastPos) * (0.13))\n    change y by (lastPos)\n    switch costume to (missile v)\n    turn left (((0) - ((lastPos) / (3))) * ((([x position v] of [hitbox v]) - (x position)) / ([abs v] of (([x position v] of [hitbox v]) - (x position)) ))) degrees\nend\nstart sound [Randomize7 v]\nset [clock v] to (([abs v] of (([boss5: hits v] of [boss5 v]) - (4)) ) * (120))\nrepeat until <(clock) < [1]>\n    if <(clock) = [42069]> then\n        point towards (boss5 v)\n        set [lastpos v] to (x position)\n        move (1) steps\n        change [mxv v] by (((x position) - (lastPos)) / (2))\n        if <(mxV) > ((x position) - (lastPos))> then\n            change [mxv v] by (((x position) - (lastPos)) / (2))\n        end\n        set [lastpos v] to (y position)\n        move (1) steps\n        change [myv v] by (((y position) - (lastPos)) / (1))\n        if <([abs v] of (mxV) ) > [12]> then\n            set [mxv v] to ((([abs v] of (mxV) ) / (mxV)) * (12))\n        end\n        if <([abs v] of (myV) ) > [7]> then\n            set [myv v] to ((([abs v] of (myV) ) / (myV)) * (12))\n        end\n        change x by (mxV)\n        change y by (myV)\n        if <touching (boss5 v)?> then\n            start sound [bigdie2 v]\n            set size to (250) %\n            point in direction (90)\n            show\n            switch costume to (particle5 v)\n            broadcast (zboss5MissileHit v)\n            repeat (6)\n                next costume\n                if <<touching (hitbox v)?> and <<(hitInvul) = [0]> and <(died) = [0]>>> then\n                    set [hitamount v] to [2]\n                    broadcast (hurtme v)\n                end\n            end\n            hide\n            switch costume to (missile v)\n            stop [this script v]\n        end\n    else\n        point towards (hitbox v)\n        set [lastpos v] to (x position)\n        move (1) steps\n        change [mxv v] by (((x position) - (lastPos)) / (2))\n        move (-1) steps\n        set [lastpos v] to (y position)\n        move (1) steps\n        change [myv v] by (((y position) - (lastPos)) / (1))\n        move (-1) steps\n        if <([abs v] of (mxV) ) > [5]> then\n            set [mxv v] to ((([abs v] of (mxV) ) / (mxV)) * (5))\n        end\n        if <([abs v] of (myV) ) > [5]> then\n            set [myv v] to ((([abs v] of (myV) ) / (myV)) * (5))\n        end\n        change x by (mxV)\n        change y by (myV)\n        change [clock v] by (-1)\n        if <(clock) = [42069]> then\n            start sound [Randomize9 v]\n        end\n        if <(clock) = [60]> then\n            switch costume to (missile3 v)\n        end\n        if <(clock) < [60]> then\n            if <<touching (hitbox v)?> and <(yV) < [-1.6]>> then\n                set [yv v] to [8]\n                start sound [ouch v]\n                set [clock v] to [42075]\n            end\n            if <(clock) < [5]> then\n                change size by (20)\n            end\n        else\n            if <(clock) < [42069]> then\n                if <<touching (hitbox v)?> and <<(hitInvul) = [0]> and <(died) = [0]>>> then\n                    set [hitamount v] to [1]\n                    broadcast (hurtme v)\n                end\n            else\n                set [mxv v] to ((([abs v] of (mxV) ) / (mxV)) * (([abs v] of (mxV) ) / (2)))\n                set [myv v] to ((([abs v] of (myV) ) / (myV)) * (([abs v] of (myV) ) / (2)))\n            end\n        end\n    end\n    create clone of (_myself_ v)\n    broadcast (zbossMissileFlash v)\nend\nstart sound [bigdie2 v]\nset size to (300) %\npoint in direction (90)\nshow\nswitch costume to (particle5 v)\nrepeat (6)\n    next costume\n    if <<touching (hitbox v)?> and <<(hitInvul) = [0]> and <(died) = [0]>>> then\n        set [hitamount v] to [3]\n        broadcast (hurtme v)\n    end\nend\nhide\nswitch costume to (missile v)\n\nwhen I receive [zbossmissileflash v]\nnext costume\nif <(costume [number v]) = [3]> then\n    switch costume to (missile v)\nend\nif <(costume [number v]) = [5]> then\n    switch costume to (missile3 v)\nend\nif <(costume [number v]) = [7]> then\n    switch costume to (particle2 v)\nend\nif <(costume [number v]) = [9]> then\n    switch costume to (particle4 v)\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [0]> then\n\nwhen I receive [loadlevel v]\nhide\nchange [clonecount v] by (-1)\ndelete this clone\n\nwhen I receive [loadlevel v]\nwait (0) seconds\nstop [other scripts in sprite v]\nchange [clonecount v] by (1)\nhide\n\nwhen I receive [titlestart v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [greenflag v]\nstop [other scripts in sprite v]\nhide\n\n@bossBullet\n\nwhen I receive [zbossbullet v]\nif <(costume [number v]) = [3]> then\n    if <(current) = [35]> then\n        switch costume to (b5b v)\n        create clone of (_myself_ v)\n        switch costume to (work please v)\n    end\nend\n\nwhen I start as a clone\nchange [clonecount v] by (1)\nif <(current) = [35]> then\n    if <(costume [number v]) = [1]> then\n        start sound [Randomize9 v]\n        show\n        switch costume to (b5b v)\n        go to (boss5 v)\n        point towards (hitbox v)\n        set [motion v] to (([boss5: xv v] of [boss5 v]) + ((16) * ((([x position v] of [hitbox v]) - (x position)) / ([abs v] of (([x position v] of [hitbox v]) - (x position)) ))))\n        repeat until <touching (_edge_ v)?>\n            change [motion v] by ((([abs v] of (motion) ) / (motion)) * (0.3))\n            move [4]\n        end\n        hide\n        change [clonecount v] by (-1)\n        delete this clone\n    else\n        if <(costume [number v]) = [2]> then\n            show\n            change y by (pick random (1) to (-1))\n            set [motion v] to [0]\n            repeat (5)\n                change size by (-10)\n            end\n            change [clonecount v] by (-1)\n            delete this clone\n        end\n    end\nend\n\nwhen I receive [loadlevel v]\nwait (0) seconds\nstop [other scripts in sprite v]\nchange [clonecount v] by (1)\n\nwhen I receive [loadlevel v]\nhide\nchange [clonecount v] by (-1)\nrepeat (10)\n    delete this clone\nend\n\ndefine move (times)\nrepeat (times)\n    move (([abs v] of (motion) ) / (times)) steps\n    switch costume to (b5bt v)\n    create clone of (_myself_ v)\n    switch costume to (b5b v)\n    if <<touching (hitbox v)?> and <<(hitInvul) = [0]> and <(died) = [0]>>> then\n        set [hitamount v] to [0.5]\n        broadcast (hurtme v)\n        change [clonecount v] by (-1)\n        delete this clone\n    end\nend\n\n@D.E.B.\n\nwhen I start as a clone\nchange [clonecount v] by (1)\nif <(costume [number v]) = [2]> then\n    change x by (pick random (2) to (-2))\n    change y by (pick random (2) to (-2))\n    set size to (((size) / (100)) * (pick random (75) to (125))) %\n    repeat (5)\n        change size by (15)\n    end\n    repeat (5)\n        change size by (-15)\n    end\n    change [clonecount v] by (-1)\n    delete this clone\nend\n\nwhen I receive [updateobj v]\nif <(costume [number v]) = [3]> then\n    switch costume to (particle v)\n    move (4) steps\n    if <<touching (hitbox v)?> and <<(hitInvul) = [0]> and <(died) = [0]>>> then\n        set [hitamount v] to [1]\n        broadcast (hurtme v)\n    end\n    if <<touching (ground v)?> or <touching (_edge_ v)?>> then\n        if <touching (reflector v)?> then\n            go to x: (((round (((x position) + (8)) / (8))) * (8)) - (8)) y: (((round (((y position) - (4)) / (8))) * (8)) + (4))\n            turn right (90) degrees\n            move (4) steps\n            if <touching (reflector v)?> then\n                turn right (180) degrees\n                move (8) steps\n                if <touching (reflector v)?> then\n                    turn right (-90) degrees\n                end\n            end\n        else\n            move (-4) steps\n            create clone of (_myself_ v)\n            create clone of (_myself_ v)\n            create clone of (_myself_ v)\n            change [clonecount v] by (-1)\n            delete this clone\n        end\n    end\n    change [clock v] by (1)\n    if <(clock) > [1]> then\n        set [clock v] to [0]\n        create clone of (_myself_ v)\n    end\n    switch costume to (projectile v)\nend\nif <(costume [number v]) = [1]> then\n    change [clock v] by (-1)\n    if <<touching (hitbox v)?> and <<(hitInvul) = [0]> and <(died) = [0]>>> then\n        set [hitamount v] to [1]\n        broadcast (hurtme v)\n    end\n    if <[0] < (clock)> then\n        if <((clock) mod ([floor v] of ((clock) / (10)) )) = [0]> then\n            switch costume to (particle v)\n            create clone of (_myself_ v)\n            switch costume to (emitter v)\n        end\n    else\n        if <(clock) < [-15]> then\n            switch costume to (particle v)\n            create clone of (_myself_ v)\n            switch costume to (emitter v)\n            set [clock v] to [-1]\n        end\n    end\n    if <(clock) = [0]> then\n        switch costume to (projectile v)\n        create clone of (_myself_ v)\n        switch costume to (emitter v)\n        set [clock v] to (clockset)\n    end\nend\n\nwhen I receive [loadlevel v]\nhide\nwait (0) seconds\nchange [clonecount v] by (1)\ncreate\n\nwhen I receive [loadlevel v]\nhide\nchange [clonecount v] by (-1)\ndelete this clone\n\ndefine create\nshow\nset [i v] to [0]\nset [n v] to []\nswitch costume to (emitter v)\nrepeat until <(i) > (length of (item ((current) - (35)) of [d.e.b.s v]))>\n    change [i v] by (1)\n    if <(letter (i) of (item ((current) - (35)) of [d.e.b.s v])) = [;]> then\n        goto (n)\n        set [n v] to []\n        change [i v] by (1)\n        point in direction ((letter (i) of (item ((current) - (35)) of [d.e.b.s v])) * (90))\n        change [i v] by (2)\n        if <(letter (i) of (item ((current) - (35)) of [d.e.b.s v])) = [-]> then\n            set [clock v] to [-1]\n        else\n            set [clockset v] to ((letter (i) of (item ((current) - (35)) of [d.e.b.s v])) * (10))\n            set [clock v] to [1]\n        end\n        change [i v] by (1)\n        create clone of (_myself_ v)\n    else\n        set [n v] to (join (n) (letter (i) of (item ((current) - (35)) of [d.e.b.s v])))\n    end\nend\nhide\nswitch costume to (emitter2 v)\n\ndefine goto (tile)\ngo to x: (((((tile) - (1)) mod (30)) * (16)) - (232)) y: ((-172) + (([floor v] of (((tile) - (1)) / (30)) ) * (16)))\n\nstart sound [Randomize7 v]\n\n@D.E.C.\n\ndefine create\nshow\nset [i v] to [0]\nset [n v] to []\nrepeat until <(i) > (length of (item ((current) - (35)) of [d.e.c.s v]))>\n    change [i v] by (1)\n    if <(letter (i) of (item ((current) - (35)) of [d.e.c.s v])) = [;]> then\n        goto (n)\n        change [i v] by (1)\n        point in direction ((letter (i) of (item ((current) - (35)) of [d.e.c.s v])) * (45))\n        change [i v] by (2)\n        set [n v] to (letter (i) of (item ((current) - (35)) of [d.e.c.s v]))\n        change [i v] by (1)\n        switch costume to (projectile v)\n        create clone of (_myself_ v)\n        switch costume to (projectile2 v)\n        set [n v] to []\n    else\n        set [n v] to (join (n) (letter (i) of (item ((current) - (35)) of [d.e.c.s v])))\n    end\nend\nhide\n\ndefine goto (tile)\ngo to x: (((((tile) - (1)) mod (30)) * (16)) - (232)) y: ((-172) + (([floor v] of (((tile) - (1)) / (30)) ) * (16)))\n\nwhen I receive [updateobj v]\nif <(costume [number v]) = [1]> then\n    switch costume to (particle v)\n    move (n) steps\n    change [i v] by (1)\n    if <(i) > [1]> then\n        create clone of (_myself_ v)\n        set [i v] to [0]\n    end\n    switch costume to (particle2 v)\n    set size to (100) %\n    if <<touching (ground v)?> or <touching (_edge_ v)?>> then\n        if <touching (reflector v)?> then\n            go to x: (((round (((x position) + (8)) / (8))) * (8)) - (8)) y: (((round (((y position) - (4)) / (8))) * (8)) + (4))\n            turn right (90) degrees\n            move (4) steps\n            if <touching (reflector v)?> then\n                turn right (180) degrees\n                move (8) steps\n                if <touching (reflector v)?> then\n                    turn right (-90) degrees\n                end\n            end\n        else\n            if <(((direction) / (45)) mod (2)) > [0]> then\n                turn right (90) degrees\n                move (n) steps\n                if <<touching (ground v)?> or <touching (_edge_ v)?>> then\n                    move ((0) - (n)) steps\n                    turn right (180) degrees\n                else\n                    move ((0) - (n)) steps\n                end\n            else\n                turn right (180) degrees\n            end\n            set size to (150) %\n            switch costume to (particle v)\n            create clone of (_myself_ v)\n            create clone of (_myself_ v)\n            create clone of (_myself_ v)\n            set size to (100) %\n        end\n    end\n    if <<touching (hitbox v)?> and <<(hitInvul) = [0]> and <(died) = [0]>>> then\n        set [hitamount v] to [1]\n        broadcast (hurtme v)\n    end\n    switch costume to (projectile v)\nend\n\nwhen I receive [loadlevel v]\nhide\nchange [clonecount v] by (-1)\nrepeat (4)\n    delete this clone\nend\n\nwhen I receive [loadlevel v]\nhide\nwait (0) seconds\nchange [clonecount v] by (1)\ncreate\n\nwhen I start as a clone\nchange [clonecount v] by (1)\nif <(costume [number v]) = [2]> then\n    change x by (pick random (2) to (-2))\n    change y by (pick random (2) to (-2))\n    set size to (((size) / (100)) * (pick random (75) to (125))) %\n    repeat (5)\n        change size by (15)\n    end\n    repeat (5)\n        change size by (-15)\n    end\n    change [clonecount v] by (-1)\n    delete this clone\nelse\n    set [i v] to [0]\nend\n\nreplace item (5) of [d.e.c.s v] with []\nset [i v] to [35]\nrepeat (12)\n    change [i v] by (.4)\n    replace item (5) of [d.e.c.s v] with (join (item (5) of [d.e.c.s v]) (join ((round ((i) * (10))) / (10)) [;2;5;]))\nend\nset [i v] to [575]\nrepeat (12)\n    change [i v] by (.4)\n    replace item (5) of [d.e.c.s v] with (join (item (5) of [d.e.c.s v]) (join ((round ((i) * (10))) / (10)) [;6;5;]))\nend\nset [i v] to [424]\nrepeat (12)\n    change [i v] by (.4)\n    replace item (5) of [d.e.c.s v] with (join (item (5) of [d.e.c.s v]) (join ((round ((i) * (10))) / (10)) [;2;5;]))\nend\n\n@reflector\n\nwhen I receive [updateobj v]\nif <[8] > (costume [number v])> then\n    switch costume to ([floor v] of (color) )\nend\n\ndefine goto (tile)\ngo to x: (((((tile) - (1)) mod (30)) * (16)) - (232)) y: ((-172) + (([floor v] of (((tile) - (1)) / (30)) ) * (16)))\n\ndefine create\nshow\nset [i v] to [0]\nset [n v] to []\nrepeat until <(i) > (length of (item ((current) - (37)) of [reflectors v]))>\n    change [i v] by (1)\n    if <(letter (i) of (item ((current) - (37)) of [reflectors v])) = [;]> then\n        goto (n)\n        change [i v] by (1)\n        set [n v] to (letter (i) of (item ((current) - (37)) of [reflectors v]))\n        point in direction (90)\n        switch costume to ((n) + (9))\n        create clone of (_myself_ v)\n        turn right ((90) * (n)) degrees\n        switch costume to (r1 v)\n        create clone of (_myself_ v)\n        set [n v] to []\n        change [i v] by (1)\n        switch costume to (b0 v)\n    else\n        set [n v] to (join (n) (letter (i) of (item ((current) - (37)) of [reflectors v])))\n    end\nend\nhide\n\nwhen I receive [loadlevel v]\nchange [clonecount v] by (-1)\ndelete this clone\n\nwhen I receive [loadlevel v]\nwait (0) seconds\nchange [clonecount v] by (1)\ncreate\n\n@D.E.S\n\ndefine create\ngoto [247]\nclone [7] [60] [1]\nclone [7] [180] [1]\nclone [7] [300] [1]\ngoto [601]\nclone [4] [0] [1]\ngoto [497]\nclone [3] [0] [1]\ngoto [473]\nclone [3] [0] [0]\ngoto [508]\nclone [3] [90] [1]\ngoto [137]\nclone [5] [90] [1]\nclone [5] [-90] [1]\ngoto [143]\nclone [5] [0] [1]\nclone [5] [180] [1]\ngoto [317]\nclone [5] [0] [1]\nclone [5] [180] [1]\ngoto [323]\nclone [5] [90] [1]\nclone [5] [-90] [1]\ngoto [488]\nchange y by (8)\nclone [6] [0] [0]\nclone [6] [120] [0]\nclone [6] [240] [0]\n\nwhen I start as a clone\nchange [clonecount v] by (1)\nif <(costume [number v]) = [2]> then\n    change size by (1000)\n    change x by (pick random (2) to (-2))\n    change y by (pick random (2) to (-2))\n    change size by (-1000)\n    set size to (((size) / (100)) * (pick random (75) to (125))) %\n    if <([abs v] of (x position) ) > ((((size) / (100)) * (2)) + (240))> then\n        change [clonecount v] by (-1)\n        delete this clone\n    end\n    repeat (5)\n        change size by (15)\n    end\n    repeat (5)\n        change size by (-15)\n    end\n    change [clonecount v] by (-1)\n    delete this clone\nend\nif <(costume [number v]) = [1]> then\n    move ((i) * (4.9)) steps\nend\n\nwhen I receive [updateobj v]\nif <(costume [number v]) = [1]> then\n    move ((0) - ((i) * (4.9))) steps\n    if <(r) = [0]> then\n        turn right (([abs v] of ((item (1) of [medallionfragments v]) - (9)) ) / (2)) degrees\n    else\n        turn left (([abs v] of ((item (1) of [medallionfragments v]) - (9)) ) / (2)) degrees\n    end\n    set size to (1000) %\n    move ((i) * (4.9)) steps\n    set size to (100) %\n    switch costume to (particle v)\n    if <<touching (hitbox v)?> and <<(hitInvul) = [0]> and <(died) = [0]>>> then\n        set [hitamount v] to [1]\n        broadcast (hurtme v)\n    end\n    change [n v] by (1)\n    if <((i) mod (4)) = [0]> then\n        if <(n) > [4]> then\n            switch costume to (particle v)\n            create clone of (_myself_ v)\n            switch costume to (projectile v)\n            set [n v] to [0]\n        end\n    else\n        if <(n) > [7]> then\n            switch costume to (particle v)\n            create clone of (_myself_ v)\n            switch costume to (projectile v)\n            set [n v] to [1]\n        end\n    end\n    switch costume to (projectile v)\nend\n\nwhen I receive [loadlevel v]\nwait (0) seconds\nchange [clonecount v] by (1)\nif <(current) = [39]> then\n    create\nend\n\nwhen I receive [loadlevel v]\nhide\nchange [clonecount v] by (-1)\ndelete this clone\n\ndefine clone (#) (d) (r)\npoint in direction (d)\nshow\nswitch costume to (projectile v)\nset [i v] to [-2]\nset [n v] to [0]\nset [r v] to (r)\nrepeat (#)\n    change [i v] by (2)\n    create clone of (_myself_ v)\nend\nswitch costume to (projectile2 v)\nhide\n\ndefine goto (tile)\ngo to x: (((((tile) - (1)) mod (30)) * (16)) - (232)) y: ((-172) + (([floor v] of (((tile) - (1)) / (30)) ) * (16)))\n\n@boss6\n\nwhen I receive [loadlevel v]\nwait (0) seconds\nswitch costume to (particle v)\nstop [other scripts in sprite v]\nchange [clonecount v] by (1)\nif <(current) = [42]> then\n    set [boss6: hits v] to [0]\n    set [boss6: xv v] to [0]\n    set [boss6: stunned v] to [0]\n    go to x: (0) y: (-1)\n    point in direction (-90)\n    switch costume to (end7 v)\n    clear graphic effects\n    set [brightness v] effect to (3)\n    show\n    wait until <(enabled) = [0]>\n    repeat (10)\n        wait (0) seconds\n    end\n    set [music v] to [14]\n    broadcast (music v)\n    set [clock v] to [0]\n    set [boss6: hits v] to [3]\nelse\n    hide\nend\n\nwhen I receive [loadlevel v]\nchange [clonecount v] by (-1)\ndelete this clone\n\nwhen I receive [updateobj v]\nif <not <(costume [number v]) = [17]>> then\n    if <(boss6: hits) > [0]> then\n        if <(boss6: stunned) = [0]> then\n            if <(clock) = [0]> then\n                set [boss6: yv v] to [8]\n            end\n            if <(clock) < [344]> then\n                change [clock v] by (1)\n                if <(clock) = [25]> then\n                    set [boss6: xv v] to [8]\n                    switch costume to (end5 v)\n                end\n                if <(clock) < [25]> then\n                    switch costume to (madup v)\n                    change [boss6: yv v] by (-0.32)\n                    change y by (boss6: yV)\n                    broadcast (zboss6drag v)\n                else\n                    set [boss6: yv v] to ([ceiling v] of (boss6: yV) )\n                    change [boss6: xv v] by ((boss6: yV) / (5))\n                    change x by (boss6: xV)\n                    broadcast (zboss6drag v)\n                    if <<(boss6: xV) > [8]> or <(boss6: xV) < [-8]>> then\n                        set [boss6: yv v] to ((0) - (boss6: yV))\n                    end\n                    point in direction ((90) * ((([x position v] of [hitbox v]) - (x position)) / ([abs v] of (([x position v] of [hitbox v]) - (x position)) )))\n                    if <((clock) mod ([ceiling v] of ((81) - ([abs v] of ((13.5) * ((boss6: hits) - (3))) )) )) = [0]> then\n                        broadcast (zboss6bomb v)\n                    end\n                    if <(((clock) + (86)) mod (172)) = [0]> then\n                        broadcast (zboss6bullets v)\n                    end\n                end\n                create clone of (_myself_ v)\n            else\n                if <(clock) < [355]> then\n                    point in direction ((90) * ((([x position v] of [hitbox v]) - (x position)) / ([abs v] of (([x position v] of [hitbox v]) - (x position)) )))\n                    change [clock v] by (1)\n                    set x to (0)\n                    set [boss6: xv v] to [0]\n                    broadcast (zboss6drag v)\n                else\n                    if <(clock) < ((445) + ((60) * ([abs v] of ((boss6: hits) - (2)) )))> then\n                        point in direction ((90) * ((([x position v] of [hitbox v]) - (x position)) / ([abs v] of (([x position v] of [hitbox v]) - (x position)) )))\n                        broadcast (zboss6swordHover v)\n                        switch costume to (end3 v)\n                        change [clock v] by (1)\n                        if <(clock) = ((445) + ((60) * ([abs v] of ((boss6: hits) - (2)) )))> then\n                            broadcast (zboss6swordSlam v)\n                        end\n                    else\n                        if <(clock) < ((535) + ((60) * ([abs v] of ((boss6: hits) - (2)) )))> then\n                            if <(jumpColor) = [0]> then\n                                change [clock v] by (1)\n                            end\n                            if <(costume [number v]) > [11]> then\n                                switch costume to ((costume [number v]) - (1))\n                            end\n                            set [brightness v] effect to (50)\n                            if <touching (hitbox v)?> then\n                                set [boss6: stunned v] to [1]\n                                set [jumpcolor v] to [0]\n                                set [enabled v] to [0]\n                                change [boss6: hits v] by (-1)\n                                if <(boss6: hits) > [0]> then\n                                    start sound [evil v]\n                                    start sound [bigdie2 v]\n                                else\n                                    set [boss6: yv v] to [6]\n                                    set [music v] to [0]\n                                    stop all sounds\n                                    start sound [evil v]\n                                    start sound [bigdie3 v]\n                                end\n                                set [brightness v] effect to (3)\n                            end\n                        else\n                            if <(clock) < ((551) + ((60) * ([abs v] of ((boss6: hits) - (2)) )))> then\n                                set [brightness v] effect to (3)\n                                change [clock v] by (1)\n                                broadcast (zboss6swordReturn v)\n                                if <[15] > (costume [number v])> then\n                                    next costume\n                                end\n                            else\n                                if <(clock) < ((560) + ((60) * ([abs v] of ((boss6: hits) - (2)) )))> then\n                                    set [boss6: xv v] to [0]\n                                    broadcast (zboss6drag v)\n                                    change [clock v] by (1)\n                                else\n                                    set [clock v] to [24]\n                                end\n                            end\n                        end\n                    end\n                end\n                change y by (-2)\n                create clone of (_myself_ v)\n                create clone of (_myself_ v)\n                change y by (2)\n            end\n        else\n            change [boss6: stunned v] by (1)\n            if <((boss6: stunned) mod (2)) = [0]> then\n                switch costume to (endhurt v)\n            else\n                switch costume to (end v)\n            end\n            if <(boss6: stunned) > [24]> then\n                set [boss6: stunned v] to [0]\n                set [clock v] to ((535) + ((60) * ([abs v] of ((boss6: hits) - (2)) )))\n            end\n        end\n    else\n        if <[0] < (boss6: stunned)> then\n            if <(boss6: stunned) < [360]> then\n                change [boss6: stunned v] by (1)\n                if <(boss6: stunned) < [30]> then\n                    change [boss6: yv v] by (-0.8)\n                    change y by (boss6: yV)\n                else\n                    if <(boss6: stunned) = [30]> then\n                        go to x: (0) y: (-92)\n                    end\n                    if <(boss6: stunned) < [60]> then\n                        if <((boss6: stunned) mod (2)) = [0]> then\n                            switch costume to (end v)\n                        else\n                            switch costume to (endhurt v)\n                        end\n                    else\n                        if <(boss6: stunned) = [60]> then\n                            start sound [Randomize15 v]\n                        end\n                        if <((boss6: stunned) mod (2)) = [0]> then\n                            switch costume to (end9 v)\n                        else\n                            switch costume to (end6 v)\n                        end\n                        change [ghost v] effect by ((1) / (3))\n                        broadcast (zboss6deathrender v)\n                    end\n                end\n            else\n                if <(boss6: stunned) < [390]> then\n                    if <(boss6: stunned) = [360]> then\n                        start sound [darkness v]\n                    end\n                    change [boss6: stunned v] by (1)\n                    endclones (((boss6: stunned) / (2)) - (180))\n                    if <(boss6: stunned) = [390]> then\n                        broadcast (goalShow v)\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <(boss6: stunned) > [0]> then\n    clear graphic effects\nend\nchange [clonecount v] by (1)\nswitch costume to (particle v)\nchange x by (pick random (4) to (-4))\nchange y by (pick random (4) to (-4))\nset size to (((size) / (100)) * (pick random (75) to (125))) %\nrepeat (5)\n    change size by (15)\nend\nrepeat (5)\n    change size by (-15)\nend\nchange [clonecount v] by (-1)\ndelete this clone\n\nwhen I receive [zboss6bomb v]\nif <not <(costume [number v]) = [17]>> then\n    switch costume to (end5 v)\n    repeat (4)\n        switch costume to ((costume [number v]) - (1))\n    end\n    repeat (8)\n    repeat (4)\n        next costume\n    end\nend\n\ndefine endclones (num)\nrepeat (num)\n    create clone of (_myself_ v)\nend\n\nset [clock v] to [340]\n\nset [boss6: hits v] to [1]\n\nwhen I receive [scenec v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [titlestart v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [greenflag v]\nstop [other scripts in sprite v]\nhide\n\n@boss6-2\n\nwhen I receive [loadlevel v]\nwait (0) seconds\nswitch costume to (swordp v)\nstop [other scripts in sprite v]\npoint in direction (90)\ngo to x: (0) y: (-12)\nchange [clonecount v] by (1)\nif <(current) = [42]> then\n    set [canspin v] to [0]\n    go to [front v] layer\n    go [backward v] (69) layers\n    show\nelse\n    hide\nend\n\nwhen I receive [loadlevel v]\nchange [clonecount v] by (-1)\ndelete this clone\n\nwhen I receive [zboss6drag v]\ngo to (boss6 v)\nset size to (1000) %\nturn right (90) degrees\nmove (11) steps\nturn left (90) degrees\nset size to (100) %\nif <<(canspin) = [0]> and <not <(costume [number v]) = [2]>>> then\n    if <([boss6: xv v] of [boss6 v]) > [0]> then\n        turn right (6) degrees\n        if <(direction) > [135]> then\n            point in direction (135)\n        end\n    else\n        if <[0] > ([boss6: xv v] of [boss6 v])> then\n            turn right (-6) degrees\n            if <(direction) < [45]> then\n                point in direction (45)\n            end\n        else\n            if <(direction) < [90]> then\n                turn right (6) degrees\n                if <(direction) > [90]> then\n                    point in direction (90)\n                end\n            else\n                turn right (-6) degrees\n                if <(direction) < [90]> then\n                    point in direction (90)\n                end\n            end\n        end\n    end\nend\n\ndefine spinClones (deg) (rots) (siz)\nrepeat (rots)\n    set size to (1000) %\n    turn right ((deg) / (rots)) degrees\n    set size to (siz) %\n    switch costume to (swordw v)\n    create clone of (_myself_ v)\n    switch costume to (swordp v)\n    if <<touching (hitbox v)?> and <<(hitInvul) = [0]> and <(died) = [0]>>> then\n        set [hitinvul v] to [30]\n        set [hitamount v] to [1]\n        broadcast (hurtme v)\n    end\nend\n\ndefine moveClones (xdir) (ydir) (amnt) (size)\nrepeat (amnt)\n    switch costume to (swordw v)\n    create clone of (_myself_ v)\n    switch costume to (swordp v)\n    set size to (1000) %\n    change x by ((xdir) / (amnt))\n    change y by ((ydir) / (amnt))\n    set size to (size) %\n    if <<touching (hitbox v)?> and <<(hitInvul) = [0]> and <(died) = [0]>>> then\n        set [hitinvul v] to [30]\n        set [hitamount v] to [2]\n        broadcast (hurtme v)\n    end\nend\n\nwhen I start as a clone\nchange [clonecount v] by (1)\ngo [backward v] (1) layers\nclear graphic effects\nshow\nif <(costume [number v]) = [2]> then\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    change [clonecount v] by (-1)\n    delete this clone\nend\n\nwhen I receive [zboss6bomb v]\nstart sound [Randomize11 v]\nset [canspin v] to [1]\nif <(direction) > [90]> then\n    repeat (10)\n        spinClones [31.5] [5] [100]\n    end\nelse\n    repeat (10)\n        spinClones [-31.5] [5] [100]\n    end\nend\nrepeat (10)\nset [canspin v] to [0]\n\nwhen I receive [zboss6swordhover v]\nif <not <(costume [number v]) = [2]>> then\n    set [canspin v] to (y position)\n    set y to ([y position v] of [hitbox v])\n    if <([x position v] of [hitbox v]) > (x position)> then\n        change x by ((distance to [hitbox v]) / ((8) - ((2) * ([abs v] of (([boss6: hits v] of [boss6 v]) - (3)) ))))\n    else\n        change x by ((0) - ((distance to [hitbox v]) / ((8) - ((2) * ([abs v] of (([boss6: hits v] of [boss6 v]) - (3)) )))))\n    end\n    set y to (canspin)\n    set [canspin v] to [0]\nend\n\nwhen I receive [zboss6swordslam v]\nif <not <(costume [number v]) = [2]>> then\n    go [backward v] (69) layers\n    set [canspin v] to [12]\n    repeat until <(y position) < [-31]>\n        change [canspin v] by (-2)\n        if <(canspin) = [0]> then\n            start sound [Randomize7 v]\n        end\n        if <[0] < (canspin)> then\n            change y by (canspin)\n        else\n            moveClones [0] (canspin) [1] [100]\n        end\n        if <(y position) < [-31]> then\n            set y to (-32)\n        end\n    end\n    start sound [bigdie2 v]\n    create clone of (jumplight v)\n    set [canspin v] to [0]\nend\n\nwhen I receive [zboss6swordreturn v]\nif <not <(costume [number v]) = [2]>> then\n    set [canspin v] to (direction)\n    point towards (boss6 v)\n    moveClones2 ((distance to [boss6 v]) / (4)) (direction) (canspin) [1] [100]\n    point in direction (canspin)\n    if <([x position v] of [boss6 v]) > (x position)> then\n        turn right (6) degrees\n        if <(direction) > [135]> then\n            point in direction (135)\n        end\n    else\n        if <(x position) > ([x position v] of [boss6 v])> then\n            turn right (-6) degrees\n            if <(direction) < [45]> then\n                point in direction (45)\n            end\n        else\n            if <(direction) < [90]> then\n                turn right (6) degrees\n                if <(direction) > [90]> then\n                    point in direction (90)\n                end\n            else\n                turn right (-6) degrees\n                if <(direction) < [90]> then\n                    point in direction (90)\n                end\n            end\n        end\n    end\n    set [canspin v] to [0]\nend\n\ndefine moveClones2 (move) (dir) (ddir) (amnt) (size)\nrepeat (amnt)\n    switch costume to (swordw v)\n    point in direction (ddir)\n    if <(move) > [3]> then\n        create clone of (_myself_ v)\n    end\n    switch costume to (swordp v)\n    set size to (1000) %\n    point in direction (dir)\n    move ((move) / (amnt)) steps\n    set size to (size) %\nend\n\nwhen I receive [scenec v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [titlestart v]\nstop [other scripts in sprite v]\nhide\n\ngo to x: (80) y: (-92)\n\nwhen I receive [greenflag v]\nstop [other scripts in sprite v]\nhide\n\n@boss6bomb\n\nwhen I receive [zboss6bomb v]\nshow\nswitch costume to (bomb v)\nstart sound [Powerup2 v]\nset [bombvel v] to (([abs v] of (([direction v] of [boss6-2 v]) - (90)) ) / (([direction v] of [boss6-2 v]) - (90)))\nrepeat (10)\n    change [bombvel v] by (([abs v] of (bombVel) ) / (bombVel))\n    go to (boss6-2 v)\n    point in direction ((([direction v] of [boss6-2 v]) + (90)) + ((([abs v] of (bombVel) ) / (bombVel)) * (31.5)))\n    move ([abs v] of ((bombVel) * (10)) ) steps\n    broadcast (zbossBombFlash v)\nend\nstart sound [Randomize7 v]\npoint towards (hitbox v)\nset [bombvel v] to [8]\nrepeat until <touching (_edge_ v)?>\n    change [bombvel v] by (0.8)\n    move (bombVel) steps\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    broadcast (zbossBombFlash v)\n    if <<touching (hitbox v)?> and <<(hitInvul) = [0]> and <(died) = [0]>>> then\n        set [hitamount v] to [1.5]\n        broadcast (hurtme v)\n    end\nend\nhide\nrepeat (11)\n    broadcast (zbossBombFlash v)\nend\n\nwhen I start as a clone\nchange [clonecount v] by (1)\nswitch costume to ((costume [number v]) + (2))\nchange x by (pick random (3) to (-3))\nchange y by (pick random (3) to (-3))\nset size to ((size) + (pick random (-25) to (25))) %\nrepeat (5)\n    change size by (15)\nend\nrepeat (5)\n    change size by ((0) - ((size) * (0.15)))\nend\nchange [clonecount v] by (-1)\ndelete this clone\n\nwhen I receive [zbossbombflash v]\nnext costume\nif <(costume [number v]) = [3]> then\n    switch costume to (bomb v)\nend\nif <(costume [number v]) = [5]> then\n    switch costume to (particle v)\nend\n\nwhen I receive [loadlevel v]\nwait (0) seconds\nchange [clonecount v] by (1)\nstop [other scripts in sprite v]\n\nwhen I receive [loadlevel v]\nhide\nchange [clonecount v] by (-1)\ndelete this clone\n\nwhen I receive [titlestart v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [greenflag v]\nstop [other scripts in sprite v]\nhide\n\n@boss6death\n\nwhen I receive [zboss6deathrender v]\nif <(costume [number v]) < [8]> then\n    set rotation style [don't rotate v]\n    change [ghost v] effect by ((1) / (3))\n    show\n    set size to (100) %\n    go to (boss6 v)\n    go to [front v] layer\n    go [backward v] (80) layers\n    switch costume to ([floor v] of (color) )\n    turn left (5) degrees\n    create clone of (_myself_ v)\n    wait (0) seconds\n    hide\nend\n\nwhen I receive [greenflag v]\nswitch costume to (cblue v)\nhide\n\nwhen I start as a clone\nset rotation style [all around v]\nchange [ghost v] effect by (-0.33333)\nshow\nswitch costume to (([floor v] of (color) ) + (7))\nset size to (1000) %\ngo to (boss6 v)\nset size to (([sqrt v] of (([boss6: stunned v] of [boss6 v]) - (60)) ) * (180)) %\nif <(size) < [180]> then\n    set size to ((([boss6: stunned v] of [boss6 v]) - (50)) * (18)) %\nend\nrepeat (1)\n    wait (0) seconds\nend\ndelete this clone\n\nwhen I receive [loadlevel v]\nswitch costume to (cblue v)\nclear graphic effects\nhide\n\n@boss6bullet\n\nwhen I receive [updateobj v]\nif <(costume [number v]) = [2]> then\n    point towards (hitbox v)\n    set [lastpos v] to (x position)\n    move (1) steps\n    change [mxv v] by (((x position) - (lastPos)) / (2))\n    move (-1) steps\n    set [lastpos v] to (y position)\n    move (1) steps\n    change [myv v] by (((y position) - (lastPos)) / (1))\n    move (-1) steps\n    if <([abs v] of (mxV) ) > [5]> then\n        set [mxv v] to ((([abs v] of (mxV) ) / (mxV)) * (4))\n    end\n    if <([abs v] of (myV) ) > [5]> then\n        set [myv v] to ((([abs v] of (myV) ) / (myV)) * (4))\n    end\n    change x by ((mxV) * (mult))\n    change y by ((myV) * (mult))\n    switch costume to (b6bt v)\n    create clone of (_myself_ v)\n    switch costume to (b6b v)\n    if <<touching (hitbox v)?> and <<(hitInvul) = [0]> and <(died) = [0]>>> then\n        set [hitamount v] to [0.5]\n        broadcast (hurtme v)\n        delete this clone\n    end\nend\n\nwhen I receive [loadlevel v]\nwait (0) seconds\nstop [other scripts in sprite v]\nchange [clonecount v] by (1)\n\nwhen I receive [loadlevel v]\nhide\nchange [clonecount v] by (-1)\nrepeat (10)\n    delete this clone\nend\n\nwhen I start as a clone\nset [mult v] to ((pick random (65.0) to (95.0)) / (100))\nif <(costume [number v]) = [3]> then\n    show\n    set [brightness v] effect to (5)\n    change y by (pick random (1) to (-1))\n    set [motion v] to [0]\n    repeat (15)\n        change size by (-10)\n        change y by (pick random (1) to (-1))\n    end\n    change [clonecount v] by (-1)\n    delete this clone\nend\n\nwhen I receive [zboss6swordslam v]\nif <(costume [number v]) = [2]> then\n    repeat (pick random (13) to (17))\n        change size by (-10)\n    end\n    change [clonecount v] by (-1)\n    delete this clone\nend\n\nwhen I receive [zboss6bullets v]\nif <(costume [number v]) = [1]> then\n    go to (boss6 v)\n    set [brightness v] effect to (7)\n    switch costume to (b6b v)\n    show\n    if <([boss6: hits v] of [boss6 v]) < [3]> then\n        set [mxv v] to [-2]\n        set [myv v] to [2]\n        create clone of (_myself_ v)\n        set [mxv v] to [2]\n        set [myv v] to [2]\n        create clone of (_myself_ v)\n    end\n    if <([boss6: hits v] of [boss6 v]) < [2]> then\n        set [mxv v] to [-2]\n        set [myv v] to [-2]\n        create clone of (_myself_ v)\n        set [mxv v] to [2]\n        set [myv v] to [-2]\n        create clone of (_myself_ v)\n    end\n    switch costume to (costume1 v)\n    clear graphic effects\n    hide\nend\n\n@endMedals\n\nwhen I receive [loadlevel v]\nchange [clonecount v] by (-1)\nhide\ndelete this clone\n\nwhen I receive [loadlevel v]\nwait (0) seconds\nchange [clonecount v] by (1)\n\nwhen I receive [scenecpedistal v]\nhide\nwait (3.5) seconds\nshow\nset [y v] to [250]\nrepeat (100)\n    change [y v] by (-3.02)\n    change [spin v] by (4)\n    set [radius v] to ((60) + (([sin v] of ((y) * (5)) ) * (10)))\n    circle (spin)\nend\nstop [other scripts in sprite v]\nswitch costume to (spin v)\ncircle (spin)\nset [pitch v] effect to (0)\nstart sound [laser v]\nrepeat (18)\n    change [radius v] by (-4)\n    change [spin v] by (8)\n    circle (spin)\nend\nbroadcast (sceneCmedallions v)\nstart sound [form v]\ngo to x: (0) y: (-52)\nswitch costume to (pedistal2 v)\nrepeat (4)\n    go to [front v] layer\n    next costume\nend\nhide\nswitch costume to (pedistal2 v)\n\nwhen I start as a clone\nrepeat (1)\ndelete this clone\n\ndefine circle (tilt)\nset [sequence v] to [0]\nrepeat (20)\n    change [sequence v] by (18)\n    set size to (1000) %\n    go to x: ((radius) * ([sin v] of ((sequence) + (tilt)) )) y: ((y) + ((radius) * ([cos v] of ((sequence) + (tilt)) )))\n    set size to (100) %\n    create clone of (_myself_ v)\nend\n\nwhen I receive [scenecpedistal v]\nforever\n    repeat (2)\n    next costume\n    if <(costume [number v]) > [4]> then\n        switch costume to (spin v)\n    end\nend\n\nwhen I receive [scenec v]\nhide\n\nwhen I receive [scenecpedistal v]\nwait (3.5) seconds\nset [pitch v] effect to (30)\nrepeat (3)\n    play sound [Pickup_Coin2 v] until done\n    wait (0.2) seconds\nend\n\nwhen I receive [titlestart v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [updateobj v]\nif <<(debug) = [1]> and <not <<(current) = [43]> and <(gameHalf) = [1]>>>> then\n    set [radius v] to (round ((1) / ((timer) - (sequence))))\n    set [sequence v] to (timer)\nend\n\nwhen I receive [greenflag v]\nstop [other scripts in sprite v]\nhide\n\n@menuEffects\n\nwhen I receive [menueffects v]\nshow\nset size to (100) %\nchange [color v] by (colorSpeed)\nif <(color) > [7.999]> then\n    set [color v] to [1]\nend\nif <([select v] of [text v]) = [2.1]> then\n    go to x: (-12) y: (-40)\n    switch costume to ([floor v] of (color) )\n    set [trail3 v] to [0]\n    trail\n    switch costume to (cidle v)\n    stamp\nend\nhide\nclear graphic effects\nif <([select v] of [text v]) = [3.1]> then\n    set size to (200) %\n    if <(visualLightsUI) = [1]> then\n        switch costume to (hp v)\n        go to x: (-226) y: (-166)\n        stamp\n        go to x: (-170) y: (-166)\n        switch costume to (([floor v] of (color) ) + (7))\n        stamp\n    else\n        if <(visualLightsUI) = [2]> then\n            switch costume to (hp v)\n            go to x: (-226) y: (-166)\n            stamp\n            go to x: (207) y: (-166)\n            switch costume to (([floor v] of (color) ) + (7))\n            stamp\n        else\n            switch costume to (hp v)\n            go to x: (-226) y: (-166)\n            stamp\n            set size to (100) %\n            go to x: (-12) y: (-64)\n            switch costume to (cwhite v)\n            stamp\n            switch costume to (cidle v)\n            stamp\n            change y by (16)\n            change x by (-20)\n        end\n    end\n    change x by (20)\n    switch costume to ((visualLightsUI) + (14))\n    stamp\nend\nif <([select v] of [text v]) = [4.1]> then\n    go to x: (-12) y: (-88)\n    switch costume to (block3backlight v)\n    if <(visualLumens) = [1]> then\n        set [ghost v] effect to (70)\n    end\n    if <not <(visualLumens) = [2]>> then\n        stamp\n    end\n    set [ghost v] effect to (0)\n    switch costume to (block3on v)\n    stamp\nend\n\nwhen I receive [titlestart v]\nstop [other scripts in sprite v]\nhide\n\ndefine trail\nchange x by (80)\nset [ghost v] effect to (100)\nrepeat (10)\n    change x by (-8)\n    change [ghost v] effect by (-10)\n    if <(visualTrail) = [1]> then\n        next costume\n        if <(costume [number v]) > [7]> then\n            switch costume to (corange v)\n        end\n    end\n    if <(visualTrail) = [3]> then\n        change [trail3 v] by (0.25)\n        if <(trail3) > [0.999]> then\n            set [trail3 v] to [0]\n            next costume\n            if <(costume [number v]) > [7]> then\n                switch costume to (corange v)\n            end\n        end\n    end\n    stamp\nend\n\nwhen I receive [updateobj v]\nif <(costume [number v]) = [22]> then\n    go to [back v] layer\n    change x by ([sin v] of (((y position) + (180)) * (5)) )\n    change y by (2)\n    if <(((y position) + (180)) mod (6)) = [0]> then\n        switch costume to (flare1 v)\n        create clone of (_myself_ v)\n        switch costume to (flare0 v)\n    end\n    if <(y position) > [179]> then\n        set x to (pick random (-232) to (232))\n        set y to (-180)\n    end\n    if <<(blocks3) = [1]> and <(current) = [47]>> then\n        set [color v] effect to (0)\n        set [brightness v] effect to (([sin v] of (((y position) + (180)) * (5)) ) * (50))\n        if <<touching (hitbox v)?> and <<(hitInvul) = [0]> and <(died) = [0]>>> then\n            set [hitamount v] to [1]\n            broadcast (hurtme v)\n        end\n    end\nend\nif <(costume [number v]) > [22]> then\n    go to [back v] layer\n    change [ghost v] effect by (2)\n    change [trail3 v] by (1)\n    if <(trail3) > [8]> then\n        if <(costume [number v]) = [28]> then\n            delete this clone\n        else\n            set [trail3 v] to [0]\n            next costume\n        end\n    end\n    change y by (.5)\nend\n\nwhen I receive [loadlevel v]\nswitch costume to (flare5 v)\ndelete this clone\n\nwhen I receive [loadlevel v]\nwait (0) seconds\nif <<(current) > [42]> and <(gameHalf) = [2]>> then\n    clear graphic effects\n    flare\nend\n\ndefine flare\nset [trail3 v] to [0]\nswitch costume to (flare0 v)\nshow\nset y to (-180)\nrepeat (8)\n    set x to (pick random (-232) to (232))\n    change y by (pick random (40) to (48))\n    if <not <(round ((y position) / (2))) = ((y position) / (2))>> then\n        change y by (1)\n    end\n    create clone of (_myself_ v)\nend\nhide\nswitch costume to (3 v)\n\nwhen I receive [menuswitch v]\nhide\ndelete this clone\n\nwhen I receive [returntomonke v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [greenflag v]\nstop [other scripts in sprite v]\nhide\n\n@mobile\n\nwhen I receive [greenflag v]\nhide\ndelete this clone\n\nwhen I receive [titlestart v]\nwait (0.1) seconds\nswitch costume to (mobile-pad v)\nforever\n    broadcast (mobileTick v)\nend\n\nwhen I receive [mobileoff v]\nset [mobileactive v] to [0]\nhide\ndelete this clone\n\nwhen I receive [mobiletick v]\ngo to [front v] layer\ngo [backward v] (1) layers\nif <(costume [number v]) = [3]> then\n    go to [front v] layer\n    if <(mobileActive) < [1]> then\n        if <mouse down?> then\n            show\n            set [mobileactive v] to [2]\n            switch costume to (mobile-ring v)\n            create clone of (_myself_ v)\n            set [ghost v] effect to (60)\n            switch costume to (mobile-back v)\n            create clone of (_myself_ v)\n            set [ghost v] effect to (0)\n            switch costume to (mobile-pad v)\n        end\n    else\n        set [mobileleft v] to [0]\n        set [mobileright v] to [0]\n        set [mobileup v] to [0]\n        set [mobiledown v] to [0]\n        if <(mobileActive) < [2]> then\n            if <mouse down?> then\n                if <(mouse y) < [0]> then\n                    if <(mouse x) > [0]> then\n                        set [mobilequadrant v] to [1]\n                    else\n                        set [mobilequadrant v] to [2]\n                    end\n                else\n                    if <(mouse x) < [0]> then\n                        set [mobilequadrant v] to [3]\n                    else\n                        set [mobilequadrant v] to [4]\n                    end\n                end\n                if <(mobileQuadrant) = (mobileCurrentQuadrant)> then\n                    set [mobileactive v] to [3]\n                else\n                    set [mobileactive v] to [2]\n                    if <(mobileQuadrant) > [2]> then\n                        set [mobiley v] to [108]\n                    else\n                        set [mobiley v] to [-108]\n                    end\n                    if <<(mobileQuadrant) > [1]> and <(mobileQuadrant) < [4]>> then\n                        set [mobilex v] to [-168]\n                    else\n                        set [mobilex v] to [168]\n                    end\n                end\n                set [mobilecurrentquadrant v] to (mobileQuadrant)\n                broadcast (mobileReposition v)\n            end\n        else\n            if <(mobileActive) > [2]> then\n                go to x: (mobileX) y: (mobileY)\n                point towards (mouse-pointer v)\n                if <(distance to [mouse-pointer v]) > [12]> then\n                    if <(enabled) = [1]> then\n                        if <<(direction) < [-45]> and <(direction) > [-135]>> then\n                            set [mobileleft v] to [1]\n                        end\n                        if <<(direction) > [45]> and <(direction) < [135]>> then\n                            set [mobileright v] to [1]\n                        end\n                        if <([abs v] of (direction) ) < [45]> then\n                            set [mobileup v] to [1]\n                        end\n                        if <([abs v] of (direction) ) > [135]> then\n                            set [mobiledown v] to [1]\n                        end\n                    else\n                        if <<(direction) < [-22.5]> and <(direction) > [-157.5]>> then\n                            set [mobileleft v] to [1]\n                        end\n                        if <<(direction) > [22.5]> and <(direction) < [157.5]>> then\n                            set [mobileright v] to [1]\n                        end\n                        if <([abs v] of (direction) ) < [70]> then\n                            set [mobileup v] to [1]\n                        end\n                    end\n                end\n                if <(distance to [mouse-pointer v]) > [36]> then\n                    go to x: (mobileX) y: (mobileY)\n                    move (36) steps\n                else\n                    go to (mouse-pointer v)\n                end\n            end\n            if <mouse down?> then\n        end\n        if <key (any v) pressed?> then\n            broadcast (mobileOff v)\n        end\n    end\nend\n\nwhen I receive [mobilereposition v]\ngo to x: (mobileX) y: (mobileY)\n\nsay (join (join (join (mobileLeft) (join [,] (mobileRight))) (join [,] (join (mobileUp) [,]))) (mobileDown))\n\nwhen I receive [levelstart v]\nif <(mobileActive) > [0]> then\n    show\nend\n\nwhen I receive [scenea v]\nhide\n\nwhen I receive [sceneb v]\nhide\n\nwhen I receive [scenec v]\nhide\n\nwhen I receive [scened v]\nhide\n\nwhen I receive [returntomonke v]\nhide\n\nwhen I receive [titlestart v]\nhide\ndelete this clone\n\n