Difficult Platformer

Instructions: Part 2: https://scratch.mit.edu/projects/481140655/\nPart 3: https://scratch.mit.edu/projects/501360677/\nDefinitive edition: https://scratch.mit.edu/projects/497169267/\n\nZ or up arrow to jump, S to skip, and arrow keys or WASD to move. Triple click the green flag when resetting! Press c to change the color of your cube! To defeat the first boss, hit the red heart three times in a row without dying. To defeat the second boss, survive 5 avalanches in a row. To defeat the third boss, make it hit into the spinning wheel 5 times.

@Stage\n\n@Player 1\n\ndefine Move\nchange y by (y)\nif <touching (level v)?> then\n    repeat ([abs v] of (y) )\n        if <touching (level v)?> then\n            change y by ((-1) * (([abs v] of (y) ) / (y)))\n        end\n    end\n    if <<<key (z v) pressed?> or <<key (w v) pressed?> or <key (up arrow v) pressed?>>> and <not <(y) > [0]>>> then\n        set [y v] to [15]\n    else\n        set [y v] to [0]\n    end\nelse\n    change [y v] by (-1)\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [x v] by (1)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [x v] by (-1)\nend\nchange x by (x)\nif <touching (level v)?> then\n    set [prev y v] to (y position)\n    repeat (([abs v] of (y) ) + (1))\n        if <touching (level v)?> then\n            change y by (1)\n        end\n    end\n    if <touching (level v)?> then\n        set y to (Prev Y)\n        repeat ([ceiling v] of ([abs v] of (x) ) )\n            if <touching (level v)?> then\n                change x by ((-1) * (([abs v] of (x) ) / (x)))\n            end\n        end\n    end\nend\nset [x v] to ((x) * (0.9))\n\nwhen flag clicked\nforever\n    Move\nend\n\nwhen flag clicked\nset [level v] to [1]\ngo to x: (-194) y: (-166)\n\nwhen flag clicked\nforever\n    if <touching (fireball1 l1 v)?> then\n        if <(level) = [1]> then\n            go to x: (-194) y: (-166)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (lava1 v)?> then\n        if <(level) = [1]> then\n            go to x: (-194) y: (-166)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [1]> then\n        if <touching (exit v)?> then\n            broadcast (level 2 pls v)\n            go to x: (-194) y: (-166)\n            set [level v] to [2]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (lava1 v)?> then\n        if <(level) = [2]> then\n            go to x: (-194) y: (-166)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (fireball1 l2 v)?> then\n        if <(level) = [2]> then\n            go to x: (-194) y: (-166)\n            change [deaths v] by (1)\n            wait (0.7) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (fireball2 l2 v)?> then\n        if <(level) = [2]> then\n            go to x: (-194) y: (-166)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [2]> then\n        if <touching (exit v)?> then\n            broadcast (level 3 pls v)\n            go to x: (-194) y: (-166)\n            set [level v] to [3]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (spike 1 l3 v)?> then\n        if <<(level) = [3]> or <(level) = [8]>> then\n            go to x: (-194) y: (-166)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (spike 2 l3 v)?> then\n        if <<(level) = [3]> or <(level) = [8]>> then\n            go to x: (-194) y: (-166)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (spike 3 l3 v)?> then\n        if <<(level) = [3]> or <(level) = [8]>> then\n            go to x: (-194) y: (-166)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (fireball1 l3 v)?> then\n        if <(level) = [3]> then\n            go to x: (-194) y: (-166)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [3]> then\n        if <touching (exit v)?> then\n            broadcast (level 4 pls v)\n            go to x: (-194) y: (-166)\n            set [level v] to [4]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [4]> then\n        if <touching (exit v)?> then\n            broadcast (level 5 pls v)\n            go to x: (-194) y: (-166)\n            set [level v] to [5]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (s v) pressed?> then\n        if <(level) < [24]> then\n            change [level v] by (1)\n            wait (0.7) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [5]> then\n        switch backdrop to (backdrop2 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [5]> then\n        if <touching (sprite2 v)?> then\n            set [1st boss hp v] to [15]\n            go to x: (-194) y: (-166)\n            change [deaths v] by (1)\n            wait (0.7) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [5]> then\n        if <touching (sprite3 v)?> then\n            change [1st boss hp v] by (-5)\n            wait (7) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (c v) pressed?> then\n        next costume\n        wait (0.5) seconds\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen flag clicked\nhide variable [1st boss hp v]\n\nwhen flag clicked\nforever\n    if <(level) = [6]> then\n        if <touching (exit v)?> then\n            go to x: (-194) y: (-166)\n            set [level v] to [7]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (sprite4 v)?> then\n        if <(level) = [6]> then\n            go to x: (-194) y: (-166)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (rock v)?> then\n        if <(level) = [7]> then\n            go to x: (-194) y: (-166)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(level) = [5]> or <<(level) = [10]> or <<(level) = [15]> or <(level) = [20]>>>> then\n        play sound [\[Undertale Remix\] Megalovania 6 v] until done\n    else\n        if <(level) = [25]> then\n            if <(is it flowey yet?) = [1]> then\n                play sound [Undertale OST- 080 - Finale v] until done\n            end\n        else\n            play sound [hollow-knight-ost-enter-hallownest-youtubemp3free v] until done\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [5]> then\n        stop all sounds\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [6]> then\n        stop all sounds\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [7]> then\n        if <touching (exit v)?> then\n            go to x: (-194) y: (-166)\n            set [level v] to [8]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [8]> then\n        if <touching (exit v)?> then\n            go to x: (-194) y: (-166)\n            set [level v] to [9]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [9]> then\n        if <touching (exit v)?> then\n            go to x: (-194) y: (-166)\n            set [level v] to [10]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [10]> then\n        stop all sounds\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [11]> then\n        stop all sounds\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (rock2 v)?> then\n        if <(level) = [10]> then\n            set [2nd boss hp v] to [15]\n            go to x: (-194) y: (-166)\n            change [deaths v] by (1)\n            wait (0.5) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (sprite6 v)?> then\n        if <(level) = [9]> then\n            go to x: (-194) y: (-166)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (sprite7 v)?> then\n        if <(level) = [9]> then\n            go to x: (-194) y: (-166)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [11]> then\n        go to x: (-194) y: (-166)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [11]> then\n        if <touching (exit v)?> then\n            go to x: (-194) y: (-166)\n            set [level v] to [12]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (sprite6 v)?> then\n        if <(level) = [11]> then\n            go to x: (-194) y: (-166)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (sprite7 v)?> then\n        if <(level) = [11]> then\n            go to x: (-194) y: (-166)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (fireball3 l2 v)?> then\n        if <(level) = [2]> then\n            go to x: (-194) y: (-166)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [11]> then\n        play sound [sfx_level_announcer_knockout_0004 v] until done\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [6]> then\n        play sound [sfx_level_announcer_knockout_0004 v] until done\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (sprite9 v)?> then\n        if <(level) = [12]> then\n            go to x: (-194) y: (-166)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [12]> then\n        if <touching (exit v)?> then\n            go to x: (-194) y: (-166)\n            set [level v] to [13]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (sprite11 v)?> then\n        if <(level) = [13]> then\n            go to x: (-194) y: (-166)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [13]> then\n        if <touching (exit v)?> then\n            go to x: (-194) y: (-50)\n            set [level v] to [14]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (spike 1 l3 v)?> then\n        if <(level) = [12]> then\n            go to x: (-194) y: (-166)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (spike 1 l3 v)?> then\n        if <(level) = [13]> then\n            go to x: (-194) y: (-166)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (spike 2 l3 v)?> then\n        if <(level) = [13]> then\n            go to x: (-194) y: (-166)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (spike 3 l3 v)?> then\n        if <<(level) = [14]> or <(level) = [21]>> then\n            go to x: (-220) y: (-50)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [14]> then\n        go to x: (-220) y: (-50)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (spike 1 l3 v)?> then\n        if <<(level) = [14]> or <(level) = [21]>> then\n            go to x: (-220) y: (-50)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (spike 2 l3 v)?> then\n        if <<(level) = [14]> or <(level) = [21]>> then\n            go to x: (-220) y: (-50)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (sprite7 v)?> then\n        if <(level) = [14]> then\n            go to x: (-220) y: (-50)\n            change [deaths v] by (1)\n            wait (1) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [14]> then\n        if <touching (exit v)?> then\n            go to x: (-194) y: (-50)\n            set [level v] to [15]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [15]> then\n        stop all sounds\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (sprite12 v)?> then\n        if <(level) = [15]> then\n            go to x: (-194) y: (-165)\n            change [deaths v] by (1)\n            wait (2) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (sprite4 v)?> then\n        if <(level) = [15]> then\n            go to x: (-220) y: (-50)\n            set [3rd boss hp v] to [15]\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [16]> then\n        go to x: (-194) y: (-150)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (spike 1 l3 v)?> then\n        if <(level) = [16]> then\n            go to x: (-194) y: (-160)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (sprite6 v)?> then\n        if <(level) = [16]> then\n            go to x: (-194) y: (-160)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (sprite7 v)?> then\n        if <(level) = [16]> then\n            go to x: (-194) y: (-160)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [16]> then\n        if <touching (exit v)?> then\n            go to x: (-194) y: (-160)\n            set [level v] to [17]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [16]> then\n        stop all sounds\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (sprite4 v)?> then\n        if <(level) = [15]> then\n            go to x: (-194) y: (-166)\n            set [3rd boss hp v] to [15]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [16]> then\n        play sound [sfx_level_announcer_knockout_0004 v] until done\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (spike 2 l3 v)?> then\n        if <(level) = [17]> then\n            go to x: (-220) y: (-160)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (sprite6 v)?> then\n        if <(level) = [17]> then\n            go to x: (-194) y: (-160)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (lava1 v)?> then\n        if <(level) = [17]> then\n            go to x: (-194) y: (-160)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [17]> then\n        if <touching (exit v)?> then\n            go to x: (-194) y: (-160)\n            set [level v] to [18]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [18]> then\n        if <touching (exit v)?> then\n            go to x: (-194) y: (-140)\n            set [level v] to [19]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [20]> then\n        stop all sounds\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [21]> then\n        stop all sounds\n        play sound [sfx_level_announcer_knockout_0004 v] until done\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (spike 1 l3 v)?> then\n        if <(level) = [19]> then\n            go to x: (-194) y: (-140)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (spike 2 l3 v)?> then\n        if <(level) = [19]> then\n            go to x: (-194) y: (-140)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (spike 3 l3 v)?> then\n        if <(level) = [19]> then\n            go to x: (-194) y: (-140)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [19]> then\n        if <touching (exit v)?> then\n            go to x: (-194) y: (-140)\n            set [level v] to [20]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [16]> then\n        hide variable [3rd boss hp v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [20]> then\n        show variable [4th boss hp v]\n    end\nend\n\nwhen flag clicked\nhide variable [4th boss hp v]\n\nwhen flag clicked\nforever\n    if <(level) = [20]> then\n        show variable [4th boss hp v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [6]> then\n        go to x: (-194) y: (-150)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (pikpng v)?> then\n        if <(level) = [20]> then\n            go to x: (-194) y: (-160)\n            change [deaths v] by (1)\n            set [4th boss hp v] to [15]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [21]> then\n        go to x: (-220) y: (-50)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (sprite7 v)?> then\n        if <(level) = [21]> then\n            go to x: (-220) y: (-50)\n            change [deaths v] by (1)\n            wait (1) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (fireball1 l3 v)?> then\n        if <(level) = [21]> then\n            go to x: (-194) y: (-50)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [21]> then\n        if <touching (exit v)?> then\n            go to x: (-194) y: (-160)\n            set [level v] to [22]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (spike 1 l3 v)?> then\n        if <(level) = [22]> then\n            go to x: (-194) y: (-160)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (rock v)?> then\n        if <(level) = [22]> then\n            go to x: (-194) y: (-160)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (sprite11 v)?> then\n        if <(level) = [22]> then\n            go to x: (-194) y: (-160)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [22]> then\n        if <touching (exit v)?> then\n            go to x: (-210) y: (-160)\n            set [level v] to [23]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (rock v)?> then\n        if <(level) = [23]> then\n            go to x: (-194) y: (-160)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (sprite6 v)?> then\n        if <(level) = [23]> then\n            go to x: (-194) y: (-160)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (sprite9 v)?> then\n        if <(level) = [23]> then\n            go to x: (-194) y: (-160)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [23]> then\n        if <touching (exit v)?> then\n            go to x: (-210) y: (-160)\n            set [level v] to [24]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [24]> then\n        go to x: (11) y: (-150)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [24]> then\n        wait (1) seconds\n        repeat (20)\n            change size by (-3)\n        end\n        hide\n        set [level v] to [25]\n    end\nend\n\nwhen flag clicked\nset size to (100) %\ngo to [front v] layer\nshow\n\nwhen flag clicked\nforever\n    if <(level) = [25]> then\n        go to x: (-194) y: (-160)\n        set size to (100) %\n        go to [front v] layer\n        show\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [25]> then\n        switch backdrop to (d7s4uas-103c2058-51f3-4f1c-9f1b-a1f009aa8081 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [25]> then\n        stop all sounds\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (sprite16 v)?> then\n        if <(level) = [25]> then\n            go to x: (0) y: (-160)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (sprite17 v)?> then\n        if <(level) = [25]> then\n            broadcast (switch! v)\n            hide\n        end\n    end\nend\n\n@level\n\nwhen flag clicked\nforever\n    if <(level) = [1]> then\n        switch costume to (level 1 v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [2]> then\n        switch costume to (level 2 v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [3]> then\n        switch costume to (level 3 v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [4]> then\n        switch costume to (level 4 v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [5]> then\n        switch costume to (level 3 v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [6]> then\n        switch costume to (level 6 v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [7]> then\n        switch costume to (level7 v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [8]> then\n        switch costume to (level 8 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [9]> then\n        switch costume to (level 9 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [10]> then\n        switch costume to (level 10 v)\n        switch backdrop to (backdrop2 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [11]> then\n        switch costume to (level 11 v)\n        switch backdrop to (pixel-art-wallpapers-top-free-pixel-art-backgrounds-pixel-art-background v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [12]> then\n        switch costume to (level 12 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [13]> then\n        switch costume to (level 13 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [14]> then\n        switch costume to (level 14 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [15]> then\n        switch costume to (level 15 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [16]> then\n        switch backdrop to (pixel-art-wallpapers-top-free-pixel-art-backgrounds-pixel-art-background v)\n        switch costume to (level 16 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [17]> then\n        switch costume to (level 17 v)\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\n\nwhen flag clicked\nforever\n    if <(level) = [18]> then\n        switch costume to (level 18 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [18]> then\n        change x by (70)\n        wait (1) seconds\n        change x by (-70)\n        wait (1) seconds\n    end\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\nwhen flag clicked\nforever\n    if <(level) = [19]> then\n        go to x: (0) y: (0)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [20]> then\n        switch costume to (level 20 v)\n        switch backdrop to (backdrop2 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [20]> then\n        switch costume to (level 20 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [19]> then\n        switch costume to (level 19 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [21]> then\n        switch costume to (level 21 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [22]> then\n        switch costume to (level 21 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [22]> then\n        switch costume to (level 22 v)\n    end\nend\n\nwhen I receive [it's boss time! v]\nhide\n\nwhen flag clicked\nshow\n\n@exit\n\nwhen flag clicked\nforever\n    if <(level) = [1]> then\n        show\n        go to x: (-206) y: (105)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [2]> then\n        go to x: (196) y: (-160)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [8]> then\n        go to x: (-206) y: (105)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [10]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [11]> then\n        go to x: (-205) y: (43)\n        show\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [5]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [6]> then\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [12]> then\n        go to x: (196) y: (-160)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [15]> then\n        switch backdrop to (backdrop2 v)\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [16]> then\n        go to x: (-206) y: (97)\n        show\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [17]> then\n        go to x: (200) y: (-160)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [18]> then\n        go to x: (-10) y: (140)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [18]> then\n        change x by (70)\n        wait (1) seconds\n        change x by (-70)\n        wait (1) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [19]> then\n        go to x: (215) y: (102)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [20]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [21]> then\n        go to x: (196) y: (-160)\n        show\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [24]> then\n        hide\n    end\nend\n\n@lava1\n\nwhen flag clicked\nforever\n    if <(level) = [1]> then\n        show\n        switch costume to (level 1 v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [2]> then\n        show\n        switch costume to (level 2 v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [3]> then\n        hide\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [17]> then\n        show\n        switch costume to (level 17 v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [18]> then\n        hide\n        stop [this script v]\n    end\nend\n\n@fireball1 L1\n\nwhen flag clicked\nif <(level) = [1]> then\n    go to x: (-25) y: (-191)\n    point in direction (90)\n    forever\n        if <(level) = [1]> then\n            show\n            repeat (20)\n                change y by (10)\n            end\n            turn right (180) degrees\n            wait (0.1) seconds\n            repeat (20)\n                change y by (-10)\n            end\n            hide\n            turn right (180) degrees\n            wait (1) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [2]> then\n        hide\n        stop [this script v]\n    end\nend\n\n@left edge\n\nwhen flag clicked\nforever\n    if <(level) = [9]> then\n        hide\n    end\nend\n\nwhen flag clicked\nshow\n\nwhen flag clicked\nforever\n    if <(level) = [21]> then\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [22]> then\n        hide\n    end\nend\n\n@fireball1 L2\n\nwhen flag clicked\nforever\n    if <(level) = [2]> then\n        go to x: (180) y: (-140)\n        forever\n            repeat (36)\n                change x by (-10)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [2]> then\n        if <touching (left edge v)?> then\n            hide\n            wait (1) seconds\n            go to x: (180) y: (-140)\n            show\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [1]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [2]> then\n        show\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [3]> then\n        if <touching (left edge v)?> then\n            hide\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [3]> then\n        hide\n    end\nend\n\n@fireball2 L2\n\nwhen flag clicked\nforever\n    if <(level) = [2]> then\n        wait (0.2) seconds\n        go to x: (180) y: (-50)\n        forever\n            repeat (36)\n                change x by (-10)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [2]> then\n        if <touching (left edge v)?> then\n            hide\n            wait (1) seconds\n            go to x: (180) y: (-50)\n            show\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [1]> then\n        repeat (10)\n            hide\n        end\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [2]> then\n        wait (0.2) seconds\n        show\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [3]> then\n        if <touching (left edge v)?> then\n            hide\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [4]> then\n        hide\n    end\nend\n\n@fireball3 L2\n\nwhen flag clicked\nforever\n    if <(level) = [2]> then\n        wait (0.4) seconds\n        go to x: (180) y: (150)\n        forever\n            repeat (36)\n                change x by (-10)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [2]> then\n        if <touching (left edge v)?> then\n            hide\n            wait (1) seconds\n            go to x: (180) y: (150)\n            show\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [1]> then\n        repeat (10)\n            hide\n        end\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [2]> then\n        wait (0.4) seconds\n        show\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [3]> then\n        if <touching (left edge v)?> then\n            hide\n        end\n    end\nend\n\n@spike 1 L3\n\nwhen flag clicked\nforever\n    if <(level) = [3]> then\n        go to x: (-107) y: (-124)\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [1]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [2]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [4]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [8]> then\n        go to x: (-123) y: (-38)\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [9]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [13]> then\n        go to x: (-140) y: (-125)\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [14]> then\n        go to x: (-107) y: (-124)\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [16]> then\n        go to x: (-17) y: (119)\n        switch costume to (costume2 v)\n        show\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen flag clicked\nforever\n    if <(level) = [17]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [17]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [19]> then\n        go to x: (197) y: (-18)\n        switch costume to (costume1 v)\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [15]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [20]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [21]> then\n        go to x: (-107) y: (-124)\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [22]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [22]> then\n        go to x: (140) y: (-158)\n        switch costume to (costume2 v)\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [23]> then\n        hide\n    end\nend\n\n@Spike 2 L3\n\nwhen flag clicked\nforever\n    if <(level) = [3]> then\n        go to x: (98) y: (-124)\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [1]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [2]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [4]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [8]> then\n        go to x: (15) y: (31)\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [9]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [13]> then\n        go to x: (150) y: (-126)\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [14]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [14]> then\n        go to x: (98) y: (-124)\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [16]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [17]> then\n        go to x: (0) y: (63)\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [18]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [19]> then\n        go to x: (-198) y: (38)\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [15]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [20]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [21]> then\n        go to x: (98) y: (-124)\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [22]> then\n        hide\n    end\nend\n\n@Spike 3 L3\n\nwhen flag clicked\nforever\n    if <(level) = [3]> then\n        go to x: (1) y: (-123)\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [2]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [1]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [4]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [8]> then\n        go to x: (142) y: (126)\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [9]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [14]> then\n        go to x: (1) y: (-124)\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [16]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [19]> then\n        go to x: (170) y: (138)\n        switch costume to (costume2 v)\n        show\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen flag clicked\nforever\n    if <(level) = [15]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [20]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [21]> then\n        go to x: (1) y: (-123)\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [22]> then\n        hide\n    end\nend\n\n@fireball1 L3\n\nwhen flag clicked\nforever\n    if <<(level) = [3]> or <(level) = [21]>> then\n        go to x: (180) y: (-40)\n        forever\n            repeat (36)\n                change x by (-10)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [1]> then\n        repeat (10)\n            hide\n        end\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [3]> then\n        show\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(level) = [3]> or <(level) = [21]>> then\n        if <touching (left edge v)?> then\n            hide\n            wait (1) seconds\n            go to x: (180) y: (-40)\n            show\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [5]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [21]> then\n        show\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [22]> then\n        hide\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\nforever\n    if <(level) = [5]> then\n        show variable [1st boss hp v]\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nswitch backdrop to (pixel-art-wallpapers-top-free-pixel-art-backgrounds-pixel-art-background v)\n\nwhen flag clicked\nset [1st boss hp v] to [15]\n\nwhen flag clicked\nforever\n    if <(level) = [5]> then\n        switch costume to (tenor v)\n        wait (0.1) seconds\n        switch costume to (tenor2 v)\n        wait (0.1) seconds\n        switch costume to (tenor3 v)\n        wait (0.1) seconds\n        switch costume to (tenor4 v)\n        wait (0.1) seconds\n        switch costume to (tenor5 v)\n        wait (0.1) seconds\n        switch costume to (tenor6 v)\n        wait (0.1) seconds\n        switch costume to (tenor7 v)\n        wait (0.1) seconds\n        switch costume to (tenor8 v)\n        wait (0.1) seconds\n        switch costume to (tenor9 v)\n        wait (0.1) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [5]> then\n        if <(1st boss HP) = [0]> then\n            change [level v] by (1)\n            hide variable [1st boss hp v]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [6]> then\n        stop [other scripts in sprite v]\n        hide\n        switch backdrop to (pixel-art-wallpapers-top-free-pixel-art-backgrounds-pixel-art-background v)\n    end\nend\n\nwhen I receive [this is going to be a swell battle! v]\nforever\n    if <(level) = [5]> then\n        forever\n            broadcast (bones! v) and wait\n        end\n    end\nend\n\n@Sprite2\n\nwhen flag clicked\nhide\n\nwhen I receive [bones! v]\ncreate clone of (_myself_ v)\nwait (0.7) seconds\n\nwhen I start as a clone\nshow\npoint towards (player 1 v)\nrepeat (30)\n    move (10) steps\nend\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <touching (level v)?> then\n        hide\n        delete this clone\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [6]> then\n        stop [other scripts in sprite v]\n        hide\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(level) = [6]> then\n        delete this clone\n    end\nend\n\n@Sprite3\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <(level) = [5]> then\n        change y by (-5)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [5]> then\n        if <touching (level v)?> then\n            hide\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [6]> then\n        stop [other scripts in sprite v]\n        hide\n    end\nend\n\nwhen I receive [this is going to be a swell battle! v]\nforever\n    if <(level) = [5]> then\n        repeat (3)\n            wait (pick random (7) to (12)) seconds\n            go to x: (pick random (-90) to (354)) y: (180)\n            show\n        end\n    end\nend\n\n@Sprite4\n\nwhen flag clicked\nforever\n    if <<(level) = [6]> or <(level) = [15]>> then\n        show\n        turn right (5) degrees\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [15]> then\n        switch costume to (costume2 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [6]> then\n        switch costume to (costume1 v)\n        stop [this script v]\n    end\nend\n\n@rock\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <(level) = [7]> then\n        create clone of (_myself_ v)\n        wait (0.5) seconds\n    end\nend\n\nwhen I start as a clone\ngo to x: (pick random (-220) to (230)) y: (180)\nshow\nrepeat (36)\n    change y by (-10)\nend\n\nwhen I start as a clone\nforever\n    if <touching (level v)?> then\n        delete this clone\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [22]> then\n        create clone of (_myself_ v)\n        wait (0.5) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [23]> then\n        create clone of (_myself_ v)\n        wait (0.5) seconds\n    end\nend\n\n@Sprite5\n\nwhen flag clicked\ngo to [front v] layer\nhide\n\nwhen flag clicked\nforever\n    if <(level) = [5]> then\n        switch costume to (red_int v)\n        show\n        wait (0.2) seconds\n        switch costume to (red_int1 v)\n        wait (0.2) seconds\n        switch costume to (red_int2 v)\n        wait (0.2) seconds\n        switch costume to (red_int3 v)\n        wait (0.2) seconds\n        switch costume to (ready v)\n        wait (0.2) seconds\n        switch costume to (ready1 v)\n        wait (0.2) seconds\n        switch costume to (ready2 v)\n        hide\n        broadcast (this is going to be a swell battle! v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nset [deaths v] to [0]\n\nwhen flag clicked\nforever\n    if <(level) = [5]> then\n        play sound [sfx_level_announcer_0001_b v] until done\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [10]> then\n        switch costume to (red_int v)\n        show\n        wait (0.2) seconds\n        switch costume to (red_int1 v)\n        wait (0.2) seconds\n        switch costume to (red_int2 v)\n        wait (0.2) seconds\n        switch costume to (red_int3 v)\n        wait (0.2) seconds\n        switch costume to (ready v)\n        wait (0.2) seconds\n        switch costume to (ready1 v)\n        wait (0.2) seconds\n        switch costume to (ready2 v)\n        hide\n        broadcast (this is going to be a swell battle! v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [10]> then\n        play sound [sfx_level_announcer_0001_b v] until done\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [15]> then\n        switch costume to (red_int v)\n        show\n        wait (0.2) seconds\n        switch costume to (red_int1 v)\n        wait (0.2) seconds\n        switch costume to (red_int2 v)\n        wait (0.2) seconds\n        switch costume to (red_int3 v)\n        wait (0.2) seconds\n        switch costume to (ready v)\n        wait (0.2) seconds\n        switch costume to (ready1 v)\n        wait (0.2) seconds\n        switch costume to (ready2 v)\n        hide\n        broadcast (this is going to be a swell battle! v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [15]> then\n        play sound [sfx_level_announcer_0001_b v] until done\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [20]> then\n        switch costume to (red_int v)\n        show\n        wait (0.2) seconds\n        switch costume to (red_int1 v)\n        wait (0.2) seconds\n        switch costume to (red_int2 v)\n        wait (0.2) seconds\n        switch costume to (red_int3 v)\n        wait (0.2) seconds\n        switch costume to (ready v)\n        wait (0.2) seconds\n        switch costume to (ready1 v)\n        wait (0.2) seconds\n        switch costume to (ready2 v)\n        hide\n        broadcast (this is going to be a swell battle! v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [20]> then\n        play sound [sfx_level_announcer_0001_b v] until done\n        stop [this script v]\n    end\nend\n\n@Sprite6\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <(level) = [9]> then\n        show\n        wait (1) seconds\n        hide\n        wait (1) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [10]> then\n        hide\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to x: (-74) y: (-5)\n\nwhen flag clicked\nforever\n    if <(level) = [11]> then\n        switch costume to (costume2 v)\n        show\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [11]> then\n        show\n        wait (1) seconds\n        hide\n        wait (1) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [12]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [16]> then\n        show\n        wait (1) seconds\n        hide\n        wait (1) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [16]> then\n        switch costume to (costume3 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [17]> then\n        switch costume to (costume4 v)\n        go to [front v] layer\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [17]> then\n        show\n        wait (1) seconds\n        hide\n        wait (1) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [18]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [23]> then\n        switch costume to (costume4 v)\n        go to [front v] layer\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [23]> then\n        show\n        wait (1) seconds\n        hide\n        wait (1) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [24]> then\n        hide\n    end\nend\n\n@Sprite7\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <(level) = [9]> then\n        hide\n        wait (1) seconds\n        show\n        wait (1) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [10]> then\n        hide\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to x: (86) y: (2)\n\nwhen flag clicked\nforever\n    if <(level) = [11]> then\n        switch costume to (costume2 v)\n        show\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [11]> then\n        hide\n        wait (1) seconds\n        show\n        wait (1) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [12]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [14]> then\n        show\n        wait (0.5) seconds\n        hide\n        wait (1) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [14]> then\n        switch costume to (costume3 v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [16]> then\n        hide\n        wait (1) seconds\n        show\n        wait (1) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [16]> then\n        switch costume to (costume4 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [17]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [21]> then\n        show\n        wait (0.5) seconds\n        hide\n        wait (2) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [21]> then\n        switch costume to (costume3 v)\n    end\nend\n\nwhen I receive [laser v]\nswitch costume to (costume5 v)\nshow\nwait (3) seconds\nhide\n\n@Sprite8\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <(level) = [10]> then\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [6]> then\n        hide variable [1st boss hp v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [10]> then\n        show variable [2nd boss hp v]\n    end\nend\n\nwhen flag clicked\nhide variable [2nd boss hp v]\nset [2nd boss hp v] to [15]\n\nwhen flag clicked\nforever\n    if <(level) = [10]> then\n        if <touching (rock2 v)?> then\n            change [2nd boss hp v] by (-3)\n            wait (3) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [10]> then\n        if <(2nd boss HP) = [0]> then\n            change [level v] by (1)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [11]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [11]> then\n        hide variable [2nd boss hp v]\n    end\nend\n\nwhen I receive [this is going to be a swell battle! v]\nforever\n    if <(level) = [10]> then\n        wait (3) seconds\n        broadcast (rocks! v)\n    end\nend\n\n@rock2\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\ngo to x: (pick random (-220) to (230)) y: (180)\nshow\nrepeat (36)\n    change y by (-10)\nend\n\nwhen I start as a clone\nforever\n    if <touching (level v)?> then\n        delete this clone\n    end\nend\n\nwhen I receive [rocks! v]\nrepeat (7)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\ngo to [front v] layer\n\nwhen flag clicked\nforever\n    if <(level) = [11]> then\n        stop [other scripts in sprite v]\n        hide\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(level) = [11]> then\n        delete this clone\n    end\nend\n\n@Sprite9\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <(level) = [12]> then\n        go to x: (130) y: (-170)\n        switch costume to (costume1 v)\n        show\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [12]> then\n        repeat (25)\n            change x by (-10)\n        end\n        repeat (25)\n            change x by (10)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [13]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [23]> then\n        go to x: (130) y: (-170)\n        switch costume to (costume1 v)\n        show\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [23]> then\n        repeat (25)\n            change x by (-10)\n        end\n        repeat (25)\n            change x by (10)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [24]> then\n        hide\n    end\nend\n\n@Sprite10\n\n@Sprite11\n\nwhen flag clicked\ngo to x: (2) y: (-115)\nhide\n\nwhen flag clicked\nforever\n    if <(level) = [13]> then\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [13]> then\n        turn right (5) degrees\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [14]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [22]> then\n        go to x: (-30) y: (-115)\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [22]> then\n        turn right (5) degrees\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [23]> then\n        hide\n    end\nend\n\n@Sprite12\n\nwhen flag clicked\nhide variable [3rd boss hp v]\nset [3rd boss hp v] to [15]\nhide\n\nwhen flag clicked\nforever\n    if <(level) = [15]> then\n        go to x: (-184) y: (95)\n        show variable [3rd boss hp v]\n        show\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [15]> then\n        wait (3) seconds\n        forever\n            if <(level) = [15]> then\n                point towards (player 1 v)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [15]> then\n        wait (3) seconds\n        forever\n            if <(level) = [15]> then\n                move (2.5) steps\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [15]> then\n        if <touching (sprite4 v)?> then\n            change [3rd boss hp v] by (-3)\n            change y by (100)\n            wait (2) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [15]> then\n        if <touching (player 1 v)?> then\n            set [3rd boss hp v] to [15]\n            go to x: (-184) y: (95)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [15]> then\n        if <(3rd boss HP) = [0]> then\n            hide\n            set [level v] to [16]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [16]> then\n        hide\n    end\nend\n\n@Sprite13\n\nwhen flag clicked\nshow\nwait (5) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\n\nwhen flag clicked\nset [ghost v] effect to (0)\ngo to [front v] layer\nswitch costume to (costume1 v)\n\nwhen flag clicked\nforever\n    if <(level) = [1]> then\n        switch costume to (costume1 v)\n        set [ghost v] effect to (0)\n        show\n        wait (3) seconds\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [2]> then\n        switch costume to (costume2 v)\n        set [ghost v] effect to (0)\n        show\n        wait (3) seconds\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [3]> then\n        switch costume to (costume3 v)\n        set [ghost v] effect to (0)\n        show\n        wait (3) seconds\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [4]> then\n        switch costume to (costume4 v)\n        set [ghost v] effect to (0)\n        show\n        wait (3) seconds\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [6]> then\n        switch costume to (costume5 v)\n        set [ghost v] effect to (0)\n        show\n        wait (3) seconds\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [7]> then\n        switch costume to (costume6 v)\n        set [ghost v] effect to (0)\n        show\n        wait (3) seconds\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [7]> then\n        switch costume to (costume6 v)\n        set [ghost v] effect to (0)\n        show\n        wait (3) seconds\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [8]> then\n        switch costume to (costume7 v)\n        set [ghost v] effect to (0)\n        show\n        wait (3) seconds\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [9]> then\n        switch costume to (costume8 v)\n        set [ghost v] effect to (0)\n        show\n        wait (3) seconds\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [11]> then\n        switch costume to (costume9 v)\n        set [ghost v] effect to (0)\n        show\n        wait (3) seconds\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [12]> then\n        switch costume to (costume10 v)\n        set [ghost v] effect to (0)\n        show\n        wait (3) seconds\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [13]> then\n        switch costume to (costume11 v)\n        set [ghost v] effect to (0)\n        show\n        wait (3) seconds\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [14]> then\n        switch costume to (costume12 v)\n        set [ghost v] effect to (0)\n        show\n        wait (3) seconds\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [16]> then\n        switch costume to (costume13 v)\n        set [ghost v] effect to (0)\n        show\n        wait (3) seconds\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [17]> then\n        switch costume to (costume14 v)\n        set [ghost v] effect to (0)\n        show\n        wait (3) seconds\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [18]> then\n        switch costume to (costume15 v)\n        set [ghost v] effect to (0)\n        show\n        wait (3) seconds\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [19]> then\n        switch costume to (costume16 v)\n        set [ghost v] effect to (0)\n        show\n        wait (3) seconds\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [21]> then\n        switch costume to (costume17 v)\n        set [ghost v] effect to (0)\n        show\n        wait (3) seconds\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [22]> then\n        switch costume to (costume18 v)\n        set [ghost v] effect to (0)\n        show\n        wait (3) seconds\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [23]> then\n        switch costume to (costume19 v)\n        set [ghost v] effect to (0)\n        show\n        wait (3) seconds\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        stop [this script v]\n    end\nend\n\n@PikPng\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <(level) = [20]> then\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [20]> then\n        repeat (100)\n            point towards (player 1 v)\n        end\n        wait (0.5) seconds\n        switch costume to (costume1 v)\n        repeat (3)\n            create clone of (_myself_ v)\n            wait (1) seconds\n        end\n        change [4th boss hp v] by (-3)\n        switch costume to (pikpng v)\n    end\nend\n\nwhen flag clicked\nswitch costume to (pikpng v)\n\nwhen I start as a clone\nset size to (20) %\npoint towards (player 1 v)\nrepeat (36)\n    move (10) steps\nend\nhide\n\nwhen I start as a clone\nforever\n    if <(level) = [20]> then\n        if <touching (level v)?> then\n            hide\n        end\n    end\nend\n\nwhen flag clicked\nset [4th boss hp v] to [15]\n\nwhen flag clicked\nforever\n    if <(level) = [21]> then\n        hide\n        set [level v] to [21]\n        switch backdrop to (pixel-art-wallpapers-top-free-pixel-art-backgrounds-pixel-art-background v)\n        hide variable [4th boss hp v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [20]> then\n        if <(4th boss HP) = [0]> then\n            set [level v] to [21]\n        end\n    end\nend\n\n@Sprite14\n\nwhen flag clicked\nrepeat (2)\n    go to [front v] layer\nend\nshow\nwait (1) seconds\nhide\n\n@Sprite15\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <(level) = [24]> then\n        go to [back v] layer\n        show\n    end\nend\n\nwhen flag clicked\nswitch backdrop to (pixel-art-wallpapers-top-free-pixel-art-backgrounds-pixel-art-background v)\n\nwhen flag clicked\nforever\n    if <(level) = [25]> then\n        hide\n    end\nend\n\n@Sprite16\n\nwhen flag clicked\nhide\n\nwhen I receive [it's boss time! v]\nshow\nwait (2) seconds\nforever\n    if <(level) = [25]> then\n        repeat (20)\n            broadcast (bro this is fire v)\n            wait (0.5) seconds\n        end\n        broadcast (Boss weakness v)\n        wait (5) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [25]> then\n        if <(final boss) = [0]> then\n            say [no...] for (1) seconds\n            say [NO...] for (1) seconds\n            say [...] for (1) seconds\n            say [NO] for (1) seconds\n            broadcast (Mr Goat Guy v)\n            forever\n                hide\n            end\n        end\n    end\nend\n\n@Sprite17\n\nwhen flag clicked\nhide\n\nwhen I receive [it's boss time! v]\nforever\n    if <key (right arrow v) pressed?> then\n        change x by (7)\n    end\nend\n\nwhen I receive [it's boss time! v]\nforever\n    if <key (left arrow v) pressed?> then\n        change x by (-7)\n    end\nend\n\nwhen I receive [it's boss time! v]\nforever\n    if <key (up arrow v) pressed?> then\n        change y by (7)\n    end\nend\n\nwhen I receive [it's boss time! v]\nforever\n    if <key (down arrow v) pressed?> then\n        change y by (-7)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [25]> then\n        go to x: (0) y: (-100)\n        show\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [25]> then\n        if <touching (sprite16 v)?> then\n            go to x: (0) y: (-160)\n            set [final boss v] to [15]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [25]> then\n        if <touching (sprite19 v)?> then\n            go to x: (0) y: (-160)\n            set [final boss v] to [15]\n        end\n    end\nend\n\nwhen flag clicked\nhide variable [final boss v]\n\nwhen flag clicked\nset [final boss v] to [15]\n\nwhen I receive [it's boss time! v]\nshow variable [final boss v]\n\nwhen flag clicked\ngo to [front v] layer\n\nwhen flag clicked\nforever\n    if <(level) = [25]> then\n        if <touching (rock3 v)?> then\n            go to x: (0) y: (-160)\n            set [final boss v] to [15]\n        end\n    end\nend\n\n@Sprite18\n\nwhen flag clicked\nhide\n\nwhen I receive [switch! v]\ngo to [front v] layer\nshow\nwait (1) seconds\nhide\nbroadcast (It's boss time! v)\n\nwhen I receive [mr goat guy v]\ngo to [front v] layer\nshow\nwait (1) seconds\nhide\nbroadcast (It's the true boss time! v)\n\nwhen I receive [next time... v]\ngo to [front v] layer\nshow\nbroadcast (hello ad v)\n\nwhen I receive [it's boss time! v]\nset [is it flowey yet? v] to [1]\n\nwhen flag clicked\nset [is it flowey yet? v] to [0]\n\n@Sprite19\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [bro this is fire v]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\npoint towards (sprite17 v)\nshow\nforever\n    move (10) steps\nend\n\nwhen I start as a clone\nforever\n    if <touching (level v)?> then\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nforever\n    if <touching (_edge_ v)?> then\n        delete this clone\n    end\nend\n\nwhen I receive [mr goat guy v]\nstop [other scripts in sprite v]\n\n@Sprite20\n\nwhen I receive [boss weakness v]\ngo to x: (24) y: (-58)\nshow\nwait (5) seconds\nhide\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <touching (sprite17 v)?> then\n        change [final boss v] by (-5)\n        hide\n    end\nend\n\n@Sprite21\n\nwhen flag clicked\nhide\n\nwhen I receive [it's the true boss time! v]\nshow\nsay [YOU SHALL NEVER ESCAPE] for (3) seconds\nbroadcast (Next time... v)\n\n@Sprite22\n\nwhen I receive [hello ad v]\ngo to [front v] layer\nshow\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen I receive [hello ad v]\nforever\n    if <(deaths) < [25]> then\n        switch costume to (costume2 v)\n    end\nend\n\n