Minecraft Platformer Part 1 (NOT GENERIC)

Instructions: Press WASD, arrow keys, or screen to move. Press space or fight button to attack. Click an empty area or press Q while hovering over and empty are to build. \n                 FOLLOWERS CAN ADVERTISE!\n                     NO MORE FREE FOLLOWS!\nThere are so many generic minecraft platformers, so I decided to make this. Good luck calling it generic!

@Stage\n\nwhen flag clicked\nset [the level v] to [1]\nforever\n    switch backdrop to (The Level)\nend\n\n@Player art\n\nwhen flag clicked\nset [ghost v] effect to (0)\npoint in direction (90)\nforever\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(x position) < (mouse x)>>> then\n        switch costume to (right 1 v)\n        set [last touched v] to [right]\n        repeat until <<(costume [number v]) = [7]> or <not <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(x position) < (mouse x)>>>>>\n            wait (0) seconds\n            next costume\n        end\n        switch costume to (right 1 v)\n    else\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n            switch costume to (left 1 v)\n            set [last touched v] to [left]\n            repeat until <<(costume [number v]) = [14]> or <not <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>>>>\n                wait (0) seconds\n                next costume\n            end\n            switch costume to (left 1 v)\n        else\n            if <(last touched) = [right]> then\n                switch costume to (right 7 v)\n            else\n                switch costume to (left 7 v)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    go to (player v)\nend\n\nwhen [space v] key pressed\nplay sound [yt1s \(3\) v] until done\n\nwhen flag clicked\nforever\n    if <<key (any v) pressed?> or <mouse down?>> then\n        if <touching (ground v)?> then\n            if <(The Level) < [9]> then\n                play sound [砂2 v] until done\n                wait (0.05) seconds\n            else\n                play sound [stone3 v] until done\n                wait (0.05) seconds\n            end\n        end\n    end\nend\n\nwhen flag clicked\nwait (.1) seconds\nrepeat until <(The Level) = [14]>\n    play sound [c418-sweden-minecraft-volume-alpha v] until done\nend\nstop all sounds\nplay sound [boss-撃破 v] until done\nrepeat until <(boss health) = [0]>\n    play sound [boss-中 v] until done\nend\nstop all sounds\nplay sound [魔王魂  ピアノ39 v] until done\n\nwhen flag clicked\nforever\n    if <(The Level) = [14]> then\n        stop all sounds\n        stop [this script v]\n    end\nend\n\n@click\n\nwhen flag clicked\nset size to (80) %\ngo to x: (150) y: (-125)\nset [ghost v] effect to (30)\nforever\n    if <mouse down?> then\n        if <(touching fight) = [yes]> then\n            broadcast (Fight v)\n            set [ghost v] effect to (10)\n            wait until <not <mouse down?>>\n            set [ghost v] effect to (30)\n        end\n    end\nend\n\nwhen flag clicked\nset size to (80) %\ngo to x: (150) y: (-125)\nset [ghost v] effect to (30)\nforever\n    if <touching (mouse-pointer v)?> then\n        set [touching fight v] to [yes]\n    else\n        set [touching fight v] to [no]\n    end\nend\n\n@Love fave\n\nwhen flag clicked\nset [costume v] to [0]\nhide\nforever\n    if <not <<(Love) = [1]> and <(Favorite) = [1]>>> then\n        wait (pick random (30) to (40)) seconds\n        switch costume to (costume1 v)\n        go to x: (0) y: (50)\n        show\n        go to [back v] layer\n        start sound [pop v]\n        repeat (9)\n            change y by (-6)\n        end\n        repeat (5)\n            change y by (3)\n        end\n        repeat (5)\n            change y by (-1)\n        end\n        wait (2) seconds\n        repeat (15)\n            change y by (7)\n        end\n        hide\n    end\n    if <(Costume) > [0]> then\n        hide\n        stop [this script v]\n    end\nend\n\n@Art\n\nwhen flag clicked\ngo to [back v] layer\ngo to x: (0) y: (0)\nforever\n    switch costume to (The Level)\nend\n\n@cursor\n\nwhen flag clicked\nforever\n    if <<(mouse x) > [-225]> and <(mouse x) < [-200]>> then\n        set x to (-221)\n    end\n    if <<(mouse x) > [-200]> and <(mouse x) < [-160]>> then\n        set x to (-181)\n    end\n    if <<(mouse x) > [-160]> and <(mouse x) < [-120]>> then\n        set x to (-141)\n    end\n    if <<(mouse x) > [-120]> and <(mouse x) < [-80]>> then\n        set x to (-101)\n    end\n    if <<(mouse x) > [-80]> and <(mouse x) < [-40]>> then\n        set x to (-61)\n    end\n    if <<(mouse x) > [-40]> and <(mouse x) < [0]>> then\n        set x to (-21)\n    end\n    if <<(mouse x) > [0]> and <(mouse x) < [40]>> then\n        set x to (19)\n    end\n    if <<(mouse x) > [40]> and <(mouse x) < [80]>> then\n        set x to (59)\n    end\n    if <<(mouse x) > [80]> and <(mouse x) < [120]>> then\n        set x to (99)\n    end\n    if <<(mouse x) > [120]> and <(mouse x) < [160]>> then\n        set x to (139)\n    end\n    if <<(mouse x) > [160]> and <(mouse x) < [200]>> then\n        set x to (179)\n    end\n    if <<(mouse x) > [200]> and <(mouse x) < [240]>> then\n        set x to (219)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(mouse y) > [-180]> and <(mouse y) < [-140]>> then\n        set y to (-157)\n    end\n    if <<(mouse y) > [-140]> and <(mouse y) < [-100]>> then\n        set y to (-120)\n    end\n    if <<(mouse y) > [-100]> and <(mouse y) < [-60]>> then\n        set y to (-80)\n    end\n    if <<(mouse y) > [-60]> and <(mouse y) < [-20]>> then\n        set y to (-41)\n    end\n    if <<(mouse y) > [-20]> and <(mouse y) < [20]>> then\n        set y to (-1)\n    end\n    if <<(mouse y) > [20]> and <(mouse y) < [60]>> then\n        set y to (39)\n    end\n    if <<(mouse y) > [60]> and <(mouse y) < [100]>> then\n        set y to (79)\n    end\n    if <<(mouse y) > [100]> and <(mouse y) < [140]>> then\n        set y to (119)\n    end\n    if <<(mouse y) > [140]> and <(mouse y) < [180]>> then\n        set y to (159)\n    end\nend\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    if <<<<not <touching (golem v)?>> and <not <touching (player v)?>>> and <not <touching (zombie v)?>>> and <not <touching (skeleton v)?>>> then\n        if <not <touching (creeper v)?>> then\n            set [touching v] to [no]\n        else\n            set [touching v] to [yes]\n        end\n    else\n        set [touching v] to [yes]\n    end\nend\n\n@sword\n\nwhen flag clicked\nforever\n    set size to (80) %\n    go to [back v] layer\n    go to (player art v)\n    if <(last touched) = [left]> then\n        if <(sword type) = [wood]> then\n            switch costume to (left wood v)\n        else\n            switch costume to (left stone v)\n        end\n    else\n        if <(sword type) = [wood]> then\n            switch costume to (right wood v)\n        else\n            switch costume to (right stone v)\n        end\n    end\nend\n\nwhen [space v] key pressed\nset [kill? v] to [yes]\nif <(last touched) = [left]> then\n    point in direction (110)\n    repeat (4)\n        turn left (15) degrees\n    end\n    point in direction (90)\nelse\n    point in direction (110)\n    repeat (4)\n        turn right (15) degrees\n    end\n    point in direction (90)\nend\nset [kill? v] to [no]\nwait until <not <key (space v) pressed?>>\n\nwhen I receive [fight v]\nset [kill? v] to [yes]\nif <(last touched) = [left]> then\n    point in direction (160)\n    repeat (10)\n        turn left (15) degrees\n    end\n    point in direction (90)\nelse\n    point in direction (25)\n    repeat (10)\n        turn right (15) degrees\n    end\n    point in direction (90)\nend\nset [kill? v] to [no]\nwait until <not <mouse down?>>\n\n@Ground\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    set [ghost v] effect to (100)\n    switch costume to (The Level)\nend\n\nwhen I receive [next level v]\ndelete all of [clone pos v]\nrepeat (10)\n    delete this clone\nend\n\nwhen I start as a clone\nset [ghost v] effect to (0)\nswitch costume to (block v)\nset x to ([x position v] of [cursor v])\nset y to ([y position v] of [cursor v])\nadd (join ([x position v] of [cursor v]) ([y position v] of [cursor v])) to [clone pos v]\n\nwhen flag clicked\nshow list [clone pos v]\nforever\n    if <<key (q v) pressed?> or <mouse down?>> then\n        if <(touching) = [no]> then\n            if <(touching fight) = [no]> then\n                if <not <[clone pos v] contains (join ([x position v] of [cursor v]) ([y position v] of [cursor v]))?>> then\n                    create clone of (_myself_ v)\n                    wait (0) seconds\n                    wait until <not <mouse down?>>\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [reset v]\ndelete all of [clone pos v]\nrepeat (10)\n    delete this clone\nend\n\nwhen I start as a clone\nforever\n    if <mouse down?> then\n        if <touching (mouse-pointer v)?> then\n            wait (.5) seconds\n            if <mouse down?> then\n                if <touching (mouse-pointer v)?> then\n                    delete this clone\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <touching (boom v)?> then\n        delete this clone\n    end\nend\n\n@zombie\n\nwhen flag clicked\nhide\nforever\n    set [ghost v] effect to (0)\nend\n\nwhen I receive [reset v]\nif <(The Level) = [2]> then\n    go to x: (100) y: (70)\n    create clone of (_myself_ v)\n    wait (.1) seconds\nelse\n    if <(The Level) = [8]> then\n        go to x: (100) y: (70)\n        create clone of (_myself_ v)\n        wait (.5) seconds\n        go to x: (100) y: (70)\n        create clone of (_myself_ v)\n    else\n        repeat (10)\n            delete this clone\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <touching (sword v)?> then\n        if <(kill?) = [yes]> then\n            if <(sword type) = [wood]> then\n                change [clone health v] by (-1)\n            else\n                if <(sword type) = [stone]> then\n                    change [clone health v] by (-2)\n                end\n            end\n            set [y velocity v] to [10]\n            if <(last touched) = [right]> then\n                set [x velocity v] to [15]\n            else\n                set [x velocity v] to [-15]\n            end\n            repeat (5)\n                change [brightness v] effect by (20)\n                wait (.1) seconds\n                change [brightness v] effect by (-20)\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <<(clone health) < [1]> or <<(health) < [1]> or <(health) = [1]>>> then\n        change [clone amount v] by (-1)\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nchange [clone amount v] by (1)\nset size to (40) %\nforever\n    if <([x position v] of [player v]) < (x position)> then\n        switch costume to (1 v)\n        repeat until <<(costume [number v]) = [6]> or <(x position) < ([x position v] of [player v])>>\n            next costume\n            wait (0) seconds\n        end\n        switch costume to (1 v)\n    else\n        switch costume to (6  2 v)\n        repeat until <<(costume [number v]) = [12]> or <([x position v] of [player v]) < (x position)>>\n            next costume\n            wait (0) seconds\n        end\n        switch costume to (6  2 v)\n    end\nend\n\nwhen flag clicked\nset [fighting v] to [no]\n\nwhen flag clicked\nset [clone amount v] to [0]\n\nwhen I start as a clone\nset [clone health v] to [7]\nshow\nforever\n    if <([x position v] of [player v]) < (x position)> then\n        change [x velocity v] by (-.75)\n    end\n    if <(x position) < ([x position v] of [player v])> then\n        change [x velocity v] by (.75)\n    end\n    set [x velocity v] to ((X Velocity) * (0.85))\n    change x by (X Velocity)\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (-4)\n        change x by ((X Velocity) * (-1))\n    end\n    change [y velocity v] by (-1)\n    change y by (Y Velocity)\n    if <touching (ground v)?> then\n        change y by ((Y Velocity) - ((Y Velocity) * (2)))\n        set [y velocity v] to [0]\n    end\n    change y by (-1)\n    if <<touching (ground v)?> and <(y position) < (([y position v] of [player v]) - (20))>> then\n        set [y velocity v] to [15]\n    end\n    change y by (1)\nend\n\nwhen I start as a clone\nplay sound [zombie v] until done\nforever\n    if <<touching (sword v)?> and <(kill?) = [yes]>> then\n        start sound [damage v]\n    end\nend\n\n@golem\n\nwhen flag clicked\nhide\nforever\n    set [ghost v] effect to (0)\nend\n\nwhen I receive [reset v]\nwait (.1) seconds\nif <(The Level) = [14]> then\n    set [type v] to [golem]\n    go to x: (100) y: (70)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nset [clone amount v] to [1]\nset [boss health v] to [100]\nshow\nforever\n    if <([x position v] of [player v]) < (x position)> then\n        change [x velocity v] by (-.75)\n        switch costume to (left v)\n    end\n    if <(x position) < ([x position v] of [player v])> then\n        change [x velocity v] by (.75)\n        switch costume to (right v)\n    end\n    set [x velocity v] to ((X Velocity) * (0.85))\n    change x by (X Velocity)\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (-4)\n        change x by ((X Velocity) * (-1))\n    end\n    change [y velocity v] by (-1)\n    change y by (Y Velocity)\n    if <touching (ground v)?> then\n        change y by ((Y Velocity) - ((Y Velocity) * (2)))\n        set [y velocity v] to [0]\n    end\n    change y by (-1)\n    if <<touching (ground v)?> and <(y position) < (([y position v] of [player v]) - (20))>> then\n        set [y velocity v] to [15]\n    end\n    change y by (1)\nend\n\nwhen I start as a clone\nforever\n    if <touching (sword v)?> then\n        if <(kill?) = [yes]> then\n            change [boss health v] by (-5)\n            set [y velocity v] to [10]\n            if <(last touched) = [right]> then\n                set [x velocity v] to [13]\n            else\n                set [x velocity v] to [-13]\n            end\n            repeat (5)\n                change [brightness v] effect by (20)\n                wait (.1) seconds\n                change [brightness v] effect by (-20)\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <<(boss health) < [1]> or <<(health) < [1]> or <(health) = [1]>>> then\n        change [clone amount v] by (-1)\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nset size to (80) %\n\nwhen I receive [reset v]\nif <[0] < (clone amount)> then\n    change [clone amount v] by (-1)\n    delete this clone\nend\n\nwhen flag clicked\nset [boss health v] to [100]\n\n@health\n\nwhen flag clicked\nset [health v] to [20]\nforever\n    switch costume to ((health) + (1))\n    if <<(health) < [0]> or <(health) = [0]>> then\n        broadcast (Reset v)\n        set [health v] to [20]\n    end\nend\n\nwhen I receive [flicker v]\nrepeat (5)\n    wait (.1) seconds\n    change [brightness v] effect by (25)\n    wait (.1) seconds\n    change [brightness v] effect by (-25)\nend\n\nwhen flag clicked\nforever\n    if <<[0] < (health)> and <(health) < [20]>> then\n        wait (5) seconds\n        change [health v] by (1)\n        broadcast (flicker v)\n    end\nend\n\nwhen I receive [damage v]\nrepeat (3)\n    wait (.1) seconds\n    change [ghost v] effect by (25)\n    wait (.1) seconds\n    change [ghost v] effect by (-25)\nend\nset [ghost v] effect to (0)\n\nwhen flag clicked\nforever\n    if <[20] < (health)> then\n        set [health v] to [20]\n    end\nend\n\n@Boss health\n\nwhen I receive [next level v]\nif <(The Level) = [14]> then\n    repeat until <(boss health) = [0]>\n        set [health display v] to (boss health)\n        erase all\n        set pen size to (20)\n        set pen color to (#000000)\n        go to x: (-100) y: (150)\n        pen down\n        go to x: (100) y: (150)\n        pen up\n        set pen size to (15)\n        go to x: (-100) y: (150)\n        if <(boss health) > [51]> then\n            pen up\n            set pen color to (#0bce1b)\n            pen down\n            go to x: (((boss health) * (2)) - (100)) y: (150)\n        else\n            if <<[52] > (boss health)> and <(boss health) > [20]>> then\n                pen up\n                set pen color to (#f6d819)\n                pen down\n                go to x: (((boss health) * (2)) - (100)) y: (150)\n            else\n                if <<[21] > (boss health)> and <[0] < (boss health)>> then\n                    pen up\n                    set pen color to (#cd0000)\n                    pen down\n                    go to x: (((boss health) * (2)) - (100)) y: (150)\n                else\n                    erase all\n                end\n            end\n        end\n    end\n    erase all\nend\n\nwhen flag clicked\nerase all\n\n@sword upgrades\n\nwhen flag clicked\ngo to [back v] layer\nset [sword type v] to [wood]\nhide\n\nwhen I receive [next level v]\nhide\nif <(The Level) = [7]> then\n    switch costume to (stone age v)\n    show\n    forever\n        if <touching (player v)?> then\n            wait (.5) seconds\n            set [sword type v] to [stone]\n            hide\n        end\n    end\nend\n\n@skeleton\n\nwhen flag clicked\nhide\nforever\n    set [ghost v] effect to (0)\nend\n\nwhen I receive [reset v]\nif <(The Level) = [10]> then\n    go to x: (100) y: (70)\n    create clone of (_myself_ v)\n    wait (.3) seconds\n    go to x: (100) y: (70)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nset [clone health v] to [4]\nset [x velocity v] to [0]\nshow\nforever\n    if <([x position v] of [player v]) < (x position)> then\n        set [ad v] to [left]\n    end\n    if <(x position) < ([x position v] of [player v])> then\n        set [ad v] to [right]\n    end\n    set [x velocity v] to ((X Velocity) * (0.85))\n    change x by (X Velocity)\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (-4)\n        change x by ((X Velocity) * (-1))\n    end\n    change [y velocity v] by (-1)\n    change y by (Y Velocity)\n    if <touching (ground v)?> then\n        change y by ((Y Velocity) - ((Y Velocity) * (2)))\n        set [y velocity v] to [0]\n    end\n    change y by (-1)\n    if <<touching (ground v)?> and <(y position) < (([y position v] of [player v]) - (20))>> then\n        set [y velocity v] to [15]\n    end\n    change y by (1)\nend\n\nwhen I start as a clone\nforever\n    if <touching (sword v)?> then\n        if <(kill?) = [yes]> then\n            if <(sword type) = [wood]> then\n                change [clone health v] by (-1)\n            else\n                if <(sword type) = [stone]> then\n                    change [clone health v] by (-2)\n                end\n            end\n            set [y velocity v] to [10]\n            if <(last touched) = [right]> then\n                set [x velocity v] to [15]\n            else\n                set [x velocity v] to [-15]\n            end\n            repeat (5)\n                change [brightness v] effect by (20)\n                wait (.1) seconds\n                change [brightness v] effect by (-20)\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <<(clone health) < [1]> or <<(health) < [1]> or <(health) = [1]>>> then\n        change [clone amount v] by (-1)\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nchange [clone amount v] by (1)\nset size to (25) %\nforever\n    if <([x position v] of [player v]) < (x position)> then\n        switch costume to (1  left v)\n        repeat until <<(costume [number v]) = [6]> or <(x position) < ([x position v] of [player v])>>\n            next costume\n            wait (0.05) seconds\n        end\n        repeat until <<(costume [number v]) = [1]> or <(x position) < ([x position v] of [player v])>>\n            switch costume to ((costume [number v]) - (1))\n            wait (0.05) seconds\n        end\n    else\n        switch costume to (1  right v)\n        repeat until <<(costume [number v]) = [12]> or <([x position v] of [player v]) < (x position)>>\n            next costume\n            wait (0.05) seconds\n        end\n        repeat until <<(costume [number v]) = [7]> or <([x position v] of [player v]) < (x position)>>\n            switch costume to ((costume [number v]) - (1))\n            wait (0.05) seconds\n        end\n    end\nend\n\nwhen flag clicked\nset [fighting v] to [no]\n\nwhen flag clicked\nset [clone amount v] to [0]\n\nwhen I start as a clone\nforever\n    wait (4) seconds\n    broadcast (arrow v)\nend\n\nwhen I start as a clone\nforever\n    set [ax v] to (x position)\n    set [ay v] to (y position)\nend\n\nwhen I start as a clone\nforever\n    if <([x position v] of [player v]) < (x position)> then\n        if <(([x position v] of [player v]) + (150)) < (x position)> then\n            change [x velocity v] by (-.75)\n        else\n            change [x velocity v] by (.75)\n        end\n    else\n        if <(x position) < (([x position v] of [player v]) - (150))> then\n            change [x velocity v] by (.75)\n        else\n            change [x velocity v] by (-.75)\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <touching (sword v)?> then\n        if <(kill?) = [yes]> then\n            play sound [skeletonhurt2 v] until done\n        end\n    end\nend\n\n@Player\n\nwhen I receive [next level v]\nbroadcast (Reset v)\n\nwhen flag clicked\nset size to (200) %\nset [the level v] to [1]\nbroadcast (Next Level v)\nforever\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [x velocity v] by (-1.5)\n    end\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(x position) < (mouse x)>>> then\n        change [x velocity v] by (1.5)\n    end\n    set [x velocity v] to ((X Velocity) * (0.85))\n    change x by (X Velocity)\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (-4)\n        change x by ((X Velocity) * (-1))\n    end\n    change [y velocity v] by (-1)\n    change y by (Y Velocity)\n    if <touching (ground v)?> then\n        change y by ((Y Velocity) - ((Y Velocity) * (2)))\n        set [y velocity v] to [0]\n    end\n    change y by (-1)\n    if <<touching (ground v)?> and <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(y position) < (mouse y)>>>> then\n        set [y velocity v] to [15]\n    end\n    change y by (1)\n    if <touching (click v)?> then\n        broadcast (Reset v)\n    else\n        if <touching (lava v)?> then\n            broadcast (Reset v)\n        end\n        if <touching (click v)?> then\n            broadcast (Reset v)\n        end\n    end\nend\n\nwhen I receive [reset v]\nset [x velocity v] to [0]\nset [y velocity v] to [0]\ngo to x: (-216) y: (40)\n\nwhen [r v] key pressed\nif <not <(The Level) = [14]>> then\n    broadcast (Reset v)\nend\n\nwhen flag clicked\nforever\n    if <[200] < (x position)> then\n        if <<(clone amount) < [0]> or <(clone amount) = [0]>> then\n            broadcast (Next Level v)\n            change [the level v] by (1)\n        end\n    end\n    if <(y position) < [-200]> then\n        broadcast (Reset v)\n    end\nend\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (100)\nend\n\nwhen flag clicked\nforever\n    if <touching (zombie v)?> then\n        broadcast (damage v)\n        change [health v] by (-4)\n        set [y velocity v] to [10]\n        if <(last touched) = [right]> then\n            set [x velocity v] to [10]\n        else\n            set [x velocity v] to [-10]\n        end\n        repeat (5)\n            change [brightness v] effect by (20)\n            wait (.1) seconds\n            change [brightness v] effect by (-20)\n        end\n    end\n    if <touching (golem v)?> then\n        broadcast (damage v)\n        change [health v] by (-8)\n        set [y velocity v] to [15]\n        if <(last touched) = [right]> then\n            set [x velocity v] to [15]\n        else\n            set [x velocity v] to [-15]\n        end\n        repeat (5)\n            change [brightness v] effect by (20)\n            wait (.1) seconds\n            change [brightness v] effect by (-20)\n        end\n    end\n    if <<touching (arrow v)?> or <touching (skeleton v)?>> then\n        broadcast (damage v)\n        change [health v] by (-4)\n        set [y velocity v] to [15]\n        if <(last touched) = [right]> then\n            set [x velocity v] to [5]\n        else\n            set [x velocity v] to [-5]\n        end\n        repeat (5)\n            change [brightness v] effect by (20)\n            wait (.1) seconds\n            change [brightness v] effect by (-20)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (boom v)?> then\n        broadcast (Reset v)\n    end\nend\n\n@arrow\n\nwhen I receive [arrow v]\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\ngo to x: ((ax) - (30)) y: (ay)\nif <(ad) = [left]> then\n    point in direction (-90)\nelse\n    point in direction (90)\nend\nrepeat until <touching (_edge_ v)?>\n    move (10) steps\nend\ndelete this clone\n\n@fade\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [next level v]\ngo to [back v] layer\nif <(The Level) = [9]> then\n    set [ghost v] effect to (70)\n    show\nend\nif <(The Level) = [12]> then\n    set [ghost v] effect to (80)\n    show\nend\nif <(The Level) = [13]> then\n    set [ghost v] effect to (70)\n    hide\nend\n\n@creeper\n\nwhen flag clicked\nhide\nforever\n    set [ghost v] effect to (0)\nend\n\nwhen I receive [reset v]\nrepeat (10)\n    delete this clone\nend\nif <(The Level) = [11]> then\n    go to x: (100) y: (70)\n    create clone of (_myself_ v)\n    wait (.3) seconds\n    go to x: (100) y: (70)\n    create clone of (_myself_ v)\n    wait (.3) seconds\n    go to x: (100) y: (70)\n    create clone of (_myself_ v)\nelse\nend\n\nwhen I start as a clone\nset size to (10) %\nset [clone health v] to [4]\nshow\nforever\n    if <([x position v] of [player v]) < (x position)> then\n        change [x velocity v] by (-.75)\n    end\n    if <(x position) < ([x position v] of [player v])> then\n        change [x velocity v] by (.75)\n    end\n    set [x velocity v] to ((X Velocity) * (0.85))\n    change x by (X Velocity)\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (-4)\n        change x by ((X Velocity) * (-1))\n    end\n    change [y velocity v] by (-1)\n    change y by (Y Velocity)\n    if <touching (ground v)?> then\n        change y by ((Y Velocity) - ((Y Velocity) * (2)))\n        set [y velocity v] to [0]\n    end\n    change y by (-1)\n    if <<touching (ground v)?> and <(y position) < (([y position v] of [player v]) - (20))>> then\n        set [y velocity v] to [15]\n    end\n    change y by (1)\nend\n\nwhen I start as a clone\nforever\n    if <touching (sword v)?> then\n        if <(kill?) = [yes]> then\n            if <(sword type) = [wood]> then\n                change [clone health v] by (-1)\n            else\n                if <(sword type) = [stone]> then\n                    change [clone health v] by (-2)\n                end\n            end\n            set [y velocity v] to [10]\n            if <(last touched) = [right]> then\n                set [x velocity v] to [15]\n            else\n                set [x velocity v] to [-15]\n            end\n            repeat (5)\n                change [brightness v] effect by (20)\n                wait (.1) seconds\n                change [brightness v] effect by (-20)\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <<(clone health) < [1]> or <<(health) < [1]> or <(health) = [1]>>> then\n        change [clone amount v] by (-1)\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nchange [clone amount v] by (1)\nset size to (20) %\nforever\n    next costume\n    wait (0.05) seconds\nend\n\nwhen flag clicked\nset [fighting v] to [no]\n\nwhen flag clicked\nset [clone amount v] to [0]\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        wait (.2) seconds\n        repeat (4)\n            change [brightness v] effect by (25)\n            wait (.2) seconds\n            change [brightness v] effect by (-25)\n            wait (.2) seconds\n        end\n        set [boom x v] to (x position)\n        set [boom y v] to (y position)\n        broadcast (explode v)\n        change [clone amount v] by (-1)\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nforever\n    if <touching (sword v)?> then\n        if <(kill?) = [yes]> then\n            play sound [Creeper_hurt v] until done\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        wait (.2) seconds\n        play sound [Fuse v] until done\n    end\nend\n\n@boom\n\nwhen I receive [explode v]\nplay sound [yt1s \(2\) v] until done\n\nwhen flag clicked\nhide\n\nwhen I receive [explode v]\nset size to (400) %\nshow\ngo to x: (boom x) y: (boom y)\nswitch costume to (explosion_0 v)\nrepeat (7)\n    next costume\n    wait (0.05) seconds\nend\nhide\n\n@Thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\n\n