Minecraft Platformer

Instructions: use the arrows to move\n and check out my other game \nshuriken clicker

@Stage\n\nwhen I receive [message1 v]\nforever\n    if <([costume # v] of [ground v]) < [5]> then\n        switch backdrop to (backdrop3 v)\n    else\n        switch backdrop to (cave v)\n    end\n    if <[7] < ([costume # v] of [ground v])> then\n        switch backdrop to (backdrop2 v)\n    end\nend\n\nwhen I receive [message1 v]\nstop all sounds\nforever\n    set volume to (60) %\n    play sound [Tryhard v] until done\n    play sound [Happy v] until done\nend\n\nwhen flag clicked\nswitch backdrop to (begining v)\n\n@Ground\n\nwhen I receive [next level v]\nnext costume\ndelete this clone\n\nwhen I receive [message1 v]\nshow\n\nwhen I start as a clone\nswitch costume to (costume11 v)\nif <([costume # v] of [ground v]) = [5]> then\n    forever\n        go to x: (133) y: (-80)\n        repeat (56)\n            change x by (-5)\n        end\n        repeat (56)\n            change x by (5)\n        end\n    end\nend\nif <([costume # v] of [ground v]) = [6]> then\n    forever\n        go to x: (70) y: (15)\n        repeat (53)\n            change x by (-5)\n            change y by (-1.5)\n        end\n        repeat (53)\n            change x by (5)\n            change y by (1.5)\n        end\n    end\nend\nif <([costume # v] of [ground v]) = [7]> then\n    forever\n        go to x: (140) y: (13)\n        repeat (68)\n            change x by (-5)\n        end\n        repeat (68)\n            change x by (5)\n        end\n    end\nend\nif <([costume # v] of [ground v]) = [9]> then\n    forever\n        go to x: (120) y: (50)\n        repeat (47)\n            change x by (-5)\n        end\n        repeat (47)\n            change x by (5)\n        end\n    end\nend\n\nwhen [space v] key pressed\nset [my variable v] to (join (mouse x) (mouse y))\n\nwhen flag clicked\nhide\ngo to [front v] layer\nswitch costume to (costume1 v)\n\n@Text\n\nwhen flag clicked\nhide\n\nwhen I receive [message1 v]\nshow\ngo to [back v] layer\nforever\n    go to x: (0) y: (0)\n    switch costume to ([costume # v] of [ground v])\nend\n\nswitch costume to (level 1 v)\n\n@Tn\n\nwhen flag clicked\nforever\n    show\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    set size to (100) %\nend\n\n@Spikes\n\nwhen flag clicked\ngo to [back v] layer\nhide\n\nwhen I start as a clone\npoint in direction (90)\nswitch costume to (level 10 v)\nforever\n    show\n    go to [back v] layer\n    turn right (10) degrees\nend\n\nwhen I receive [restart v]\nif  then\n    delete this clone\nend\nif <([costume # v] of [ground v]) = [2]> then\n    delete this clone\nend\nif <([costume # v] of [ground v]) = [3]> then\n    delete this clone\nend\nif <([costume # v] of [ground v]) = [4]> then\n    delete this clone\nend\nif <([costume # v] of [ground v]) = [5]> then\n    Glide of clone [-140] [-180] [-140] [150]\n    Glide of clone [50] [-180] [50] [150]\nend\nif <([costume # v] of [ground v]) = [6]> then\n    Glide of clone [-90] [-120] [20] [-120]\nend\nif <([costume # v] of [ground v]) = [7]> then\n    Glide of clone [100] [-120] [230] [-120]\nend\nif <([costume # v] of [ground v]) = [8]> then\n    Glide of clone [-30] [-131] [140] [-131]\nend\nif <([costume # v] of [ground v]) = [9]> then\n    Glide of clone [-27] [-101] [-27] [100]\nend\n\nwhen I start as a clone\npoint in direction (90)\nswitch costume to (level 10 v)\nforever\n    go to x: (a) y: (b)\n    repeat until <<(round (x position)) = (c)> and <(round (y position)) = (d)>>\n        change x by (((c) - (x position)) / (12))\n        change y by (((d) - (y position)) / (12))\n    end\n    repeat until <<(round (x position)) = (a)> and <(round (y position)) = (b)>>\n        change x by (((a) - (x position)) / (12))\n        change y by (((b) - (y position)) / (12))\n    end\nend\n\ndefine Glide of clone (a) (b) (c) (d)\nset [a v] to (a)\nset [b v] to (b)\nset [c v] to (c)\nset [d v] to (d)\ncreate clone of (_myself_ v)\n\nwhen I receive [message1 v]\nshow\n\nwhen flag clicked\nforever\n    switch costume to ([costume # v] of [ground v])\n    clear graphic effects\n    set size to (100) %\n    go to x: (0) y: (0)\nend\n\n@Clouds\n\nwhen I start as a clone\nshow\nswitch costume to (cloud hitbox v)\ngo to x: (240) y: (pick random (10) to (150))\nset [my costume v] to (pick random (1) to (2))\nswitch costume to (My costume)\nset [ghost v] effect to (pick random (50) to (70))\nrepeat (96)\n    switch costume to (cloud hitbox v)\n    change x by (-5)\n    switch costume to (My costume)\nend\ndelete this clone\n\nwhen I receive [message1 v]\nforever\n    if <not <(backdrop [number v]) = [3]>> then\n        create clone of (_myself_ v)\n    end\n    wait (pick random (2) to (4)) seconds\nend\n\n@Enemies\n\nwhen I receive [restart v]\ndelete this clone\n\ndefine Clone (x) (y)\ngo to x: (x) y: (y)\nset rotation style [all around v]\nswitch costume to (costume1 v)\nset [ghost v] effect to (100)\nshow\npoint in direction (90)\nrepeat (10)\n    change [ghost v] effect by (-10)\n    turn right (5) degrees\nend\nswitch costume to (costume2 v)\ncreate clone of (_myself_ v)\nswitch costume to (costume1 v)\nrepeat (10)\n    change [ghost v] effect by (10)\n    turn right (5) degrees\nend\nhide\n\nwhen I receive [restart v]\nhide\nif  then\n    delete this clone\nend\nif <([costume # v] of [ground v]) = [1]> then\nif <([costume # v] of [ground v]) = [2]> then\nif <([costume # v] of [ground v]) = [3]> then\n    Clone [110] [50]\nend\nif <([costume # v] of [ground v]) = [4]> then\n    Clone [200] [-80]\nend\nif <([costume # v] of [ground v]) = [5]> then\nif <([costume # v] of [ground v]) = [6]> then\nif <([costume # v] of [ground v]) = [7]> then\n    Clone [205] [-107]\nend\nif <([costume # v] of [ground v]) = [8]> then\n    Clone [201] [146]\n    Clone [51] [29]\nend\nif <([costume # v] of [ground v]) = [9]> then\n    Clone [218] [120]\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [2]> then\n    set rotation style [left-right v]\n    clear graphic effects\n    set size to (9) %\n    show\n    set [enemyx v] to [0]\n    set [enemyy v] to [0]\n    go to [front v] layer\n    forever\n        change [enemyy v] by (-1)\n        if <([x position v] of [player v]) < ((x position) - (10))> then\n            change [enemyx v] by (-0.4)\n            point in direction (-90)\n        end\n        if <((x position) - (-10)) < ([x position v] of [player v])> then\n            change [enemyx v] by (0.4)\n            point in direction (90)\n        end\n        set [enemyx v] to ((Enemyx) * (0.9))\n        change x by (Enemyx)\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 ((Enemyx) * (-1))\n            if <(y position) < ([y position v] of [player v])> then\n                set [enemyy v] to [10]\n                if <([abs v] of (x vel) ) = (x vel)> then\n                    set [enemyx v] to [-10]\n                else\n                    set [enemyx v] to [10]\n                end\n            else\n                set [enemyx v] to [0]\n            end\n        end\n        change y by (Enemyy)\n        if <touching (ground v)?> then\n            change y by ((Enemyy) - ((Enemyy) * (2)))\n            set [enemyy v] to [0]\n        end\n        change y by (-1)\n        if <<((y position) - (-120)) < ([y position v] of [player v])> and <touching (ground v)?>> then\n            set [enemyy v] to [14]\n        end\n        if <<touching (ground v)?> and <<touching (player v)?> and <(([y position v] of [player v]) - (10)) > (y position)>>> then\n            set [y vel v] to [15]\n            repeat (10)\n                change [ghost v] effect by (10)\n                change [enemyy v] by (1)\n            end\n            delete this clone\n        end\n        change y by (1)\n        switch costume to (costume3 v)\n        create clone of (_myself_ v)\n        switch costume to (costume2 v)\n        if <touching (player v)?> then\n            broadcast (Restart v)\n        end\n        if <touching (ladders v)?> then\n            if <([y position v] of [player v]) > (y position)> then\n                set [enemyy v] to [6]\n            else\n                set [enemyy v] to [-6]\n            end\n        end\n        if <touching (bounce v)?> then\n            set [enemyy v] to [20]\n        end\n    end\nelse\n    show\n    clear graphic effects\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\n\nwhen flag clicked\nset [amount v] to [1]\nset [speed v] to [1]\n\nwait (1) seconds\n\nwhen flag clicked\nhide\n\nClone [250] [-40]\n\n@SKIP\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nif <not <([costume # v] of [ground v]) = [10]>> then\n    broadcast (Next level v)\nend\n\nwhen I receive [message1 v]\nshow\npoint in direction (90)\ngo to [front v] layer\nturn left (15) degrees\nforever\n    repeat (15)\n        turn left (-2) degrees\n    end\n    wait (0.1) seconds\n    repeat (15)\n        turn left (2) degrees\n    end\n    wait (0.1) seconds\nend\n\n@Moon\n\nwhen flag clicked\nhide\n\nwhen I receive [message1 v]\nforever\n    if <([costume # v] of [ground v]) < [5]> then\n        go to [back v] layer\n        show\n        go to x: (218) y: (160)\n        set size to (140) %\n        forever\n            repeat (40)\n                change size by (0.6)\n            end\n            repeat (40)\n                change size by (-0.6)\n            end\n        end\n    else\n        hide\n    end\nend\n\n@intro animation\n\nwhen I receive [message1 v]\nhide\n\nwhen I receive [portishead7 intro done v]\nwait (1) seconds\nstart sound [Happy Times v]\nset volume to (100) %\nshow\nswitch costume to (costume2 v)\nswitch backdrop to (begining v)\nset size to (100) %\ngo to [front v] layer\npoint in direction (90)\ngo to x: (-350) y: (-270)\nrepeat (40)\n    move (3.5) steps\nend\nswitch costume to (hi wanna v)\nwait (3) seconds\nswitch costume to (hi wanna2 v)\nwait (2) seconds\nswitch costume to (costume3 v)\npoint in direction (90)\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nwait (3.5) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nswitch backdrop to (park v)\ngo to x: (-350) y: (-270)\nclear graphic effects\nset size to (100) %\nswitch costume to (weeee v)\nrepeat (50)\n    move (5) steps\nend\nswitch costume to (costume4 v)\npoint in direction (90)\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nset size to (100) %\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nwait (0.5) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nstop all sounds\nswitch backdrop to (bad guys v)\nstart sound [Bad Guys! v]\nclear graphic effects\nswitch costume to (costume5 v)\ngo to x: (-250) y: (190)\npoint in direction (135)\nrepeat (70)\n    move (pick random (2) to (5)) steps\nend\nswitch backdrop to (bad guys2 v)\nswitch costume to (costume6 v)\npoint in direction (90)\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nset size to (100) %\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nwait (3.5) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nwait (2) seconds\nclear graphic effects\nswitch costume to (costume7 v)\npoint in direction (90)\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nset size to (100) %\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nwait (1.5) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nclear graphic effects\nclear graphic effects\nswitch costume to (costume8 v)\npoint in direction (90)\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nset size to (100) %\nrepeat (40)\n    change [ghost v] effect by (-2.5)\nend\nwait (1.85) seconds\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nrepeat (20)\n    change volume by (-5)\nend\nwait (0.8) seconds\nhide\nbroadcast (message1 v)\n\nwhen flag clicked\nhide\n\n@Lava\n\nwhen I start as a clone\nshow\ngo to x: (0) y: (0)\nset [ghost v] effect to (60)\ngo to [back v] layer\nrepeat until <(homecoming) = [1]>\n    set [time v] to [2]\n    switch costume to ([costume # v] of [ground v])\n    repeat (10)\n        switch costume to ([costume # v] of [ground v])\n        move (1) steps\n        change y by (time)\n    end\n    repeat (10)\n        change y by ((time) * (-1))\n        move (-1) steps\n        switch costume to ([costume # v] of [ground v])\n    end\nend\nhide\n\nwhen flag clicked\nhide\nrepeat (3)\n    create clone of (_myself_ v)\n    wait (0.5) seconds\nend\nforever\n    clear graphic effects\n    go to x: (0) y: (0)\n    switch costume to ([costume # v] of [ground v])\nend\n\n@UpSpikes\n\nwhen flag clicked\nforever\n    switch costume to ([costume # v] of [ground v])\n    clear graphic effects\n    set size to (100) %\n    go to x: (0) y: (0)\n    glide (0.2) secs to x: (0) y: (-40)\n    wait (0.5) seconds\n    glide (0.4) secs to x: (0) y: (0)\nend\n\nwhen flag clicked\ngo to [back v] layer\nhide\n\nwhen I receive [message1 v]\nshow\n\n@Fire 1\n\nwhen I receive [message1 v]\nhide\nset [level v] to [1]\nwait until <([costume # v] of [ground v]) = [8]>\ngo to x: (-240) y: (-171)\nswitch backdrop to (backdrop3 v)\nshow\nset size to (100) %\nclear graphic effects\nswitch costume to (costume1 v)\ngo to [front v] layer\nset [ghost v] effect to (25)\ngo to [back v] layer\nbroadcast (Fire clones v)\nforever\n    if <([costume # v] of [ground v]) = [10]> then\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nset size to (100) %\nclear graphic effects\nif <(Level) = [19]> then\n    set x to (pick random (-240) to (-45))\nelse\n    set x to (pick random (-240) to (240))\nend\ngo to [back v] layer\nset [ghost v] effect to (25)\nQuick go up\nrepeat (pick random (20) to (25))\n    switch costume to (costume2 v)\n    change size by (-3)\n    change [ghost v] effect by (2.5)\n    change x by (pick random (-2) to (2))\n    change y by (4)\nend\ndelete this clone\n\nwhen I receive [fire clones v]\nforever\n    create clone of (_myself_ v)\n    wait (0.0001) seconds\nend\n\nwhen I receive [fire clones v]\nforever\n    create clone of (_myself_ v)\n    wait (0.0001) seconds\nend\n\nwhen I receive [fire clones v]\nforever\n    create clone of (_myself_ v)\n    wait (0.0001) seconds\nend\n\nwhen I receive [fire clones v]\nforever\n    create clone of (_myself_ v)\n    wait (0.0001) seconds\nend\n\nwhen I receive [fire clones v]\nforever\n    create clone of (_myself_ v)\n    wait (0.0001) seconds\nend\n\nwhen I receive [fire clones v]\nforever\n    create clone of (_myself_ v)\n    wait (0.0001) seconds\nend\n\nwhen I receive [fire gone v]\nstop [other scripts in sprite v]\nwait (0) seconds\nstop [other scripts in sprite v]\n\ndefine Quick go up\nrepeat until <not <touching (boden v)?>>\n    change y by (5)\nend\nchange y by (-50)\n\n@bounce\n\nwhen I start as a clone\ngo to [front v] layer\ngo [backward v] (5) layers\nforever\n    show\n    if <touching (player v)?> then\n        set [y vel v] to [20]\n        switch costume to (costume1 v)\n        repeat (2)\n            next costume\n        end\n        repeat (2)\n            switch costume to ((costume [number v]) - (1))\n        end\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [next level v]\ndelete this clone\n\nwhen flag clicked\nhide\ndelete this clone\n\nwhen I receive [message1 v]\nwait until <([costume # v] of [ground v]) = [8]>\ngo to x: (-50) y: (-78)\ncreate clone of (_myself_ v)\nwait until <([costume # v] of [ground v]) = [9]>\ngo to x: (80) y: (-80)\ncreate clone of (_myself_ v)\n\n@Character\n\nwhen flag clicked\nset [clone? v] to [0]\nhide\ndelete (all) of [items: v]\ndelete (all) of [errands: v]\n\nwhen I receive [message1 v]\nforever\n    hide\n    if <([costume # v] of [ground v]) = [10]> then\n        switch costume to (friend v)\n        go to [front v] layer\n        go [backward v] (10) layers\n        point in direction (-90)\n        go to x: (0) y: (-69)\n        show\n        if <touching (player v)?> then\n            if <<key (space v) pressed?> or <mouse down?>> then\n                set [move? v] to [no]\n                say [*cough *cough, Is that you young one?] for (5) seconds\n                say [The cubes have took our people to the Cube Laboratory...] for (5) seconds\n                say [They are going to turn them evil. You must save them...] for (6) seconds\n                say [The crystal over there is broken, you can't fix this world now...] for (7) seconds\n                say [The world is turning gray, follow the cubes to the laboratory and save our people young one...] for (7) seconds\n                say [So a long...] for (2) seconds\n                wait (0.7) seconds\n                broadcast (sad v)\n                switch costume to (oof v)\n                wait (20) seconds\n                set [move? v] to [yes]\n            end\n        end\n    end\nend\n\n@Intro\n\nwhen flag clicked\nstart sound [Sh-Boom Cars v]\nswitch costume to (costume1 v)\nshow\nrepeat (79)\n    next costume\n    wait (.08) seconds\nend\nhide\nbroadcast (portishead7 intro done v)\n\n@Res\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nif <not <([costume # v] of [ground v]) = [10]>> then\n    broadcast (Restart v)\nend\n\nwhen I receive [message1 v]\nshow\ngo to x: (134) y: (-155)\npoint in direction (90)\ngo to [front v] layer\nturn left (15) degrees\nforever\n    repeat (15)\n        turn left (-2) degrees\n    end\n    wait (0.1) seconds\n    repeat (15)\n        turn left (2) degrees\n    end\n    wait (0.1) seconds\nend\n\n@Player\n\nchange x by ((x vel) * (-1))\n\nchange y by (-4)\n\nset [y vel v] to [15]\n\nwhen flag clicked\nswitch costume to (happy v)\nset size to (100) %\nhide\n\nwhen [r v] key pressed\nbroadcast (Restart v)\n\nwhen I receive [next level v]\nbroadcast (Restart v)\n\nwhen I receive [restart v]\ngo to x: (-220) y: (-10)\npoint in direction (90)\nset [y vel v] to [0]\nset [x vel v] to [0]\n\nwhen I receive [message1 v]\nshow\nforever\n    if <<(x position) > [230]> and <touching (_edge_ v)?>> then\n        broadcast (Next level v)\n    end\n    if <<touching (spikes v)?> or <<<<touching (lava v)?> or <touching (fly v)?>> or <touching (upspikes v)?>> or <<(y position) < [-170]> and <touching (_edge_ v)?>>>> then\n        broadcast (Restart v)\n    end\n    if <touching (bounce v)?> then\n        set [y vel v] to [20]\n    end\nend\n\nchange [y vel v] by (-1)\n\nwhen flag clicked\nforever\n    Move\nend\n\ndefine Move\ngo to [front v] layer\n\nwhen I receive [message1 v]\nbroadcast (Restart v)\nswitch costume to (costume1 v)\nshow\nset [x vel v] to [0]\nset [y vel v] to [0]\nforever\n    go to [front v] layer\n    if <touching (ladders v)?> then\n        set [y vel v] to [0]\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            set [y vel v] to [8]\n        end\n        if <<key (down arrow v) pressed?> or <<mouse down?> and <(y position) > (mouse y)>>> then\n            set [y vel v] to [-8]\n        end\n    else\n        change [y vel v] by (-1)\n    end\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [x vel v] by (-1)\n        point in direction (-90)\n    end\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(x position) < (mouse x)>>> then\n        change [x vel v] by (1)\n        point in direction (90)\n    end\n    set [x vel v] to ((x vel) * (0.9))\n    change x by (x vel)\n    if <touching (ground v)?> then\n        change y by (2)\n        if <touching (ground v)?> then\n            change y by (2)\n            if <touching (ground v)?> then\n                change y by (2)\n                if <touching (ground v)?> then\n                    change y by (2)\n                    if <touching (ground v)?> then\n                        change y by (2)\n                        if <touching (ground v)?> then\n                            change y by (-4)\n                            change x by ((x vel) * (-1))\n                            if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n                                if <([abs v] of (x vel) ) = (x vel)> then\n                                    set [x vel v] to [-10]\n                                else\n                                    set [x vel v] to [10]\n                                end\n                                set [y vel v] to [15]\n                            else\n                                set [x vel v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (y vel)\n    if <touching (ground v)?> then\n        change y by ((y vel) * (-1))\n        set [y vel v] to [0]\n    end\n    change y by (-1)\n    if <touching (ground v)?> then\n        if <<<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> and <touching (ground v)?>> then\n            set [y vel v] to [15]\n        end\n    end\n    change y by (1)\nend\n\nwhen I receive [sad v]\nswitch costume to (sad v)\n\n