Avengers platformer

Instructions: Use arrow keys to move. Red is bad, try to save the world from Ultron!! Goodluck!!!

@Stage\n\nwhen I receive [move on v]\nforever\n    if <(level) = [16]> then\n        switch backdrop to (backdrop1 v)\n    end\n    if <(level) = [17]> then\n        switch backdrop to (backdrop15 v)\n    end\nend\n\nwhen I receive [start screen v]\nset volume to (100) %\nswitch backdrop to (backdrop1 v)\nplay sound [479319_-Electroman-adventures- v] until done\n\nwhen I receive [start game v]\nrepeat (30)\n    change volume by (-10)\nend\nstop [other scripts in sprite v]\nforever\n    if <(level) = [1]> then\n        switch backdrop to (backdrop2 v)\n    end\n    if <(level) = [2]> then\n        switch backdrop to (backdrop3 v)\n    end\n    if <(level) = [3]> then\n        switch backdrop to (backdrop4 v)\n    end\n    if <(level) = [4]> then\n        switch backdrop to (backdrop5 v)\n    end\n    if <(level) = [5]> then\n        switch backdrop to (backdrop6 v)\n    end\n    if <(level) = [6]> then\n        switch backdrop to (backdrop7 v)\n    end\n    if <(level) = [7]> then\n        switch backdrop to (backdrop8 v)\n    end\n    if <(level) = [8]> then\n        switch backdrop to (backdrop9 v)\n    end\n    if <(level) = [8]> then\n        switch backdrop to (backdrop11 v)\n    end\n    if <(level) = [9]> then\n        switch backdrop to (backdrop10 v)\n    end\n    if <(level) = [10]> then\n        switch backdrop to (backdrop12 v)\n    end\n    if <(level) = [14]> then\n        switch backdrop to (backdrop13 v)\n    end\n    if <(level) = [15]> then\n        switch backdrop to (backdrop12 v)\n        broadcast (boss fight v)\n        stop [this script v]\n    end\nend\n\n@Player\n\nwhen I receive [boss fight failed v]\ngo to x: (-198) y: (-126)\n\nwhen I receive [left v]\nswitch costume to ((costume [number v]) - (1))\n\nwhen I receive [start game v]\nwait (5) seconds\nstart sound [267779_Sonik_Boom_Final_Master v]\nset volume to (100) %\n\nwhen I receive [next level v]\ngo to x: (-198) y: (-126)\nchange [level v] by (1)\n\nwhen I receive [start game v]\ngo to x: (-198) y: (-126)\nset size to (400) %\nforever\n    go to [front v] layer\n    if <key (left arrow v) pressed?> then\n        change [xvel v] by (-1)\n    end\n    if <key (right arrow v) pressed?> then\n        change [xvel v] by (1)\n    end\n    set [xvel v] to ((Xvel) * (0.9))\n    change x by (Xvel)\n    if <touching (ground v)?> then\n        change y by (1)\n        if <touching (ground v)?> then\n            change y by (1)\n            if <touching (ground v)?> then\n                change y by (1)\n                if <touching (ground v)?> then\n                    change y by (1)\n                    if <touching (ground v)?> then\n                        change y by (1)\n                        if <touching (ground v)?> then\n                            change y by (1)\n                            if <touching (ground v)?> then\n                                change y by (1)\n                                if <touching (ground v)?> then\n                                    change x by ((Xvel) * (-1))\n                                    change y by (-7)\n                                    if <key (up arrow v) pressed?> then\n                                        if <(Xvel) > [0]> then\n                                            set [xvel v] to [-5]\n                                        else\n                                            set [xvel v] to [5]\n                                        end\n                                        set [yvel v] to [10]\n                                    else\n                                        set [xvel v] to [0]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yvel v] by (-1)\n    change y by (Yvel)\n    if <touching (ground v)?> then\n        change y by ((Yvel) * (-1))\n        set [yvel v] to [0]\n    end\n    change y by (-1)\n    if <touching (ground v)?> then\n        if <key (up arrow v) pressed?> then\n            set [yvel v] to [15]\n        end\n    end\n    change y by (1)\nend\n\nwhen I receive [right v]\nnext costume\n\nwhen flag clicked\ngo to [back v] layer\nswitch costume to (costume1 v)\ngo to x: (0) y: (-60)\nset size to (500) %\nforever\n    if <touching color (#ff0000)?> then\n        go to x: (-198) y: (-126)\n    end\nend\n\n@Ground\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    switch costume to (level)\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\ngo to [back v] layer\n\n@Arrow right\n\nwhen this sprite clicked\nbroadcast (right v)\nwait (.5) seconds\n\nwhen I receive [start game v]\nhide\n\nwhen flag clicked\ngo to x: (49) y: (-61)\nshow\n\n@Title\n\nwhen flag clicked\nforever\n    set size to (100) %\n    go to x: (0) y: (96)\n    show\n    clear graphic effects\n    set [ghost v] effect to (0)\n    forever\n        change y by ([cos v] of ((p) / (1)) )\n        change [p v] by (5)\n    end\nend\n\nwhen I receive [start game v]\nstop [other scripts in sprite v]\nhide\n\n@Arrow right2\n\nwhen this sprite clicked\nbroadcast (left v)\nwait (.5) seconds\n\nwhen I receive [start game v]\nhide\n\nwhen flag clicked\ngo to x: (-55) y: (-61)\nshow\n\n@play\n\nwhen this sprite clicked\nbroadcast (start game v)\n\nwhen flag clicked\nshow\ngo to x: (14) y: (34)\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 I receive [start game v]\nhide\n\n@next\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\nforever\n    if <touching (player v)?> then\n        broadcast (next level v)\n    end\n    if <(level) = [17]> then\n        hide\n    end\nend\n\nwhen I receive [boss fight v]\nhide\n\nwhen I receive [move on v]\nshow\nswitch backdrop to (backdrop14 v)\n\nwhen I receive [start game v]\nshow\n\n@lava\n\nwhen flag clicked\nhide\n\nforever\n    if <(level) = [3]> then\n        show\n        switch costume to (costume1 v)\n        go to x: (-14) y: (-66)\n    end\n    if <(level) = [4]> then\n        show\n        switch costume to (costume2 v)\n        go to x: (10) y: (-66)\n    end\n    if <(level) = [5]> then\n        show\n        switch costume to (costume3 v)\n        go to x: (10) y: (-68)\n    end\n    if <(level) = [6]> then\n        show\n        switch costume to (costume4 v)\n        go to x: (0) y: (-55)\n    end\n    if <(level) = [7]> then\n        hide\n    end\n    if <(level) = [10]> then\n        show\n        switch costume to (costume1 v)\n        go to x: (-22) y: (-66)\n    end\n    if <(level) = [11]> then\n        show\n        switch costume to (costume4 v)\n        go to x: (-120) y: (-48)\n    end\n    if <(level) = [12]> then\n        show\n        switch costume to (costume2 v)\n        go to x: (29) y: (-55)\n    end\n    if <(level) = [13]> then\n        show\n        switch costume to (costume3 v)\n        go to x: (-68) y: (-66)\n    end\n    if <(level) = [14]> then\n        hide\n    end\nend\n\n@laser\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\ngo to [back v] layer\nhide\nwait until <(level) = [8]>\nshow\nrepeat until <(level) = [9]>\n    switch costume to (costume1 v)\n    wait (1) seconds\n    switch costume to (costume2 v)\n    wait (1) seconds\nend\n\nwhen flag clicked\nforever\n    if <(level) = [9]> then\n        hide\n    end\nend\n\n@Dark Cube\n\nwhen flag clicked\nset [ghost v] effect to (0)\nhide\n\nwhen I receive [boss fight v]\nswitch costume to (costume1 v)\nshow\nset size to (400) %\ngo to x: (74) y: (-125)\nsay [Hello I see that you escaped before I could take over] for (3) seconds\nsay [But today you will not I will destroy you and this city will be MINE!] for (4) seconds\nbroadcast (ring #1 v)\nwait (1) seconds\nsay [You see this ring! It will destroy you!!!!!!!!!!!!] for (3) seconds\n\nbroadcast (boss fight v)\n\nwhen I receive [ring #2 v]\nsay [owww!!!!!!!!!!!!!!] for (2) seconds\nsay [take this] for (2) seconds\n\nwhen I receive [boss fight failed v]\nwait (1) seconds\nbroadcast (ring #1 v)\nwait (1) seconds\nsay [You see this ring! It will destroy you!!!!!!!!!!!!] for (3) seconds\n\nwhen I receive [ring #3 v]\nstop [other scripts in sprite v]\nsay [owww!!!!!!!!!!!!!!] for (2) seconds\nsay [YARRRRRRGHHHHHH!!!!!!] for (2) seconds\nsay [This one is sure to destroy you] for (2) seconds\nswitch costume to (costume2 v)\n\nsay [take this] for (2) seconds\n\nwhen I receive [no too much v]\nsay [no I-I-I can't hold this it is too-too-too much] for (3) seconds\nwait (1.5) seconds\nsay [noooo!!!!!!] for (2) seconds\nrepeat (100)\n    change [ghost v] effect by (1)\nend\nbroadcast (move on v)\n\n@Fire ring\n\nwhen I receive [ring #1 v]\nset size to (100) %\npoint in direction (90)\nshow\ngo to x: (79) y: (-54)\nwait (6) seconds\npoint in direction (-30)\nforever\n    repeat until <touching (_edge_ v)?>\n        move (10) steps\n    end\n    point towards (player v)\nend\n\nwhen flag clicked\nhide\nset size to (100) %\n\nwhen I receive [boss fight v]\nhide\n\nwhen I receive [ring #1 v]\nforever\n    if on edge, bounce\n    if <touching (player v)?> then\n        stop [other scripts in sprite v]\n        broadcast (boss fight failed v)\n        hide\n        stop [this script v]\n    end\n    if <touching (dark cube v)?> then\n        stop [other scripts in sprite v]\n        broadcast (ring #2 v)\n        hide\n        stop [this script v]\n    end\nend\n\nhide\n\nrepeat (25)\n\nwhen I receive [ring #2 v]\ncreate clone of (_myself_ v)\nwait (3) seconds\nset size to (50) %\npoint in direction (90)\nshow\ngo to x: (31) y: (-79)\nwait (4) seconds\npoint in direction (-30)\nforever\n    repeat until <touching (_edge_ v)?>\n        move (10) steps\n    end\n    point towards (player v)\nend\n\nwhen I start as a clone\nwait (3) seconds\nset size to (50) %\npoint in direction (90)\nshow\ngo to x: (133) y: (-79)\nwait (4) seconds\npoint in direction (30)\nforever\n    repeat until <touching (_edge_ v)?>\n        move (10) steps\n    end\n    point towards (player v)\nend\n\nwhen I receive [ring #2 v]\nforever\n    if on edge, bounce\n    if <touching (player v)?> then\n        stop [other scripts in sprite v]\n        broadcast (boss fight failed v)\n        hide\n        stop [this script v]\n    end\n    if <touching (dark cube v)?> then\n        stop [other scripts in sprite v]\n        broadcast (ring #3 v)\n        hide\n        stop [this script v]\n    end\nend\n\nwhen I start as a clone\nforever\n    if on edge, bounce\n    if <touching (player v)?> then\n        stop [other scripts in sprite v]\n        broadcast (boss fight failed v)\n        hide\n        delete this clone\n    end\n    if <touching (dark cube v)?> then\n        stop [other scripts in sprite v]\n        broadcast (ring #3 v)\n        delete this clone\n    end\nend\n\nstop [this script v]\n\nhide\n\nstop [this script v]\n\nwhen I receive [ring #3 v]\nhide\n\nwhen I receive [ring #3 v]\ndelete this clone\n\nwhen I receive [ring #3 v]\nstop [other scripts in sprite v]\nwait (5) seconds\nset size to (100) %\nshow\ngo to x: (72) y: (-64)\nglide (1) secs to x: (73) y: (126)\nbroadcast (NO too much v)\nwait (4) seconds\nglide (.2) secs to x: (75) y: (-109)\nhide\n\n@thumbnail\n\nwhen flag clicked\nhide\n\nshow\ngo to x: (0) y: (0)\ngo to [front v] layer\n\n