The Gauntlet (Scrolling Platformer)
@Stage\n\nwhen I receive [step 1 v]\nswitch backdrop to (backdrop2 v)\nwait (1.1) seconds\nbroadcast (step 2 v)\nswitch backdrop to (backdrop3 v)\n\nwhen flag clicked\nswitch backdrop to (backdrop3 v)\n\nwhen I receive [start v]\nswitch backdrop to (backdrop1 v)\nforever\n    play sound [Rolling Sky Soundtrack level 10 \(X\) \(HQ\) \[Now level Castle in the Sky\] \(320  kbps\).mp3 v] until done\nend\n\nwhen I receive [game! v]\nstop [other scripts in sprite v]\n\n@Ground\n\ndefine move (speed)\nchange x by (speed)\nset [slope v] to [0]\nrepeat until <<not <touching (hitbox v)?>> or <(slope) = [8]>>\n    change y by (-1)\n    change [slope v] by (1)\nend\nif <(slope) = [8]> then\n    change x by ((0) - (speed))\n    change y by (slope)\n    set [x v] to [0]\nend\n\ndefine touching hitbox?\nchange [falling v] by (1)\nrepeat until <not <touching (hitbox v)?>>\n    change y by (-1)\n    set [y v] to [0]\n    set [falling v] to [0]\nend\n\nwhen I receive [start v]\nset [y v] to [0]\nset [x v] to [0]\nshow\ngo to [front v] layer\ngo to x: (0) y: (-55)\nforever\n    Ground Movement\nend\n\ndefine Ground Movement\nforever\n    if <(yes/no) = [yes]> then\n        change y by (y)\n        set [x v] to ((x) * (0.9))\n        change [y v] by (1)\n        touching hitbox?\n        if <key (right arrow v) pressed?> then\n            if <(x) > [0]> then\n                set [x v] to [0]\n            end\n            change [x v] by (-0.75)\n        else\n            if <key (left arrow v) pressed?> then\n                if <(x) < [0]> then\n                    set [x v] to [0]\n                end\n                change [x v] by (0.75)\n            else\n                set [x v] to [0]\n            end\n        end\n        if <<(x) > [0.5]> or <(x) < [-0.5]>> then\n            move (x)\n        end\n        if <<key (up arrow v) pressed?> and <(Falling) < [3]>> then\n            set [y v] to [-11]\n        end\n    end\nend\n\nwhen I receive [die v]\nset [health v] to [8]\nif <(Checkpoint) = [1]> then\n    go to x: (0) y: (-70)\nend\nif <(Checkpoint) = [2]> then\n    go to x: (-1961) y: (-480)\nend\nif <(Checkpoint) = [3]> then\n    go to x: (-28) y: (-880)\n    switch costume to (costume4 v)\nend\n\nwhen I receive [checkpoint v]\nswitch costume to (costume3 v)\nset [health v] to [8]\n\nwhen I receive [checkpoint 2 v]\nswitch costume to (costume4 v)\nset [health v] to [8]\n\nwhen I receive [start v]\nset size to (100) %\nswitch costume to (costume1 v)\nset size to (1000) %\nswitch costume to (costume2 v)\n\nwhen I receive [checkpoint 2 v]\nwait until <<[-237] > (x position)> and <(y position) < [-863]>>\nswitch costume to (costume5 v)\n\nwhen I receive [start v]\nwait until <<[-310] > (x position)> and <(costume [number v]) = [5]>>\nbroadcast (boss time v)\n\nwhen I receive [done liners v]\nwait until <[-200] < (x position)>\nwait until <<[-237] > (x position)> and <(y position) < [-863]>>\nswitch costume to (costume5 v)\n\nwhen I receive [done liners v]\nwait until <[-200] < (x position)>\nwait until <<[-310] > (x position)> and <(costume [number v]) = [5]>>\nbroadcast (boss time v)\n\nwhen flag clicked\nset [falling v] to [6]\nset [yes/no v] to [yes]\nhide\n\nwhen I receive [start v]\nforever\n    if <<not <key (left arrow v) pressed?>> and <not <key (right arrow v) pressed?>>> then\n        set [x v] to [0]\n    end\nend\n\n@Hitbox\n\nwhen I receive [start v]\nforever\n    if <touching (spikes v)?> then\n        set [damage v] to (Health)\n        set [health v] to [0]\n    end\nend\n\nwhen flag clicked\nswitch costume to (hitbox v)\nset size to (20) %\nset [ghost v] effect to (100)\ngo to (player v)\n\n@Player\n\ndefine Set Costume\nif <(Touching) = [1]> then\n    switch costume to (stand v)\nelse\n    if <(Falling) < [3]> then\n        if <not <<key (left arrow v) pressed?> or <key (right arrow v) pressed?>>> then\n            switch costume to (stand v)\n        else\n            if <(costume [number v]) > [5]> then\n                switch costume to (runloop-0 v)\n            else\n                next costume\n            end\n        end\n    else\n        if <(y) < [0]> then\n            switch costume to (jump v)\n        else\n            switch costume to (fall v)\n        end\n    end\n    if <key (right arrow v) pressed?> then\n        point in direction (90)\n    end\n    if <key (left arrow v) pressed?> then\n        point in direction (-90)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\npoint in direction (90)\nset size to (20) %\nswitch costume to (hitbox v)\ngo to x: (0) y: (-62)\ngo [backward v] (1000) layers\nforever\n    if <(yes/no) = [yes]> then\n        Set Costume\n    end\nend\n\nwhen I receive [die v]\npoint in direction (90)\n\nwhen I receive [start v]\nwait until <(yes/no) = [no]>\nswitch costume to (stand v)\npoint in direction (90)\n\nwhen I receive [done liners v]\nwait (1) seconds\nwait until <(yes/no) = [no]>\nswitch costume to (stand v)\npoint in direction (90)\n\n@Health Bar\n\nwhen I receive [start v]\nset [health v] to [8]\n\nwhen I receive [start v]\nshow\nswitch costume to (costume1 v)\nforever\n    go to [front v] layer\n    go [backward v] (1) layers\n    if <(Health) = [8]> then\n        switch costume to (costume1 v)\n    end\n    if <(Health) = [7]> then\n        switch costume to (costume2 v)\n    end\n    if <(Health) = [6]> then\n        switch costume to (costume3 v)\n    end\n    if <(Health) = [5]> then\n        switch costume to (costume4 v)\n    end\n    if <(Health) = [4]> then\n        switch costume to (costume5 v)\n    end\n    if <(Health) = [3]> then\n        switch costume to (costume6 v)\n    end\n    if <(Health) = [2]> then\n        switch costume to (costume7 v)\n    end\n    if <(Health) = [1]> then\n        switch costume to (costume8 v)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nforever\n    if <(Health) < [1]> then\n        broadcast (die v)\n        set [health v] to [8]\n    end\nend\n\nwhen I receive [game! v]\nhide\n\n@Turret 1\n\nwhen I start as a clone\nforever\n    if <(costume [number v]) = [5]> then\n        if <touching (hitbox v)?> then\n            change [health v] by (-1)\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <<<(#) = [2]> or <(#) = [4]>> or <(#) = [6]>> then\n        change x by (x)\n        change y by (y)\n    end\nend\n\nwhen I start as a clone\nif <<<(#) = [1]> or <(#) = [3]>> or <(#) = [5]>> then\n    point towards (player v)\n    switch costume to (costume3 v)\n    wait (0.03) seconds\n    next costume\n    wait (0.03) seconds\n    delete this clone\nend\nif <<<(#) = [2]> or <(#) = [4]>> or <(#) = [6]>> then\n    point towards (player v)\n    switch costume to (costume4 v)\n    repeat until <<<touching (hitbox v)?> or <touching (ground v)?>> or <touching (_edge_ v)?>>\n        move (10) steps\n    end\n    delete this clone\nend\n\nwhen flag clicked\nrepeat (5)\n    delete this clone\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nforever\n    if <<<(x position) > [278]> or <(x position) < [-278]>> or <<(y position) > [189]> or <(y position) < [-189]>>> then\n        delete this clone\n    else\n        set [# v] to [0]\n        repeat (3)\n            repeat (2)\n                change [# v] by (1)\n                create clone of (_myself_ v)\n            end\n            wait (0.3) seconds\n        end\n        wait (2) seconds\n    end\nend\n\nwhen I receive [start v]\nforever\n    go to x: (([x position v] of [ground v]) + (450)) y: (([y position v] of [ground v]) + (-80))\nend\n\nwhen I receive [die v]\nwait (0.03) seconds\nrepeat (5)\n    delete this clone\nend\n\nwhen I receive [start v]\nswitch costume to (costume1 v)\nforever\n    point towards (player v)\n    if <<<(x position) > [278]> or <(x position) < [-278]>> or <<(y position) > [189]> or <(y position) < [-191]>>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <([x position v] of [player v]) > (x position)> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\n@Turret 2\n\nwhen flag clicked\n\nwhen I start as a clone\nforever\n    if <(costume [number v]) = [5]> then\n        if <touching (hitbox v)?> then\n            change [health v] by (-1)\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <<<(#) = [2]> or <(#) = [4]>> or <(#) = [6]>> then\n        change x by (x)\n        change y by (y)\n    end\nend\n\nwhen I start as a clone\nif <<<(#) = [1]> or <(#) = [3]>> or <(#) = [5]>> then\n    point towards (player v)\n    switch costume to (costume3 v)\n    wait (0.03) seconds\n    next costume\n    wait (0.03) seconds\n    delete this clone\nend\nif <<<(#) = [2]> or <(#) = [4]>> or <(#) = [6]>> then\n    point towards (player v)\n    switch costume to (costume4 v)\n    repeat until <<<touching (hitbox v)?> or <touching (ground v)?>> or <touching (_edge_ v)?>>\n        move (10) steps\n    end\n    delete this clone\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nforever\n    if <<<(x position) > [277]> or <(x position) < [-277]>> or <<(y position) > [189]> or <(y position) < [-189]>>> then\n        delete this clone\n    else\n        set [# v] to [0]\n        repeat (3)\n            repeat (2)\n                change [# v] by (1)\n                create clone of (_myself_ v)\n            end\n            wait (0.3) seconds\n        end\n        wait (2) seconds\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <([x position v] of [player v]) > (x position)> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen flag clicked\nrepeat (5)\n    delete this clone\nend\n\nwhen I receive [die v]\nwait (0.03) seconds\nrepeat (5)\n    delete this clone\nend\n\nwhen I receive [start v]\nforever\n    go to x: (([x position v] of [ground v]) + (1575)) y: (([y position v] of [ground v]) + (-37))\nend\n\nwhen I receive [start v]\nswitch costume to (costume1 v)\nforever\n    point towards (player v)\n    if <<<(x position) > [277]> or <(x position) < [-277]>> or <<(y position) > [189]> or <(y position) < [-191]>>> then\n        hide\n    else\n        show\n    end\nend\n\n@Grenade Turret\n\nwhen I start as a clone\nset size to (140) %\nif <(#) = [2]> then\n    switch costume to (costume7 v)\n    move (49) steps\n    change y by (5)\n    go [backward v] (1) layers\n    set [y v] to [0]\n    show\n    set size to (250) %\n    point in direction ([direction v] of [grenade turret v])\n    repeat until <<<touching (hitbox v)?> or <touching (_edge_ v)?>> or <touching (ground v)?>>\n        move (7) steps\n        change [y v] by (-0.4)\n        change y by (Y)\n    end\n    if <<touching (hitbox v)?> or <touching (ground v)?>> then\n        set size to (250) %\n        point in direction (90)\n        turn right (pick random (-10) to (10)) degrees\n        switch costume to (costume3 v)\n        wait (0.03) seconds\n        if <touching (hitbox v)?> then\n            change [health v] by (-3)\n        end\n        repeat (3)\n            change size by (17)\n            change [ghost v] effect by (10)\n            next costume\n        end\n        wait (0.03) seconds\n    end\n    delete this clone\nend\n\nwhen flag clicked\n\nwhen I start as a clone\nif <(#) = [1]> then\n    point in direction ([direction v] of [grenade turret v])\n    switch costume to (costume7 v)\n    wait (0.03) seconds\n    switch costume to (costume8 v)\n    wait (0.03) seconds\n    delete this clone\nend\n\nwhen I start as a clone\nif <(#) = [2]> then\n    forever\n        change x by (x)\n        change y by (y)\n    end\nend\n\nwhen I start as a clone\nif <(#) = [2]> then\n    set rotation style [all around v]\n    switch costume to (costume9 v)\n    repeat until <<touching (hitbox v)?> or <touching (ground v)?>>\n        set size to (60) %\n        switch costume to (costume9 v)\n    end\nend\n\nwhen flag clicked\nforever\n    set [turn v] to ((distance to [hitbox v]) / (3))\nend\n\nwhen flag clicked\n\nwhen I receive [start v]\nforever\n    if <<<(x position) > [236]> or <(x position) < [-236]>> or <<(y position) > [173]> or <(y position) < [-173]>>> then\n    else\n        set [# v] to [0]\n        repeat (2)\n            change [# v] by (1)\n            create clone of (_myself_ v)\n        end\n        wait (0.8) seconds\n    end\nend\n\nwhen I receive [start v]\nswitch costume to (costume1 v)\nforever\n    if <<<(x position) > [236]> or <(x position) < [-236]>> or <<(y position) > [173]> or <(y position) < [-173]>>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [start v]\nswitch costume to (costume1 v)\nforever\n    point towards (player v)\n    if <([x position v] of [player v]) > ([x position v] of [grenade turret v])> then\n        turn left ((turn) - ((distance to [hitbox v]) / (7))) degrees\n    else\n        turn right ((turn) - ((distance to [hitbox v]) / (7))) degrees\n    end\nend\n\nwhen I receive [start v]\nforever\n    go to x: (([x position v] of [ground v]) + (1700)) y: (([y position v] of [ground v]) + (405))\nend\n\nwhen I receive [start v]\nforever\n    if <(x position) > ([x position v] of [hitbox v])> then\n        switch costume to (costume1 v)\n    else\n        switch costume to (costume2 v)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nrepeat (10)\n    delete this clone\nend\n\nwhen I receive [die v]\nrepeat (5)\n    delete this clone\nend\n\n@Spikes\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nforever\n    if <<<(y position) > [59]> or <(y position) < [-59]>> or <<(x position) > [-472]> or <(x position) < [-1338]>>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [start v]\nforever\n    go to x: ([x position v] of [ground v]) y: ([y position v] of [ground v])\nend\n\nwhen I receive [start v]\nswitch costume to (costume1 v)\nset size to (1000) %\nswitch costume to (costume2 v)\n\n@Checkpoint\n\nwhen flag clicked\nset [checkpoint v] to [1]\nset [# v] to [0]\nhide\n\nwhen I receive [start v]\nrepeat (2)\n    change [# v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nif <(#) = [1]> then\n    forever\n        if <<<(x position) > [226]> or <(x position) < [-226]>> or <<(y position) > [166]> or <(y position) < [-166]>>> then\n            hide\n        else\n            show\n        end\n    end\nend\nif <(#) = [2]> then\n    forever\n        if <<<(x position) > [226]> or <(x position) < [-226]>> or <<(y position) > [166]> or <(y position) < [-166]>>> then\n            hide\n        else\n            show\n        end\n    end\nend\n\nwhen I start as a clone\nswitch costume to (costume1 v)\nwait until <touching (hitbox v)?>\nrepeat (4)\n    next costume\nend\nif <(Checkpoint) = [1]> then\n    broadcast (Checkpoint v)\nend\nif <(Checkpoint) = [2]> then\n    broadcast (Checkpoint 2 v)\nend\nchange [checkpoint v] by (1)\n\nwhen I start as a clone\nset rotation style [left-right v]\nif <(#) = [1]> then\n    forever\n        point in direction (90)\n        go to x: (([x position v] of [ground v]) + (1960)) y: (([y position v] of [ground v]) + (410))\n    end\nend\nif <(#) = [2]> then\n    forever\n        point in direction (-90)\n        go to x: (([x position v] of [ground v]) + (30)) y: (([y position v] of [ground v]) + (809))\n    end\nend\n\n@Lasers\n\nwhen I start as a clone\nif <(#) = [1]> then\n    forever\n        go to x: (([x position v] of [ground v]) + (1115)) y: (([y position v] of [ground v]) + (665))\n        if <<<(x position) > [238]> or <(x position) < [-238]>> or <<(y position) > [175]> or <(y position) < [-175]>>> then\n            hide\n        else\n            show\n        end\n    end\nend\nif <(#) = [2]> then\n    forever\n        go to x: (([x position v] of [ground v]) + (1015)) y: (([y position v] of [ground v]) + (665))\n        if <<<(x position) > [238]> or <(x position) < [-238]>> or <<(y position) > [175]> or <(y position) < [-175]>>> then\n            hide\n        else\n            show\n        end\n    end\nend\nif <(#) = [3]> then\n    forever\n        go to x: (([x position v] of [ground v]) + (915)) y: (([y position v] of [ground v]) + (665))\n        if <<<(x position) > [238]> or <(x position) < [-238]>> or <<(y position) > [175]> or <(y position) < [-175]>>> then\n            hide\n        else\n            show\n        end\n    end\nend\nif <(#) = [4]> then\n    forever\n        go to x: (([x position v] of [ground v]) + (815)) y: (([y position v] of [ground v]) + (665))\n        if <<<(x position) > [238]> or <(x position) < [-238]>> or <<(y position) > [175]> or <(y position) < [-175]>>> then\n            hide\n        else\n            show\n        end\n    end\nend\nif <(#) = [5]> then\n    forever\n        go to x: (([x position v] of [ground v]) + (715)) y: (([y position v] of [ground v]) + (665))\n        if <<<(x position) > [238]> or <(x position) < [-238]>> or <<(y position) > [175]> or <(y position) < [-175]>>> then\n            hide\n        else\n            show\n        end\n    end\nend\nif <(#) = [6]> then\n    forever\n        go to x: (([x position v] of [ground v]) + (615)) y: (([y position v] of [ground v]) + (665))\n        if <<<(x position) > [238]> or <(x position) < [-238]>> or <<(y position) > [175]> or <(y position) < [-175]>>> then\n            hide\n        else\n            show\n        end\n    end\nend\nif <(#) = [7]> then\n    forever\n        go to x: (([x position v] of [ground v]) + (515)) y: (([y position v] of [ground v]) + (665))\n        if <<<(x position) > [238]> or <(x position) < [-238]>> or <<(y position) > [175]> or <(y position) < [-175]>>> then\n            hide\n        else\n            show\n        end\n    end\nend\nif <(#) = [8]> then\n    forever\n        go to x: (([x position v] of [ground v]) + (415)) y: (([y position v] of [ground v]) + (665))\n        if <<<(x position) > [238]> or <(x position) < [-238]>> or <<(y position) > [175]> or <(y position) < [-175]>>> then\n            hide\n        else\n            show\n        end\n    end\nend\nif <(#) = [9]> then\n    forever\n        go to x: (([x position v] of [ground v]) + (315)) y: (([y position v] of [ground v]) + (665))\n        if <<<(x position) > [238]> or <(x position) < [-238]>> or <<(y position) > [175]> or <(y position) < [-175]>>> then\n            hide\n        else\n            show\n        end\n    end\nend\nif <(#) = [10]> then\n    forever\n        go to x: (([x position v] of [ground v]) + (215)) y: (([y position v] of [ground v]) + (665))\n        if <<<(x position) > [238]> or <(x position) < [-238]>> or <<(y position) > [175]> or <(y position) < [-175]>>> then\n            hide\n        else\n            show\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nswitch costume to (costume1 v)\nforever\n    wait (0.8) seconds\n    repeat (30)\n        if <(costume [number v]) = [4]> then\n            switch costume to (costume2 v)\n        else\n            next costume\n        end\n    end\n    switch costume to (costume1 v)\nend\n\nwhen I receive [die v]\nwait (0.3) seconds\nset [# v] to [0]\nMake\n\nwhen I receive [die v]\nrepeat (10)\n    delete this clone\nend\n\nwhen I receive [start v]\nset [# v] to [0]\nMake\n\nwhen I start as a clone\nforever\n    if <<(costume [number v]) > [1]> and <touching (hitbox v)?>> then\n        set [health v] to [0]\n    end\nend\n\ndefine Make\nrepeat (10)\n    change [# v] by (1)\n    create clone of (_myself_ v)\nend\n\n@Tesla Bombs\n\nwhen I start as a clone\nif <(#) = [1]> then\n    forever\n        go to x: (([x position v] of [ground v]) + (1188)) y: (([y position v] of [ground v]) + (-86))\n        if <<<(x position) > [240]> or <(x position) < [-240]>> or <<(y position) > [175]> or <(y position) < [-175]>>> then\n            hide\n        else\n            show\n        end\n    end\nend\nif <(#) = [2]> then\n    forever\n        go to x: (([x position v] of [ground v]) + (1248)) y: (([y position v] of [ground v]) + (-86))\n        if <<<(x position) > [240]> or <(x position) < [-240]>> or <<(y position) > [175]> or <(y position) < [-175]>>> then\n            hide\n        else\n            show\n        end\n    end\nend\nif <(#) = [3]> then\n    forever\n        go to x: (([x position v] of [ground v]) + (1306)) y: (([y position v] of [ground v]) + (-86))\n        if <<<(x position) > [240]> or <(x position) < [-240]>> or <<(y position) > [175]> or <(y position) < [-175]>>> then\n            hide\n        else\n            show\n        end\n    end\nend\nif <(#) = [4]> then\n    forever\n        go to x: (([x position v] of [ground v]) + (1364)) y: (([y position v] of [ground v]) + (-86))\n        if <<<(x position) > [240]> or <(x position) < [-240]>> or <<(y position) > [175]> or <(y position) < [-175]>>> then\n            hide\n        else\n            show\n        end\n    end\nend\nif <(#) = [5]> then\n    forever\n        go to x: (([x position v] of [ground v]) + (1422)) y: (([y position v] of [ground v]) + (-86))\n        if <<<(x position) > [240]> or <(x position) < [-240]>> or <<(y position) > [175]> or <(y position) < [-175]>>> then\n            hide\n        else\n            show\n        end\n    end\nend\nif <(#) = [6]> then\n    forever\n        go to x: (([x position v] of [ground v]) + (1480)) y: (([y position v] of [ground v]) + (-86))\n        if <<<(x position) > [240]> or <(x position) < [-240]>> or <<(y position) > [175]> or <(y position) < [-175]>>> then\n            hide\n        else\n            show\n        end\n    end\nend\nif <(#) = [7]> then\n    forever\n        go to x: (([x position v] of [ground v]) + (1538)) y: (([y position v] of [ground v]) + (-86))\n        if <<<(x position) > [240]> or <(x position) < [-240]>> or <<(y position) > [175]> or <(y position) < [-175]>>> then\n            hide\n        else\n            show\n        end\n    end\nend\nif <(#) = [8]> then\n    delete this clone\nend\nif <(#) = [9]> then\n    delete this clone\nend\nif <(#) = [10]> then\n    delete this clone\nend\nif <(#) = [11]> then\n    delete this clone\nend\nif <(#) = [12]> then\n    forever\n        go to x: (([x position v] of [ground v]) + (37)) y: (([y position v] of [ground v]) + (564))\n        if <<<(x position) > [240]> or <(x position) < [-240]>> or <<(y position) > [175]> or <(y position) < [-175]>>> then\n            hide\n        else\n            show\n        end\n    end\nend\nif <(#) = [13]> then\n    forever\n        go to x: (([x position v] of [ground v]) + (-2)) y: (([y position v] of [ground v]) + (603))\n        if <<<(x position) > [240]> or <(x position) < [-240]>> or <<(y position) > [175]> or <(y position) < [-175]>>> then\n            hide\n        else\n            show\n        end\n    end\nend\nif <(#) = [14]> then\n    forever\n        go to x: (([x position v] of [ground v]) + (-43)) y: (([y position v] of [ground v]) + (642))\n        if <<<(x position) > [240]> or <(x position) < [-240]>> or <<(y position) > [175]> or <(y position) < [-175]>>> then\n            hide\n        else\n            show\n        end\n    end\nend\nif <(#) = [15]> then\n    forever\n        go to x: (([x position v] of [ground v]) + (-83)) y: (([y position v] of [ground v]) + (684))\n        if <<<(x position) > [240]> or <(x position) < [-240]>> or <<(y position) > [175]> or <(y position) < [-175]>>> then\n            hide\n        else\n            show\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nclear graphic effects\nshow\nswitch costume to (costume1 v)\nwait until <touching (hitbox v)?>\nswitch costume to (costume2 v)\ngo [backward v] (1) layers\nwait (0.1) seconds\nswitch costume to (costume3 v)\nif <touching (hitbox v)?> then\n    change [health v] by (-3)\nend\nrepeat (4)\n    next costume\n    change size by (17)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen I receive [start v]\nrun\n\nwhen I receive [die v]\nset [# v] to [0]\nrepeat (15)\n    change [# v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [die v]\nrepeat (15)\n    delete this clone\nend\n\ndefine run\nset [# v] to [0]\nrepeat (15)\n    change [# v] by (1)\n    create clone of (_myself_ v)\nend\n\n@Tesla Coils\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\nset size to (150) %\npoint in direction (90)\nswitch costume to (costume1 v)\n\nwhen I receive [start v]\nset [# v] to [0]\nrepeat (2)\n    change [# v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nif <(#) = [1]> then\n    set [coil 1 health v] to [4]\n    forever\n        go to x: (([x position v] of [ground v]) + (470)) y: (([y position v] of [ground v]) + (825))\n    end\nend\nif <(#) = [2]> then\n    set [coil 2 health v] to [4]\n    forever\n        go to x: (([x position v] of [ground v]) + (1070)) y: (([y position v] of [ground v]) + (825))\n    end\nend\n\ndefine run\nrepeat (pick random (2) to (5))\n    set [flash x v] to (x position)\n    set [flash y v] to (y position)\n    create clone of (flashes v)\nend\n\nwhen I start as a clone\nforever\n    if <<<(x position) > [220]> or <(x position) < [-220]>> or <<(y position) > [166]> or <(y position) < [-166]>>> then\n        hide\n    else\n        show\n        if <(#) = [1]> then\n            if <(Coil 1 Health) > [0]> then\n                if <(costume [number v]) = [10]> then\n                    switch costume to (costume1 v)\n                else\n                    next costume\n                end\n                wait (0.07) seconds\n            else\n                switch costume to (costume11 v)\n            end\n        end\n        if <(#) = [2]> then\n            if <(Coil 2 Health) > [0]> then\n                if <(costume [number v]) = [10]> then\n                    switch costume to (costume1 v)\n                else\n                    next costume\n                end\n                wait (0.07) seconds\n            else\n                switch costume to (costume11 v)\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <(#) = [1]> then\n    forever\n        if <touching (missle v)?> then\n            change [coil 1 health v] by (-1)\n            wait (1) seconds\n        end\n    end\nend\nif <(#) = [2]> then\n    forever\n        if <touching (missle v)?> then\n            change [coil 2 health v] by (-1)\n            wait (1) seconds\n        end\n    end\nend\n\n@Boss\n\nwhen I receive [boss time v]\nforever\n    if <(x position) < (([x position v] of [hitbox v]) - (15))> then\n        point in direction (100)\n    else\n        if <(x position) > (([x position v] of [hitbox v]) + (15))> then\n            point in direction (80)\n        else\n            point in direction (90)\n        end\n    end\nend\n\nwhen I receive [boss time v]\nset [boss x v] to [450]\nset [boss y v] to [1100]\nforever\n    go to x: (([x position v] of [ground v]) + (Boss X)) y: (([y position v] of [ground v]) + (Boss Y))\nend\n\nwhen I receive [boss time v]\nforever\n    if <<<(x position) > [235]> or <(x position) < [-235]>> or <<(y position) > [172]> or <(y position) < [-172]>>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen flag clicked\ngo to x: (0) y: (200)\nhide\n\nwhen I receive [boss time v]\nset [yes/no v] to [no]\nrepeat (50)\n    change [boss y v] by (-3)\nend\nwait (0.7) seconds\nbroadcast (one liners v)\n\nwhen I receive [done liners v]\nwait (0.3) seconds\nset [y v] to [0]\nset [x v] to [0]\nset [yes/no v] to [yes]\n\ndefine Missle\ncreate clone of (missle v)\nwait (2) seconds\n\ndefine Ninjas\nrepeat until <(y position) > [188]>\n    if <(Health) > [0]> then\n        change [boss y v] by (4)\n    end\nend\nbroadcast (ninjas v)\nwait (10) seconds\nrepeat (18)\n    if <(Health) > [0]> then\n        change [boss y v] by (-4)\n    end\nend\n\nwhen I receive [die v]\nstop [other scripts in sprite v]\nhide\nset [boss x v] to [450]\nset [boss y v] to [1100]\nrepeat (7)\n    delete this clone\nend\n\nwhen I receive [boss time v]\nset size to (20) %\nforever\n    if <(x position) < ([x position v] of [hitbox v])> then\n        switch costume to (costume1 v)\n        wait (0.03) seconds\n        switch costume to (costume2 v)\n        wait (0.03) seconds\n    else\n        switch costume to (costume3 v)\n        wait (0.03) seconds\n        switch costume to (costume4 v)\n        wait (0.03) seconds\n    end\nend\n\ndefine Sound\nbroadcast (go v)\nwait (1) seconds\nrepeat (6)\n    wait (0.7) seconds\n    create clone of (sound waves v)\nend\nwait (1) seconds\nset [show? v] to [no]\nbroadcast (hide v)\n\nwhen I receive [done liners v]\nwait (1) seconds\nrepeat until <(Health) < [1]>\n    if <<<(pick random (1) to (3)) = [3]> and <<([x position v] of [ground v]) < [-425]> and <([x position v] of [ground v]) > [-1120]>>> and <not <(Last Done) = [Ninjas]>>> then\n        Ninjas\n        set [last done v] to [Ninjas]\n        wait (pick random (3) to (4)) seconds\n    else\n        if <<(distance to [hitbox v]) > [165]> and <<(pick random (1) to (3)) = [3]> and <not <(Last Done) = [Sound]>>>> then\n            Sound\n            set [last done v] to [Sound]\n            wait (pick random (3) to (4)) seconds\n        else\n            Missle\n            wait (pick random (3) to (4)) seconds\n        end\n    end\nend\n\nwhen I receive [done liners v]\nwait (0.5) seconds\nforever\n    if <(distance to [hitbox v]) > [220]> then\n        if <([x position v] of [hitbox v]) > (x position)> then\n            change [boss x v] by (5)\n        else\n            change [boss x v] by (-5)\n        end\n    end\nend\n\nwhen I receive [done liners v]\nwait until <<(Coil 1 Health) < [1]> and <(Coil 2 Health) < [1]>>\nstop [other scripts in sprite v]\nhide\nbroadcast (Its Over v)\n\n@Text\n\nwhen I receive [one liners v]\nset [slide# v] to [1]\ngo to x: (-124) y: (-131)\nshow\nforever\n    go to [front v] layer\n    if <(Slide#) = [1]> then\n        switch costume to (costume1 v)\n        wait (0.5) seconds\n        switch costume to (costume2 v)\n        wait (0.3) seconds\n    end\n    if <(Slide#) = [2]> then\n        switch costume to (costume3 v)\n        wait (0.5) seconds\n        switch costume to (costume4 v)\n        wait (0.3) seconds\n    end\n    if <(Slide#) = [3]> then\n        switch costume to (costume5 v)\n        wait (0.5) seconds\n        switch costume to (costume6 v)\n        wait (0.3) seconds\n    end\n    if <(Slide#) > [3]> then\n        hide\n        broadcast (done liners v)\n        set [yes/no v] to [yes]\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\ngo to x: (-124) y: (-131)\nhide\n\nwhen I receive [one liners v]\nwait (0.05) seconds\nforever\n    if <key (space v) pressed?> then\n        change [slide# v] by (1)\n        wait (1) seconds\n    end\nend\n\n@Missle\n\nwhen I start as a clone\nforever\n    if <<<(x position) > [235]> or <(x position) < [-235]>> or <<(y position) > [175]> or <(y position) < [-175]>>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I start as a clone\nforever\n    change x by (x)\n    change y by (y)\nend\n\nwhen I start as a clone\nset [exploded? v] to [no]\nset size to (100) %\nswitch costume to (costume1 v)\nif <([x position v] of [hitbox v]) < ([x position v] of [boss v])> then\n    point in direction (-90)\n    go to (boss v)\n    change y by (-30)\n    repeat (7)\n        change y by (-5)\n        turn left (pick random (2) to (4)) degrees\n    end\nelse\n    point in direction (90)\n    go to (boss v)\n    change y by (-30)\n    repeat (7)\n        change y by (-5)\n        turn right (pick random (2) to (4)) degrees\n    end\nend\nswitch costume to (costume2 v)\nrepeat until <<touching (tesla coils v)?> or <touching (hitbox v)?>>\n    point towards (hitbox v)\n    move (6) steps\n    if <(costume [number v]) = [3]> then\n        switch costume to (costume2 v)\n    else\n        next costume\n    end\nend\nif <touching (hitbox v)?> then\n    change [health v] by (-3)\nend\nset [exploded? v] to [yes]\nset size to (200) %\nswitch costume to (costume4 v)\nwait (0.03) seconds\nrepeat (3)\n    next costume\nend\nwait (0.03) seconds\ndelete this clone\n\nwhen flag clicked\nhide\n\n@Health Bar2\n\nwhen I receive [start v]\nset [# v] to [0]\nrepeat (2)\n    change [# v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nif <(#) = [1]> then\n    forever\n        if <(Coil 1 Health) = [4]> then\n            switch costume to (costume1 v)\n        end\n        if <(Coil 1 Health) = [3]> then\n            switch costume to (costume2 v)\n        end\n        if <(Coil 1 Health) = [2]> then\n            switch costume to (costume3 v)\n        end\n        if <(Coil 1 Health) = [1]> then\n            switch costume to (costume4 v)\n        end\n        if <(Coil 1 Health) = [0]> then\n            switch costume to (costume5 v)\n        end\n    end\nend\n\nwhen I start as a clone\nset size to (60) %\nshow\nif <(#) = [1]> then\n    forever\n        go to x: (([x position v] of [ground v]) + (460)) y: (([y position v] of [ground v]) + (855))\n    end\nend\nif <(#) = [2]> then\n    forever\n        go to x: (([x position v] of [ground v]) + (1060)) y: (([y position v] of [ground v]) + (855))\n    end\nend\n\nwhen I start as a clone\nif <(#) = [2]> then\n    forever\n        if <(Coil 2 Health) = [4]> then\n            switch costume to (costume1 v)\n        end\n        if <(Coil 2 Health) = [3]> then\n            switch costume to (costume2 v)\n        end\n        if <(Coil 2 Health) = [2]> then\n            switch costume to (costume3 v)\n        end\n        if <(Coil 2 Health) = [1]> then\n            switch costume to (costume4 v)\n        end\n        if <(Coil 2 Health) = [0]> then\n            switch costume to (costume5 v)\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(distance to [hitbox v]) > [160]> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [done liners v]\nwait until <[-200] < ([x position v] of [ground v])>\nset [coil 1 health v] to [4]\nset [coil 2 health v] to [4]\n\n@Mount\n\nwhen I receive [go v]\nshow\nswitch costume to (costume1 v)\nwait (0.05) seconds\nrepeat (5)\n    next costume\n    wait (0.05) seconds\nend\nset [show? v] to [yes]\nbroadcast (Time v)\n\nwhen I receive [go v]\nset rotation style [left-right v]\nset size to (20) %\nforever\n    if <(x position) > ([x position v] of [hitbox v])> then\n        point in direction (-90)\n    else\n        point in direction (90)\n    end\nend\n\nwhen I receive [go v]\nforever\n    if <(x position) > ([x position v] of [hitbox v])> then\n        go to x: (([x position v] of [ground v]) + ((Boss X) + (8))) y: (([y position v] of [ground v]) + (Boss Y))\n    else\n        go to x: (([x position v] of [ground v]) + ((Boss X) + (-3))) y: (([y position v] of [ground v]) + (Boss Y))\n    end\nend\n\nwhen I receive [go v]\nset rotation style [left-right v]\nforever\n    if <([costume # v] of [boss v]) > [2]> then\n        go to x: (([x position v] of [ground v]) + ((Boss X) - (-3))) y: (([y position v] of [ground v]) + (Boss Y))\n        point in direction (-90)\n    else\n        go to x: (([x position v] of [ground v]) + ((Boss X) + (-3))) y: (([y position v] of [ground v]) + (Boss Y))\n        point in direction (90)\n    end\nend\n\nwhen I receive [hide v]\nset [show? v] to [no]\nhide\n\nwhen I receive [go v]\nforever\n    if <(Show?) = [yes]> then\n        if <<<(x position) > [233]> or <(x position) < [-233]>> or <<(y position) > [174]> or <(y position) < [-174]>>> then\n            hide\n        else\n            show\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [die v]\nset [show? v] to [no]\nhide\n\n@Gun\n\nwhen I receive [time 2 v]\nset size to (80) %\nforever\n    point towards (hitbox v)\nend\n\nwhen I receive [time v]\nforever\n    if <([costume # v] of [boss v]) > [2]> then\n        go to x: (([x position v] of [ground v]) + ((Boss X) - (-3))) y: (([y position v] of [ground v]) + ((Boss Y) + (32)))\n    else\n        go to x: (([x position v] of [ground v]) + ((Boss X) + (0))) y: (([y position v] of [ground v]) + ((Boss Y) + (32)))\n    end\nend\n\nwhen I receive [time v]\nshow\nswitch costume to (costume1 v)\nwait (0.05) seconds\nrepeat (2)\n    next costume\n    wait (0.05) seconds\nend\nbroadcast (Time 2 v)\n\nwhen flag clicked\nhide\n\nwhen I receive [hide v]\nset [show? v] to [no]\nhide\n\nwhen I receive [time 2 v]\nforever\n    if <(Show?) = [yes]> then\n        if <<<(x position) > [233]> or <(x position) < [-233]>> or <<(y position) > [174]> or <(y position) < [-174]>>> then\n            hide\n        else\n            show\n        end\n    end\nend\n\nwhen I receive [die v]\nhide\n\n@Sound Waves\n\nwhen I start as a clone\ngo [backward v] (1) layers\nshow\nset size to (100) %\ngo to (gun v)\npoint towards (hitbox v)\nmove (35) steps\nrepeat until <<touching (hitbox v)?> or <<touching (ground v)?> or <touching (_edge_ v)?>>>\n    move (10) steps\n    change size by (5)\nend\nif <touching (hitbox v)?> then\n    change [health v] by (-2)\nelse\n    repeat (3)\n        move (10) steps\n        change size by (5)\n    end\nend\nset [hit v] to [yes]\ndelete this clone\n\nwhen I start as a clone\nforever\n    change x by (x)\n    change y by (y)\nend\n\nwhen flag clicked\nhide\n\n@Ninjas\n\nwhen flag clicked\nset [show? v] to [no]\nhide\n\nwhen I receive [start v]\nforever\n    if <(Show?) = [yes]> then\n        if <<<(x position) > [220]> or <(x position) < [-220]>> or <<(y position) > [174]> or <(y position) < [-174]>>> then\n            hide\n        else\n            show\n        end\n    end\nend\n\nwhen I receive [ninjas v]\nset rotation style [left-right v]\nif <([x position v] of [hitbox v]) < (x position)> then\n    point in direction (-90)\nelse\n    point in direction (-90)\nend\nset [show? v] to [yes]\nshow\nswitch costume to (stand v)\nwait (0.03) seconds\nrepeat (27)\n    next costume\nend\nwait (0.5) seconds\nrepeat (6)\n    next costume\nend\nbroadcast (ninjago v)\nwait (1) seconds\nrepeat (7)\n    wait (0.4) seconds\n    if <([x position v] of [ground v]) < [-200]> then\n        create clone of (effects v)\n        create clone of (bullets v)\n    end\nend\nwait (0.5) seconds\nbroadcast (done v)\nrepeat (24)\n    next costume\nend\nset [show? v] to [no]\nhide\n\nbroadcast (ninjas v)\n\nwhen I receive [ninjas v]\nset [x v] to (([x position v] of [ground v]) - (120))\nforever\n    go to x: (([x position v] of [ground v]) - (X)) y: (([y position v] of [ground v]) + (975))\nend\n\nwhen I receive [die v]\nset [show? v] to [no]\nhide\n\nif <([x position v] of [ground v]) < [-100]> then\nend\n\n@Ninja Arm\n\nwhen flag clicked\nhide\nset size to (90) %\n\nwhen flag clicked\nforever\n    if <([x position v] of [hitbox v]) > (x position)> then\n        switch costume to (costume1 v)\n    else\n        switch costume to (costume2 v)\n    end\nend\n\nwhen I receive [ninjago v]\nset [show? v] to [yes]\nshow\n\nwhen I receive [ninjago v]\nforever\n    point towards (hitbox v)\nend\n\nwhen I receive [done v]\nset [show? v] to [no]\nhide\n\nwhen I receive [ninjago v]\nforever\n    if <(Show?) = [yes]> then\n        if <<<(x position) > [233]> or <(x position) < [-233]>> or <<(y position) > [174]> or <(y position) < [-174]>>> then\n            hide\n        else\n            show\n        end\n    end\nend\n\nwhen I receive [ninjago v]\nforever\n    if <([x position v] of [hitbox v]) < ([x position v] of [ninjas v])> then\n        go to x: ((([x position v] of [ground v]) - (X)) - (-13)) y: (([y position v] of [ground v]) + (825))\n    else\n        go to x: ((([x position v] of [ground v]) - (X)) - (-13)) y: (([y position v] of [ground v]) + (825))\n    end\nend\n\nwhen I receive [die v]\nset [show? v] to [no]\nhide\n\n@Effects\n\nwhen I start as a clone\nset size to (75) %\ngo to (ninja arm v)\npoint towards (hitbox v)\nmove (6) steps\nshow\nswitch costume to (costume1 v)\nwait (0.03) seconds\nswitch costume to (costume2 v)\nwait (0.03) seconds\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nif <<<(x position) > [233]> or <(x position) < [-233]>> or <<(y position) > [174]> or <(y position) < [-174]>>> then\n    delete this clone\nelse\n    show\nend\n\nset [coil 1 health v] to [1]\nset [coil 2 health v] to [1]\n\n@Bullets\n\nwhen I start as a clone\ngo to (ninja arm v)\npoint towards (hitbox v)\nshow\nrepeat until <<touching (ground v)?> or <<touching (_edge_ v)?> or <touching (hitbox v)?>>>\n    move (8) steps\nend\nif <touching (hitbox v)?> then\n    change [health v] by (-1)\nend\ndelete this clone\n\nwhen flag clicked\nhide\nrepeat (10)\n    delete this clone\nend\n\nwhen I start as a clone\nforever\n    change x by (x)\n    change y by (y)\nend\n\nwhen I receive [die v]\ndelete\n\ndefine delete\nrepeat (10)\n    delete this clone\nend\n\n@Ninjas2\n\nwhen flag clicked\nset [show? v] to [no]\nhide\n\nwhen I receive [start v]\nforever\n    if <(Show?) = [yes]> then\n        if <<<(x position) > [220]> or <(x position) < [-220]>> or <<(y position) > [174]> or <(y position) < [-174]>>> then\n            hide\n        else\n            show\n        end\n    end\nend\n\nwhen I receive [ninjas v]\nset [x2 v] to (([x position v] of [ground v]) - (-120))\nforever\n    go to x: (([x position v] of [ground v]) - (X2)) y: (([y position v] of [ground v]) + (975))\nend\n\nwhen I receive [ninjas v]\nwait (1) seconds\nset rotation style [left-right v]\nif <([x position v] of [hitbox v]) < (x position)> then\n    point in direction (90)\nelse\n    point in direction (90)\nend\nset [show? v] to [yes]\nshow\nswitch costume to (stand v)\nwait (0.03) seconds\nrepeat (27)\n    next costume\nend\nwait (0.5) seconds\nrepeat (6)\n    next costume\nend\nbroadcast (ninjago2 v)\nwait (1) seconds\nrepeat (7)\n    wait (0.4) seconds\n    if <([x position v] of [ground v]) < [-200]> then\n        create clone of (effects2 v)\n        create clone of (bullets2 v)\n    end\nend\nwait (0.5) seconds\nbroadcast (done2 v)\nrepeat (24)\n    next costume\nend\nset [show? v] to [no]\nhide\n\nwhen I receive [die v]\nset [show? v] to [no]\nhide\n\n@Ninja Arm2\n\nwhen flag clicked\nhide\nset size to (90) %\n\nwhen flag clicked\nforever\n    if <([x position v] of [hitbox v]) > (x position)> then\n        switch costume to (costume1 v)\n    else\n        switch costume to (costume2 v)\n    end\nend\n\nwhen I receive [ninjago2 v]\nset [show? v] to [yes]\nshow\n\nwhen I receive [ninjago v]\nforever\n    point towards (hitbox v)\nend\n\nwhen I receive [done2 v]\nset [show? v] to [no]\nhide\n\nwhen I receive [ninjago v]\nforever\n    if <(Show?) = [yes]> then\n        if <<<(x position) > [233]> or <(x position) < [-233]>> or <<(y position) > [174]> or <(y position) < [-174]>>> then\n            hide\n        else\n            show\n        end\n    end\nend\n\nwhen I receive [ninjago v]\nforever\n    if <([x position v] of [hitbox v]) < ([x position v] of [ninjas v])> then\n        go to x: ((([x position v] of [ground v]) - (X2)) - (13)) y: (([y position v] of [ground v]) + (825))\n    else\n        go to x: ((([x position v] of [ground v]) - (X2)) - (-13)) y: (([y position v] of [ground v]) + (825))\n    end\nend\n\nwhen I receive [die v]\nset [show? v] to [no]\nhide\n\n@Effects2\n\nwhen I start as a clone\nset size to (75) %\ngo to (ninja arm2 v)\npoint towards (hitbox v)\nmove (6) steps\nshow\nswitch costume to (costume1 v)\nwait (0.03) seconds\nswitch costume to (costume2 v)\nwait (0.03) seconds\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nif <<<(x position) > [233]> or <(x position) < [-233]>> or <<(y position) > [174]> or <(y position) < [-174]>>> then\n    delete this clone\nelse\n    show\nend\n\n@Bullets2\n\nwhen I start as a clone\ngo to (ninja arm2 v)\npoint towards (hitbox v)\nshow\nrepeat until <<touching (ground v)?> or <<touching (_edge_ v)?> or <touching (hitbox v)?>>>\n    move (8) steps\nend\nif <touching (hitbox v)?> then\n    change [health v] by (-1)\nend\ndelete this clone\n\nwhen flag clicked\nhide\nrepeat (10)\n    delete this clone\nend\n\nwhen I start as a clone\nforever\n    change x by (x)\n    change y by (y)\nend\n\nwhen I receive [die v]\nDelete\n\ndefine Delete\nrepeat (10)\n    delete this clone\nend\n\n@Thumbnaill\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\nwhen I receive [thumbnail v]\ngo to x: (-4) y: (0)\nshow\ngo to [front v] layer\n\nwhen flag clicked\nset [ghost v] effect to (100)\nshow\nforever\n    go to [front v] layer\nend\n\n@Bounce Pad\n\nwhen I receive [start v]\nforever\n    go to x: (([x position v] of [ground v]) + (2100)) y: (([y position v] of [ground v]) + (-84))\n    if <<<(x position) > [235]> or <(x position) < [-235]>> or <<(y position) > [175]> or <(y position) < [-175]>>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <touching (player v)?> then\n        set [y v] to [1]\n        repeat (5)\n            change [y v] by (-7)\n        end\n        wait (1) seconds\n    end\nend\n\nwhen flag clicked\nhide\n\n@Explosion\n\nwhen flag clicked\nhide\n\nwhen I receive [its over v]\nset [yes/no v] to [no]\nset size to (pick random (350) to (500)) %\nchange x by (pick random (-75) to (75))\nchange y by (pick random (-75) to (75))\nshow\ngo to (boss v)\nswitch costume to (costume4 v)\nrepeat (3)\n    wait (0.03) seconds\n    next costume\nend\nwait (0.03) seconds\nhide\nwait (0.03) seconds\nset size to (pick random (550) to (700)) %\nchange x by (pick random (-75) to (75))\nchange y by (pick random (-75) to (75))\nshow\ngo to (boss v)\nswitch costume to (costume4 v)\nrepeat (3)\n    wait (0.03) seconds\n    next costume\nend\nwait (0.03) seconds\nhide\nwait (1.5) seconds\nbroadcast (Game! v)\n\n@Win Slide\n\nwhen I receive [game! v]\nshow\ngo to [front v] layer\ngo [backward v] (1) layers\nset x to (0)\nset y to (250)\nrepeat until <(y position) < [1]>\n    change y by (down speed)\n    change [down speed v] by (-1)\nend\n\nwhen flag clicked\nset [down speed v] to [-3]\nhide\n\nbroadcast (Game! v)\n\nwhen I receive [game! v]\nforever\n    play sound [QUxWh9C230R8E0vk3AcSe26IrtoiqNyZuw0kBtQw.mp3 v] until done\nend\n\n@Twist\n\nwhen flag clicked\nhide\n\nwhen I receive [game! v]\ngo to x: (-203) y: (-48)\nswitch costume to (knobbyenchantedcheetah-size_restricted-0 v)\nshow\ngo to [front v] layer\nforever\n    if <(costume [number v]) > [49]> then\n        switch costume to (knobbyenchantedcheetah-size_restricted-0 v)\n    else\n        next costume\n        wait (0.034) seconds\n    end\nend\n\n@Viper\n\nwhen flag clicked\nshow\nclear graphic effects\nswitch costume to (nothing v)\nset size to (120) %\ngo to x: (10) y: (10)\nswitch costume to (costume1 v)\nrepeat (2)\n    wait (0.1) seconds\n    create clone of (_myself_ v)\n    next costume\nend\nset [fisheye v] effect to (5)\nrepeat (2)\n    wait (0.1) seconds\n    next costume\nend\nwait (0.1) seconds\nhide\nbroadcast (step 1 v)\ndelete this clone\n\nwhen I start as a clone\ngo to [back v] layer\nset [ghost v] effect to (25)\nwait (0.3) seconds\ndelete this clone\n\n@Logo\n\ndefine Draw\ngo to x: (10) y: (-46)\nset pen color to (#ffffff)\npen down\npoint in direction (0)\nmove (63) steps\npen up\ngo to x: (10) y: (-46)\npoint in direction (37.5)\npen down\nmove (79) steps\npen up\ngo to x: (-60) y: (-15)\npen down\npoint in direction (90)\nmove (60) steps\npoint in direction (0)\nmove (30) steps\npoint in direction (-90)\nmove (30) steps\npoint in direction (45)\nmove (45) steps\npoint in direction (-90)\nmove (60) steps\npoint in direction (180)\nmove (40) steps\npen up\ngo to x: (15) y: (-51)\nset pen color to (#dddede)\npen down\npoint in direction (0)\nmove (63) steps\npen up\ngo to x: (15) y: (-51)\npoint in direction (37.5)\npen down\nmove (79) steps\npen up\ngo to x: (-55) y: (-20)\npen down\npoint in direction (90)\nmove (60) steps\npoint in direction (0)\nmove (30) steps\npoint in direction (-90)\nmove (30) steps\npoint in direction (45)\nmove (45) steps\npoint in direction (-90)\nmove (60) steps\npoint in direction (180)\nmove (40) steps\n\nwhen I receive [step 2 v]\nerase all\npen up\nset pen size to (15)\nset [ghost v] effect to (100)\nDraw\npen up\nset pen color to (#9c9ea2)\ngo to x: (240) y: (-50)\npen down\npoint in direction (-95)\nrepeat until <<(x position) < [-179]> and <(x position) < [0]>>\n    move (60) steps\nend\npen up\ngo to x: (-240) y: (50)\npoint in direction (85)\npen down\nrepeat until <<(x position) > [179]> and <(x position) > [0]>>\n    move (60) steps\nend\nwait (1) seconds\nerase all\nbroadcast (start v)\n\nwhen flag clicked\nerase all\npen up\nset pen size to (15)\n\n
Arrow keys to move. Dodge bullets, mines, lasers, and spikes to reach the boss. Use the heat-seeking missile the boss fires to blow up the Tesla coils to take down their health and win the game!\nI don't think it's that hard but comment if you beat the whole thing!