Minecraft Platformer - Iron Edition 

Instructions: READ THIS BEFORE STARTING THE GAME.\nTo clear a level, you must find all of the Iron Ingots that are in the level before getting to the end. \n----------------------------------------------------------------------------\nWelcome to my (kind of) First Project. \nThis is a Minecraft based platformer. Used the Arrow keys to move.This is also Mobile Friendly, Just tap where you want the player to go. There are also a few things that you should know before playing the game:\n\n- Magma blocks, Lava and Spiders are dangerous.\nDo Not touch them.\n\n- Unlike the original Minecraft game, Webs to not stick, they are used like regular platforms.\n\nCredit to Minecraft and Griffpatch or else this game would not be possible. \n\n#Minecraft #Music #Games #iron #Cave #Overworld\n#Scratch #Platformer #Scrolling

@Stage\n\nwhen I receive [setup v]\nif <(LEVEL) = [1]> then\n    set [brightness v] effect to (0)\n    switch backdrop to (sky v)\nelse\n    if <(LEVEL) = [2]> then\n        set [brightness v] effect to (-35)\n        switch backdrop to (stone v)\n    else\n        if <(LEVEL) = [3]> then\n            set [brightness v] effect to (-35)\n            switch backdrop to (stone v)\n        else\n            if <(LEVEL) = [4]> then\n            else\n            end\n        end\n    end\nend\n\nwhen flag clicked\nswitch backdrop to (sky v)\n\n@Platforms\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((Platforms: x) - (SCROLL X)) ((Platforms: y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [platforms: x v] to [0]\nset [platforms: y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1-1 v)\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\nend\nif <(LEVEL) = [2]> then\n    switch costume to (level 2-1 v)\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\nend\nif <(LEVEL) = [3]> then\n    switch costume to (level 4-1 v)\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [-50]\nend\nif <(LEVEL) = [4]> then\n    switch costume to (level 5-1 v)\nend\n\nClone At x: [360] y: [0]\nClone At x: [360] y: [0]\nClone At x: [360] y: [0]\nClone At x: [360] y: [0]\nClone At x: [360] y: [0]\nClone At x: [360] y: [0]\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone At x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [platforms: x v] by (x)\nchange [platforms: y v] by (y)\nnext costume\n\nwhen flag clicked\nset [level v] to [1]\n\nbroadcast (Open Portal v)\n\n@Iron\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((Ingots: x) - (SCROLL X)) ((Ingots: y) - (SCROLL Y))\nif <touching (player v)?> then\n    start sound [Pop \(Minecraft Sound\) - Sound Effect for editing v]\n    change [collected v] by (1)\n    if <(COLLECTED) = (COLLECTED MAX)> then\n        broadcast (Open Portal v)\n    end\n    delete this clone\nend\n\nwhen I receive [setup v]\nhide\nset [collected v] to [0]\nset [collected max v] to [0]\nset [ingots: x v] to [0]\nset [ingots: y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (iron ingot v)\n    Clone At x: [370] y: [100]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (iron ingot v)\n        Clone At x: [310] y: [150]\n        Clone At x: [1423] y: [0]\n        Clone At x: [2036] y: [30]\n        set [collected max v] to [3]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (costume3 v)\n            Clone At x: [-186] y: [-73]\n            Clone At x: [300] y: [100]\n            set [collected max v] to [2]\n        else\n            if <(LEVEL) = [4]> then\n            end\n        end\n    end\nend\nset [ingots: x v] to [-99999]\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone At x: (x) y: (y)\nset [ingots: x v] to (x)\nset [ingots: y v] to (y)\nchange [collected max v] by (1)\ncreate clone of (_myself_ v)\n\nClone At x: [310] y: [150]\n\nwhen I start as a clone\nforever\n    repeat (10)\n        change y by (1)\n    end\n    repeat (10)\n        change y by (-1)\n    end\nend\n\n@Danger\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((Danger: x) - (SCROLL X)) ((Danger: y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [danger: x v] to [0]\nset [danger: y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    Clone At x: [0] y: [-6]\n    Clone At x: [400] y: [-6]\n    Clone At x: [1900] y: [-6]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 2 1 v)\n        Clone At x: [340] y: [-200]\n        Clone At x: [440] y: [-200]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (level 4 1 v)\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (level 5 1 v)\n            end\n        end\n    end\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    go to [front v] layer\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone At x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [danger: x v] by (x)\nchange [danger: y v] by (y)\ngo to [front v] layer\nnext costume\n\ngo to [front v] layer\n\nwhen I start as a clone\nforever\n    if <(LEVEL) = [4]> then\n        hide\n        delete this clone\n    end\nend\n\n@Player\n\ndefine Change Player Y By (sy)\nchange [player: y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (platforms v)?>>\n    if <(sy) > [0]> then\n        change [player: y v] by (-1)\n    else\n        change [player: y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\n\ndefine Change Player X By (sx)\nchange [player: x v] by (sx)\nPosition\nif <touching (platforms v)?> then\n    repeat (12)\n        change [player: y v] by (1)\n        Position\n        if <not <touching (platforms v)?>> then\n            stop [this script v]\n        end\n    end\n    change [player: y v] by (-12)\n    repeat until <not <touching (platforms v)?>>\n        if <(sx) > [0]> then\n            change [player: x v] by (-1)\n        else\n            change [player: x v] by (1)\n        end\n        Position\n    end\nend\n\ndefine Tick\nif <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(x position) > (mouse x)>>>> then\n    Change Player X By [-8]\n    point in direction (-90)\nend\nif <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>>> then\n    Change Player X By [8]\n    point in direction (90)\nend\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n    if <(in air) < [4]> then\n        set [sy v] to [16]\n    end\nend\nchange [sy v] by (-2)\nChange Player Y By (sy)\nTest - Die\nset [add v] to (join (COLLECTED) (join [ ] (join [/] (join [ ] (COLLECTED MAX)))))\nchange [scroll x v] by (round (((Player: x) - (SCROLL X)) / (10)))\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nchange [scroll y v] by (round (((Player: y) - (SCROLL Y)) / (10)))\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nPosition\nif <(Player: y) < [-180]> then\n    set [exit v] to [Die]\nend\n\ndefine Game On\nset [player: x v] to [0]\nset [player: y v] to [0]\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [exit v] to []\npoint in direction (90)\nset size to (100) %\nset [ghost v] effect to (0)\nshow\n\ndefine Test - Die\nif <touching (danger v)?> then\n    set [exit v] to [Die]\nend\n\ndefine Game - Win\nbroadcast (Sword...? v)\nrepeat (50)\n    create clone of (_myself_ v)\n    point towards (exit portal v)\n    turn right (65) degrees\n    move ((distance to [exit portal v]) / (2)) steps\n    change size by (-1)\n    change [ghost v] effect by (2)\nend\nhide\nchange [level v] by (1)\nwait (1) seconds\n\ndefine Game - Die\nset [exit v] to []\nrepeat (5)\n    hide\n    wait (0.1) seconds\n    show\n    wait (0.1) seconds\nend\nhide\nwait (0.5) seconds\n\ndefine Position\ngo to x: ((Player: x) - (SCROLL X)) y: ((Player: y) - (SCROLL Y))\n\nwhen I receive [play game v]\nset [level v] to [1]\nforever\n    broadcast (Reset v) and wait\n    broadcast (Setup v) and wait\n    Game On\n    repeat until <(EXIT) > []>\n        Tick\n        broadcast (Tick v)\n    end\n    if <(EXIT) = [Win]> then\n        Game - Win\n    else\n        Game - Die\n    end\nend\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\ngo [backward v] (1) layers\n\nwhen flag clicked\nhide\n\nwhen I receive [tick v]\ncreate clone of (stamp v)\n\nwhen I start as a clone\npoint in direction ([direction v] of [player v])\nset [ghost v] effect to (50)\nrepeat (10)\n    change [ghost v] effect by (4.9)\n    change size by (-1)\nend\ndelete this clone\n\nforever\n\nwhen flag clicked\n\ncreate clone of (_myself_ v)\n\nset y to (0)\n\nwhen flag clicked\nbroadcast (Green Flag v)\nbroadcast (Play Game v)\n\n@Music\n\nwhen flag clicked\nshow\nforever\n    if <touching (player v)?> then\n        set [ghost v] effect to (50)\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen flag clicked\nshow\nset [song number v] to [1]\ngo to x: (410) y: (0)\n\nwhen this sprite clicked\nstop all sounds\nswitch costume to (costume1 v)\nstart sound ((Song NUMBER) + (1))\nchange [song number v] by (1)\n\nwhen I receive [close store v]\nshow\n\nwhen I receive [open store v]\nhide\n\nwhen I receive [level up v]\ngo to [front v] layer\n\nwhen flag clicked\n\nwhen flag clicked\nplay sound [Taswell v] until done\n\nwhen this sprite clicked\nset volume to (100) %\n\n@cooool thumbnaal\n\nwhen flag clicked\nhide\nforever\n    reset timer\nend\n\nwhen [timer v] > (0)\nshow\ngo to [front v] layer\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\n@Exit Portal\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((Exit Portal: x) - (SCROLL X)) ((Exit Portal: y) - (SCROLL Y))\nif <<(costume [name v]) = [O]> and <touching (player v)?>> then\n    set [exit v] to [Win]\nend\nforever\n    if <(COLLECTED) = (COLLECTED MAX)> then\n        switch costume to (o v)\n    else\n        switch costume to (c v)\n    end\nend\n\nwhen I receive [setup v]\nhide\nset [collected v] to [0]\nset [exit portal: x v] to [0]\nset [exit portal: y v] to [0]\nif <(LEVEL) = [1]> then\n    Clone At x: [2450] y: [200]\nelse\n    Clone At x: [2237] y: [240]\nend\nif <(LEVEL) = [3]> then\n    Clone At x: [500] y: [120]\nelse\n    if <(LEVEL) = [4]> then\n        hide\n    end\nend\n\ndefine Position (x) (y)\ngo [backward v] (99) layers\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone At x: (x) y: (y)\nset [exit portal: x v] to (x)\nset [exit portal: y v] to (y)\n\nwhen I receive [open portal v]\nswitch costume to (exit open v)\n\nClone At x: [945] y: [46]\n\nchange [collected v] by (1)\n\nset [exit portal: x v] to [-99999]\nhide\n\n