A normal platformer

Instructions: Use WASD to move up arrow to jump and red kills you.Don't go under the moving platformer you will get squished.

@Stage\n\nwhen flag clicked\nforever\n    set volume to (18) %\n    play sound [Dance Magic v] until done\nend\n\nwait (0.0) seconds\n\n@Sprite1\n\nwhen I receive [start level v]\nstop [other scripts in sprite v]\nif <(level) = [6]> then\n    show\nelse\n    hide\nend\nmove platform\n\ndefine move platform\ngo to x: (27) y: (94)\nforever\n    glide (1) secs to x: (27) y: (34)\n    glide (1) secs to x: (24) y: (156)\nend\n\nwhen flag clicked\nhide\n\n@Sprite2\n\ndefine move platform\ngo to x: (36) y: (28)\nforever\n    glide (1) secs to x: (33) y: (135)\n    glide (1) secs to x: (27) y: (23)\nend\n\nwhen I receive [start level v]\nstop [other scripts in sprite v]\nif <(level) = [7]> then\n    show\nelse\n    hide\nend\nmove platform\n\nwhen flag clicked\nhide\n\n@your\n\nwhen I receive [start level v]\nset [jumping v] to [false]\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nforever\n    change [y velocity v] by (-1)\n    if <key (a v) pressed?> then\n        if <(x velocity) > [-10]> then\n            change [x velocity v] by (-2)\n        end\n        if <(costume [number v]) = [1]> then\n            switch costume to (costume2 v)\n        else\n            switch costume to (costume1 v)\n        end\n    end\n    if <key (d v) pressed?> then\n        if <(x velocity) < [10]> then\n            change [x velocity v] by (2)\n            if <(costume [number v]) = [3]> then\n                switch costume to (costume4 v)\n            else\n                switch costume to (costume3 v)\n            end\n        end\n    end\n    if <(x velocity) > [0]> then\n        change [x velocity v] by (-1)\n    end\n    if <(x velocity) < [0]> then\n        change [x velocity v] by (1)\n    end\n    change x by (x velocity)\n    move vertical\n    move horizontal\n    if <touching color (#bb7600)?> then\n        broadcast (next level v)\n    end\n    if <<(y position) < [-179]> or <touching color (#ff0000)?>> then\n        broadcast (start level v)\n    end\nend\n\nwhen flag clicked\nset [level v] to [1]\nbroadcast (start level v)\n\ndefine move horizontal\nif <touching color (#04de00)?> then\n    if <(x velocity) > [0]> then\n        repeat until <not <touching color (#04de00)?>>\n            change x by (-2)\n        end\n    else\n        repeat until <not <touching color (#04de00)?>>\n            change x by (2)\n        end\n    end\n    set [x velocity v] to [0]\nend\n\ndefine move vertical\nchange y by (y velocity)\nif <touching color (#04de00)?> then\n    if <(y velocity) > [0]> then\n        repeat until <not <touching color (#04de00)?>>\n            change y by (-1)\n        end\n    else\n        repeat until <not <touching color (#04de00)?>>\n            change y by (1)\n        end\n        set [jumping v] to [false]\n    end\nend\n\nwhen [w v] key pressed\nif <(jumping) = [false]> then\n    set [y velocity v] to [11]\n    set [jumping v] to [true]\nend\n\nwhen I receive [next level v]\nchange [level v] by (1)\nstop [other scripts in sprite v]\nbroadcast (start level v)\n\nwhen I receive [start level v]\nif <(level) = [1]> then\n    show\n    go to x: (-166) y: (-96)\n    switch backdrop to (backdrop1 v)\nend\nif <(level) = [2]> then\n    go to x: (198) y: (-130)\n    switch backdrop to (backdrop2 v)\nend\nif <(level) = [3]> then\n    go to x: (206) y: (-138)\n    switch backdrop to (backdrop3 v)\nend\nif <(level) = [4]> then\n    go to x: (210) y: (-139)\n    switch backdrop to (backdrop4 v)\nend\nif <(level) = [5]> then\n    go to x: (202) y: (-139)\n    switch backdrop to (backdrop5 v)\nend\nif <(level) = [6]> then\n    go to x: (210) y: (-139)\n    switch backdrop to (backdrop6 v)\nend\nif <(level) = [7]> then\n    go to x: (202) y: (-137)\n    switch backdrop to (backdrop7 v)\nend\nif <(level) = [8]> then\n    go to x: (202) y: (-137)\n    switch backdrop to (backdrop8 v)\nend\nif <(level) = [9]> then\n    go to x: (202) y: (-137)\n    switch backdrop to (backdrop9 v)\nend\n\nwhen flag clicked\nforever\n    change [y velocity v] by (-1)\n    if <key (left arrow v) pressed?> then\n        if <(x velocity) > [-10]> then\n            change [x velocity v] by (-2)\n        end\n        if <(costume [number v]) = [1]> then\n            switch costume to (costume2 v)\n        else\n            switch costume to (costume1 v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    change [y velocity v] by (1)\n    if <key (right arrow v) pressed?> then\n        if <(x velocity) < [10]> then\n            change [x velocity v] by (2)\n            if <(costume [number v]) = [3]> then\n                switch costume to (costume4 v)\n            else\n                switch costume to (costume3 v)\n            end\n        end\n    end\nend\n\n