Time Travel: A Platformer

Instructions: Arrow keys or mobile.\n\nSequel is out! https://scratch.mit.edu/projects/662896622/\n\nBest game in the whole series:\nhttps://scratch.mit.edu/projects/666111000/\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nSince you scrolled down here, now you have to add this project to 10 studios. Or you can remix. If you remix this 3 or more times, you get a free follow!

@Stage\n\nwhen flag clicked\nforever\n    play sound [platformer_;\) v] until done\nend\n\n@TN\n\nwhen flag clicked\nhide\n\ngo to [front v] layer\nshow\n\n@HitBox\n\nwhen flag clicked\nforever\n    if <(x position) > [238]> then\n        go to x: (-220) y: (-70)\n        set [xv v] to [0]\n        set [yv v] to [0]\n        broadcast (next level v)\n    end\nend\n\nwhen flag clicked\ngo to x: (-220) y: (-70)\nset [ghost v] effect to (0)\nforever\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [xv v] by (1)\n    end\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [xv v] by (-1)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <touching (level v)?> then\n        change y by (1)\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change y by (1)\n                        if <touching (level v)?> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                            if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-5]\n                                else\n                                    set [xv v] to [5]\n                                end\n                                set [yv v] to [10]\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-1)\n    change y by (Yv)\n    if <touching (level v)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching (level v)?> then\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            set [yv v] to [15]\n        end\n    end\n    change y by (1)\nend\n\nif <key (up arrow v) pressed?> then\n    if <(Xv) > [0]> then\n        set [xv v] to [-5]\n    else\n        set [xv v] to [5]\n    end\n    set [yv v] to [10]\nelse\n    set [xv v] to [0]\nend\n\nif <touching (level v)?> then\n    change y by (1)\n    if <touching (level v)?> then\n        change y by (1)\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change x by ((Xv) * (-1))\n                        change y by (-5)\n                    end\n                end\n            end\n        end\n    end\nend\n\nif <key (right arrow v) pressed?> then\n    change [xv v] by (1)\nend\nif <key (left arrow v) pressed?> then\n    change [xv v] by (-1)\nend\nset [xv v] to ((Xv) * (0.9))\nchange x by (Xv)\n\nif <touching (level v)?> then\n    change y by ((Yv) * (-1))\n    set [yv v] to [0]\nend\nchange y by (-1)\nif <touching (level v)?> then\n    if <key (up arrow v) pressed?> then\n        set [yv v] to [15]\n    end\nend\nchange y by (1)\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nset [ghost v] effect to (0)\nrepeat (8)\n    change [ghost v] effect by (12.5)\nend\ndelete this clone\n\n@Level\n\nwhen flag clicked\nswitch costume to (1 v)\n\nwhen I receive [next level v]\nnext costume\n\n