Tower of Lines (A non-generic platformer!)
@Stage\n\nwhen flag clicked\nforever\n    if <(gamestart) = [0]> then\n        play sound [Dance Funky v] until done\n    end\nend\n\nwhen I receive [start game v]\nrepeat until <(Boss health) < [0.1]>\n    play sound [Eggs v] until done\nend\nforever\n    play sound [Triumph v] until done\nend\n\n@platform\n\nwhen I receive [screenshake v]\nchange x by (2)\nwait (.05) seconds\nchange x by (-4)\nwait (.05) seconds\nchange x by (3)\nwait (.05) seconds\nchange x by (-2)\nwait (.05) seconds\nchange x by (1)\nset x to (0)\n\nwhen I receive [boss v]\nchange [level v] by (1)\n\nwhen I receive [spike v]\nbroadcast (screenshake v)\nbroadcast (screenshake v)\n\nwhen I receive [start game v]\nset [level v] to [0]\nswitch costume to (level v)\ngo to x: (0) y: (571)\n\nwhen I receive [bos unhapp v]\nbroadcast (screenshake v)\nwait (0.3) seconds\nbroadcast (screenshake v)\nwait (0.3) seconds\nbroadcast (screenshake v)\nwait (0.3) seconds\nbroadcast (screenshake v)\nwait (0.3) seconds\nbroadcast (screenshake v)\nwait (0.3) seconds\nbroadcast (screenshake v)\nwait (0.3) seconds\n\nwhen flag clicked\nhide\n\nwhen I receive [boss v]\nnext costume\ngo to x: (0) y: (562)\n\nwhen I receive [reset v]\ngo to x: (0) y: (571)\nshow\nwait (.1) seconds\ngo to [back v] layer\n\nwhen I receive [camera v]\nforever\n    change y by (camera scrolling)\n    broadcast (decor v)\nend\n\n@cuber\n\nwhen flag clicked\nset [player.move v] to [0]\n\nwhen I receive [end dialogue v]\nset [player.move v] to [1]\n\nwhen I receive [boss v]\ngo to x: (0) y: (4)\n\nbroadcast (end dialogue v)\n\nwhen flag clicked\nforever\n    if <not <(player.move) = [2]>> then\n        Platformer\n    end\nend\n\ndefine Platformer\npoint in direction (1)\nswitch costume to (hitbox v)\nset size to (100) %\nchange y by (y.vel)\nif <not <touching (platform v)?>> then\n    if <touching (ladders v)?> then\n        set [y.vel v] to [-1]\n    else\n        change [y.vel v] by (-1)\n    end\nend\nif <touching (platform v)?> then\n    repeat until <not <touching (platform v)?>>\n        if <(y.vel) < [0]> then\n            change y by (1)\n        else\n            change y by (-1)\n        end\n    end\n    if <<(player.move) = [1]> and <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <(y.vel) < [0]>>> then\n        if <not <touching (ladders v)?>> then\n            set [y.vel v] to [11]\n        end\n    else\n        set [y.vel v] to [0]\n    end\nend\nif <<(player.move) = [1]> and <<touching (ladders v)?> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>>> then\n    set [y.vel v] to [3]\nend\nif <<(player.move) = [1]> and <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n    if <not <<(Level up) = [1]> and <(x position) < [-80]>>> then\n        change [x.vel v] by (-2)\n    else\n        if <(boss.defeated?) = [1]> then\n            change [x.vel v] by (-2)\n        end\n    end\nend\nif <<(player.move) = [1]> and <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n    change [x.vel v] by (2)\nend\nchange x by (x.vel)\nif <touching (platform v)?> then\n    repeat until <not <touching (platform v)?>>\n        if <(x.vel) > [0]> then\n            change x by (-1)\n        else\n            change x by (1)\n        end\n    end\nend\npoint in direction (x.vel)\nset [x.vel v] to ((.6) * (x.vel))\nif <not <touching (ladders v)?>> then\n    if <(round (x.vel)) = [0]> then\n        if <(throw?) = [0]> then\n            set [costume.action v] to [idle]\n        else\n            set [costume.action v] to [throw-idle]\n        end\n    else\n        if <(throw?) = [0]> then\n            set [costume.action v] to [run]\n        else\n            set [costume.action v] to [throw-run]\n        end\n    end\nelse\n    if <([abs v] of (round (y.vel)) ) < [1.5]> then\n        set [costume.action v] to [climb-idle]\n    else\n        set [costume.action v] to [climb]\n    end\nend\nswitch costume to (join (costume.action) (costume.rotation))\nif <(throw?) = [0]> then\n    point in direction (x.vel)\nelse\n    point towards (boomerang v)\nend\nset size to (400) %\nif <([y position v] of [platform v]) > [-550]> then\n    set [camera scrolling v] to (round (((y position) + (20)) * (-.1)))\nelse\n    set [camera scrolling v] to [0]\n    broadcast (boss v)\nend\nbroadcast (camera v)\nbroadcast (sync v)\n\nwhen I receive [camera v]\nforever\n    change y by (camera scrolling)\nend\n\nwhen flag clicked\nforever\n    set [costume.rotation v] to []\n    wait (.2) seconds\n    set [costume.rotation v] to [1]\n    wait (.2) seconds\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [screenshake v]\nchange x by (2)\nwait (.05) seconds\nchange x by (-4)\nwait (.05) seconds\nchange x by (3)\nwait (.05) seconds\nchange x by (-2)\nwait (.05) seconds\nchange x by (1)\nchange y by (y.vel)\nset [old.y.vel v] to (y.vel)\nif <touching (platform v)?> then\n    set [y.vel v] to [0]\nend\nchange y by ((old.y.vel) * (-2))\n\nwhen flag clicked\nset [health v] to [3]\nwait (.2) seconds\nset [health v] to [3]\nforever\n    if <not <(health) = [0]>> then\n        if <(player.imune) = [1]> then\n            if <<touching (spikes v)?> or <<touching (sprite1 v)?> or <<touching (spike boss v)?> or <<touching (boss v)?> or <<touching (spike boss v)?> or <touching (spike boss2 v)?>>>>>> then\n                damage\n            end\n        else\n            if <<touching (spikes v)?> or <<touching (sprite1 v)?> or <<touching (spike boss v)?> or <<touching (boss v)?> or <<touching (spike boss v)?> or <touching (spike boss2 v)?>>>>>> then\n                damage\n            end\n        end\n    end\nend\n\nwhen I receive [start.bossfight v]\nset [player.move v] to [1]\n\nwhen I receive [reset v]\npoint in direction (90)\ngo to x: (0) y: (4)\nset [y.vel v] to [0]\nset [ghost v] effect to (0)\nshow\nset [health v] to [3]\nset [level up v] to [0]\nwait (.1) seconds\nset [health v] to [3]\n\nwhen I receive [reset v]\nset [level up v] to [0]\nif <(level) < [3]> then\n    wait until <<(y position) > [150]> and <[-295] > ([y position v] of [platform v])>>\nend\n\nbroadcast (boss v)\n\nstart sound [sound \(13\) v]\nset [y.vel v] to [0]\nset [player.move v] to [2]\nset [level up v] to [1]\nbroadcast (transition v)\nbroadcast (boss2 v)\nrepeat (20)\ngo to x: (192) y: (-15)\nset [player.move v] to [0]\nrepeat (20)\nrepeat (30)\n    set [x.vel v] to [-3]\nend\nbroadcast (boss.dialouge v) and wait\n\nwhen I receive [reset v]\n\ndefine damage\nbroadcast (screenshake v)\nchange [health v] by (-1)\nif <not <(health) = [0]>> then\n    play sound [Crunch v] until done\n    set [x.vel v] to [-20]\n    set [y.vel v] to [10]\n    set [brightness v] effect to (100)\n    wait (.05) seconds\n    set [brightness v] effect to (0)\n    wait (1) seconds\nelse\n    broadcast (player.die v)\n    broadcast (Player boss v)\n    set [player.move v] to [2]\n    repeat (25)\n        change [ghost v] effect by (4)\n    end\n    broadcast (transition v)\n    repeat (20)\n    set [player.move v] to [1]\n    broadcast (reset v)\nend\n\nwhen flag clicked\nset [timer v] to [0]\nforever\n    change [timer v] by (.1)\nend\n\nwhen I receive [boss.defeated v]\nset [player.move v] to [2]\n\nswitch costume to (idle v)\n\nwhen I receive [win v]\nset [player.move v] to [1]\n\nstart sound [jump v]\n\nstart sound [hurt v]\n\nstart sound [sound \(15\) v]\n\nwhen flag clicked\nforever\n    if <(level) = [2]> then\n        set [camera scrolling v] to [-1.5]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (sprite1 v)?> then\n        damage\n    end\nend\n\nbroadcast (reset v)\n\nrepeat (3)\n\nrepeat until <(health) = [0]>\n\nwhen flag clicked\nforever\n    set [xpos v] to (x position)\nend\n\nwhen I receive [start game v]\nshow\nbroadcast (reset v)\nbroadcast (end dialogue v)\n\nwhen I receive [back v]\nhide\n\nwhen I receive [back v]\nhide\n\nwhen I receive [invis v]\n\nwhen I receive [start game v]\nforever\n    if <[12] > (accessory)> then\n        if <<(favourite) = [1]> and <(loved yes) = [1]>> then\n            create clone of (_myself_ v)\n        end\n    end\nend\n\nwhen I start as a clone\nset [ghost v] effect to (-25)\nrepeat (5)\n    if <(death) = [0]> then\n        show\n        change [brightness v] effect by (-1)\n        change [ghost v] effect by (30)\n    else\n        delete this clone\n    end\nend\ndelete this clone\n\nwhen I receive [invis v]\n\nhide\n\nif <key (space v) pressed?> then\n\nwhen I receive [invis v]\nswitch costume to (hide.2 v)\nforever\n    wait until <key (space v) pressed?>\n    switch costume to (hide.2 v)\nend\n\nwait until <key (space v) pressed?>\nswitch costume to (idle1 v)\n\nif <(gamestart) = [1]> then\n\nswitch costume to (hide.2 v)\n\n\n\nbroadcast (player.die v)\nbroadcast (reset v)\n\nwhen I receive [start game v]\nforever\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        play sound [Jump v] until done\n    end\nend\n\nwhen flag clicked\nforever\n    if <(health) = [0]> then\n        play sound [Oops v] until done\n        wait (1) seconds\n    end\nend\n\n@spikes\n\nwhen flag clicked\nset [level v] to [0]\nhide\n\nwhen I receive [decor v]\ngo to (platform v)\n\nwhen I receive [reset v]\ngo to [back v] layer\n\nswitch costume to (level v)\n\nwhen I receive [start game v]\nshow\nforever\n    if <<(y position) = [110]> or <(y position) = [-349]>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [back v]\nhide\n\nswitch costume to (level v)\n\nwhen I receive [reset v]\ngo to x: (0) y: (571)\nshow\nwait (.1) seconds\ngo to [back v] layer\n\nwhen I receive [boss v]\nnext costume\ngo to x: (0) y: (562)\n\nwhen flag clicked\nswitch costume to (level v)\ngo to x: (0) y: (571)\n\nwhen I receive [camera v]\nchange y by (camera scrolling)\nbroadcast (decor v)\n\n@Bouncy pad\n\nwhen flag clicked\nhide\nforever\n    if <<<(favourite) = [0]> and <(loved yes) = [0]>> or <(equip) = [12]>> then\n        if <touching (cuber v)?> then\n            set [y.vel v] to [20]\n        end\n    else\n        if <touching (cuber v)?> then\n            set [y.vel v] to [15]\n        end\n    end\nend\n\nwhen I receive [decor v]\ngo to (platform v)\n\nwhen I receive [reset v]\ngo to [back v] layer\n\nswitch costume to (level v)\n\nwhen I receive [start game v]\nshow\n\nwhen I receive [start game v]\nforever\n    if <<<(y position) = [-451]> or <(y position) = [203]>> or <(y position) = [488]>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [back v]\nhide\n\nrepeat (10)\n\nswitch costume to (level v)\n\nwhen I receive [reset v]\ngo to x: (0) y: (571)\nshow\nwait (.1) seconds\ngo to [back v] layer\n\nwhen I receive [boss v]\nset [health v] to [3]\nnext costume\ngo to x: (0) y: (562)\n\nwhen flag clicked\nswitch costume to (level v)\ngo to x: (0) y: (571)\n\nwhen I receive [camera v]\nchange y by (camera scrolling)\nbroadcast (decor v)\n\n@Sprite1\n\nwhen flag clicked\nset [level v] to [0]\nhide\nwait (1) seconds\nhide\n\nwhen I receive [start game v]\nset [level v] to [0]\nforever\n    if <(level) = [2]> then\n        show\n    else\n        hide\n    end\nend\n\n@BOSS\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nset [death v] to [0]\nforever\n    turn left (15) degrees\nend\n\nwhen I receive [player.die v]\nrepeat (10)\n    set [death v] to [1]\nend\n\n\n\nwhen I receive [reset v]\nset [boss health v] to [20]\nset [death v] to [1]\nwait (0.5) seconds\nset [death v] to [0]\n\n\n\nwhen I receive [boss thing v]\nwait (0) seconds\npoint in direction (90)\nset rotation style [all around v]\nglide (1) secs to x: (0) y: (150)\nset [death v] to [0]\nwait until <(level) = [3]>\nif <(level) = [3]> then\n    show\n    repeat (1)\n        repeat until <(Boss health) < [15]>\n            if <(death) = [0]> then\n                repeat until <<[15] > (Boss health)> or <(death) = [1]>>\n                    if <(death) = [1]> then\n                        broadcast (boss thing v)\n                        stop [this script v]\n                    end\n                    set [boss acceleration v] to [0]\n                    glide (0.3) secs to x: (xpos) y: (150)\n                    repeat (20)\n                        go to x: (xpos) y: (150)\n                    end\n                    wait (1) seconds\n                    repeat until <(y position) < [-66]>\n                        point in direction (180)\n                        move (boss acceleration) steps\n                        change [boss acceleration v] by (1)\n                    end\n                    broadcast (spike v)\n                    set [spike v] to [1]\n                end\n            else\n                broadcast (boss thing v)\n                stop [this script v]\n            end\n        end\n    end\n    set [spike v] to [0]\n    glide (1) secs to x: (0) y: (150)\n    set [spike v] to [1]\n    repeat (1)\n        repeat until <(Boss health) < [10]>\n            if <(death) = [0]> then\n                if <(Boss health) > [10]> then\n                    glide (1) secs to x: (0) y: (150)\n                    if <(death) = [1]> then\n                        broadcast (boss thing v)\n                        stop [this script v]\n                    end\n                    wait (1) seconds\n                    if <(death) = [1]> then\n                        broadcast (boss thing v)\n                        stop [this script v]\n                    end\n                    point towards (cuber v)\n                    wait (0) seconds\n                    set [spike v] to [0]\n                    set [boss acceleration v] to [0]\n                    repeat until <(y position) < [-66]>\n                        turn right (15) degrees\n                        move (boss acceleration) steps\n                        change [boss acceleration v] by (0.2)\n                        set [spike v] to [1]\n                        if <(death) = [1]> then\n                            broadcast (boss thing v)\n                            stop [this script v]\n                        end\n                    end\n                    broadcast (screenshake v)\n                    set [boss acceleration v] to [0]\n                    set [boss acceleration v] to [0]\n                end\n            else\n                broadcast (boss thing v)\n                stop [this script v]\n            end\n        end\n        glide (1) secs to x: (-150) y: (-110)\n        repeat (1)\n            repeat until <[5] > (Boss health)>\n                if <(death) = [0]> then\n                    glide (1.5) secs to x: (150) y: (y position)\n                    if <(death) = [1]> then\n                        broadcast (boss thing v)\n                        stop [this script v]\n                    end\n                    set [spike v] to [0]\n                    set [spike v] to [0]\n                    broadcast (spike v)\n                    set [spike v] to [0]\n                    set [spike v] to [0]\n                    glide (1.5) secs to x: (-150) y: (y position)\n                    if <(death) = [1]> then\n                        broadcast (boss thing v)\n                        stop [this script v]\n                    end\n                    set [spike v] to [0]\n                    set [spike v] to [0]\n                    broadcast (spike v)\n                else\n                    stop [this script v]\n                end\n            end\n        end\n        repeat (1)\n            repeat until <[0] > (Boss health)>\n                if <(death) = [0]> then\n                    set [spike v] to [1]\n                    glide (1) secs to x: (150) y: (150)\n                    if <(death) = [1]> then\n                        broadcast (boss thing v)\n                        stop [this script v]\n                    end\n                    broadcast (screenshake v)\n                    set [spike v] to [1]\n                    glide (1) secs to x: (-150) y: (150)\n                    if <(death) = [1]> then\n                        broadcast (boss thing v)\n                        stop [this script v]\n                    end\n                    broadcast (screenshake v)\n                else\n                    broadcast (boss thing v)\n                    stop [this script v]\n                end\n            end\n        end\n        stop [this script v]\n    end\nend\n\nif <(death) = [1]> then\n    broadcast (boss thing v)\n    stop [this script v]\nend\n\nwhen flag clicked\nwait (1) seconds\nforever\n    if <(level) = [3]> then\n        wait until <(death) = [1]>\n        broadcast (boss thing v)\n    end\nend\n\nwhen I receive [start game v]\nclear graphic effects\nhide\nwait (2.1) seconds\npoint in direction (90)\nset rotation style [all around v]\ngo to x: (0) y: (150)\nwait until <(level) = [3]>\nplay sound [Dun Dun Dunnn v] until done\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nbroadcast (screenshake v)\nif <(level) = [3]> then\n    show\n    repeat (1)\n        repeat until <(Boss health) < [15]>\n            if <(death) = [0]> then\n                repeat until <<[15] > (Boss health)> or <(death) = [1]>>\n                    if <(death) = [1]> then\n                        broadcast (boss thing v)\n                        stop [this script v]\n                    end\n                    set [boss acceleration v] to [0]\n                    glide (0.3) secs to x: (xpos) y: (150)\n                    repeat (20)\n                        go to x: (xpos) y: (150)\n                    end\n                    wait (1) seconds\n                    repeat until <(y position) < [-66]>\n                        point in direction (180)\n                        move (boss acceleration) steps\n                        change [boss acceleration v] by (1)\n                    end\n                    broadcast (spike v)\n                    set [spike v] to [1]\n                end\n            else\n                broadcast (boss thing v)\n                stop [this script v]\n            end\n        end\n    end\n    set [spike v] to [0]\n    glide (1) secs to x: (0) y: (150)\n    set [spike v] to [1]\n    repeat (1)\n        repeat until <(Boss health) < [10]>\n            if <(death) = [0]> then\n                if <(Boss health) > [10]> then\n                    glide (1) secs to x: (0) y: (150)\n                    if <(death) = [1]> then\n                        broadcast (boss thing v)\n                        stop [this script v]\n                    end\n                    wait (1) seconds\n                    if <(death) = [1]> then\n                        broadcast (boss thing v)\n                        stop [this script v]\n                    end\n                    point towards (cuber v)\n                    wait (0) seconds\n                    set [spike v] to [0]\n                    set [boss acceleration v] to [0]\n                    repeat until <(y position) < [-66]>\n                        turn right (15) degrees\n                        move (boss acceleration) steps\n                        change [boss acceleration v] by (0.2)\n                        set [spike v] to [1]\n                        if <(death) = [1]> then\n                            broadcast (boss thing v)\n                            stop [this script v]\n                        end\n                    end\n                    broadcast (screenshake v)\n                    set [boss acceleration v] to [0]\n                    set [boss acceleration v] to [0]\n                end\n            else\n                broadcast (boss thing v)\n                stop [this script v]\n            end\n        end\n    end\n    glide (1) secs to x: (-150) y: (-110)\n    repeat (1)\n        repeat until <[5] > (Boss health)>\n            if <(death) = [0]> then\n                glide (1.5) secs to x: (150) y: (y position)\n                if <(death) = [1]> then\n                    broadcast (boss thing v)\n                    stop [this script v]\n                end\n                set [spike v] to [0]\n                set [spike v] to [0]\n                broadcast (spike v)\n                set [spike v] to [0]\n                set [spike v] to [0]\n                glide (1.5) secs to x: (-150) y: (y position)\n                if <(death) = [1]> then\n                    broadcast (boss thing v)\n                    stop [this script v]\n                end\n                set [spike v] to [0]\n                set [spike v] to [0]\n                broadcast (spike v)\n            else\n                stop [this script v]\n            end\n        end\n    end\n    repeat (1)\n        repeat until <[0] > (Boss health)>\n            if <(death) = [0]> then\n                set [spike v] to [1]\n                glide (1) secs to x: (150) y: (150)\n                if <(death) = [1]> then\n                    broadcast (boss thing v)\n                    stop [this script v]\n                end\n                broadcast (screenshake v)\n                set [spike v] to [1]\n                glide (1) secs to x: (-150) y: (150)\n                if <(death) = [1]> then\n                    broadcast (boss thing v)\n                    stop [this script v]\n                end\n                broadcast (screenshake v)\n            else\n                broadcast (boss thing v)\n                stop [this script v]\n            end\n        end\n    end\n    stop [this script v]\nend\n\nwhen I receive [bos unhapp v]\nrepeat (30)\n    change [ghost v] effect by (1)\nend\nhide\nstop [other scripts in sprite v]\n\nplay sound [pop v] until done\n\nwhen I receive [camera v]\nforever\n    change y by (camera scrolling)\n    broadcast (decor v)\nend\n\n@skill issue\n\n@dark\n\nwhen flag clicked\nhide\n\nwhen I receive [back v]\nhide\n\nwhen I receive [start game v]\nhide\ngo to x: (0) y: (0)\nwait (1) seconds\nwait until <(level) = [3]>\nshow\n\nwhen I receive [bos unhapp v]\n\n@spike boss\n\nwhen flag clicked\nhide\nset rotation style [all around v]\nwait (1) seconds\nforever\n    if <(spike) = [1]> then\n        wait (0.3) seconds\n        repeat (10)\n            create clone of (_myself_ v)\n            turn right (36) degrees\n        end\n        set [spike v] to [0]\n    end\nend\n\nwait (1) seconds\n\nwhen I start as a clone\nset rotation style [all around v]\nset [ghost v] effect to (0)\ngo to (boss v)\nshow\nrepeat until <touching (_edge_ v)?>\n    move (5) steps\nend\nset [spike acceleration v] to [0]\ndelete this clone\n\npoint in direction (0)\n\nwhen I receive [spike v]\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [camera v]\nforever\n    change y by (camera scrolling)\n    broadcast (decor v)\nend\n\nwhen I receive [bos unhapp v]\nhide\nstop [other scripts in sprite v]\n\n@boss spike\n\nwhen flag clicked\nhide\nwait (1) seconds\nwait (1) seconds\nhide\nforever\n    if <(level) = [3]> then\n        show\n        set size to (90) %\n        go to (boss v)\n        turn right (10) degrees\n    end\nend\n\nwhen I receive [camera v]\nforever\n    change y by (camera scrolling)\n    broadcast (decor v)\nend\n\nwhen I receive [bos unhapp v]\nhide\nstop [other scripts in sprite v]\n\n@Star\n\nwhen flag clicked\nhide\nwait (1) seconds\nwait until <(level) = [3]>\nshow\ngo to x: (pick random (-150) to (150)) y: (-15)\nwait until <touching (cuber v)?>\nrepeat until <touching (boss v)?>\n    create clone of (_myself_ v)\n    point towards (boss v)\n    move (20) steps\n    change [brightness v] effect by (2)\nend\nplay sound [Wobble v] until done\nrepeat (10)\n    change [boss health v] by (-0.15)\n    change [ghost v] effect by (25)\nend\nbroadcast (screenshake v)\nbroadcast (spawn star v)\nhide\n\nwhen I start as a clone\nshow\nrepeat (10)\n    change [ghost v] effect by (25)\n    change [brightness v] effect by (1)\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    turn left (15) degrees\nend\n\nforever\n\nwhen I receive [spawn star v]\nclear graphic effects\nwait (3) seconds\nshow\ngo to x: (pick random (-150) to (150)) y: (-15)\nwait until <touching (cuber v)?>\nrepeat until <touching (boss v)?>\n    create clone of (_myself_ v)\n    point towards (boss v)\n    move (20) steps\n    change [brightness v] effect by (2)\nend\nplay sound [Wobble v] until done\nrepeat (10)\n    change [boss health v] by (-0.15)\n    change [ghost v] effect by (25)\nend\nbroadcast (screenshake v)\nbroadcast (spawn star v)\nhide\n\nwait (2) seconds\n\nwhen I receive [bos unhapp v]\nhide\n\nwhen I receive [bos unhapp v]\nstop [other scripts in sprite v]\n\nplay sound [collect v] until done\n\n@boss Health Bar\n\ngo to (player v)\nchange y by (70)\n\nwhen flag clicked\nhide\nset [boss health v] to [20]\nset [boss max v] to [20]\nwait (1) seconds\nwait until <(level) = [3]>\nshow\nswitch costume to (base v)\nset size to (300) %\ngo to [front v] layer\ncreate clone of (_myself_ v)\nswitch costume to (full v)\nforever\n    switch costume to (big v)\n    Position Bar\n    if <(percent) < [0.5]> then\n        switch costume to (empty v)\n    else\n        switch costume to (full v)\n    end\n    set [width v] to ((46) * ((size) / (100)))\n    change x by ((width) * (percent))\nend\n\nwhen I start as a clone\nforever\n    Position Bar\nend\n\ndefine Position Bar\ngo to x: (0) y: (150)\nset [percent v] to ((Boss health) / (Boss max))\n\nset [percent v] to ((HEALTH) / (MAX HEALTH))\nset [color v] effect to ((percent) * (50))\n\nhide\n\nwhen flag clicked\nwait (1) seconds\nforever\n    if <(Boss health) < [0.1]> then\n        broadcast (bos unhapp v)\n    end\nend\n\nwhen I receive [bos unhapp v]\nhide\n\nbroadcast (Back v)\n\nwhen I receive [bos unhapp v]\nhide\nstop [other scripts in sprite v]\n\n@Sprite2\n\nwhen flag clicked\nhide\n\nwhen I receive [start game v]\nshow\nforever\n    if <(health) = [3]> then\n        switch costume to (costume1 v)\n    end\n    if <(health) = [2]> then\n        switch costume to (costume2 v)\n    end\n    if <(health) = [1]> then\n        switch costume to (costume3 v)\n    end\n    if <(health) = [0]> then\n        switch costume to (costume4 v)\n    end\nend\n\n@heart\n\nforever\nend\n\nwhen I start as a clone\nshow\ngo to x: (pick random (-150) to (150)) y: (-15)\nwait until <touching (cuber v)?>\nchange [health v] by (1)\nrepeat (10)\n    change [ghost v] effect by (25)\nend\ndelete this clone\n\nforever\n    if  then\n    end\nend\n\nwhen flag clicked\n\nwait (2) seconds\n\nwait (1) seconds\n\nbroadcast (spawn star v)\nhide\n\nchange [ghost v] effect by (25)\nchange [brightness v] effect by (1)\n\nwhen I start as a clone\npoint in direction (90)\nforever\n    repeat (20)\n        turn left (1) degrees\n        change size by (2)\n    end\n    repeat (20)\n        turn right (1) degrees\n        change size by (-2)\n    end\n    set size to (50) %\nend\n\nwhen flag clicked\nforever\n    if <[3] < (health)> then\n        set [health v] to [3]\n    end\nend\n\nwhen I receive [start game v]\nhide\nwait (1) seconds\nwait until <(level) = [3]>\nrepeat until <(Boss health) < [0.1]>\n    hide\n    wait (20) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I receive [bos unhapp v]\nhide\n\n@start button\n\nwhen flag clicked\ngo to x: (0) y: (-60)\nforever\n    turn right (2) degrees\nend\n\n\n\ngo to x: (0) y: (-20)\n\nwhen flag clicked\ngo to x: (0) y: (-60)\nshow\nwait (0.1) seconds\nshow\nforever\n    if <(hide) = [0]> then\n        if <touching (mouse-pointer v)?> then\n            set size to (230) %\n            if <mouse down?> then\n                broadcast (Start game v)\n            end\n        else\n            set size to (200) %\n        end\n    else\n        set size to (1) %\n        hide\n    end\nend\n\nwhen I receive [start game v]\nrepeat (30)\n    change size by (20)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen flag clicked\nclear graphic effects\nset size to (200) %\nrepeat (10)\n    change size by (10)\nend\n\nwhen I receive [instructions v]\nset size to (1) %\nhide\n\nwhen I receive [back v]\nrepeat (10)\n    clear graphic effects\n    show\nend\n\n@Title\n\nwhen I receive [start game v]\nrepeat (30)\n    change size by (20)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen flag clicked\nclear graphic effects\nset size to (200) %\nshow\nforever\n    repeat (20)\n        change size by (1)\n    end\n    repeat (20)\n        change size by (-1)\n    end\nend\n\nwhen I receive [instructions v]\nhide\n\nwhen I receive [back v]\nrepeat (10)\n    set size to (200) %\n    clear graphic effects\n    show\nend\n\n@button \n\nwhen I receive [start game v]\nrepeat (30)\n    change size by (20)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen flag clicked\nset [hide v] to [0]\nshow\nforever\n    if <(hide) = [0]> then\n        if <touching (mouse-pointer v)?> then\n            set size to (230) %\n            if <mouse down?> then\n                broadcast (Instructions v)\n                set [hide v] to [1]\n            end\n        else\n            set size to (200) %\n        end\n    end\nend\n\nwhen flag clicked\nclear graphic effects\nset size to (200) %\nrepeat (10)\n    change size by (10)\nend\n\nwhen I receive [instructions v]\nhide\nset size to (1) %\n\nwhen I receive [back v]\nrepeat (10)\n    clear graphic effects\n    show\nend\n\n@Instructions\n\nwhen flag clicked\nset size to (100) %\nclear graphic effects\nhide\n\nwhen I receive [instructions v]\nset size to (100) %\nclear graphic effects\nshow\n\nwhen I receive [back v]\nrepeat (1)\n    change size by (-100)\n    change [ghost v] effect by (5)\nend\nhide\n\n@Button\n\nwhen flag clicked\ngo to x: (-214) y: (160)\nhide\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (150) %\n        if <mouse down?> then\n            broadcast (Back v)\n        end\n    else\n        set size to (100) %\n    end\nend\n\nwhen I receive [instructions v]\nclear graphic effects\nshow\n\nwhen I receive [back v]\nrepeat (10)\n    change size by (-10)\n    change [ghost v] effect by (5)\nend\nhide\n\n@Customize\n\nwhen I receive [back v]\nset [hide v] to [0]\n\nwhen flag clicked\nforever\n    if <(hide) = [0]> then\n        if <(accessory) = (max)> then\n            hide\n            set size to (1) %\n        else\n            show\n            set size to (300) %\n        end\n    else\n        set size to (1) %\n        hide\n    end\nend\n\nwhen flag clicked\ngo to x: (-175) y: (4)\nforever\n    if <(hide) = [0]> then\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            broadcast (up v)\n            wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n        end\n    else\n        set size to (1) %\n        hide\n    end\nend\n\nwhen I receive [start game v]\nhide\n\nwait (0.3) seconds\n\nwhen I receive [back v]\nshow\n\nwhen I receive [instructions v]\nhide\n\n@Customize2\n\nwhen flag clicked\ngo to x: (-175) y: (-62)\nforever\n    if <(hide) = [0]> then\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            broadcast (down v)\n            wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n        end\n    else\n        set size to (1) %\n        hide\n    end\nend\n\nwhen I receive [start game v]\nset [hide v] to [1]\nhide\n\nwhen flag clicked\nforever\n    if <(hide) = [0]> then\n        if <(accessory) = (min)> then\n            hide\n            set size to (1) %\n        else\n            show\n            set size to (300) %\n        end\n    else\n        set size to (1) %\n        hide\n    end\nend\n\nwhen I receive [back v]\nshow\n\nwhen I receive [instructions v]\nhide\n\nwait (0.3) seconds\n\n@hat\n\nwhen flag clicked\nset [gamestart v] to [0]\nshow\nset [max v] to [12]\nset [min v] to [-1]\nset [accessory v] to [0]\nset size to (300) %\ngo to x: (-160) y: (-70)\nforever\n    if <(gamestart) = [0]> then\n        if <[0] = (accessory)> then\n            go to x: (-170) y: (-64)\n            switch costume to (0 v)\n        end\n        if <[1] = (accessory)> then\n            go to x: (-170) y: (-64)\n            switch costume to (1 v)\n        end\n        if <(max) < (accessory)> then\n            set [accessory v] to [1]\n        end\n        if <(accessory) < (min)> then\n            set [accessory v] to (min)\n        end\n        if <[2] = (accessory)> then\n            switch costume to (2 v)\n        end\n        if <[3] = (accessory)> then\n            go to x: (-170) y: (-64)\n            go to x: (-170) y: (-64)\n            switch costume to (3 v)\n        end\n        if <[5] = (accessory)> then\n            switch costume to (5 v)\n            go to x: (-172) y: (-20)\n        end\n        if <[4] = (accessory)> then\n            switch costume to (4 v)\n            go to x: (-162) y: (-98)\n        end\n        if <[6] = (accessory)> then\n            switch costume to (6 v)\n        end\n        if <[7] = (accessory)> then\n            switch costume to (7 v)\n        end\n        if <[9] = (accessory)> then\n            switch costume to (8 v)\n        end\n        if <(accessory) = [-1]> then\n            switch costume to (-1 v)\n            go to x: (-169) y: (0)\n        end\n        if <(accessory) = [10]> then\n            switch costume to (9 v)\n        end\n        if <(accessory) = [11]> then\n            switch costume to (10 v)\n        end\n        if <(accessory) = [12]> then\n            switch costume to (11 v)\n        end\n    end\nend\n\nwhen I receive [start game v]\nset [gamestart v] to [1]\nset size to (100) %\ngo to (cuber v)\nif <[-1] = (equip)> then\n    switch costume to (-1 v)\nend\nif <[0] = (equip)> then\n    switch costume to (0 v)\nend\nif <[1] = (equip)> then\n    switch costume to (1 v)\nend\nif <[2] = (equip)> then\n    switch costume to (2 v)\nend\nif <[3] = (equip)> then\n    switch costume to (3 v)\nend\nif <[4] = (equip)> then\n    switch costume to (4 v)\nend\nif <[5] = (equip)> then\n    switch costume to (5 v)\nend\nif <[6] = (equip)> then\n    switch costume to (6 v)\nend\nif <[7] = (equip)> then\n    switch costume to (7 v)\nend\nif <[8] = (equip)> then\n    switch costume to (8 v)\nend\nif <[10] = (equip)> then\n    switch costume to (9 v)\nend\nif <[11] = (equip)> then\n    switch costume to (10 v)\nend\nif <(equip) = [9]> then\n    switch costume to (8 v)\nend\nif <(equip) = [12]> then\n    broadcast (Invis v)\nend\nforever\n    if <(back 1) = [0]> then\n        go to (cuber v)\n    end\nend\n\nforever\n\nwhen I receive [down v]\nchange [accessory v] by (-1)\n\nwhen I receive [up v]\nchange [accessory v] by (1)\n\nnext costume\n\nwhen I receive [start game v]\nset rotation style [left-right v]\nforever\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        point in direction (90)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        point in direction (-90)\n    end\nend\n\nwhen I receive [player.die v]\nhide\nwait (1.5) seconds\nshow\n\ngo to x: (-161) y: (29)\n\nwhen flag clicked\ngo to [front v] layer\ngo [backward v] (1) layers\n\nif <[11] = (equip)> then\n    switch costume to (-1 v)\nend\n\nwhen flag clicked\ngo to [front v] layer\ngo [backward v] (2) layers\n\nwhen I receive [back v]\nshow\nset [max v] to [12]\nset [min v] to [-1]\nset [accessory v] to [0]\nset size to (300) %\ngo to x: (-160) y: (-70)\nforever\n    if <(gamestart) = [0]> then\n        if <[0] = (accessory)> then\n            go to x: (-170) y: (-64)\n            switch costume to (0 v)\n        end\n        if <[1] = (accessory)> then\n            go to x: (-170) y: (-64)\n            switch costume to (1 v)\n        end\n        if <(max) < (accessory)> then\n            set [accessory v] to [1]\n        end\n        if <(accessory) < (min)> then\n            set [accessory v] to (min)\n        end\n        if <[2] = (accessory)> then\n            switch costume to (2 v)\n        end\n        if <[3] = (accessory)> then\n            go to x: (-170) y: (-64)\n            go to x: (-170) y: (-64)\n            switch costume to (3 v)\n        end\n        if <[5] = (accessory)> then\n            switch costume to (5 v)\n            go to x: (-172) y: (-20)\n        end\n        if <[4] = (accessory)> then\n            switch costume to (4 v)\n            go to x: (-162) y: (-98)\n        end\n        if <[6] = (accessory)> then\n            switch costume to (6 v)\n        end\n        if <[7] = (accessory)> then\n            switch costume to (7 v)\n        end\n        if <[9] = (accessory)> then\n            switch costume to (8 v)\n        end\n        if <(accessory) = [-1]> then\n            switch costume to (-1 v)\n            go to x: (-169) y: (0)\n        end\n        if <(accessory) = [10]> then\n            switch costume to (9 v)\n        end\n        if <(accessory) = [11]> then\n            switch costume to (10 v)\n        end\n        if <(accessory) = [12]> then\n            switch costume to (11 v)\n        end\n    end\nend\n\nwhen flag clicked\n\nwhen I receive [back v]\nset [back 1 v] to [1]\n\nwhen I receive [start game v]\nset [back 1 v] to [0]\n\nwhen I receive [invis v]\nforever\n    hide\nend\n\nwhen flag clicked\nforever\n    if <(gamestart) = [0]> then\n        point in direction (90)\n    end\nend\n\nwhen I receive [invis v]\nforever\n    hide\nend\n\nbroadcast (reset v)\nbroadcast (player.die v)\n\nwhen I receive [instructions v]\nhide\n\nwhen I receive [back v]\nshow\n\n@Sprite4\n\nwhen I receive [back v]\nclear graphic effects\nshow\nshow\nset [equip v] to [-1]\ngo to x: (-169) y: (-150)\nshow\nforever\n    if <(hide) = [0]> then\n        if <<(accessory) < [8]> or <<[7] < (accessory)> and <<(loved yes) = [1]> and <(favourite) = [1]>>>> then\n            show\n            if <touching (mouse-pointer v)?> then\n                set size to (170) %\n                if <mouse down?> then\n                    switch costume to (costume2 v)\n                    set [equip v] to (accessory)\n                end\n            else\n                show\n                set size to (150) %\n                repeat (10)\n                    turn right (0.5) degrees\n                end\n                repeat (10)\n                    turn right (-0.5) degrees\n                end\n                point in direction (90)\n            end\n        else\n            set size to (1) %\n            hide\n        end\n    else\n        set size to (1) %\n        hide\n    end\nend\n\nwhen flag clicked\nshow\nwait (0.15) seconds\nshow\nforever\n    if <<(equip) > (accessory)> or <(accessory) > (equip)>> then\n        switch costume to (costume1 v)\n    else\n        switch costume to (costume2 v)\n    end\nend\n\nwhen flag clicked\nshow\nset [equip v] to [-1]\ngo to x: (-169) y: (-150)\nshow\nforever\n    if <(hide) = [0]> then\n        if <<(accessory) < [8]> or <<[7] < (accessory)> and <<(loved yes) = [1]> and <(favourite) = [1]>>>> then\n            if <touching (mouse-pointer v)?> then\n                set size to (170) %\n                if <mouse down?> then\n                    switch costume to (costume2 v)\n                    set [equip v] to (accessory)\n                end\n            else\n                show\n                set size to (150) %\n            end\n        else\n            set size to (1) %\n            hide\n        end\n    else\n        set size to (1) %\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    repeat (10)\n        turn right (0.5) degrees\n    end\n    repeat (10)\n        turn right (-0.5) degrees\n    end\n    point in direction (90)\nend\n\n@TIMER\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\ngo to [front v] layer\nshow\nforever\n    change costume to (join [Glow-] (letter (index) of (timer 3)))\n    set x to ((((index) - (5)) - ((length of [apple]) / (2))) * ((size) / (3)))\n    change size by ((1.2) * ((100) - (size)))\nend\n\ndefine setup\nhide\nswitch costume to (glow-0 v)\nset size to (100) %\ngo to x: (0) y: (150)\nset [index v] to [1]\nrepeat (6)\n    create clone of (_myself_ v)\n    change x by ((size) / (2))\n    change [index v] by (1)\nend\n\ndefine change costume to (costume)\nif <not <(costume) = (costume [name v])>> then\n    switch costume to (costume)\n    set size to (110) %\nend\n\nwhen I receive [start game v]\nshow\nset [timer 3 v] to [0]\nrepeat until <<(Boss health) < [0.1]> or <(timer 3) = [99999]>>\n    change [timer 3 v] by (1)\n    wait (0.9) seconds\nend\n\nforever\n\nwhen I receive [start game v]\nshow\nsetup\n\nwhen I receive [start game v]\n\nwhen I receive [back v]\nset [timer 3 v] to [0]\n\nrepeat until <[] = [0]>\n\nset [timer 3 v] to [99999]\n\n@Sprite5\n\nwhen flag clicked\nhide\n\nwhen I receive [back v]\nhide\n\nwhen I receive [start game v]\nshow\n\nwhen I receive [bos unhapp v]\nchange [☁ people who beat the game v] by (1)\n\n@detector\n\nwhen flag clicked\nhide\nset [favourite v] to [0]\nset [loved yes v] to [0]\nset [clone id v] to [0]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [clone id v] to [1]\ncreate clone of (_myself_ v)\nwait until <<(loved yes) = [1]> and <(favourite) = [1]>>\nif <(accessory) > [6]> then\n    change [accessory v] by (1)\nend\n\nwhen I start as a clone\nif <(clone id) = [0]> then\n    go to x: (-15) y: (0)\n    set [loved yes v] to [0]\n    switch costume to (love v)\n    forever\n        set [loved v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            wait (1) seconds\n            set [loved yes v] to [1]\n        end\n    end\nend\nif <(clone id) = [1]> then\n    go to x: (0) y: (0)\n    switch costume to (fave v)\n    set [favourite v] to [0]\n    forever\n        set [fav v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            wait (1) seconds\n            set [favourite v] to [1]\n        end\n    end\nend\n\nwhen flag clicked\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\nend\n\nwhen flag clicked\nforever\n    hide\nend\n\n@Sprite6\n\nwhen I receive [back v]\nclear graphic effects\nset [equip v] to [-1]\ngo to x: (-172) y: (-32)\nforever\n    if <<[7] < (accessory)> and <<(loved yes) = [0]> and <(favourite) = [0]>>> then\n        show\n    else\n        if <<(favourite) = [1]> and <(loved yes) = [1]>> then\n            hide\n        end\n    end\nend\n\nwhen flag clicked\nhide\nforever\n    if <<[7] < (accessory)> and <<(loved yes) = [0]> and <(favourite) = [0]>>> then\n        show\n    else\n        if <<(favourite) = [1]> and <(loved yes) = [1]>> then\n            hide\n        end\n    end\nend\n\nwhen flag clicked\ngo to [front v] layer\nset [equip v] to [-1]\ngo to x: (-172) y: (-32)\n\nshow\n\nwhen flag clicked\nforever\n    point in direction (90)\n    repeat (10)\n        turn right (0.1) degrees\n    end\n    repeat (10)\n        turn right (-0.1) degrees\n    end\nend\n\nshow\nshow\n\nshow\n\nshow\nwait (0.1) seconds\nshow\n\nwhen I receive [start game v]\nforever\n    hide\nend\n\n@World record\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nhide\ngo to [front v] layer\nforever\n    change costume to (join [Glow-] (letter (index) of (☁ WR)))\n    set x to ((((index) - (5)) - ((length of [apple]) / (2))) * ((size) / (3)))\n    change size by ((1.2) * ((100) - (size)))\nend\n\ndefine setup\nhide\nshow\nhide\nswitch costume to (glow-0 v)\nset size to (100) %\ngo to x: (0) y: (90)\nset [index v] to [1]\nrepeat (6)\n    create clone of (_myself_ v)\n    change x by ((size) / (2))\n    change [index v] by (1)\nend\n\ndefine change costume to (costume)\nif <not <(costume) = (costume [name v])>> then\n    switch costume to (costume)\n    set size to (110) %\nend\n\nwhen I receive [bos unhapp v]\nif <(timer 3) < (☁ WR)> then\n    set [☁ wr v] to (timer 3)\n    broadcast (new wr v)\nend\n\nwhen I receive [start game v]\nshow\nhide\nsetup\n\nshow\n\nwhen I start as a clone\nforever\n    if <(Boss health) < [0.1]> then\n        show\n    end\nend\n\nset [☁ wr v] to [10000]\n\nhide\n\n@Sprite7\n\nwhen I receive [new wr v]\nswitch costume to (costume2 v)\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\nwait (1) seconds\nswitch costume to (costume1 v)\nhide\n\nwhen I receive [bos unhapp v]\nshow\n\n@Sprite3\n\nwhen flag clicked\ngo to [front v] layer\nshow\ngo to [front v] layer\nclear graphic effects\ngo to [front v] layer\nwait (0.5) seconds\nrepeat (30)\n    change [ghost v] effect by (10)\nend\nhide\n\n
LOOKING AT INSTRUCTIONS BEFORE PLAYING IS HIGHLY RECOMMENDED!              WASD を移動します\nLike and Favorite to get a trail, more skins and an invisibility potion in customization! This took me a lot of work and stress so please do it.\nJUMP UP THE SLOPES  Ads are recommended\n\nGlitches I could not fix (All Related to Boss.):\nBoss has a low chance of suddenly being very fast just after you die until you die again.\nBoss Battle has low chance of Glitching out.\n