Platformer (Test)

Instructions: This is a platformer base.

@Stage\n\nwhen flag clicked\nswitch backdrop to (1 v)\n\n@character\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset [dead character v] to [0]\nhide variable [dead character v]\ngo to x: (-222) y: (-80)\nset [x v] to [0]\nset [y v] to [0]\nshow\nshow variable [dead character v]\nforever\n    if <key (right arrow v) pressed?> then\n        switch costume to (costume1 v)\n        change [x v] by (1)\n    end\n    if <key (left arrow v) pressed?> then\n        switch costume to (costume1 v)\n        change [x v] by (-1)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching color (#1d7100)?> then\n        change y by (1)\n        if <touching color (#1d7100)?> then\n            change y by (1)\n            if <touching color (#1d7100)?> then\n                change y by (1)\n                if <touching color (#1d7100)?> then\n                    change y by (1)\n                    if <touching color (#1d7100)?> then\n                        change y by (1)\n                        change x by ((x) * (-1))\n                        if <key (up arrow v) pressed?> then\n                            if <(x) > [0]> then\n                                set [x v] to [-5]\n                            else\n                                set [x v] to [5]\n                            end\n                            set [y v] to [10]\n                        else\n                            set [x v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y v] by (-1)\n    change y by (y)\n    if <touching color (#1d7100)?> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#1d7100)?> then\n        if <key (up arrow v) pressed?> then\n            set [y v] to [15]\n        end\n    end\n    change y by (1)\n    if <touching (lava v)?> then\n        change [dead character v] by (1)\n        go to x: (-184) y: (-40.8799)\n    else\n        if <touching (spike v)?> then\n            change [dead character v] by (1)\n            go to x: (-184) y: (-40.8799)\n        end\n    end\n    if <touching (exit portal v)?> then\n        go to x: (-224) y: (-79)\n        next backdrop\n    end\n    if <key (r v) pressed?> then\n        go to x: (-184) y: (-40.8799)\n    end\n    if <touching (jump v)?> then\n        set [y v] to [22]\n    end\nend\n\nwhen backdrop switches to [1 v]\nhide\nwait (1) seconds\nshow\ngo to x: (-220) y: (-73)\n\nwhen flag clicked\nshow\n\nwhen backdrop switches to [end v]\nhide\n\n@Lava\n\nwhen backdrop switches to [3 v]\ngo to x: (88) y: (-31)\nswitch costume to (costume1 v)\nshow\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen backdrop switches to [4 v]\ngo to x: (17) y: (0)\nswitch costume to (costume2 v)\n\nwhen backdrop switches to [5 v]\nhide\n\nwhen backdrop switches to [end v]\nhide\n\n@Exit portal\n\nwhen backdrop switches to [end v]\nhide\n\nwhen flag clicked\nshow\n\n@Jump\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [4 v]\ngo to x: (-139) y: (-28)\nshow\n\nwhen backdrop switches to [5 v]\nhide\n\nwhen flag clicked\nforever\n    if <touching (sprite1 v)?> then\n        go to x: (x position) y: (-27)\n    end\nend\n\nwhen backdrop switches to [end v]\nhide\n\n@Spike\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [5 v]\nshow\ngo to x: (-58) y: (-51)\n\nwhen backdrop switches to [end v]\nhide\n\n@Sprite1\n\nwhen flag clicked\nshow\nwait (1) seconds\nhide\n\n