Polluted - A Platformer - MOBILE FRIENDLY #games

Instructions: NEW PROJECT: https://scratch.mit.edu/projects/396578522/\n

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop5 v)\nwait (0.1) seconds\nswitch backdrop to (platform2 v)\n\nwhen I receive [etaztgatatatata v]\nswitch backdrop to (victory v)\nshow variable [deaths: v]\n\nwhen I receive [reeeee v]\nswitch backdrop to (victory v)\n\nwhen [l v] key pressed\nnext backdrop\n\nwhen flag clicked\nshow variable [deaths: v]\nforever\n    play sound [Vexento - Pixel Party v] until done\nend\n\n@Hops Dude\n\nwhen I receive [return v]\nif <(backdrop [number v]) = [9]> then\n    go to x: (-208) y: (149)\nelse\n    switch costume to (right v)\n    go to x: (-200) y: (-45)\nend\n\nwhen flag clicked\nset [deaths: v] to [0]\nset [xvel v] to [0]\nswitch costume to (right v)\ngo to x: (-200) y: (-45)\nwait (1.5) seconds\nPhysics\n\ndefine Physics\nforever\n    if <touching color (#aa0000)?> then\n        broadcast (Return v)\n        change [deaths: v] by (1)\n    end\n    if <(x position) > [235]> then\n        broadcast (Return v)\n        next backdrop\n    end\n    if <touching color (#000000)?> then\n        change y by (1)\n    end\n    if <not <touching color (#000000)?>> then\n        change y by (-1)\n    end\n    if <<<mouse down?> and <(mouse x) > [100]>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n        switch costume to (right v)\n        change [xvel v] by (1)\n        if <(Xvel) > [5]> then\n            set [xvel v] to [5]\n        end\n    end\n    if <<<mouse down?> and <[-100] > (mouse x)>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n        switch costume to (left v)\n        change [xvel v] by (-1)\n        if <(Xvel) < [-5]> then\n            set [xvel v] to [-5]\n        end\n    end\n    if <([abs v] of (Xvel) ) > [.1]> then\n        change x by ((Xvel) * (1))\n    end\n    if <(Xvel) > [0]> then\n        change [xvel v] by (-0.5)\n    else\n        if <(Xvel) < [0]> then\n            change [xvel v] by (0.5)\n        end\n    end\n    change [yvel v] by (-1)\n    change y by (Yvel)\n    if <touching color (#000000)?> then\n        change y by ((0) - (Yvel))\n        set [yvel v] to [1]\n    end\n    if <touching color (#000000)?> then\n        if <<<(mouse y) > [20]> and <mouse down?>> or <<key (space v) pressed?> or <<key (w v) pressed?> or <key (up arrow v) pressed?>>>> then\n            change [yvel v] by (15)\n        end\n    end\n    if <touching color (#000000)?> then\n        change y by (1)\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change y by (1)\n                        if <touching color (#000000)?> then\n                            Wall detection\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#a700ff)?> then\n        broadcast (Etaztgatatatata v) and wait\n    end\nend\n\nwhen flag clicked\nif <(x position) = [-9]> then\n    broadcast (YEEEEEE v)\nend\n\ngo to x: (0) y: (0)\n\nwhen flag clicked\nforever\n    if <<<key (y v) pressed?> and <key (e v) pressed?>> and <key (t v) pressed?>> then\n        broadcast (REEEEE v)\n    end\nend\n\ndefine Wall detection\nchange y by (-5)\nchange x by ((Xvel) * (-1.7))\nif <([abs v] of (Xvel) ) > [.2]> then\n    if <(Xvel) > [0]> then\n        set [xvel v] to [-6]\n    else\n        set [xvel v] to [6]\n    end\n    set [yvel v] to [14]\nelse\n    if <(Xvel) < [-.2]> then\n        set [yvel v] to [-3]\n        set [xvel v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    hide variable [deaths: v]\nend\n\n@Sprite1\n\nwhen flag clicked\nshow\ngo to [front v] layer\nrepeat (10)\n    change [ghost v] effect by (5)\n    wait (0.1) seconds\nend\nhide\n\nshow\n\n