Kirby - Pyxelstar Ultra (Beta V0.03)
@Stage\n\nwhen flag clicked\nset volume to (80) %\nforever\n    play sound [Float_Islands_-_Kirby_Super_Star\[Mp3Converter.net\].mp3 v] until done\nend\n\n@Control\n\nwhen flag clicked\nset [ghost v] effect to (100)\nhide\ngo to x: (0) y: (0)\nshow\n\nwhen flag clicked\ngo to x: (0) y: (-72)\n\ndefine Simulate Gravity\nchange y by (FallSpeed)\nif <<touching (_edge_ v)?> or <touching (aelox's terrain generator v)?>> then\n    if <(FallSpeed) < [0]> then\n        set [reversestep v] to [1]\n    else\n        set [reversestep v] to [-1]\n    end\n    repeat until <not <<touching (_edge_ v)?> or <touching (aelox's terrain generator v)?>>>\n        if <<touching color (#4e415a)?> or <touching (gordo v)?>> then\n            broadcast (Death v)\n        end\n        if <touching (kracko attack v)?> then\n            broadcast (Restart v)\n        end\n        change y by (ReverseStep)\n    end\n    set [fallspeed v] to [0]\nelse\n    if <<touching color (#4e415a)?> or <touching (gordo v)?>> then\n        broadcast (Death v)\n    end\n    if <touching (kracko attack v)?> then\n        broadcast (Restart v)\n    end\n    change [fallspeed v] by (Gravity)\nend\n\ndefine Jump Control\nif <<key (up arrow v) pressed?> or <key (up arrow v) pressed?>> then\n    change y by (-1)\n    if <<touching (_edge_ v)?> or <touching (aelox's terrain generator v)?>> then\n        set [fallspeed v] to (TakeOffSpeed)\n    end\n    change y by (1)\nend\n\nwhen I receive [start v]\nrepeat until <(x position) > [220]>\n    change x by (3)\nend\n\nwhen flag clicked\nset [runspeed v] to [3]\nset [gravity v] to [-1]\nset [fallspeed v] to [0]\nset [takeoffspeed v] to [9.3]\n\nwhen I receive [start v]\nwait (2) seconds\nforever\n    if <(Loading?) = [True]> then\n    else\n        Run Controls\n        Jump Control\n        Simulate Gravity\n    end\nend\n\nwhen I receive [loadcheck v]\nwait (2) seconds\ngo to x: (kx) y: (ky)\n\ndefine Run Controls\nif <key (right arrow v) pressed?> then\n    change x by (RunSpeed)\n    if <<touching (aelox's terrain generator v)?> or <touching (_edge_ v)?>> then\n        change x by ((0) - (RunSpeed))\n    end\nend\nif <key (left arrow v) pressed?> then\n    change x by ((0) - (RunSpeed))\n    if <<touching (aelox's terrain generator v)?> or <touching (_edge_ v)?>> then\n        change x by (RunSpeed)\n    end\nend\n\nwhen I receive [death v]\ngo to x: (kx) y: (ky)\n\nwhen I receive [start v]\nwait (4) seconds\ngo to x: (kx) y: (ky)\n\n@Aelox's Terrain Generator\n\ndefine generate [] by [] platform\nshow\nset y to (y)\nset x to (x)\nif <<(x) = [2]> and <(y) = [1]>> then\n    point in direction (90)\n    switch costume to (costume2 v)\n    create clone of (_myself_ v)\n    move (24) steps\n    switch costume to (costume7 v)\n    create clone of (_myself_ v)\n    move (24) steps\nelse\n    point in direction (90)\n    repeat (x)\n        if <(pick random (1) to (2)) = [2]> then\n            switch costume to (costume1 v)\n        else\n            switch costume to (costume3 v)\n        end\n        create clone of (_myself_ v)\n        move (24) steps\n    end\nend\nchange y by (-24)\nchange x by ((-24) * (x))\nif <<(y) > [2]> or <(y) = [2]>> then\n    repeat ((y) - (1))\n        repeat (x)\n            if <(pick random (1) to (5)) = [5]> then\n                switch costume to (costume5 v)\n            else\n                if <(pick random (1) to (10)) = [4]> then\n                    switch costume to (costume6 v)\n                else\n                    switch costume to (costume4 v)\n                end\n            end\n            create clone of (_myself_ v)\n            move (24) steps\n        end\n        change y by (-24)\n        change x by ((-24) * (x))\n    end\nelse\n    repeat (x)\n        move (24) steps\n    end\nend\nhide\n\nwhen flag clicked\ngo to x: (-228) y: (168)\n\nwhen I start as a clone\nwait until <(clear?) = [true]>\ndelete this clone\n\nwhen flag clicked\nset [y v] to [0]\nset [x v] to [0]\nset [y v] to ((168) - ((24) * (11)))\nset [x v] to ((-228) + ((24) * (0)))\ngenerate [21] by [4] platform\nset [y v] to ((168) - ((24) * (9)))\nset [x v] to ((-228) + ((24) * (2)))\ngenerate [2] by [1] platform\nset [y v] to ((168) - ((24) * (9)))\nset [x v] to ((-228) + ((24) * (16)))\ngenerate [2] by [1] platform\nbroadcast (MenuLoadDone v)\n\ndefine generate [] spikes\nshow\nset y to (y)\nset x to (x)\npoint in direction (90)\nrepeat (x)\n    switch costume to (spikes1 v)\n    create clone of (_myself_ v)\n    move (24) steps\nend\n\nwhen I receive [nextlvl v]\nset [loading? v] to [True]\nbroadcast (LoadCheck v)\nwait (2) seconds\nset [clear? v] to [True]\nwait (1) seconds\nset [clear? v] to [False]\nif <(LVL) = [2]> then\n    LVL2\nelse\n    if <(LVL) = [3]> then\n        LVL3\n    else\n        if <(LVL) = [4]> then\n            LVL4\n        else\n            if <(LVL) = [5]> then\n                set [kx v] to [-220]\n                set [ky v] to [-70]\n                LVL5\n            else\n            end\n        end\n    end\nend\n\ndefine None\nset [gordoatt v] to (att)\nset [gx v] to ((-228) + ((24) * (x)))\nset [gy v] to ((168) - ((24) * (y)))\nbroadcast (SPWNgordo v) and wait\n\nwhen I receive [start v]\nset [stars need v] to [1]\nwait (2) seconds\nset [clear? v] to [True]\nwait (1) seconds\nset [clear? v] to [False]\nset [y v] to ((168) - ((24) * (12)))\nset [x v] to ((-228) + ((24) * (0)))\ngenerate [5] by [3] platform\nset [y v] to ((168) - ((24) * (14)))\nset [x v] to ((-228) + ((24) * (5)))\ngenerate [2] spikes\nset [y v] to ((168) - ((24) * (12)))\nset [x v] to ((-228) + ((24) * (7)))\ngenerate [5] by [3] platform\nset [y v] to ((168) - ((24) * (14)))\nset [x v] to ((-228) + ((24) * (12)))\ngenerate [4] spikes\nset [y v] to ((168) - ((24) * (10)))\nset [x v] to ((-228) + ((24) * (13)))\ngenerate [2] by [1] platform\nset [y v] to ((168) - ((24) * (12)))\nset [x v] to ((-228) + ((24) * (16)))\ngenerate [3] by [5] platform\nset y: (12) x: (19)\ngenerate [1] by [3] platform\nset [kx v] to [-220]\nset [ky v] to [-80]\nDone\n\ndefine LVL2\nset [stars need v] to [1]\nset [y v] to ((168) - ((24) * (12)))\nset [x v] to ((-228) + ((24) * (0)))\ngenerate [3] by [3] platform\nset [y v] to ((168) - ((24) * (14)))\nset [x v] to ((-228) + ((24) * (3)))\ngenerate [2] spikes\nset [y v] to ((168) - ((24) * (13)))\nset [x v] to ((-228) + ((24) * (5)))\ngenerate [3] by [2] platform\nset [y v] to ((168) - ((24) * (14)))\nset [x v] to ((-228) + ((24) * (8)))\ngenerate [12] spikes\nset [y v] to ((168) - ((24) * (12)))\nset [x v] to ((-228) + ((24) * (9)))\ngenerate [2] by [1] platform\nset [y v] to ((168) - ((24) * (11)))\nset [x v] to ((-228) + ((24) * (13)))\ngenerate [2] by [1] platform\nSpawn Gordo | ATT (2) | (15) (10)\nset [y v] to ((168) - ((24) * (11)))\nset [x v] to ((-228) + ((24) * (18)))\ngenerate [2] by [1] platform\nset [y v] to ((168) - ((24) * (13)))\nset [x v] to ((-228) + ((24) * (16)))\ngenerate [1] by [1] platform\nDone\n\ndefine LVL5\nset [y v] to ((168) - ((24) * (11)))\nset [x v] to ((-228) + ((24) * (0)))\ngenerate [21] by [4] platform\nset [y v] to ((168) - ((24) * (9)))\nset [x v] to ((-228) + ((24) * (2)))\ngenerate [2] by [1] platform\nset [y v] to ((168) - ((24) * (9)))\nset [x v] to ((-228) + ((24) * (16)))\ngenerate [2] by [1] platform\nset [loading? v] to [False]\nbroadcast (LoadCheck v)\nbroadcast (BossStart v)\n\ndefine LVL3\nset y: (12) x: (0)\ngenerate [3] by [3] platform\nset y: (10) x: (4)\ngenerate [2] by [1] platform\nset y: (14) x: (3)\ngenerate [17] spikes\nset y: (11) x: (8)\ngenerate [2] by [1] platform\nset y: (10) x: (12)\ngenerate [2] by [1] platform\nSpawn Gordo | ATT (1) | (7) (11)\nset y: (11) x: (16)\ngenerate [4] by [1] platform\nSpawn Gordo | ATT (1) | (10) (12)\nset [loading? v] to [False]\nbroadcast (LoadCheck v)\n\ndefine None\nset [y v] to ((168) - ((24) * (y)))\nset [x v] to ((-228) + ((24) * (x)))\n\ndefine LVL4\nset [stars need v] to [1]\nset [y v] to ((168) - ((24) * (12)))\nset [x v] to ((-228) + ((24) * (0)))\ngenerate [3] by [3] platform\nset [y v] to ((168) - ((24) * (14)))\nset [x v] to ((-228) + ((24) * (3)))\ngenerate [3] spikes\nSpawn Gordo | ATT (1) | (4) (12)\nset [y v] to ((168) - ((24) * (12)))\nset [x v] to ((-228) + ((24) * (6)))\ngenerate [2] by [3] platform\nset [y v] to ((168) - ((24) * (14)))\nset [x v] to ((-228) + ((24) * (8)))\ngenerate [3] spikes\nSpawn Gordo | ATT (1) | (9) (12)\nset [y v] to ((168) - ((24) * (12)))\nset [x v] to ((-228) + ((24) * (11)))\ngenerate [2] by [3] platform\nset [y v] to ((168) - ((24) * (14)))\nset [x v] to ((-228) + ((24) * (13)))\ngenerate [3] spikes\nset [y v] to ((168) - ((24) * (12)))\nset [x v] to ((-228) + ((24) * (16)))\ngenerate [3] by [3] platform\nSpawn Gordo | ATT (1) | (14) (12)\nset [loading? v] to [False]\nbroadcast (LoadCheck v)\n\ndefine Done\nset [loading? v] to [False]\nbroadcast (LoadCheck v)\n\n@Kirby Logo\n\nwhen flag clicked\ngo to [front v] layer\nshow\nrepeat until <(Loading?) = [True]>\n    wait (0.03) seconds\n    next costume\nend\nswitch costume to (kirby-logo-new v)\n\nwhen I receive [loadcheck v]\nif <(Loading?) = [True]> then\n    set [ghost v] effect to (100)\n    show\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\nelse\n    set [ghost v] effect to (0)\n    wait (1) seconds\n    show\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    hide\nend\n\n@Intro Kirby\n\nwhen I receive [start v]\nset [ghost v] effect to (100)\nwait (1) seconds\nshow\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nforever\n    if <(Loading?) = [True]> then\n        wait (0.03) seconds\n        next costume\n        go to [front v] layer\n    end\nend\n\nwhen I receive [loadcheck v]\ngo to [front v] layer\nif <(Loading?) = [True]> then\n    set [ghost v] effect to (100)\n    show\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\nelse\n    set [ghost v] effect to (0)\n    wait (1) seconds\n    show\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    hide\nend\n\n@Cloud\n\nwhen flag clicked\nset [nographics v] to [False]\nhide\nset [ghost v] effect to (50)\nforever\n    if <(NoGraphics) = [True]> then\n    else\n        wait (4) seconds\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\nset size to (pick random (100) to (200)) %\nset [spd v] to (pick random (0.3) to (1))\nshow\nif <(pick random (1) to (2)) = [2]> then\n    go to x: (-250) y: (pick random (80) to (150))\n    point in direction (90)\n    repeat until <not <touching (_edge_ v)?>>\n        move (spd) steps\n    end\n    repeat until <touching (_edge_ v)?>\n        move (spd) steps\n    end\nelse\n    go to x: (250) y: (pick random (80) to (150))\n    point in direction (-90)\n    repeat until <not <touching (_edge_ v)?>>\n        move (spd) steps\n    end\n    repeat until <touching (_edge_ v)?>\n        move (spd) steps\n    end\nend\nrepeat (5)\n    change [ghost v] effect by (10)\n    move (1) steps\nend\ndelete this clone\n\nwhen I receive [bossstart v]\nset [nographics v] to [True]\n\n@Butterfly\n\nwhen I start as a clone\nshow\nforever\n    point in direction (pick random (180) to (-180))\n    repeat (30)\n        move (0.5) steps\n    end\nend\n\nwhen I start as a clone\nforever\n    next costume\n    wait (0.1) seconds\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nwait until <(clear?) = [true]>\ndelete this clone\n\nwhen I receive [nextlvl v]\nwait (3.1) seconds\nif <(NoGraphics) = [True]> then\nelse\n    repeat (pick random (2) to (5))\n        go to x: (pick random (-200) to (200)) y: (pick random (-70) to (50))\n        set [color v] effect to (pick random (-20) to (20))\n        set size to (pick random (90) to (110)) %\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I receive [start v]\nwait (3.1) seconds\nrepeat (pick random (2) to (5))\n    go to x: (pick random (-200) to (200)) y: (pick random (-70) to (50))\n    set [color v] effect to (pick random (-20) to (20))\n    set size to (pick random (90) to (110)) %\n    create clone of (_myself_ v)\nend\n\n@Pyxelstar Ultra\n\nwhen flag clicked\nshow\n\nwhen I receive [start v]\nwait (2) seconds\nhide\n\n@Press Space\n\nwhen flag clicked\nset [loading? v] to [False]\nset size to (50) %\nhide\n\nwhen I receive [menuloaddone v]\nwait (1) seconds\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nset [cos v] to [0]\nrepeat until <(Loading?) = [True]>\n    change [cos v] by (9)\n    change size by ([cos v] of (cos) )\nend\n\nwhen I receive [menuloaddone v]\nwait until <key (space v) pressed?>\nbroadcast (Start v)\nrepeat (10)\n    change [ghost v] effect by (25)\nend\nset [loading? v] to [True]\nhide\n\n@Loading Level\n\nwhen I receive [start v]\nset [ghost v] effect to (100)\nwait (1) seconds\nshow\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\n\nwhen flag clicked\ngo to [front v] layer\nhide\n\nwhen I receive [loadcheck v]\nif <(Loading?) = [True]> then\n    set [ghost v] effect to (100)\n    show\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\nelse\n    set [ghost v] effect to (0)\n    wait (1) seconds\n    show\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    hide\nend\n\n@Loading Backdrop\n\nwhen flag clicked\ngo to [front v] layer\ngo [backward v] (2) layers\nhide\ngo to x: (0) y: (0)\n\nwhen I receive [start v]\nset [ghost v] effect to (100)\nwait (1) seconds\nshow\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\n\nwhen I receive [loadcheck v]\nif <(Loading?) = [True]> then\n    set [ghost v] effect to (100)\n    show\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\nelse\n    set [ghost v] effect to (0)\n    wait (1) seconds\n    show\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    hide\nend\n\nwait (0.1) seconds\n\n@Kirby\n\ndefine Animate\nset [rest? v] to [True]\nif <key (right arrow v) pressed?> then\n    set [rest? v] to [False]\n    repeat until <not <key (right arrow v) pressed?>>\n        point in direction (90)\n        if <(Jump?) = [Y]> then\n            repeat until <(Jump?) = [N]>\n                switch costume to (kirby jump1 v)\n            end\n        else\n            if <(costume) > [9]> then\n                set [costume v] to [1]\n            end\n            change [costume v] by (1)\n            switch costume to (join [kirby walk] (costume))\n            wait (0.05) seconds\n        end\n    end\nend\nset [rest? v] to [False]\nif <key (left arrow v) pressed?> then\n    set [rest? v] to [False]\n    repeat until <not <key (left arrow v) pressed?>>\n        point in direction (-90)\n        if <(Jump?) = [Y]> then\n            repeat until <(Jump?) = [N]>\n                switch costume to (kirby jump1 v)\n            end\n        else\n            if <(costume) > [9]> then\n                set [costume v] to [1]\n            end\n            change [costume v] by (1)\n            switch costume to (join [kirby walk] (costume))\n            wait (0.05) seconds\n        end\n    end\n    switch costume to (kirby_walk\[1\]6 v)\nend\nset [rest? v] to [True]\n\nwhen I receive [start v]\nset [startani v] to [Yes]\nrepeat until <(x position) > [220]>\n    point in direction (90)\n    if <(costume) > [9]> then\n        set [costume v] to [1]\n    end\n    change [costume v] by (1)\n    switch costume to (join [kirby walk] (costume))\n    wait (0.05) seconds\nend\nset [startani v] to [No]\n\nwhen flag clicked\nset [startani v] to [No]\nset [jump? v] to [N]\nswitch costume to (kirby idle1 v)\n\nwhen I receive [start v]\nrepeat until <touching (_edge_ v)?>\n    set [rest? v] to [False]\nend\n\nwhen flag clicked\nforever\n    go to (control v)\nend\n\nwhen [up arrow v] key pressed\nwait (0.01) seconds\nrepeat until <touching (aelox's terrain generator v)?>\n    set [jump? v] to [Y]\nend\nwait until <not <key (up arrow v) pressed?>>\nset [jump? v] to [N]\n\ndefine Idle\nif <<not <key (right arrow v) pressed?>> or <not <key (up arrow v) pressed?>>> then\n    if <(Rest?) = [False]> then\n        stop [this script v]\n    end\n    switch costume to (kirby idle1 v)\nelse\n    stop [this script v]\nend\n\nwhen I receive [start v]\nforever\n    Animate\nend\n\nwhen [up arrow v] key pressed\nset volume to (20) %\nplay sound [Kirby - Jump1 v] until done\nset volume to (100) %\nwait until <not <key (up arrow v) pressed?>>\n\nwhen I receive [start v]\nforever\n    if <(startani) = [No]> then\n        Idle\n    else\n    end\nend\n\nwhen I receive [death v]\nset volume to (20) %\nplay sound [Kirby - DamageFl2 v] until done\nset volume to (100) %\n\n@Star\n\nwhen flag clicked\nset [stars v] to [0]\nhide\ngo to x: (-228) y: (168)\nforever\n    repeat (5)\n        change y by (0.5)\n        wait (0.01) seconds\n    end\n    repeat (5)\n        change y by (-0.5)\n        wait (0.01) seconds\n    end\nend\n\nwhen I receive [start v]\nwait (2) seconds\ngo to x: ((-228) + ((24) * (13.5))) y: ((168) - ((24) * (9)))\nchange y by (1)\nshow\n\nwhen I receive [start v]\nforever\n    if <touching (kirby v)?> then\n        broadcast (StarGet v)\n    end\n    wait until <not <touching (kirby v)?>>\nend\n\nwhen I receive [starget v]\nrepeat (10)\n    change [ghost v] effect by (10)\n    change y by (2)\nend\nhide\n\nwhen I receive [starget v]\nchange [stars v] by (1)\nif <(Stars) = (Stars Need)> then\n    set [starscheck v] to [True]\nelse\n    set [starscheck v] to [False]\nend\n\nwhen I receive [nextlvl v]\nset [stars v] to [0]\nwait (2) seconds\nif <(LVL) = [2]> then\n    set [ghost v] effect to (0)\n    go to x: (156) y: (-120)\n    show\nelse\n    if <(LVL) = [3]> then\n        set [ghost v] effect to (0)\n        go to x: ((-228) + ((24) * (9))) y: ((168) - ((24) * (9)))\n        show\n    else\n        if <(LVL) = [4]> then\n        else\n            if <(LVL) = [5]> then\n            else\n            end\n        end\n    end\nend\n\n@Menu Cover\n\nwhen flag clicked\nshow\n\nwhen I receive [start v]\nwait (2) seconds\nhide\n\n@Collision\n\nwhen flag clicked\nset [lvl v] to [1]\nhide\nchange [ghost v] effect by (100)\nshow\n\nwhen I receive [start v]\nwait (10) seconds\nforever\n    if <<touching (kirby v)?> and <(StarsCheck) = [True]>> then\n        change [lvl v] by (1)\n        broadcast (nextlvl v)\n        wait until <not <touching (kirby v)?>>\n    end\nend\n\nwhen I receive [nextlvl v]\nif <(LVL) = [2]> then\n    set [kx v] to [-220]\n    set [ky v] to [-80]\nelse\n    if <(LVL) = [3]> then\nend\n\n@Thumbnail\n\nshow\n\nwhen flag clicked\nhide\n\n@Backdrop\n\nwhen flag clicked\nforever\n    next costume\n    wait (0.13) seconds\nend\n\n@Gordo\n\nwhen flag clicked\nhide\n\nwhen I receive [spwngordo v]\nwait (0.1) seconds\ncreate clone of (_myself_ v)\n\ndefine Set 1\nshow\nrepeat until <(clear?) = [True]>\n    repeat ((2) * (24))\n        change y by (1)\n    end\n    repeat ((2) * (24))\n        change y by (-1)\n    end\nend\n\ndefine Set 2\nshow\nrepeat until <(clear?) = [True]>\n    repeat ((2) * (24))\n        change x by (1)\n    end\n    repeat ((2) * (24))\n        change x by (-1)\n    end\nend\n\nwhen I start as a clone\nwait until <(clear?) = [True]>\ndelete this clone\n\nwhen I start as a clone\nif <(GordoATT) = [1]> then\n    Set 1\nelse\n    if <(GordoATT) = [2]> then\n        Set 2\n    else\n        if <(GordoATT) = [3]> then\n        else\n            if <(GordoATT) = [4]> then\n            else\n            end\n        end\n    end\nend\n\nwhen I start as a clone\ngo to x: (gx) y: (gy)\n\n@Kracko Cloud\n\nwhen flag clicked\ngo to x: (0) y: (100)\nhide\n\ndefine Move\nif <(x position) < [-200]> then\n    point in direction (90)\n    repeat (10)\n        move (1) steps\n    end\n    repeat (20)\n        move (0.5) steps\n    end\nend\nif <(x position) > [200]> then\n    point in direction (90)\n    repeat (10)\n        move (1) steps\n    end\n    repeat (20)\n        move (0.5) steps\n    end\nend\nif <(y position) < [0]> then\n    point in direction (0)\n    repeat (10)\n        move (1) steps\n    end\n    repeat (20)\n        move (0.5) steps\n    end\nelse\n    point in direction (pick random (-180) to (180))\n    repeat (10)\n        move (1) steps\n    end\n    repeat (20)\n        move (0.5) steps\n    end\nend\n\nwhen I receive [bossstart v]\nshow\nrepeat until <(clear?) = [True]>\n    Move\nend\nhide\n\nset [lvl v] to [5]\nbroadcast (NextLVL v)\n\n@Kracko Eye\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\ndefine Look At Kirby\npoint towards (kirby v)\nif <<(direction) < [-80]> and <(direction) > [-180]>> then\n    switch costume to (leftb v)\nend\nif <<(direction) > [-80]> and <(direction) > [170]>> then\n    switch costume to (bottom v)\nend\nif <<(direction) > [90]> and <(direction) < [170]>> then\n    switch costume to (rightb v)\nend\n\nwhen I receive [bossstart v]\nshow\nrepeat until <(clear?) = [True]>\n    Look At Kirby\n    go to (kracko cloud v)\nend\nhide\n\n@Kracko Attack\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [bossstart v]\nif <(clone?) = [N]> then\n    repeat until <(clear?) = [True]>\n        wait (5) seconds\n        go to (kracko cloud v)\n        point towards (kirby v)\n        set [direction v] to (direction)\n        change [direction v] by (40)\n        repeat (5)\n            set [clone? v] to [Y]\n            create clone of (_myself_ v)\n            change [direction v] by (-20)\n        end\n    end\n    set [clone? v] to [N]\nend\n\nwhen I start as a clone\nshow\npoint in direction (Direction)\nrepeat until <<<touching (aelox's terrain generator v)?> or <touching (_edge_ v)?>> or <touching (kirby v)?>>\n    move (2) steps\nend\ndelete this clone\n\nwhen I receive [restart v]\nif <(clone?) = [N]> then\n    set [lvl v] to [2]\n    broadcast (NextLVL v)\nend\n\n