2 Player Platformer

Instructions: Click the green flag a million times\nThis is a 2 player platformer\nThere are 8 levels EVERY LEVEL IS POSSIBLE\nPlayer 1 controls WASD\nPlayer 2 controls Arrow keys\nThe first to level 8 wins

@Stage\n\n@P1\n\nwhen flag clicked\ngo to x: (-325) y: (-30)\nset [x1 v] to [0]\nset [y1 v] to [0]\nshow\nforever\n    if <key (d v) pressed?> then\n        change [x1 v] by (.8)\n    end\n    if <key (a v) pressed?> then\n        change [x1 v] by (-.8)\n    end\n    change x by (X1)\n    set [x1 v] to ((X1) * (0.9))\n    if <touching (sprite2 v)?> then\n        change y by (0.5)\n        if <touching (sprite2 v)?> then\n            change y by (0.5)\n            if <touching (sprite2 v)?> then\n                change y by (0.5)\n                if <touching (sprite2 v)?> then\n                    change y by (0.5)\n                    if <touching (sprite2 v)?> then\n                        change y by (0.5)\n                        if <touching (sprite2 v)?> then\n                            change y by (0.5)\n                            if <touching (sprite2 v)?> then\n                                change y by (0.5)\n                                if <touching (sprite2 v)?> then\n                                    change y by (0.5)\n                                    if <key (w v) pressed?> then\n                                        if <[0] < (X1)> then\n                                            set [x1 v] to [-7]\n                                        else\n                                            set [x1 v] to [7]\n                                        end\n                                        set [y1 v] to [10]\n                                    else\n                                        set [x1 v] to ((X1) * (-1.3))\n                                        change x by (X1)\n                                        set [x1 v] to [0]\n                                        change x by ((X1) / (5))\n                                    end\n                                    change y by (-4)\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y1 v] by (-0.5)\n    change y by (Y1)\n    if <touching (sprite2 v)?> then\n        set [y1 v] to ((Y1) * (-0.25))\n        change y by (Y1)\n        if <touching (sprite2 v)?> then\n            change y by (Y1)\n            if <touching (sprite2 v)?> then\n                change y by (Y1)\n                if <touching (sprite2 v)?> then\n                    change y by (Y1)\n                end\n            end\n        end\n    end\n    change y by (-1)\n    if <<key (w v) pressed?> and <touching (sprite2 v)?>> then\n        set [y1 v] to [11]\n    end\n    change y by (1)\n    if <(x position) > [120]> then\n        go to x: (-325) y: (-30)\n        change [p1l v] by (1)\n        broadcast (1 v)\n    end\nend\n\n@P2\n\nwhen flag clicked\ngo to x: (-325) y: (-200)\nset [x2 v] to [0]\nset [y2 v] to [0]\nshow\nforever\n    if <key (right arrow v) pressed?> then\n        change [x2 v] by (.8)\n    end\n    if <key (left arrow v) pressed?> then\n        change [x2 v] by (-.8)\n    end\n    change x by (X2)\n    set [x2 v] to ((X2) * (0.9))\n    if <touching (sprite2 v)?> then\n        change y by (0.5)\n        if <touching (sprite2 v)?> then\n            change y by (0.5)\n            if <touching (sprite2 v)?> then\n                change y by (0.5)\n                if <touching (sprite2 v)?> then\n                    change y by (0.5)\n                    if <touching (sprite2 v)?> then\n                        change y by (0.5)\n                        if <touching (sprite2 v)?> then\n                            change y by (0.5)\n                            if <touching (sprite2 v)?> then\n                                change y by (0.5)\n                                if <touching (sprite2 v)?> then\n                                    change y by (0.5)\n                                    if <key (w v) pressed?> then\n                                        if <[0] < (X2)> then\n                                            set [x2 v] to [-7]\n                                        else\n                                            set [x2 v] to [7]\n                                        end\n                                        set [y2 v] to [10]\n                                    else\n                                        set [x2 v] to ((X2) * (-1.3))\n                                        change x by (X2)\n                                        set [x2 v] to [0]\n                                        change x by ((X2) / (5))\n                                    end\n                                    change y by (-4)\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y2 v] by (-0.5)\n    change y by (Y2)\n    if <touching (sprite2 v)?> then\n        set [y2 v] to ((Y2) * (-0.25))\n        change y by (Y2)\n        if <touching (sprite2 v)?> then\n            change y by (Y2)\n            if <touching (sprite2 v)?> then\n                change y by (Y2)\n                if <touching (sprite2 v)?> then\n                    change y by (Y2)\n                end\n            end\n        end\n    end\n    change y by (-1)\n    if <<key (up arrow v) pressed?> and <touching (sprite2 v)?>> then\n        set [y2 v] to [11]\n    end\n    change y by (1)\n    if <(x position) > [130]> then\n        go to x: (-325) y: (-200)\n        change [p2l v] by (1)\n        broadcast (2 v)\n    end\nend\n\n@Sprite2\n\nwhen flag clicked\nset [p1l v] to [1]\nswitch costume to (1 v)\ngo to x: (30) y: (37)\ncreate clone of (_myself_ v)\nswitch backdrop to (backdrop1 v)\ngo to [back v] layer\nswitch costume to (1 v)\nforever\n    switch costume to (p1L)\nend\n\nwhen I start as a clone\nset [p2l v] to [1]\nswitch costume to (1 v)\ngo to x: (30) y: (-140)\nforever\n    switch costume to (p2L)\nend\n\n@N1\n\nwhen I receive [1 v]\nnext costume\ngo to x: (-270) y: (-106)\n\nwhen flag clicked\nswitch costume to (1 v)\ngo to x: (-270) y: (-106)\n\n@N2\n\nwhen I receive [2 v]\nnext costume\ngo to x: (-270) y: (-283)\n\nwhen flag clicked\nswitch costume to (1 v)\ngo to x: (-270) y: (-283)\n\n@Thumbnail\n\nwhen flag clicked\nshow\ngo to [front v] layer\nset [ghost v] effect to (0)\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\n@music\n\nwhen flag clicked\nforever\n    play sound [Instance v] until done\nend\n\n