Metal | a Platformer

Instructions: Use w,a,s,d or arrow keys to move. MOBILE FRIENDLY!\nPress "r" to restart the level.\nHave fun!!! :P\nGo check out GraphicFox, my character animation is based off of his coding :P\nI've learned alot about character coding from him so thx Graphic Fox! :P

@Stage\n\nwhen flag clicked\nswitch backdrop to (blue sky 2  v)\n\nwhen I receive [next level! v]\nnext backdrop\n\nwhen I receive [next level! v]\nif <(backdrop [name v]) = [3 boss lvl]> then\n    broadcast (3rd boss v)\nend\n\nwhen I receive [next level! v]\nif <(backdrop [name v]) = [fourth boss lvl]> then\n    broadcast (4th boss v)\nend\n\n@Main character\n\nwhen I receive [start v]\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nrepeat (10)\n    change size by (-5)\n    change [ghost v] effect by (-5)\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\ndefine reset\ngo to x: (-200) y: (-100)\n\nwhen I receive [start v]\ngo to x: (-200) y: (-100)\nset size to (80) %\nswitch costume to (steel boi v)\nshow\nset [level v] to [1]\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > [10]>>> then\n        change [xv v] by (1)\n    end\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < [-10]>>> then\n        change [xv v] by (-1)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <touching (platform v)?> then\n        change y by (1)\n        if <touching (platform v)?> then\n            change y by (1)\n            if <touching (platform v)?> then\n                change y by (1)\n                if <touching (platform v)?> then\n                    change y by (1)\n                    if <touching (platform v)?> then\n                        change y by (1)\n                        if <touching (platform v)?> then\n                            change x by ((Xv) * (-1))\n                            if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-5]\n                                else\n                                    set [xv v] to [5]\n                                end\n                                set [yv v] to [12]\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-1)\n    change y by (Yv)\n    if <touching (platform v)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching (platform v)?> then\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            set [yv v] to [12]\n        end\n    end\n    if <touching (bounce pad v)?> then\n        set [yv v] to [20]\n    end\n    change y by (1)\n    if <key (r v) pressed?> then\n        reset\n    end\n    if <<(y position) < [-177]> or <touching (spikes v)?>> then\n        reset\n    end\n    if <<(y position) < [-177]> or <touching (lava v)?>> then\n        reset\n    end\n    if <(x position) > [230]> then\n        change [level v] by (1)\n        broadcast (Next level! v)\n        reset\n    end\n    if <touching (teleporter v)?> then\n        go to x: (3) y: (35)\n    end\n    if <touching (teleporter2 v)?> then\n        go to x: (65) y: (-92)\n    end\n    if <touching (teleporter3 v)?> then\n        go to x: (222) y: (-83)\n    end\n    if <touching (boss 2 dmg attack v)?> then\n        reset\n    end\n    if <touching (3rd boss weapon 1 v)?> then\n        reset\n    end\n    if <touching (3rd boss weapon 2 v)?> then\n        reset\n    end\n    if <touching (water blow upper v)?> then\n        reset\n    end\n    if <touching (water blow upper2 v)?> then\n        reset\n    end\n    if <touching (water blow upper3 v)?> then\n        reset\n    end\n    if <touching (4th boss dmg attack v)?> then\n        reset\n    end\nend\n\nwhen I receive [mainy boi's place v]\ngo to x: (-200) y: (-100)\n\n@Spikes\n\nwhen flag clicked\nhide\nswitch costume to (costume2 v)\n\nwhen I receive [next level! v]\nshow\nnext costume\n\n@Lava\n\nwhen I receive [next level! v]\nshow\nnext costume\nif <(costume [name v]) = [water blow up thingy]> then\n    broadcast (water blow up BOOOOOOOM! v)\nend\nif <(costume [name v]) = [water blow up thingy 2]> then\n    broadcast (water blow up BOOOOOOOOOM!! 2 v)\nend\nif <(costume [name v]) = [water blow up thingy 3]> then\n    broadcast (water blow up BOOOOOOM!!! 3 v)\nend\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\ngo to [front v] layer\ngo [backward v] (1) layers\n\n@Platform\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [start v]\nshow\nswitch costume to (costume1 v)\n\nwhen I receive [next level! v]\nnext costume\n\n@Teleporter\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\n\nwhen I receive [next level! v]\nshow\nnext costume\n\n@Teleporter2\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\n\nwhen I receive [next level! v]\nshow\nnext costume\n\n@Teleporter3\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\n\nwhen I receive [next level! v]\nshow\nnext costume\n\n@boss 2 dmg attack\n\nwhen flag clicked\nswitch costume to (costume2 v)\nhide\ngo to x: (9) y: (30)\nif <(backdrop [name v]) = [Background for thumbnail]> then\n    go to x: (9) y: (30)\nend\nforever\n    if <(costume [name v]) = [boss 2 dmg attack]> then\n        repeat until <(backdrop [name v]) = [Background for thumbnail]>\n            wait (1) seconds\n            glide (0.1) secs to x: (232) y: (58)\n            glide (0.1) secs to x: (9) y: (30)\n            glide (0.1) secs to x: (301) y: (-73)\n            glide (0.1) secs to x: (9) y: (30)\n            glide (0.1) secs to x: (232) y: (-182)\n            glide (0.1) secs to x: (9) y: (30)\n            glide (0.1) secs to x: (7) y: (-182)\n            glide (0.1) secs to x: (9) y: (30)\n            glide (0.1) secs to x: (148) y: (-191)\n            glide (0.1) secs to x: (9) y: (30)\n            glide (0.1) secs to x: (57) y: (-194)\n            glide (0.1) secs to x: (9) y: (30)\n            glide (0.1) secs to x: (-114) y: (-180)\n            glide (0.1) secs to x: (9) y: (30)\n            glide (0.1) secs to x: (-120) y: (-107)\n            glide (0.1) secs to x: (9) y: (30)\n            glide (0.1) secs to x: (-120) y: (-31)\n            glide (0.1) secs to x: (9) y: (30)\n            glide (0.1) secs to x: (-96) y: (73)\n            glide (0.1) secs to x: (9) y: (30)\n            glide (0.1) secs to x: (13) y: (85)\n            glide (0.1) secs to x: (9) y: (30)\n            glide (0.1) secs to x: (179) y: (60)\n            glide (0.1) secs to x: (9) y: (30)\n            wait (2) seconds\n        end\n    end\nend\n\nwhen I receive [next level! v]\nnext costume\nshow\n\n@Intro\n\nwhen flag clicked\nshow\ngo to x: (-6) y: (4)\npoint in direction (90)\nforever\n    repeat (10)\n        turn left (2.5) degrees\n    end\n    repeat (10)\n        turn right (5) degrees\n    end\n    repeat (10)\n        turn left (5) degrees\n    end\n    repeat (10)\n        turn right (5) degrees\n    end\n    repeat (10)\n        turn left (5) degrees\n    end\n    repeat (10)\n        turn right (5) degrees\n    end\n    repeat (10)\n        turn left (5) degrees\n    end\n    repeat (10)\n        turn right (5) degrees\n    end\nend\n\nwhen flag clicked\nplay sound [Trap Beat v] until done\nbroadcast (start v)\n\nwhen I receive [start v]\nforever\n    play sound [Adventures - A Himitsu \(No Copyright Music\) v] until done\nend\n\nwhen I receive [start v]\nhide\n\n@3rd boss weapon 1\n\nwhen I receive [3rd boss v]\nforever\n    show\n    go to x: (91) y: (49)\n    set size to (150) %\n    glide (0.8) secs to x: (-74) y: (199)\nend\n\nwhen flag clicked\nif <(backdrop [name v]) = [underground 1]> then\n    forever\n        hide\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume2 v)\nhide\nif <(backdrop [name v]) = [3 boss lvl]> then\n    go to x: (36) y: (28)\n    show\nend\n\nwhen I receive [next level! v]\nshow\nnext costume\n\n@3rd boss weapon 2\n\nwhen I receive [3rd boss v]\nforever\n    show\n    go to x: (-34) y: (165)\n    set size to (150) %\n    glide (0.8) secs to x: (124) y: (255)\nend\n\nwhen flag clicked\nswitch costume to (costume2 v)\nhide\nif <(backdrop [name v]) = [3 boss lvl]> then\n    go to x: (2) y: (104)\n    show\nend\n\nwhen flag clicked\nif <(backdrop [name v]) = [underground 1]> then\n    forever\n        hide\n    end\nend\n\nwhen I receive [next level! v]\nshow\nnext costume\n\n@water blow upper\n\nwhen I receive [water blow up booooooom! v]\nshow\ngo to x: (40) y: (30)\nrepeat until <not <(backdrop [name v]) = [underground]>>\n    wait (3) seconds\n    switch costume to (heater v)\n    wait (1) seconds\n    switch costume to (costume1 v)\n    repeat (9)\n        wait (0.05) seconds\n        next costume\n    end\n    wait (1.5) seconds\n    switch costume to (noting v)\nend\n\nwhen flag clicked\nhide\ngo to [front v] layer\n\nwhen I receive [water blow up booooooooom!! 2 v]\nshow\ngo to x: (210) y: (30)\nrepeat until <not <(backdrop [name v]) = [underground3]>>\n    wait (3) seconds\n    switch costume to (heater v)\n    wait (1) seconds\n    switch costume to (costume1 v)\n    repeat (9)\n        wait (0.05) seconds\n        next costume\n    end\n    wait (1.5) seconds\n    switch costume to (noting v)\nend\n\nwhen I receive [water blow up boooooom!!! 3 v]\nshow\ngo to x: (172) y: (29)\nrepeat until <not <(backdrop [name v]) = [underground again again]>>\n    wait (3) seconds\n    switch costume to (heater v)\n    wait (1) seconds\n    switch costume to (costume1 v)\n    repeat (9)\n        wait (0.05) seconds\n        next costume\n    end\n    wait (1.5) seconds\n    switch costume to (noting v)\nend\n\nwhen backdrop switches to [underground 6 v]\nhide\n\nwhen backdrop switches to [underground2 v]\nhide\n\nwhen backdrop switches to [underground again v]\nhide\n\n@water blow upper2\n\nwhen flag clicked\nhide\ngo to [front v] layer\n\nwhen I receive [water blow up boooooom!!! 3 v]\ngo to x: (53) y: (30)\nshow\nrepeat until <not <(backdrop [name v]) = [underground again again]>>\n    wait (3) seconds\n    switch costume to (heater v)\n    wait (1) seconds\n    switch costume to (costume1 v)\n    repeat (9)\n        wait (0.05) seconds\n        next costume\n    end\n    wait (1.5) seconds\n    switch costume to (noting v)\nend\n\nwhen backdrop switches to [underground 6 v]\nhide\n\n@water blow upper3\n\nwhen flag clicked\nhide\ngo to [front v] layer\n\nwhen I receive [water blow up boooooom!!! 3 v]\ngo to x: (297) y: (30)\nshow\nrepeat until <not <(backdrop [name v]) = [underground again again]>>\n    wait (3) seconds\n    switch costume to (heater v)\n    wait (1) seconds\n    switch costume to (costume1 v)\n    repeat (9)\n        wait (0.05) seconds\n        next costume\n    end\n    wait (1.5) seconds\n    switch costume to (noting v)\nend\n\nwhen backdrop switches to [underground 6 v]\nhide\n\n@4th boss dmg attack\n\nwhen flag clicked\nhide\nif <(backdrop [name v]) = [fourth boss lvl]> then\n    go to x: (36) y: (28)\n    show\nend\n\nwhen I receive [4th boss v]\nforever\n    switch costume to (noting v)\n    wait (2) seconds\n    switch costume to (dmg v)\n    wait (0.5) seconds\nend\n\nwhen I receive [next level! v]\nshow\nswitch costume to (noting v)\nnext costume\n\nwhen flag clicked\nif <(backdrop [name v]) = [another one]> then\n    hide\nend\n\n@Skip\n\nwhen flag clicked\nhide\ngo to x: (-378) y: (-276)\n\nwhen I receive [start v]\nshow\ngo to [front v] layer\n\nwhen this sprite clicked\nbroadcast (Next level! v)\nbroadcast (Mainy Boi's Place v)\n\nwhen I receive [next level! v]\nwait (0.05) seconds\nif <(backdrop [name v]) = [another one]> then\n    hide\nend\n\n