Platformer
@Stage\n\n@Play\n\nwhen flag clicked\nshow\nset [# of deaths v] to [0]\nswitch backdrop to (backdrop1 v)\n\nwhen this sprite clicked\nhide\nbroadcast (go v)\n\n@Player\n\nwhen I receive [go v]\ngo to x: (-218) y: (65)\nset [level v] to [1]\nswitch costume to (player v)\nswitch backdrop to (backdrop2 v)\nshow\ngo to x: (-218) y: (65)\nhide variable [y v]\nhide variable [x v]\nset [y v] to [0]\nset [x v] to [0]\nforever\n    change [y v] by (-1)\n    if <key (left arrow v) pressed?> then\n        change [x v] by (-1)\n    end\n    if <key (right arrow v) pressed?> then\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 (#000000)?> then\n        change y by (1)\n    end\n    if <touching color (#000000)?> then\n        change y by (1)\n    end\n    if <touching color (#000000)?> then\n        change y by (1)\n    end\n    if <touching color (#000000)?> then\n        change y by (1)\n    end\n    if <touching color (#000000)?> then\n        change y by (-4)\n        change x by ((x) * (-1))\n        if <key (up arrow v) pressed?> then\n            set [y v] to [17]\n            if <([abs v] of (x) ) = (x)> then\n                set [x v] to [-10]\n            else\n                set [x v] to [10]\n            end\n        else\n            set [x v] to [0]\n        end\n    end\n    change y by (y)\n    if <touching color (#000000)?> then\n        change y by ((y) - ((y) * (2)))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<key (up arrow v) pressed?> and <touching color (#000000)?>> then\n        set [y v] to [15]\n    end\n    change y by (1)\n    if <<touching color (#ff0000)?> or <<touching color (#ff1b1b)?> or <touching color (#ff0a0a)?>>> then\n        change [# of deaths v] by (1)\n        go to x: (-218) y: (65)\n    end\n    if <touching color (#00ff55)?> then\n        change [level v] by (1)\n        switch backdrop to (next backdrop v)\n        go to x: (-218) y: (65)\n    end\nend\n\nwhen flag clicked\nswitch costume to (player v)\nforever\n    play sound [Epic Soundtrack Music \(instrumental\) - 1 Minute Originals.mp3 v] until done\nend\n\n
-Click the green flag and then click 'play'\n-Up arrow key to jump\n-Left and right arrow keys to move\n-Avoid red\n-Touch green to go to the next level