together - a platformer 

Instructions: +++++++Together - a platformer+++++++++\nyou control both cubes at the same time\nWASD or arrow keys to move\nyou must get both cubes to the other side to progress\nspikes hurt you\nbounce pads make you jump higher\npress o to skip the level\n\n\n\nNote: this is supposed to be a short platformer

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\n@player\n\nwhen flag clicked\nset [level v] to [1]\n\nwhen I receive [levelup v]\nshow\n\nif <[230] < (x position)> then\n    broadcast (message1 v)\n    go to x: (-185) y: (-40)\n    change [pdone v] by (1)\n    if <(pdone) = [2]> then\n        show\n        change [level v] by (1)\n        broadcast (levelup v)\n        set [pdone v] to [0]\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(pdone) = [2]> then\n        go to x: (-185) y: (-40)\n        show\n        change [level v] by (1)\n        set [pdone v] to [0]\n    end\nend\n\nwhen [o v] key pressed\ngo to x: (-185) y: (-40)\nshow\n\nwhen flag clicked\ngo to x: (-185) y: (-40)\n\nwhen flag clicked\nshow\nset [pdone v] to [0]\nforever\n    if <[230] < (x position)> then\n        broadcast (message1 v)\n        go to x: (-185) y: (-40)\n        change [pdone v] by (1)\n        if <(pdone) = [2]> then\n            show\n            change [level v] by (1)\n            broadcast (levelup v)\n            set [pdone v] to [0]\n        else\n            hide\n            go to x: (-185) y: (-40)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<<touching (obsticles v)?> or <touching (obsticles2 v)?>> or <touching (obsticles3 v)?>> or <touching (obsticles4 v)?>> then\n        go to x: (-185) y: (-40)\n    end\n    if <touching (bouncer v)?> then\n        set [speed y v] to [25]\n    end\nend\n\ndefine TOUCHing ground <up>\nchange [flying? v] by (1)\nrepeat until <not <touching (levels v)?>>\n    if <up> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [flying? v] to [0]\n    end\n    set [speed y v] to [0]\nend\n\ndefine walk (speed)\nchange x by (speed)\nset [ope v] to [0]\nrepeat until <<(ope) = [8]> or <not <touching (levels v)?>>>\n    change [ope v] by (1)\n    change y by (1)\nend\nif <(ope) = [8]> then\n    change x by ((0) - (speed))\n    change y by ((0) - (ope))\n    if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> and <([abs v] of (speed) ) > [3]>> then\n        if <(wall jump) = [0]> then\n            set [speed x v] to ((-1.2) * (speed))\n            set [speed y v] to [11]\n            set [flying? v] to [6]\n            set [wall jump v] to [15]\n        end\n    else\n        set [speed x v] to [0]\n    end\nend\n\nwhen flag clicked\n\nwhen flag clicked\nset [speed y v] to [0]\nforever\n    change [speed y v] by (-1)\n    change y by (speeD Y)\n    TOUCHing ground <[0] < (speeD Y)>\nend\n\nwhen flag clicked\nforever\n    if <(wall jump) > [0]> then\n        change [wall jump v] by (-1)\n    else\n        set [speed x v] to ((speed X) * (0.7))\n        if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n            change [speed x v] by (-1.5)\n        end\n        if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n            change [speed x v] by (1.5)\n        end\n    end\n    if <(speed X) < [-0.5]> then\n        point in direction (-90)\n    else\n        if <[0.5] < (speed X)> then\n            point in direction (90)\n        end\n    end\nend\n\nwhen flag clicked\nchange [speed y v] by (-1)\npoint in direction (-90)\nchange y by (speeD Y)\nswitch costume to (hitbox v)\nforever\n    if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n        walk [-7]\n    end\n    if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n        walk [7]\n    end\n    if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> and <(flying?) < [3]>> then\n        set [speed y v] to [13]\n    end\n    if <(y position) < [-180]> then\n        go to x: (-185) y: (-40)\n        set [speed y v] to [0]\n    end\n    switch costume to (costume1 v)\nend\n\nwhen flag clicked\nforever\n    play sound [thefatrat-jackpot-jackpot-ep-track-1-youtubemp3free v] until done\nend\n\n@Levels\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [levelup v]\nnext costume\n\nwhen [o v] key pressed\nnext costume\nchange [level v] by (1)\n\n@player2\n\nwhen I receive [levelup v]\nshow\n\nwhen flag clicked\nforever\n    if <(pdone) = [2]> then\n        show\n        go to x: (-185) y: (100)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#ff0000)?> then\n        go to x: (-185) y: (100)\n    end\nend\n\nwhen [o v] key pressed\ngo to x: (-185) y: (100)\nshow\n\nwhen flag clicked\ngo to x: (-185) y: (100)\n\nwhen flag clicked\nshow\nforever\n    if <[230] < (x position)> then\n        broadcast (message1 v)\n        go to x: (-185) y: (100)\n        change [pdone v] by (1)\n        if <(pdone) = [2]> then\n            show\n            broadcast (levelup v)\n            change [level v] by (0)\n        else\n            hide\n            go to x: (-185) y: (100)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<<touching (obsticles v)?> or <touching (obsticles2 v)?>> or <touching (obsticles3 v)?>> or <touching (obsticles4 v)?>> then\n        go to x: (-185) y: (100)\n    end\n    if <touching (bouncer v)?> then\n        set [up v] to [25]\n    end\nend\n\ndefine TOUCHing ground <up>\nchange [falling v] by (1)\nrepeat until <not <touching (levels v)?>>\n    if <up> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [falling v] to [0]\n    end\n    set [up v] to [0]\nend\n\ndefine walk (speed)\nchange x by (speed)\nset [sloo v] to [0]\nrepeat until <<(sloo) = [8]> or <not <touching (levels v)?>>>\n    change [sloo v] by (1)\n    change y by (1)\nend\nif <(sloo) = [8]> then\n    change x by ((0) - (speed))\n    change y by ((0) - (sloo))\n    if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> and <([abs v] of (speed) ) > [3]>> then\n        if <(jump wall) = [0]> then\n            set [move v] to ((-1.2) * (speed))\n            set [up v] to [11]\n            set [falling v] to [6]\n            set [jump wall v] to [15]\n        end\n    else\n        set [move v] to [0]\n    end\nend\n\nwhen flag clicked\n\nwhen flag clicked\nset [up v] to [0]\nforever\n    change [up v] by (-1)\n    change y by (up)\n    TOUCHing ground <[0] < (up)>\nend\n\nwhen flag clicked\nforever\n    if <(jump wall) > [0]> then\n        change [wall jump v] by (-1)\n    else\n        set [move v] to ((move) * (0.7))\n        if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n            change [move v] by (-1.5)\n        end\n        if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n            change [move v] by (1.5)\n        end\n    end\n    if <(move) < [-0.5]> then\n        point in direction (-90)\n    else\n        if <[0.5] < (move)> then\n            point in direction (90)\n        end\n    end\nend\n\nwhen flag clicked\nchange [up v] by (-1)\npoint in direction (-90)\nchange y by (up)\nswitch costume to (hitbox v)\nforever\n    if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n        walk [-7]\n    end\n    if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n        walk [7]\n    end\n    if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> and <(falling) < [3]>> then\n        set [up v] to [13]\n    end\n    if <(y position) < [-180]> then\n        go to x: (-185) y: (100)\n        set [up v] to [0]\n    end\n    switch costume to (costume1 v)\nend\n\nwhen flag clicked\nforever\n\n@obsticles\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [levelup v]\nnext costume\n\nwhen [o v] key pressed\nnext costume\n\n@thumbnail\n\nwhen flag clicked\ngo to x: (36) y: (28)\nforever\n    show\n    set [ghost v] effect to (100)\n    go to [front v] layer\nend\n\n@bouncer\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\n\nwhen I receive [levelup v]\nnext costume\n\nwhen [o v] key pressed\nnext costume\n\n