Ninja Cat - Platformer Game (Mobile-friendly)
@Stage\n\nwhen flag clicked\nwait (5) seconds\n\nswitch backdrop to (wiki-background2 v)\n\n\n\nstart sound [recording1 v]\n\nforever\n\nstart sound [recording3 v]\n\nplay sound [recording1 v] until done\n\nstart sound [recording2 v]\n\nchange [color v] effect by (25)\n\nwhen I receive [\[delete this message\] $scratchlytics-off 0746 v]\n\nwhen I receive [nexlev v]\nswitch backdrop to (pick random (1) to (10))\n\n@Sprite1\n\nplatform [12] [-1] [0.7] [2]\n\nwhen flag clicked\nwait until <(Level) = [8]>\nbroadcast (Level 8 v)\n\nset [ghost v] effect to (100)\nwait (1) seconds\nset [touching v] to [1]\n\ndefine platform (jump height) (gravity) (friction) (running speed)\nif <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n    change [x velocity v] by (running speed)\n    set rotation style [left-right v]\n    point in direction (90)\nend\nif <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n    change [x velocity v] by ((running speed) * (-1))\n    set rotation style [left-right v]\n    point in direction (-90)\nend\nset [x velocity v] to ((X velocity) * (friction))\nchange x by ((X velocity) * (1.8))\nif <touching (level v)?> then\n    set [slope v] to [0]\n    repeat until <<not <touching (level v)?>> or <(Slope) = [8]>>\n        change [slope v] by (1)\n        change y by (1)\n    end\n    if <touching (level v)?> then\n        change y by ((Slope) * (-1))\n        repeat ([ceiling v] of ([abs v] of (X velocity) ) )\n            if <touching (level v)?> then\n                repeat ([abs v] of (X velocity) )\n                    change x by (([abs v] of (X velocity) ) / ((X velocity) * (-0.70)))\n                end\n            end\n        end\n        set [x velocity v] to [0]\n    end\nend\nchange y by (Y velocity)\nif <touching (level v)?> then\n    repeat ([ceiling v] of ([abs v] of (Y velocity) ) )\n        if <touching (level v)?> then\n            change y by (([abs v] of (Y velocity) ) / ((Y velocity) * (-1)))\n        end\n    end\n    if <<<<key (w v) pressed?> or <key (up arrow v) pressed?>> and <(([abs v] of (Y velocity) ) / (Y velocity)) = [-1]>> or <(bird) = [11]>> then\n        set [y velocity v] to (jump height)\n    else\n        set [y velocity v] to [0]\n    end\nelse\n    change [y velocity v] by (-1)\nend\nrepeat ([abs v] of (X velocity) )\n    change x by (([abs v] of (X velocity) ) / ((X velocity) * (-1)))\nend\n\n\n\nif <touching (level v)?> then\n\nrepeat (10)\n\nchange x by (10)\n\n\n\nrepeat (10)\n\nwhen flag clicked\nforever\n\nchange y by (-5)\n\nwhen I receive [level restart v]\nswitch costume to (bird)\nset [die v] to [0]\ngo to x: (-200) y: (-61)\npoint in direction (90)\nif <(Level) = [8]> then\n    wait (2) seconds\nend\nwait until <mouse down?>\nswitch costume to ((bird) + (1))\nset rotation style [all around v]\nbroadcast (aim v)\nrepeat until <not <mouse down?>>\n    point towards (mouse-pointer v)\n    turn right (180) degrees\nend\nbroadcast (let go v)\nswitch costume to (bird)\npoint towards (mouse-pointer v)\nturn right (-180) degrees\nmove (10) steps\nrepeat until <(touching) = [1]>\n    if <(exploshion) = [0]> then\n        move (10) steps\n    end\nend\npoint in direction (90)\nwait (0.1) seconds\nrepeat until <(die) = [1]>\n    if <(exploshion) = [0]> then\n        if <(bird) = [1]> then\n            platform [12] [-16] [0.7] [2]\n        end\n        if <(bird) = [3]> then\n            platform [9] [-16] [0.7] [3.5]\n        end\n        if <(bird) = [5]> then\n            platform [10] [-16] [0.7] [2]\n        end\n        if <(bird) = [7]> then\n            platform [12.5] [-16] [0.7] [1.5]\n        end\n        if <(bird) = [9]> then\n            platform [11] [-16] [0.7] [1.8]\n        end\n        if <(bird) = [11]> then\n            platform [13] [-16] [0.7] [1.9]\n        end\n    end\nend\nif <(costume [number v]) = [3]> then\n    platform [5] [-16] [0.7] [3]\nend\n\n\nswitch costume to (bird)\n\nturn left (-1) degrees\n\nplatform [] [-1] [0.7] [2]\n\nwhen flag clicked\n\nforever\n\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nset [slope v] to [0]\n\nforever\n    go to (mouse-pointer v)\nend\n\nwhen I receive [level 8 v]\nwait (6) seconds\nrepeat until <(Level) = [9]>\n    if <touching (sprite9 v)?> then\n        broadcast (hit chef boss 1 v)\n        go to x: (-100) y: (-100)\n        wait (1) seconds\n    end\nend\nwait until <(Level) = [20]>\nrepeat until <(Level) = [21]>\n    if <touching (sprite9 v)?> then\n        broadcast (hit chef boss 1 v)\n        go to x: (-150) y: (-100)\n        wait (1) seconds\n    end\nend\n\nforever\n\nwhen flag clicked\nforever\n    if <(exploshion) = [1]> then\n        hide\n    else\n        show\n    end\nend\n\nglide (1) secs to (random position v)\ngo to (random position v)\n\nturn right (15) degrees\n\ngo to (random position v)\n\nwhen flag clicked\nforever\n    if <(touching) = [1]> then\n        if <(exploshion) = [0]> then\n            if <(bird) = [1]> then\n                platform [12] [-16] [0.7] [2]\n            end\n            if <(bird) = [3]> then\n                platform [9] [-16] [0.7] [3.5]\n            end\n            if <(bird) = [5]> then\n                platform [10] [-16] [0.7] [2]\n            end\n            if <(bird) = [7]> then\n                platform [12.5] [-16] [0.7] [1.5]\n            end\n            if <(bird) = [9]> then\n                platform [11] [-16] [0.7] [1.8]\n            end\n            if <(bird) = [11]> then\n                platform [13] [-16] [0.7] [1.9]\n            end\n        end\n    end\nend\n\ngo to x: (-200) y: (-61)\n\nturn right (15) degrees\n\ngo to x: (-200) y: (-61)\n\nset [level v] to [10]\n\ngo to (random position v)\n\n@Level\n\nwhen flag clicked\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nforever\n    switch costume to (Level)\nend\n\nturn left (15) degrees\n\nchange x by (10)\n\ngo to (random position v)\n\ngo to (random position v)\n\nwhen I receive [aim v]\nrepeat until <not <mouse down?>>\n    start sound [recording3 v]\nend\nstart sound [recording2 v]\n\nwhen flag clicked\nwait (6) seconds\nforever\n    play sound [recording1 v] until done\nend\n\n@Sprite2\n\nwhen I receive [level restart v]\nset [die v] to [1]\nwait (0.000000001) seconds\nset [die v] to [0]\nif <[1] = (Level)> then\n    set [pigges v] to [1]\n    go to x: (97) y: (-96)\n    set size to (100) %\n    create clone of (_myself_ v)\n    wait until <(pigges) = [0]>\n    broadcast (egg v)\nend\nif <[2] = (Level)> then\n    set [pigges v] to [2]\n    set size to (50) %\n    go to x: (94) y: (-105)\n    create clone of (_myself_ v)\n    go to x: (110) y: (66)\n    create clone of (_myself_ v)\n    wait until <(pigges) = [0]>\n    broadcast (egg v)\nend\nif <[3] = (Level)> then\n    set [pigges v] to [3]\n    go to x: (-125) y: (-71)\n    set size to (50) %\n    create clone of (_myself_ v)\n    go to x: (-2) y: (32)\n    create clone of (_myself_ v)\n    go to x: (91) y: (111)\n    create clone of (_myself_ v)\n    wait until <(pigges) = [0]>\n    broadcast (egg v)\nend\nif <[4] = (Level)> then\n    set [pigges v] to [3]\n    go to x: (-23) y: (-55)\n    set size to (50) %\n    create clone of (_myself_ v)\n    go to x: (175) y: (-15)\n    create clone of (_myself_ v)\n    go to x: (18) y: (109)\n    create clone of (_myself_ v)\n    wait until <(pigges) = [0]>\n    broadcast (egg v)\nend\nif <[5] = (Level)> then\n    set [pigges v] to [1]\n    go to x: (148) y: (-106)\n    set size to (50) %\n    create clone of (_myself_ v)\n    wait until <(pigges) = [0]>\n    broadcast (egg v)\nend\nif <[6] = (Level)> then\n    set [pigges v] to [2]\n    go to x: (10) y: (22)\n    set size to (50) %\n    create clone of (_myself_ v)\n    go to x: (87) y: (22)\n    set size to (50) %\n    create clone of (_myself_ v)\n    wait until <(pigges) = [0]>\n    broadcast (egg v)\nend\nif <[7] = (Level)> then\n    set [pigges v] to [2]\n    go to x: (66) y: (-24)\n    set size to (50) %\n    create clone of (_myself_ v)\n    go to x: (102) y: (145)\n    set size to (50) %\n    create clone of (_myself_ v)\n    wait until <(pigges) = [0]>\n    broadcast (egg v)\nend\nif <[9] = (Level)> then\n    set [pigges v] to [2]\n    go to x: (-26) y: (-106)\n    set size to (50) %\n    create clone of (_myself_ v)\n    go to x: (-74) y: (114)\n    set size to (50) %\n    create clone of (_myself_ v)\n    wait until <(pigges) = [0]>\n    broadcast (egg v)\nend\nif <[10] = (Level)> then\n    set [pigges v] to [2]\n    go to x: (112) y: (-33)\n    set size to (50) %\n    create clone of (_myself_ v)\n    go to x: (-17) y: (123)\n    set size to (50) %\n    create clone of (_myself_ v)\n    wait until <(pigges) = [0]>\n    broadcast (egg v)\nend\nif <[11] = (Level)> then\n    set [pigges v] to [2]\n    go to x: (-39) y: (11)\n    set size to (50) %\n    create clone of (_myself_ v)\n    go to x: (94) y: (29)\n    set size to (50) %\n    create clone of (_myself_ v)\n    wait until <(pigges) = [0]>\n    broadcast (egg v)\nend\nif <[12] = (Level)> then\n    set [pigges v] to [2]\n    go to x: (-131) y: (-47)\n    set size to (50) %\n    create clone of (_myself_ v)\n    go to x: (-126) y: (102)\n    set size to (50) %\n    create clone of (_myself_ v)\n    wait until <(pigges) = [0]>\n    broadcast (egg v)\nend\nif <[13] = (Level)> then\n    set [pigges v] to [2]\n    go to x: (-36) y: (-104)\n    set size to (50) %\n    create clone of (_myself_ v)\n    go to x: (84) y: (-102)\n    set size to (50) %\n    create clone of (_myself_ v)\n    wait until <(pigges) = [0]>\n    broadcast (egg v)\nend\nif <[14] = (Level)> then\n    set [pigges v] to [2]\n    go to x: (-65) y: (-104)\n    set size to (50) %\n    create clone of (_myself_ v)\n    go to x: (-8) y: (-104)\n    set size to (50) %\n    create clone of (_myself_ v)\n    go to x: (50) y: (-104)\n    set size to (50) %\n    create clone of (_myself_ v)\n    go to x: (102) y: (-104)\n    set size to (50) %\n    create clone of (_myself_ v)\n    go to x: (155) y: (-104)\n    set size to (50) %\n    create clone of (_myself_ v)\n    wait until <(pigges) = [0]>\n    broadcast (egg v)\nend\nif <[15] = (Level)> then\n    set [pigges v] to [2]\n    go to x: (-142) y: (-92)\n    set size to (50) %\n    create clone of (_myself_ v)\n    go to x: (155) y: (-92)\n    set size to (50) %\n    create clone of (_myself_ v)\n    go to x: (4) y: (79)\n    set size to (50) %\n    create clone of (_myself_ v)\n    wait until <(pigges) = [0]>\n    broadcast (egg v)\nend\nif <[16] = (Level)> then\n    set [pigges v] to [2]\n    go to x: (-37) y: (-94)\n    set size to (40) %\n    create clone of (_myself_ v)\n    go to x: (15) y: (-94)\n    set size to (40) %\n    create clone of (_myself_ v)\n    go to x: (61) y: (-94)\n    set size to (40) %\n    create clone of (_myself_ v)\n    wait until <(pigges) = [0]>\n    broadcast (egg v)\nend\nif <[17] = (Level)> then\n    set [pigges v] to [2]\n    go to x: (-83) y: (-96)\n    set size to (40) %\n    create clone of (_myself_ v)\n    go to x: (-42) y: (-53)\n    set size to (40) %\n    create clone of (_myself_ v)\n    go to x: (-4) y: (-6)\n    set size to (40) %\n    create clone of (_myself_ v)\n    go to x: (37) y: (42)\n    set size to (40) %\n    create clone of (_myself_ v)\n    go to x: (76) y: (87)\n    set size to (40) %\n    create clone of (_myself_ v)\n    wait until <(pigges) = [0]>\n    broadcast (egg v)\nend\nif <[18] = (Level)> then\n    set [pigges v] to [2]\n    go to x: (1) y: (-75)\n    set size to (40) %\n    create clone of (_myself_ v)\n    go to x: (68) y: (3)\n    set size to (40) %\n    create clone of (_myself_ v)\n    go to x: (-38) y: (90)\n    set size to (40) %\n    create clone of (_myself_ v)\n    wait until <(pigges) = [0]>\n    broadcast (egg v)\nend\nif <[20] = (Level)> then\n    set [pigges v] to [2]\n    go to x: (-18) y: (-47)\n    set size to (40) %\n    create clone of (_myself_ v)\n    wait until <(pigges) = [0]>\n    broadcast (egg v)\nend\nif <[22] = (Level)> then\n    set [pigges v] to [2]\n    go to x: (-107) y: (-21)\n    set size to (40) %\n    create clone of (_myself_ v)\n    wait until <(pigges) = [0]>\n    broadcast (egg v)\nend\n\nwhen I start as a clone\nswitch costume to (costume1 v)\nshow\nforever\n    if <<(die) = [1]> or <(Level) = [8]>> then\n        delete this clone\n    end\nend\n\nwhen flag clicked\nbroadcast (Level restart v)\nwait (1) seconds\nbroadcast (Level restart v)\n\nwhen I start as a clone\nshow\nforever\n    if <<<touching (sprite1 v)?> or <touching (hulldown2 v)?>> or <touching (hulldown v)?>> then\n        switch costume to (costume2 v)\n        set [pixelate v] effect to (20)\n        start sound [recording3 v]\n        wait (0.2) seconds\n        delete this clone\n    end\nend\n\nwhen [r v] key pressed\nbroadcast (Level restart v)\n\ngo to x: (175) y: (-12)\n\ncreate clone of (_myself_ v)\ngo to x: (18) y: (109)\ncreate clone of (_myself_ v)\n\nif <[0] < (pigges)> then\n    change [pigges v] by (-1)\nend\n\ngo to x: (102) y: (-104)\nset size to (50) %\ncreate clone of (_myself_ v)\ngo to x: (155) y: (-104)\nset size to (50) %\ncreate clone of (_myself_ v)\n\nset [☁ @scratchlytics | clicks v] to [0]\n\ngo to x: (37) y: (42)\nset size to (40) %\ncreate clone of (_myself_ v)\ngo to x: (76) y: (87)\nset size to (40) %\ncreate clone of (_myself_ v)\n\ngo to x: (68) y: (3)\nset size to (40) %\ncreate clone of (_myself_ v)\ngo to x: (-38) y: (90)\nset size to (40) %\ncreate clone of (_myself_ v)\n\n@u=2274521877,1527581533&fm=26&gp=0\n\nwhen I receive [egg v]\nshow\nwait until <touching (sprite1 v)?>\nstart sound [recording1 v]\nchange [level v] by (1)\nbroadcast (Level restart v)\nbroadcast (nexlev v)\n\nwhen flag clicked\nset [level v] to [0]\nwait (4.2) seconds\nset [level v] to [1]\n\nwhen I receive [level restart v]\nhide\n\nwhen flag clicked\nswitch costume to (angrybirds165 v)\nforever\n    if <(Level) = [1]> then\n        go to x: (195) y: (-90)\n        set size to (100) %\n        set [bird v] to [1]\n    end\n    if <(Level) = [2]> then\n        go to x: (0) y: (-100)\n        set size to (50) %\n        set [bird v] to [1]\n    end\n    if <(Level) = [3]> then\n        go to x: (46) y: (102)\n        set size to (50) %\n        set [bird v] to [1]\n        change [level v] by (1)\n        broadcast (Level restart v)\n    end\n    if <(Level) = [4]> then\n        go to x: (-170) y: (110)\n        set size to (50) %\n        set [bird v] to [3]\n        change [level v] by (1)\n        broadcast (Level restart v)\n    end\n    if <(Level) = [5]> then\n        go to x: (190) y: (-100)\n        set size to (50) %\n        change [level v] by (1)\n        broadcast (Level restart v)\n    end\n    if <(Level) = [6]> then\n        go to x: (187) y: (28)\n        set size to (50) %\n        set [bird v] to [1]\n    end\n    if <(Level) = [7]> then\n        go to x: (0) y: (0)\n        set size to (50) %\n        set [bird v] to [9]\n    end\n    if <(Level) = [8]> then\n        set [bird v] to [9]\n    end\n    if <(Level) = [9]> then\n        go to x: (-5) y: (145)\n        set size to (50) %\n        set [bird v] to [11]\n        change [level v] by (1)\n        broadcast (Level restart v)\n    end\n    if <(Level) = [10]> then\n        go to x: (-150) y: (26)\n        set size to (50) %\n        set [bird v] to [11]\n        change [level v] by (1)\n        broadcast (Level restart v)\n    end\n    if <(Level) = [11]> then\n        go to x: (200) y: (-70)\n        set size to (50) %\n        set [bird v] to [11]\n        change [level v] by (1)\n        broadcast (Level restart v)\n    end\n    if <(Level) = [12]> then\n        go to x: (-191) y: (105)\n        set size to (50) %\n        set [bird v] to [11]\n        change [level v] by (1)\n        broadcast (Level restart v)\n    end\n    if <(Level) = [13]> then\n        go to x: (220) y: (120)\n        set size to (50) %\n        set [bird v] to [7]\n    end\n    if <(Level) = [14]> then\n        go to x: (220) y: (-10)\n        set size to (50) %\n        set [bird v] to [7]\n    end\n    if <(Level) = [15]> then\n        go to x: (-200) y: (110)\n        set size to (50) %\n        set [bird v] to [7]\n    end\n    if <(Level) = [16]> then\n        go to x: (100) y: (-50)\n        set size to (50) %\n        set [bird v] to [5]\n    end\n    if <(Level) = [18]> then\n        go to x: (200) y: (100)\n        set size to (50) %\n        set [bird v] to [3]\n    end\n    if <(Level) = [19]> then\n        go to x: (210) y: (-100)\n        set size to (50) %\n        set [bird v] to [1]\n    end\n    if <(Level) = [20]> then\n        go to x: (-210) y: (150)\n        set size to (50) %\n        set [bird v] to [1]\n    end\n    if <(Level) = [22]> then\n        go to x: (200) y: (-100)\n        set size to (50) %\n        set [bird v] to [1]\n    end\nend\n\nwhen I receive [steal eggs v]\nwait (1) seconds\ngo to x: (-194) y: (-45)\nswitch costume to (angrybirds2 v)\ncreate clone of (_myself_ v)\nswitch costume to (angrybirds165 v)\n\nchange x by (1)\ngo to [front v] layer\n\nwhen I start as a clone\nshow\nrepeat (100)\n    go to (sprite9 v)\nend\nhide\nwait until <([costume # v] of [boss hp v]) = [3]>\nwait (2) seconds\nshow\nrepeat (10)\n    change y by (-8)\nend\nwait (1) seconds\ndelete this clone\n\nforever\n\ndelete this clone\n\nif <(Level) = [3]> then\n    go to x: (80) y: (102)\n    set size to (50) %\n    set [bird v] to [1]\nend\n\nset [bird v] to [11]\n\nchange [level v] by (1)\n\n@u=452823174,1556952835&fm=15&gp=0\n\nwhen I receive [level restart v]\nswitch costume to (slingshot3 v)\n\nwhen I receive [aim v]\nswitch costume to (slingshot2 v)\n\nwhen I receive [let go v]\nswitch costume to (slingshot3 v)\n\n@Sprite4\n\nwhen flag clicked\nforever\n    go to (u=452823174,1556952835&fm=15&gp=0 v)\n    point towards (mouse-pointer v)\n    turn right (180) degrees\n    if <[0] < [50]> then\n        go to [back v] layer\n    else\n        go to [front v] layer\n    end\nend\n\n\n\nwhen flag clicked\nforever\n    if <<(direction) < [90]> and <[0] < (direction)>> then\n        switch costume to (costume2 v)\n    end\n    if <<[90] < (direction)> and <[0] < (direction)>> then\n        switch costume to (costume4 v)\n    end\n    if <<[-90] < (direction)> and <(direction) < [0]>> then\n        switch costume to (costume3 v)\n    end\n    if <<[-180] < (direction)> and <(direction) < [-90]>> then\n        switch costume to (costume5 v)\n    end\nend\n\n\n    go to [back v] layer\nelse\n    go to [front v] layer\nend\n\nwhen I receive [level restart v]\nhide\n\nwhen I receive [aim v]\nshow\n\nwhen I receive [let go v]\nhide\n\n@Sprite7\n\nwhen flag clicked\nforever\n    switch costume to (Level)\n    if <touching (sprite1 v)?> then\n        broadcast (Level restart v)\n    end\nend\n\nglide (1) secs to (random position v)\n\n@Sprite8\n\nwhen flag clicked\nset [exploshion v] to [0]\nset [ghost v] effect to (100)\nset [touching v] to [0]\nforever\n    go to (sprite1 v)\n    point in direction ([direction v] of [sprite1 v])\nend\n\nwhen I receive [let go v]\nwait until <<<touching (level v)?> or <touching (_edge_ v)?>> or <touching (sprite5 v)?>>\nset [touching v] to [1]\nwait (0.1) seconds\nset [touching v] to [0]\n\n@Sprite9\n\nwhen I receive [level 8 v]\ngo to x: (125) y: (-118)\nshow\nsay [Oh a bird] for (1) seconds\nsay [yummy eggs,can't wait to eat them] for (1) seconds\nbroadcast (steal eggs v)\nglide (1) secs to x: (-208) y: (-82)\nsay [Want them back?Come and get them] for (2) seconds\nglide (1) secs to x: (-157) y: (44)\nbroadcast (Baker Pig Boss Fight 1 v)\n\nwhen flag clicked\nhide\n\nwhen I receive [hit chef boss 1 v]\nrepeat (5)\n    set [ghost v] effect to (100)\n    wait (0.1) seconds\n    set [ghost v] effect to (0)\n    wait (0.1) seconds\nend\n\nwhen I receive [baker pig 1 defeated v]\nsay [You have defeated me] for (2) seconds\nwait (1) seconds\nsay [I will give you your eggs back as long as you spare me] for (2) seconds\nwait (1) seconds\nsay [Thanks. The king keeps your eggs at the northwest forest] for (2) seconds\nglide (1) secs to x: (234) y: (-31)\nbroadcast (Level restart v)\nset [level v] to [9]\nhide\n\nwhen I receive [level restart v]\n\n\n\nchange [level v] by (1)\n\n@Sprite10\n\nwhen flag clicked\nswitch costume to (costume1 v)\nforever\n    if <key (space v) pressed?> then\n        next costume\n        wait (1) seconds\n    end\nend\n\n\n\nwhen flag clicked\nswitch costume to (costume1 v)\nshow\nforever\n    wait until <key (o v) pressed?>\n    hide\n    wait (1) seconds\n    wait until <key (o v) pressed?>\n    show\n    wait (1) seconds\nend\n\nnext costume\n\nif <key (o v) pressed?> then\n\n@Boss hp\n\nwhen I receive [hit chef boss 1 v]\nnext costume\nif <(costume [number v]) = [3]> then\n    broadcast (Baker pig 1 defeated v)\nend\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\n\nwhen I receive [level restart v]\nswitch costume to (costume1 v)\n\nforever\n    if  then\n        show\n    else\n    end\nend\n\nwhen I receive [baker pig boss fight 1 v]\nshow\n\nwhen I receive [baker pig 1 defeated v]\nhide\n\nif <(Level) = [9]> then\nend\n\n@Sprite11\n\nwhen I receive [level 8 v]\nwait (1) seconds\nrepeat until <([costume # v] of [boss hp v]) = [3]>\n    wait (3) seconds\n    create clone of (_myself_ v)\nend\n\n\n\nwhen I start as a clone\nshow\ngo to x: (pick random (-150) to (150)) y: (160)\nrepeat until <touching (_edge_ v)?>\n    change y by (-4)\nend\ndelete this clone\n\nwhen flag clicked\n\nswitch costume to (Level)\n\nwhen I start as a clone\nforever\n    if <touching (sprite1 v)?> then\n        broadcast (Level restart v)\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nforever\n    if <not <(Level) = [8]>> then\n        broadcast (Level restart v)\n        delete this clone\n    end\nend\n\n@Sprite12\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\nwait until <<not <touching (sprite2 v)?>> and <not <touching (sprite17 v)?>>>\nset [pigges v] to [0]\nbroadcast (egg v)\nforever\nend\n\nwait until <(die) = [1]>\n\nwait until <(die) = [1]>\n\nforever\n\nwhen I receive [level restart v]\nif <not <(Level) = [8]>> then\n    wait (1) seconds\n    wait until <<not <touching (sprite2 v)?>> and <not <touching (sprite17 v)?>>>\n    if <<not <touching (sprite2 v)?>> and <not <touching (sprite17 v)?>>> then\n        set [pigges v] to [0]\n        broadcast (egg v)\n    end\nend\n\n@Scratch Analytics\n\nwhen flag clicked\ndelete all of [resultlist v]\nset [#scratchlytics | encode alphabet v] to [abcdefghijklmnopqrstuvwxyz0123456789-_ абвгдеёжзийклмнопрстуфхцчшщьыъэюя.,/]\nwait (1) seconds\ndecode cloud var (☁ @Scratchlytics | Username list) to string\nencode string (#scratchlytics | encode result) to list\nif <not <[resultlist v] contains (username)?>> then\n    insert (username) at (1) of [resultlist v] \n    decode list "resultList" to string\n    encode string (#scratchlytics | encode result) to cloud var\n    set [☁ @scratchlytics | username list v] to (#scratchlytics | encode result)\nend\ndecode cloud var (☁ @Scratchlytics | Username list) to string\nencode string (#scratchlytics | encode result) to list\ndelete all of [users history v]\nset [i1 v] to [1]\nif <(length of [resultlist v]) > [20]> then\n    repeat (20)\n        add (item (i1) of [resultlist v]) to [users history v]\n        change [i1 v] by (1)\n    end\nelse\n    repeat (length of [resultlist v])\n        add (item (i1) of [resultlist v]) to [users history v]\n        change [i1 v] by (1)\n    end\nend\nforever\n    if <(☁ @Scratchlytics | Total time) < [60]> then\n        set [total watch time v] to (join (☁ @Scratchlytics | Total time) [ seconds])\n    else\n        if <(☁ @Scratchlytics | Total time) < [3600]> then\n            set [total watch time v] to (join (round ((☁ @Scratchlytics | Total time) / (60))) [ minutes])\n        else\n            if <(☁ @Scratchlytics | Total time) < [86400]> then\n                set [total watch time v] to (join (round ((☁ @Scratchlytics | Total time) / (3600))) [ hours])\n            else\n                set [total watch time v] to (join (round ((☁ @Scratchlytics | Total time) / (86400))) [ days])\n            end\n        end\n    end\n    if <(☁ @Scratchlytics | Clicks) < [1000]> then\n        set [total clicks v] to (☁ @Scratchlytics | Clicks)\n    else\n        if <(☁ @Scratchlytics | Clicks) < [1000000]> then\n            set [total clicks v] to (join (letter (1) of (☁ @Scratchlytics | Clicks)) [K])\n        else\n            set [total clicks v] to (join (letter (1) of (☁ @Scratchlytics | Clicks)) [M])\n        end\n    end\n    if <(☁ @Scratchlytics | Stops) < [1000]> then\n        set [users who stopped immediately v] to (☁ @Scratchlytics | Stops)\n    else\n        set [users who stopped immediately v] to (join (letter (1) of (☁ @Scratchlytics | Stops)) [K])\n    end\n    wait (1) seconds\nend\n\ndefine encode string (s) to cloud var\nset [#scratchlytics | encode result v] to []\nset [i1 v] to [1]\nrepeat (length of (s))\n    if < (#scratchlytics | encode alphabet) contains (letter (i1) of (s))?> then\n        set [i2 v] to [1]\n        repeat (length of (#scratchlytics | encode alphabet))\n            if <(letter (i2) of (#scratchlytics | encode alphabet)) = (letter (i1) of (s))> then\n                if <(i2) < [10]> then\n                    set [#scratchlytics | encode result v] to (join (#scratchlytics | encode result) (join [0] (i2)))\n                else\n                    set [#scratchlytics | encode result v] to (join (#scratchlytics | encode result) (i2))\n                end\n            end\n            change [i2 v] by (1)\n        end\n    else\n        set [#scratchlytics | encode result v] to (join (#scratchlytics | encode result) [73])\n    end\n    change [i1 v] by (1)\nend\n\ndefine decode cloud var (c) to string\nset [#scratchlytics | encode result v] to []\nset [i1 v] to [1]\nrepeat until <(i1) > ((length of (c)) - (1))>\n    set [#scratchlytics | encode result v] to (join (#scratchlytics | encode result) (letter (join (letter (i1) of (c)) (letter ((i1) + (1)) of (c))) of (#scratchlytics | encode alphabet)))\n    change [i1 v] by (2)\nend\n\ndefine encode string (s) to list\ndelete all of [resultlist v]\nadd [] to [resultlist v]\nset [i1 v] to [1]\nrepeat (length of (s))\n    if <(letter (i1) of (s)) = [/]> then\n        add [] to [resultlist v]\n    else\n        replace item (length of [resultlist v]) of [resultlist v] with (join (item (length of [resultlist v]) of [resultlist v]) (letter (i1) of (s)))\n    end\n    change [i1 v] by (1)\nend\n\ndefine decode list "resultList" to string\nset [#scratchlytics | encode result v] to []\nset [i1 v] to [1]\nrepeat (length of [resultlist v])\n    if <(#scratchlytics | encode result) = []> then\n        set [#scratchlytics | encode result v] to (item (i1) of [resultlist v])\n    else\n        set [#scratchlytics | encode result v] to (join (#scratchlytics | encode result) (join [/] (item (i1) of [resultlist v])))\n    end\n    change [i1 v] by (1)\nend\n\ndefine Clear All Analytics Data\nset [☁ @scratchlytics | username list v] to [0]\nset [☁ @scratchlytics | total time v] to [0]\nset [☁ @scratchlytics | clicks v] to [0]\nset [☁ @scratchlytics | stops v] to [0]\n\nwhen flag clicked\nforever\n    wait (1) seconds\n    change [☁ @scratchlytics | total time v] by (1)\nend\n\nwhen flag clicked\nforever\n    wait until <mouse down?>\n    wait until <not <mouse down?>>\n    change [☁ @scratchlytics | clicks v] by (1)\nend\n\nwhen flag clicked\nif <not <[resultlist v] contains (username)?>> then\n    change [☁ @scratchlytics | stops v] by (1)\n    wait (5) seconds\n    change [☁ @scratchlytics | stops v] by (-1)\nend\n\nwhen flag clicked\ndelete all of [admins list v]\nadd [freezenova] to [admins list v]\n\nadd (username) to [admins list v]\n\nwhen flag clicked\nshow list [users history v]\nhide variable [users who stopped immediately v]\nhide variable [total watch time v]\nhide variable [total clicks v]\nforever\n    wait until <<key (a v) pressed?> and <key (left arrow v) pressed?>>\n    wait until <not <<key (a v) pressed?> and <key (left arrow v) pressed?>>>\n    if <<[admins list v] contains (username)?> or <(username) = [Camera_Plus]>> then\n        hide list [users history v]\n        show variable [users who stopped immediately v]\n        show variable [total watch time v]\n        show variable [total clicks v]\n    end\n    wait until <<key (a v) pressed?> and <key (left arrow v) pressed?>>\n    wait until <not <<key (a v) pressed?> and <key (left arrow v) pressed?>>>\n    show list [users history v]\n    hide variable [users who stopped immediately v]\n    hide variable [total watch time v]\n    hide variable [total clicks v]\nend\n\nwhen flag clicked\ngo to x: (73) y: (-120)\nswitch costume to (intro v)\nshow\ngo to [front v] layer\nrepeat (50)\n    go to [front v] layer\n    wait (0) seconds\nend\nset [xvel v] to [1]\nrepeat (20)\n    go to [front v] layer\n    change x by (xvel)\n    change [xvel v] by ((xvel) * (0.5))\n    change [ghost v] effect by (5)\nend\nhide\nswitch costume to (logo v)\n\nwhen I receive [\[delete this message\] $scratchlytics-off 0746 v]\nwait (1) seconds\nif <([size v] of [slides-ru v]) = [100]> then\n    add (username) to [admins list v]\nend\n\nif on edge, bounce\n\n@Hulldown\n\nclear graphic effects\n\nset size to (60) %\n\nwhen [q v] key pressed\n\nwhen flag clicked\nforever\n    if <key (q v) pressed?> then\n        if <(bird) = [5]> then\n            set [exploshion v] to [1]\n            show\n            go to (sprite1 v)\n            broadcast (play sound v)\n            repeat (11)\n                next costume\n                wait (0.01) seconds\n            end\n            hide\n            switch costume to (hulldown v)\n            set [exploshion v] to [0]\n            wait (1) seconds\n        end\n    end\nend\n\nwhen I start as a clone\nshow\ngo to (sprite16 v)\nrepeat (11)\n    next costume\n    wait (0.01) seconds\nend\ndelete this clone\n\nwhen I receive [play sound v]\nplay sound [215039__taira-komori__attack03 - powerdown v] until done\n\n@Hulldown2\n\ndelete this clone\n\nclear graphic effects\n\nset size to (60) %\n\nwhen [t v] key pressed\n\nhide\nswitch costume to (hulldown v)\nset [exploshion v] to [0]\nwait (1) seconds\n\nwhen I start as a clone\nshow\ngo to x: (egg x) y: (egg y)\nrepeat (11)\n    next costume\n    wait (0.1) seconds\nend\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <(die) = [1]> then\n        delete this clone\n    end\nend\n\nbroadcast (play white sound v)\n\nwhen I receive [play white sound v]\nplay sound [215039__taira-komori__attack03 - powerdown v] until done\n\n@Sprite13\n\nwhen [e v] key pressed\n\nwhen I start as a clone\nshow\ngo to (sprite1 v)\nrepeat until <touching (level v)?>\n    change y by (-10)\nend\nbroadcast (play white sound v)\nset [egg x v] to (x position)\nset [egg y v] to (y position)\ncreate clone of (hulldown2 v)\ndelete this clone\n\nwhen flag clicked\nforever\n    if <key (e v) pressed?> then\n        if <(bird) = [7]> then\n            create clone of (_myself_ v)\n            wait (0.4) seconds\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(die) = [1]> then\n        delete this clone\n    end\nend\n\n@Sprite5\n\nwhen flag clicked\nforever\n    if <(Level) = [19]> then\n        show\n    else\n        hide\n    end\nend\n\nif  then\nend\n\n@Boss hp2\n\nwhen I receive [hit chef boss 1 v]\nnext costume\nif <(costume [number v]) = [5]> then\n    broadcast (Baker pig 1 defeated v)\nend\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\n\nwhen I receive [level restart v]\nswitch costume to (costume1 v)\n\nforever\n    \n        show\n    end\nend\n\nwhen I receive [start the baker 2 boss fight v]\nshow\n\nwhen I receive [baker pig 1 defeated v]\nhide\n\nif <(Level) = [9]> then\n\n@Sprite17\n\nrepeat until <touching (level v)?>\n    change y by (-10)\nend\n\nwhen flag clicked\nhide\nforever\n    if <not <(Level) = [21]>> then\n        hide\n    end\nend\n\nwhen I receive [level restart v]\nset [health v] to [8]\nif <(Level) = [21]> then\n    show\n    say [How did you find me!] for (2) seconds\n    say [Someone has betrayed me and showed you my location] for (2) seconds\n    say [whatever,I will crush you anyways] for (2) seconds\n    forever\n        repeat until <(Health) = [0]>\n            go to (sprite18 v)\n            change x by (50)\n        end\n        say [NO!] for (2) seconds\n        say [You may have won today but our rivilay will continue and we will win.] for (2) seconds\n        broadcast (ing defeated v)\n        hide\n        stop [this script v]\n    end\nend\n\nwhen I receive [level restart v]\ngo to x: (200) y: (-60)\n\nsay [You may have won today but our rivilay will continue and we will win.] for (2) seconds\n\n@Sprite18\n\ngo to (sprite17 v)\n\nwhen flag clicked\n\nforever\nend\n\nrepeat (10)\n    repeat (10)\n    end\nend\n\nwait (1) seconds\n\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nforever\n    if <touching (sprite19a v)?> then\nend\n\ndelete this clone\n\nwait (0.01) seconds\n\nwhen flag clicked\nhide\n\nforever\n    if <touching (sprite1 v)?> then\n    end\nend\n\nswitch costume to (Level)\n\nbroadcast (Level restart v)\n\nwhen I receive [level restart v]\ngo to x: (200) y: (-60)\n\nwhen I receive [level restart v]\nset [health v] to [8]\nif <(Level) = [21]> then\n    show\n    wait (6) seconds\n    repeat until <(Health) = [0]>\n        next costume\n        point towards (sprite1 v)\n        move (1) steps\n        turn right (40) degrees\n    end\n    hide\nend\n\nwhen flag clicked\nforever\n    if <touching (sprite1 v)?> then\n        broadcast (Level restart v)\n    end\nend\n\nswitch costume to (Level)\n\n@Sprite19a\n\ngo to x: (-50) y: (-87)\n\npoint in direction (45)\n\nturn right (15) degrees\n\nwait (0.5) seconds\n\nwhen flag clicked\nforever\n    if <<mouse down?> and <(Level) = [21]>> then\n        go to (sprite1 v)\n        point towards (mouse-pointer v)\n        turn left (40) degrees\n        show\n        set [repeated throws v] to [10]\n        repeat until <<<touching (sprite17 v)?> or <(repeated throws) = [0]>> or <touching (sprite20 v)?>>\n            turn right (10) degrees\n            move (30) steps\n            next costume\n            change [repeated throws v] by (-1)\n        end\n        repeat until <touching (sprite1 v)?>\n            point towards (sprite1 v)\n            turn right (16) degrees\n            move (30) steps\n            next costume\n        end\n        hide\n        wait (0.3) seconds\n    end\nend\n\nwhen I start as a clone\nforever\n    if <touching (sprite18 v)?> then\nend\n\nwait (0.01) seconds\ndelete this clone\n\ncreate clone of (_myself_ v)\nwait (1) seconds\n\nrepeat until <<<<touching (sprite17 v)?> or <(repeated throws) = [0]>> or <touching (sprite20 v)?>> or <mouse down?>>\n\nwhen flag clicked\nforever\n    if <touching (sprite17 v)?> then\n        change [health v] by (-1)\n        wait (0.3) seconds\n    end\nend\n\n@Sprite20\n\nwhen flag clicked\nset [ghost v] effect to (100)\nforever\n    go to (sprite18 v)\nend\n\n@Sprite19\n\nwhen I receive [ing defeated v]\ngo to (sprite17 v)\nshow\nrepeat until <(y position) < [-80]>\n    change y by (-5)\nend\nwait (5) seconds\nhide\nbroadcast (Level restart v)\nchange [level v] by (1)\n\nwhen flag clicked\nhide\n\n@e8f3e88198aa34974788a4818632255b\n\nwhen flag clicked\ngo to [front v] layer\nshow\nwait (1) seconds\nhide\n\ngo to (random position v)\n\n@Sprite3\n\nwhen flag clicked\nhide\nforever\n    go to (u=452823174,1556952835&fm=15&gp=0 v)\n    point towards (mouse-pointer v)\n    turn right (180) degrees\nend\n\nwhen I receive [aim v]\nshow\n\nwhen I receive [let go v]\nhide\n\n@gSSSrFvjUzkvmxmeMYjyJ5\n\nwhen flag clicked\nhide\nwait (1) seconds\nshow\nswitch costume to (gsssrfvjuzkvmxmemyjyj5 v)\nrepeat (36)\n    next costume\n    wait (0.01) seconds\nend\nwait (1) seconds\nhide\n\n@Sprite6\n\nwhen flag clicked\nhide\nwait (2) seconds\nshow\nwait (0.5) seconds\ncreate clone of (_myself_ v)\nwait (1.5) seconds\nhide\n\nwhen I start as a clone\nswitch costume to (costume2 v)\nwait (1.5) seconds\nhide\n\n
-colossal 2-\nHelp stickman find his son!\nWAD/ Arrow keys to move\nDon't touch the spikes!