Pollution || A mobile platformer 

Instructions: Arrrow key,WASD or touchscreen to move\nTry and get to the other side

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nforever\n    if <(Level) > [20]> then\n        switch backdrop to (backdrop2 v)\n    end\nend\n\nwhen flag clicked\nforever\n    play sound [TheFatRat - Xenogenesis my-free-mp3s v] until done\n    wait (1) seconds\n    play sound [Vexento - Into The Unknown my-free-mp3s v] until done\nend\n\n@Sprite2\n\nwhen flag clicked\nhide\n\ngo to [front v] layer\n\ndefine Return\ngo to x: (-211) y: (-37)\n\nwhen I receive [back v]\nset [x vel v] to [0]\nset [yvel v] to [0]\nReturn\n\nset [level v] to [23]\n\nwhen I receive [s v]\nset size to (40) %\nshow\nset [level v] to [1]\nshow\nReturn\nset [yvel v] to [0]\nset [x vel v] to [0]\nset [level v] to [1]\nforever\n    change [yvel v] by (-1)\n    if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<(x position) < (mouse x)> and <mouse down?>>>> then\n        switch costume to (costume2 v)\n        change [x vel v] by (0.5)\n    end\n    if <<key (a v) pressed?> or <<key (left arrow v) pressed?> or <<(x position) > (mouse x)> and <mouse down?>>>> then\n        switch costume to (costume1 v)\n        change [x vel v] by (-0.5)\n    end\n    set [x vel v] to ((X vel) * (0.9))\n    change x by (X vel)\n    if <touching color (#64ffaf)?> then\n        change y by (1)\n        if <touching color (#64ffaf)?> then\n            change y by (1)\n            if <touching color (#64ffaf)?> then\n                change y by (1)\n                if <touching color (#64ffaf)?> then\n                    change y by (1)\n                    if <touching color (#64ffaf)?> then\n                        change y by (1)\n                        change x by ((X vel) * (-1))\n                        change y by (-5)\n                    end\n                end\n            end\n        end\n    end\n    change y by (Yvel)\n    if <touching color (#64ffaf)?> then\n        change y by ((Yvel) * (-1))\n        set [yvel v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#64ffaf)?> then\n        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<(y position) < (mouse y)> and <mouse down?>>>> then\n            set [yvel v] to [15]\n        end\n        if <touching color (#00ffff)?> then\n            set [yvel v] to [25]\n        end\n    end\n    change y by (1)\n    if <<(x position) = [230]> or <(x position) > [230]>> then\n        set [x vel v] to [0]\n        set [yvel v] to [0]\n        Return\n        change [level v] by (1)\n        broadcast (Next level v)\n    end\n    if  then\n        broadcast (ÖÖF v)\n        play sound [Crunch v] until done\n        set [boss health v] to [10]\n        repeat (10)\n            change [ghost v] effect by (10)\n            wait (0.01) seconds\n        end\n        wait (0.1) seconds\n        set [x vel v] to [0]\n        Return\n        set [yvel v] to [0]\n        repeat (10)\n            change [ghost v] effect by (-10)\n            wait (0.01) seconds\n        end\n    end\n    if <touching color (#ffff00)?> then\n        change [x vel v] by (7.5)\n    end\n    if <touching color (#000aff)?> then\n        change [x vel v] by (-7.5)\n    end\n    if <touching color (#000000)?> then\n        set [yvel v] to [15]\n    end\nend\n\nwhen I receive [s v]\nforever\n    create clone of (_myself_ v)\n    wait (0.01) seconds\nend\n\nwhen I start as a clone\nset [ghost v] effect to (60)\nrepeat (10)\n    change size by (-0.5)\nend\ndelete this clone\n\nwait (0.001) seconds\n\n@Sprite1\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nforever\n    switch costume to (Level)\nend\n\nset [level v] to [27]\n\n@Sprite3\n\n@Sprite4\n\n@Sprite5\n\nwhen flag clicked\ngo to [front v] layer\nshow\n\nwhen I receive [s v]\nwait (1) seconds\nset [ghost v] effect to (100)\nhide\n\n@Sprite6\n\nwhen flag clicked\nhide\nforever\n    if <(Level) = [23]> then\n        switch costume to (costume1 v)\n        show\n        repeat until <not <(Level) = [23]>>\n            wait (1) seconds\n            next costume\n        end\n    else\n        hide\n    end\nend\n\n@Sprite7\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nchange [level v] by (1)\nbroadcast (Back v)\n\nwhen I receive [s v]\nshow\n\nwhen flag clicked\nset size to (100) %\nforever\n    point in direction ((([cos v] of ((tic) * (1.4)) ) * (5)) + (90))\n    change y by (([cos v] of ((tic) * (2.1)) ) * (1.4))\n    change size by (([cos v] of ((tic) * (1.4)) ) * (0.3))\n    change [tic v] by (5)\nend\n\nwhen flag clicked\nshow\nforever\n    if <(Level) = [30]> then\n        hide\n    else\n        show\n    end\nend\n\n@Sprite8\n\nwhen flag clicked\nhide\n\nwhen I receive [s v]\nshow\n\nwhen this sprite clicked\nbroadcast (Back v)\n\nwhen flag clicked\nset size to (100) %\nforever\n    point in direction ((([cos v] of ((tic) * (1.4)) ) * (5)) + (90))\n    change y by (([cos v] of ((tic) * (2.1)) ) * (1.4))\n    change size by (([cos v] of ((tic) * (1.4)) ) * (0.3))\n    change [tic v] by (5)\nend\n\n@5AA70B6F-625D-431A-9F74-4D04D8DCC5B6\n\nwhen flag clicked\nbroadcast (message1 v)\n\nwhen I receive [message1 v]\npoint in direction (90)\ngo to [front v] layer\ngo [forward v] (1) layers\nshow\nswitch costume to (5aa70b6f-625d-431a-9f74-4d04d8dcc5b6 v)\ngo to x: (0) y: (0)\nrepeat (62)\n    next costume\nend\nbroadcast (S v)\nhide\n\n