Minecraft Platformer

Instructions:                                  HOW TO PLAY\n************************************************************\n-Use the arrow keys to move.\n----------------------------------------------------------------------\n-The objective is to get to all the chests\n----------------------------------------------------------------------\n-Collect all of them to see what's inside and win!

@Stage\n\nwhen flag clicked\nwait (4.43) seconds\nforever\n    play sound [Minecraft v] until done\nend\n\nstop all sounds\n\nwhen flag clicked\nswitch backdrop to (white v)\nwait (4.43) seconds\nswitch backdrop to (white v)\n\n@Alex\n\ndefine Platform Gravity: (gravity) Jump Height: (jump height) Side Movement Speed (side movement) Friction (friction) Slope: (slope)\nchange [y velocity v] by (gravity)\nchange y by (Y Velocity)\nif <touching (level v)?> then\n    repeat until <not <touching (level v)?>>\n        change y by ((([abs v] of (Y Velocity) ) / (Y Velocity)) * (-1))\n    end\n    if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <key (space v) pressed?>> and <(([abs v] of (Y Velocity) ) / (Y Velocity)) = [-1]>> then\n        set [y velocity v] to (jump height)\n    else\n        set [y velocity v] to [0]\n    end\nend\nset [x velocity v] to (((X Velocity) + ((<<key (left arrow v) pressed?> or <key (a v) pressed?>> * ((side movement) * (-1))) + (<<key (right arrow v) pressed?> or <key (d v) pressed?>> * (side movement)))) * (friction))\nchange x by (X Velocity)\nset [slope v] to [0]\nrepeat until <<(Slope) = ((slope) * (-1))> or <not <touching (level v)?>>>\n    change y by (1)\n    change [slope v] by (-1)\nend\nif <touching (level v)?> then\n    change y by (Slope)\n    repeat until <not <touching (level v)?>>\n        change x by ((([abs v] of (X Velocity) ) / (X Velocity)) * (-1))\n    end\nend\n\n\n    change [y velocity v] by (15)\nend\n\nset [y velocity v] to [32]\n\nset [y velocity v] to [0]\n\nwhen flag clicked\ngo to x: (-191) y: (-100)\nset [level v] to [1]\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nforever\n    Platform Gravity: [-1] Jump Height: [15] Side Movement Speed [3] Friction [.7] Slope: [8]\nend\n\nchange x by (X Velocity)\n\nwhen flag clicked\nrepeat until <(Level) = [6]>\n    if <touching (chest v)?> then\n        change [level v] by (1)\n        go to x: (-191) y: (-100)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (creeper v)?> then\n        go to x: (-191) y: (-100)\n        broadcast (CREEPER...RUN!!! v)\n    end\nend\n\nwhen flag clicked\nswitch costume to (smiley v)\n\nwhen I receive [you win paartaaay!! v]\nswitch costume to (cool dude v)\n\nwhen flag clicked\nswitch costume to (alex stand right v)\nhide\n\nwhen I receive [play v]\nshow\n\nwhen I receive [you win paartaaay!! v]\ngo to [front v] layer\n\nwhen flag clicked\nforever\n    if <touching (creeper2 v)?> then\n        go to x: (-191) y: (-100)\n        broadcast (Creeper2 Run! v)\n    end\nend\n\nwhen [right arrow v] key pressed\nif <key (right arrow v) pressed?> then\n    repeat until <not <key (right arrow v) pressed?>>\n        switch costume to (alex walk right v)\n        wait (.2) seconds\n        switch costume to (alex stand right v)\n        wait (.2) seconds\n    end\nelse\n    switch costume to (alex stand right v)\nend\n\nwhen [left arrow v] key pressed\nif <key (left arrow v) pressed?> then\n    repeat until <not <key (left arrow v) pressed?>>\n        switch costume to (alex walk left v)\n        wait (.2) seconds\n        switch costume to (alex stand left v)\n        wait (.2) seconds\n    end\nelse\n    switch costume to (alex stand left v)\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [6]> then\n        hide\n    end\nend\n\nwhen I receive [play v]\nif <(Alex is Selected) = [1]> then\n    go to x: (-191) y: (-100)\n    show\nelse\n    hide\n    stop [other scripts in sprite v]\n    stop [this script v]\nend\n\nwhen flag clicked\nset [alex is selected v] to [0]\n\nwhen [d v] key pressed\nif <key (d v) pressed?> then\n    repeat until <not <key (d v) pressed?>>\n        switch costume to (alex walk right v)\n        wait (.2) seconds\n        switch costume to (alex stand right v)\n        wait (.2) seconds\n    end\nelse\n    switch costume to (alex stand right v)\nend\n\nwhen [a v] key pressed\nif <key (a v) pressed?> then\n    repeat until <not <key (a v) pressed?>>\n        switch costume to (alex walk left v)\n        wait (.2) seconds\n        switch costume to (alex stand left v)\n        wait (.2) seconds\n    end\nelse\n    switch costume to (alex stand left v)\nend\n\n@Steve\n\ndefine Platform Gravity: (gravity) Jump Height: (jump height) Side Movement Speed (side movement) Friction (friction) Slope: (slope)\nchange [y velocity v] by (gravity)\nchange y by (Y Velocity)\nif <touching (level v)?> then\n    repeat until <not <touching (level v)?>>\n        change y by ((([abs v] of (Y Velocity) ) / (Y Velocity)) * (-1))\n    end\n    if <<<key (up arrow v) pressed?> or <<key (space v) pressed?> or <key (w v) pressed?>>> and <(([abs v] of (Y Velocity) ) / (Y Velocity)) = [-1]>> then\n        set [y velocity v] to (jump height)\n    else\n        set [y velocity v] to [0]\n    end\nend\nset [x velocity v] to (((X Velocity) + ((<<key (left arrow v) pressed?> or <key (a v) pressed?>> * ((side movement) * (-1))) + (<<key (right arrow v) pressed?> or <key (d v) pressed?>> * (side movement)))) * (friction))\nchange x by (X Velocity)\nset [slope v] to [0]\nrepeat until <<(Slope) = ((slope) * (-1))> or <not <touching (level v)?>>>\n    change y by (1)\n    change [slope v] by (-1)\nend\nif <touching (level v)?> then\n    change y by (Slope)\n    repeat until <not <touching (level v)?>>\n        change x by ((([abs v] of (X Velocity) ) / (X Velocity)) * (-1))\n    end\nend\n\n\n    change [y velocity v] by (15)\nend\n\nset [y velocity v] to [32]\n\nset [y velocity v] to [0]\n\nwhen flag clicked\ngo to x: (-191) y: (-100)\nset [level v] to [1]\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nforever\n    Platform Gravity: [-1] Jump Height: [15] Side Movement Speed [3] Friction [.7] Slope: [8]\nend\n\nchange x by (X Velocity)\n\nwhen flag clicked\nrepeat until <(Level) = [6]>\n    if <touching (chest v)?> then\n        change [level v] by (1)\n        go to x: (-191) y: (-100)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (creeper v)?> then\n        go to x: (-191) y: (-100)\n        broadcast (CREEPER...RUN!!! v)\n    end\nend\n\nwhen flag clicked\nswitch costume to (smiley v)\n\nwhen I receive [you win paartaaay!! v]\nswitch costume to (cool dude v)\n\nwhen flag clicked\nswitch costume to (steve stand right v)\nhide\n\nwhen I receive [play v]\nshow\n\nwhen I receive [you win paartaaay!! v]\ngo to [front v] layer\n\nwhen flag clicked\nforever\n    if <touching (creeper2 v)?> then\n        go to x: (-191) y: (-100)\n        broadcast (Creeper2 Run! v)\n    end\nend\n\nwhen [right arrow v] key pressed\nif <key (right arrow v) pressed?> then\n    repeat until <not <key (right arrow v) pressed?>>\n        switch costume to (steve walk right v)\n        wait (.2) seconds\n        switch costume to (steve stand right v)\n        wait (.2) seconds\n    end\nelse\n    switch costume to (steve stand right v)\nend\n\nwhen [left arrow v] key pressed\nif <key (left arrow v) pressed?> then\n    repeat until <not <key (left arrow v) pressed?>>\n        switch costume to (steve walk left v)\n        wait (.2) seconds\n        switch costume to (steve stand left v)\n        wait (.2) seconds\n    end\nelse\n    switch costume to (steve stand left v)\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [6]> then\n        hide\n    end\nend\n\nwhen I receive [play v]\nif <(Steve is Selected) = [1]> then\n    show\n    go to x: (-191) y: (-100)\nelse\n    hide\n    stop [other scripts in sprite v]\n    stop [this script v]\nend\n\nwhen flag clicked\nset [steve is selected v] to [0]\n\nwhen [d v] key pressed\nif <key (d v) pressed?> then\n    repeat until <not <key (d v) pressed?>>\n        switch costume to (steve walk right v)\n        wait (.2) seconds\n        switch costume to (steve stand right v)\n        wait (.2) seconds\n    end\nelse\n    switch costume to (alex stand right v)\nend\n\nwhen [a v] key pressed\nif <key (a v) pressed?> then\n    repeat until <not <key (a v) pressed?>>\n        switch costume to (steve walk left v)\n        wait (.2) seconds\n        switch costume to (steve stand left v)\n        wait (.2) seconds\n    end\nelse\n    switch costume to (alex stand left v)\nend\n\n@Level\n\nwhen I receive [level 1 completed v]\n\nwhen flag clicked\nswitch costume to (level 1 v)\n\nwhen flag clicked\nforever\n    if <(Level) = [3]> then\n        switch costume to (level 3 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [2]> then\n        switch costume to (level 2 v)\n        broadcast (Level 2 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [4]> then\n        switch costume to (level 4 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [5]> then\n        switch costume to (level 5 v)\n    end\nend\n\nwait (1) seconds\n\nwait (1) seconds\n\nwhen flag clicked\nforever\n    if <(Level) = [6]> then\n        switch costume to (level 6 v)\n    end\nend\n\nwhen flag clicked\nbroadcast (Everyone hide! v)\nhide\n\nwhen I receive [play v]\nshow\n\nwhen flag clicked\n\nplay sound [Triumph v] until done\n\nwait (.1) seconds\nforever\n\nplay sound [Dubstep v] until done\n\n\n\nforever\n\nswitch costume to (party 1 v)\nwait (.2) seconds\nswitch costume to (party 2 v)\nwait (.2) seconds\nswitch costume to (party 3 v)\nwait (.2) seconds\n\nforever\n\n@Creeper\n\nwhen flag clicked\nset size to (90) %\ngo to x: (-75) y: (-120)\nforever\n    if <<(Level) = [4]> or <(Level) = [5]>> then\n        show\n        repeat until <(Level) = [6]>\n            switch costume to (creeper standing v)\n            wait (.5) seconds\n            switch costume to (creeper leg up v)\n            wait (.5) seconds\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <(Level) = [5]> then\n        go to x: (-84) y: (-93)\n        set size to (40) %\n    end\nend\n\nwait (.5) seconds\nhide\nwait (.5) seconds\n\nwhen I receive [creeper...run!!! v]\nstart sound [explbomb v]\nswitch costume to (exploding creeper 1 v)\nwait (.1) seconds\nswitch costume to (exploding creeper 2 v)\nwait (.1) seconds\nswitch costume to (exploding creeper 3 v)\nwait (.1) seconds\n\nwhen flag clicked\nforever\n    if <(Level) = [6]> then\n        hide\n    end\nend\n\nwhen flag clicked\nhide\nforever\n    if <(Level) = [4]> then\n        go to x: (-87) y: (-119)\n        set size to (90) %\n        show\n    end\nend\n\nwhen I receive [everyone hide! v]\nhide\n\nwhen flag clicked\nforever\n    if <(Level) = [5]> then\n        go to x: (-84) y: (-93)\n        set size to (40) %\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [5]> then\n        go to x: (-84) y: (-93)\n        set size to (40) %\n    end\nend\n\n@Chest\n\nturn right (2) degrees\n\nwait (.1) seconds\n\nwait (.1) seconds\n\nwait (.1) seconds\n\nwait (.1) seconds\n\nwait (.1) seconds\n\nwait (.1) seconds\n\nwait (.1) seconds\n\nwait (.1) seconds\n\nwait (.1) seconds\n\nwait (.1) seconds\n\nwait (.1) seconds\n\nwait (.1) seconds\nturn left (2) degrees\nturn left (2) degrees\nwait (.1) seconds\nturn right (2) degrees\nturn right (2) degrees\nwait (.1) seconds\nturn left (2) degrees\nturn left (2) degrees\nwait (.1) seconds\nturn right (2) degrees\nturn right (2) degrees\nwait (.1) seconds\n\nturn left (2) degrees\nturn left (2) degrees\nturn left (2) degrees\nturn left (2) degrees\nwait (.1) seconds\nturn right (2) degrees\nturn right (2) degrees\nturn right (2) degrees\nturn right (2) degrees\nwait (.1) seconds\nturn left (2) degrees\nturn left (2) degrees\nturn left (2) degrees\nturn left (2) degrees\nwait (.1) seconds\nturn right (2) degrees\nturn right (2) degrees\nturn right (2) degrees\nturn right (2) degrees\n\nwhen flag clicked\nrepeat until <(Level) = [2]>\n    if <touching (alex v)?> then\n        broadcast (Level 1 completed v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [2]> then\n        go to x: (116) y: (-53)\n    end\nend\n\nforever\n    if <(Level) = [2]> then\n        repeat until <(Level) = [3]>\n    end\nend\n\nglide (1) secs to x: (-67) y: (18)\nglide (1) secs to x: (-67) y: (11)\n\nwhen flag clicked\nset size to (15) %\nforever\n    if <(Level) = [3]> then\n        go to x: (151) y: (92)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [4]> then\n        go to x: (169) y: (-79)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [5]> then\n        go to x: (-15) y: (102)\n    end\nend\n\nwhen flag clicked\nwait until <(Level) = [6]>\nif <(Level) = [6]> then\n    broadcast (You Win Paartaaay!! v)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [play v]\nshow\n\nwhen I receive [play v]\ngo to x: (211) y: (-149)\n\nhide\n\nwhen flag clicked\nforever\n    if <(Level) = [6]> then\n        glide (1) secs to x: (0) y: (0)\n    end\nend\n\nwhen I receive [you win paartaaay!! v]\nwait (1) seconds\nrepeat (8)\n    change size by (10)\nend\nswitch costume to (minecraft chest  open v)\nwait (.1) seconds\nswitch costume to (minecraft chest  opening1 v)\nwait (.1) seconds\nswitch costume to (minecraft chest  opening2 v)\nwait (.1) seconds\nswitch costume to (minecraft chest  opening3 v)\nhide\n\nwait (1) seconds\n\nwhen flag clicked\nswitch costume to (minecraft chest v)\n\nstop [this script v]\n\n@Creeper2\n\nwhen flag clicked\nforever\n    if <(Level) = [5]> then\n        show\n        go to x: (91) y: (106)\n        repeat until <(Level) = [6]>\n            switch costume to (creeper standing v)\n            wait (.5) seconds\n            switch costume to (creeper leg up v)\n            wait (.5) seconds\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <(Level) = [4]> then\n        hide\n    end\nend\n\nwait (.5) seconds\nhide\nwait (.5) seconds\n\nwhen I receive [creeper2 run! v]\nstart sound [explbomb v]\nswitch costume to (exploding creeper 1 v)\nwait (.1) seconds\nswitch costume to (exploding creeper 2 v)\nwait (.1) seconds\nswitch costume to (exploding creeper 3 v)\nwait (.1) seconds\n\nwhen flag clicked\nforever\n    if <(Level) = [6]> then\n        hide\n    end\nend\n\n@Play\n\nwhen flag clicked\nhide\nwait (4) seconds\nshow\n\nwhen flag clicked\nwait until <<(Alex is Selected) = [1]> or <(Steve is Selected) = [1]>>\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (110) %\n    end\n    if <not <touching (mouse-pointer v)?>> then\n        set size to (100) %\n    end\nend\n\nwhen this sprite clicked\nif <<(Alex is Selected) = [1]> or <(Steve is Selected) = [1]>> then\n    broadcast (Play v)\n    hide\nend\n\nwhen flag clicked\ngo to x: (4) y: (-5)\n\nwhen flag clicked\n\nstart sound [Dance Funky v]\n\nwait (5.08) seconds\n\nrepeat until <(Level) = [6]>\n\nstop all sounds\n\n@Diamonds\n\nwhen I receive [you win paartaaay!! v]\nwait (1.7) seconds\nshow\nforever\n    switch costume to (diamond backround3 v)\n    wait (.2) seconds\n    switch costume to (diamond backround2 v)\n    wait (.2) seconds\n    switch costume to (diamond backround4 v)\n    wait (.2) seconds\n    switch costume to (diamond backround5 v)\n    wait (.2) seconds\n    switch costume to (diamond backround6 v)\n    wait (.2) seconds\n    switch costume to (diamond backround7 v)\n    wait (.2) seconds\n    switch costume to (diamond backround8 v)\n    wait (.2) seconds\nend\n\nwhen flag clicked\nhide\n\n@Star2\n\nwhen flag clicked\npoint in direction (90)\ngo to x: (-134) y: (-9)\nhide\n\nwhen flag clicked\nforever\n    if <(Level) = [6]> then\n        go to [front v] layer\n        wait (1.7) seconds\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    turn right (2) degrees\nend\n\nwhen flag clicked\nforever\n    if <(Level) < [6]> then\n        hide\n    end\nend\n\n@Star\n\nwhen flag clicked\npoint in direction (90)\ngo to x: (151) y: (-9)\nhide\n\nwhen flag clicked\nforever\n    if <(Level) = [6]> then\n        go to [front v] layer\n        wait (1.7) seconds\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    turn right (2) degrees\nend\n\nwhen flag clicked\nforever\n    if <(Level) < [6]> then\n        hide\n    end\nend\n\n@Thumbnail\n\nwhen flag clicked\nforever\n    show\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    go to x: (41) y: (-44)\nend\n\n@Alex Button\n\nwhen flag clicked\nswitch costume to (alex unselected v)\nhide\nwait (4) seconds\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (110) %\n    else\n        set size to (100) %\n    end\nend\n\nwhen this sprite clicked\nstart sound [Coin v]\nswitch costume to (alex selected v)\nset [alex is selected v] to [1]\nbroadcast (Alex v)\n\nwhen I receive [play v]\nhide\n\nhide\n\nwhen I receive [steve v]\nswitch costume to (alex unselected v)\nset [alex is selected v] to [0]\n\n@Steve Button\n\nwhen flag clicked\nswitch costume to (steve unselected v)\nhide\nwait (4) seconds\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (110) %\n    else\n        set size to (100) %\n    end\nend\n\nwhen this sprite clicked\nstart sound [Coin v]\nswitch costume to (steve selected v)\nset [steve is selected v] to [1]\nbroadcast (Steve v)\n\nhide\n\nwhen I receive [play v]\nhide\n\nwhen I receive [alex v]\nswitch costume to (steve unselected v)\nset [steve is selected v] to [0]\n\n@Sprite1\n\nwhen flag clicked\nhide\ngo to [back v] layer\n\nwhen I receive [play v]\nshow\n\n@INTRO\n\ndefine Make clone detailed (z)\nset [x v] to (z)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nstart sound [sound2 v]\nSet up (331)\nStart type (letter (1) of (Code))\nwait (0.5) seconds\nMake clone detailed (153)\nGlide type: (letter (2) of (Code))\nwait (0.4) seconds\nExit type (letter (3) of (Code))\nhide\n\ndefine Exit type (d)\nif <(d) = [1]> then\n    Glide size to (0) [yes]\nelse\n    if <(d) = [2]> then\n        set [y v] to [0]\n        repeat until <touching (_edge_ v)?>\n            change y by (Y)\n            change [y v] by (-1.5)\n        end\n        set [y v] to (() - ((Y) * (0.85)))\n        repeat until <(y position) < [-180]>\n            change y by (Y)\n            change [y v] by (-1.5)\n        end\n    else\n        Glide size to (0) [yus]\n    end\nend\n\ndefine Glide to X: (x) Y: (y)\nrepeat (25)\n    change x by (((x) - (x position)) / (8))\n    change y by (((y) - (y position)) / (8))\nend\n\ndefine Glide type: (c)\nif <(c) = [1]> then\n    Glide to X: (-100) Y: (0)\nelse\n    if <(c) = [2]> then\n        Glide to X: (100) Y: (0)\n    else\n        if <(c) = [3]> then\n            Glide to X: (0) Y: (100)\n        else\n            if <(c) = [4]> then\n                Glide to X: (0) Y: (-100)\n            end\n        end\n    end\nend\n\ndefine Set up (code)\npoint in direction (90)\nset [code v] to (code)\nswitch costume to (logo v)\nset size to (100) %\nshow\n\ndefine Glide size to (b) (fade?)\nif <(fade?) = [yes]> then\n    set [ghost v] effect to (0)\n    repeat (10)\n        change size by (-10)\n        change [ghost v] effect by (10)\n    end\nelse\n    if <(fade?) = [yus]> then\n        set [ghost v] effect to (0)\n        repeat (10)\n            change size by (-10)\n            change [ghost v] effect by (10)\n            turn right (15) degrees\n        end\n    else\n        repeat (30)\n            change size by (((b) - (size)) / (8))\n        end\n    end\nend\n\ndefine Start type (a)\nif <(a) = [1]> then\n    go to x: (-300) y: (0)\n    repeat (30)\n        change x by (((4) - (x position)) / (8))\n    end\nelse\n    if <(a) = [2]> then\n        go to x: (300) y: (0)\n        repeat (30)\n            change x by (((-4) - (x position)) / (8))\n        end\n    else\n        if <(a) = [3]> then\n            go to x: (0) y: (240)\n            repeat (30)\n                change y by (((-3) - (y position)) / (8))\n            end\n        else\n            if <(a) = [4]> then\n                go to x: (0) y: (-240)\n                repeat (30)\n                    change y by (((3) - (y position)) / (8))\n                end\n            else\n                if <(a) = [4]> then\n                    go to x: (0) y: (-240)\n                    repeat (30)\n                        change y by (((3) - (y position)) / (8))\n                    end\n                else\n                    if <(a) = [5]> then\n                        go to x: (0) y: (0)\n                        set size to (0) %\n                        Glide size to (102) [no]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <(letter (1) of (X)) = [1]> then\n    switch costume to (words v)\n    Start type (letter (2) of (X))\n    wait (0) seconds\n    Exit type (letter (3) of (X))\n    delete this clone\nend\n\n