The Cube Planet - Platformer || mobile friendly
@Stage\n\nwhen flag clicked\nforever\n    switch backdrop to (The Level)\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nrepeat (20)\n    change [brightness v] effect by (5)\nend\nswitch backdrop to (tło12 v)\nwait (0.5) seconds\nrepeat (20)\n    change [brightness v] effect by (-5)\nend\nstop [all v]\n\n@Duszek1\n\nwhen I receive [reset v]\nset [x velocity v] to [0]\nset [y velocity v] to [0]\ngo to x: (-216) y: (40)\n\nwhen flag clicked\nshow\nset [brightness v] effect to (0)\nset [the level v] to [1]\nbroadcast (Next Level v)\nforever\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<(mouse x) < [-50]> and <mouse down?>>> then\n        change [x velocity v] by (-1.5)\n    end\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<(mouse x) > [50]> and <mouse down?>>> then\n        change [x velocity v] by (1.5)\n    end\n    set [x velocity v] to ((X Velocity) * (0.85))\n    change x by (X Velocity)\n    if <touching (duszek2 v)?> then\n        change y by (1)\n    end\n    if <touching (duszek2 v)?> then\n        change y by (1)\n    end\n    if <touching (duszek2 v)?> then\n        change y by (1)\n    end\n    if <touching (duszek2 v)?> then\n        change y by (1)\n    end\n    if <touching (duszek2 v)?> then\n        change y by (-4)\n        change x by ((X Velocity) * (-1))\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<(mouse y) > [-30]> and <mouse down?>>> then\n            if <(X Velocity) > [0]> then\n                set [x velocity v] to [-10]\n            else\n                set [x velocity v] to [10]\n            end\n            set [y velocity v] to [15]\n        else\n            set [x velocity v] to [0]\n        end\n    end\n    change [y velocity v] by (-1)\n    change y by (Y Velocity)\n    if <touching (duszek2 v)?> then\n        change y by ((Y Velocity) - ((Y Velocity) * (2)))\n        set [y velocity v] to [0]\n    end\n    change y by (-1)\n    if <<touching (duszek2 v)?> and <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<(mouse y) > [-30]> and <mouse down?>>>> then\n        set [y velocity v] to [15]\n    end\n    change y by (1)\n    if <(x position) > [239]> then\n        broadcast (Next Level v) and wait\n        change [the level v] by (1)\n    end\n    if <touching (duszek3 v)?> then\n        start sound [Crunch v]\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        broadcast (Reset v)\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen I receive [next level v]\nbroadcast (Reset v)\n\nwhen flag clicked\nforever\n    if <<(backdrop [number v]) = [11]> and <touching (duszek4 v)?>> then\n        start sound [Teleport v]\n        broadcast (End v)\n    end\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nrepeat (20)\n    change [brightness v] effect by (5)\nend\nhide\n\nwhen flag clicked\nshow variable [time v]\nreset timer\nforever\n    set [time v] to (round (timer))\nend\n\nturn left (15) degrees\n\n@Duszek2\n\nwhen flag clicked\nshow\nset [brightness v] effect to (0)\nforever\n    switch costume to (The Level)\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nrepeat (20)\n    change [brightness v] effect by (5)\nend\nhide\n\n@Duszek3\n\nwhen flag clicked\nshow\nforever\n    switch costume to (The Level)\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nrepeat (20)\n    change [brightness v] effect by (5)\nend\nhide\n\n@Duszek4\n\nwhen flag clicked\nset [brightness v] effect to (0)\nhide\nforever\n    if <(backdrop [number v]) = [11]> then\n        go to x: (0) y: (0)\n        show\n    end\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nrepeat (20)\n    change [brightness v] effect by (5)\nend\nhide\n\n@Duszek5\n\nwhen flag clicked\nhide\n\n@Duszek6\n\nwhen flag clicked\nshow\ngo to [back v] layer\nswitch costume to (kostium1 v)\nset [x v] to [0]\ncreate clone of (_myself_ v)\nnext costume\nchange [x v] by (480)\nbroadcast (Begin v)\n\nwhen I receive [begin v]\nforever\n    set [screen x v] to ((X) - (Camera x))\n    set x to (((Screen x) mod ((480) * (2))) - (480))\n    set y to (0)\nend\n\nwhen flag clicked\nforever\n    change [camera x v] by (1)\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nhide\n\n
Welcome to the Cube Planet - a beautiful and peaceful place.\n\nArrow keys or W A D - move\n\nMy best time on Computer - 38\nMy Best time on Mobile - 60\n\nJoin this discussion: https://scratch.mit.edu/discuss/topic/545910/?page=1#post-5642975\n\nMake sure you clicked heart, because only 1/20 viewers clicked it. If you done this you can also follow me. 