Mini Platformer (For Mobile Devices) (Mobile Platformer)

Instructions: Use your mouse and click to move.\nPress space for deaths and r to restart a level.\nI added an on-screen restart button!

@Stage\n\nwhen flag clicked\nwait until <(backdrop [number v]) = [14]>\nset [level v] to [21]\n\n@SMILEY\n\nwhen flag clicked\nset size to (100) %\nset drag mode [not draggable v]\nswitch costume to (costume1 v)\nhide variable [x v]\nhide variable [y v]\nset [x v] to [0]\nset [y v] to [0]\nset [level v] to [1]\nset [yy v] to [-1]\nset [xx v] to [1]\nset [v v] to [0]\nset [startpointx v] to [-200]\nset [startpointy v] to [-133]\nset [deaths v] to [0]\nhide variable [deaths v]\nhide variable [level v]\nswitch backdrop to (intro v)\nhide\nswitch backdrop to (backdrop1 v)\nshow variable [level v]\nshow\ngo to x: (startpointx) y: (startpointy)\nset [xv v] to [0]\nset [yv v] to [0]\nset [ehee v] to [0]\nforever\n    change [yv v] by (-1)\n    if <<(mouse x) > [100]> and <mouse down?>> then\n        change [xv v] by (3)\n    end\n    if <<[-100] > (mouse x)> and <mouse down?>> then\n        change [xv v] by (-3)\n    end\n    set [xv v] to ((Xv) * (0.7))\n    change x by (Xv)\n    if <touching color (#000008)?> then\n        change y by (1)\n        if <touching color (#000008)?> then\n            change y by (1)\n            if <touching color (#000008)?> then\n                change y by (1)\n                if <touching color (#000008)?> then\n                    change y by (1)\n                    if <touching color (#000008)?> then\n                        change y by (1)\n                        if <touching color (#000008)?> then\n                            change x by ((Xv) * (-1))\n                            change x by (-1)\n                            change y by (-5)\n                            change x by (1)\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (Yv)\n    if <touching color (#000008)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#000008)?> then\n        if <<[50] < (mouse y)> and <mouse down?>> then\n            start sound [jump v]\n            set [yv v] to [19]\n        end\n    end\n    change y by (1)\n    if <touching color (#ff0000)?> then\n        start sound [pop v]\n        change [deaths v] by (1)\n        go to x: (startpointx) y: (startpointy)\n        set [xv v] to [0]\n        set [yy v] to [0]\n    end\n    if <[255] < (x position)> then\n        change [level v] by (1)\n        switch backdrop to (next backdrop v)\n        go to x: (startpointx) y: (startpointy)\n        set [xv v] to [0]\n        set [yy v] to [0]\n    end\n    if <touching color (#00fffd)?> then\n        if <key (up arrow v) pressed?> then\n            set [yv v] to [8]\n        else\n            set [yv v] to [-1.5]\n        end\n    end\n    if <(LEVEL) = [26]> then\n        set [level v] to [1]\n        set size to (100) %\n        switch costume to (costume1 v)\n    end\n    if <touching color (#3fff00)?> then\n        change [level v] by (1)\n        switch backdrop to (backdrop34 v)\n        go to x: (startpointx) y: (startpointy)\n    end\n    if <touching color (#ff00e3)?> then\n        start sound [boing v]\n        set [yv v] to [24]\n    end\n    if <touching color (#e9a500)?> then\n        start sound [boing v]\n        set [yv v] to [-20]\n    end\nend\n\nwhen [r v] key pressed\nbroadcast (2 v)\n\nwhen [space v] key pressed\nif <key (space v) pressed?> then\n    if <(EHEE) = [0]> then\n        show variable [deaths v]\n        set [ehee v] to [1]\n        stop [this script v]\n    end\n    if <(EHEE) = [1]> then\n        hide variable [deaths v]\n        set [ehee v] to [0]\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(LEVEL) = [25]> then\n        switch costume to (costume2 v)\n        set size to (200) %\n    end\nend\n\nwhen I receive [2 v]\nif <(LEVEL) = [34]> then\n    switch backdrop to (backdrop37 v)\n    go to x: (startpointx) y: (startpointy)\nelse\n    change [deaths v] by (1)\n    go to x: (startpointx) y: (startpointy)\nend\n\n@Sprite1\n\nwhen flag clicked\ngo to x: (-215) y: (152)\n\nwhen this sprite clicked\nbroadcast (2 v)\n\n