Time Travel: A Platformer 2

Instructions: Arrow keys or mobile.\n\nPrequel: https://scratch.mit.edu/projects/662343663/\nSequel: https://scratch.mit.edu/projects/666111000/

@Stage\n\nwhen flag clicked\nforever\n    play sound [Video Game 2 v] until done\nend\n\n@Sprite1\n\nwhen flag clicked\ngo to x: (0) y: (161.5)\nforever\n    change y by (5)\n    if <(y position) > [320]> then\n        go to x: (0) y: (-324)\n    end\nend\n\n@Sprite2\n\nwhen flag clicked\ngo to x: (0) y: (-161.5)\nforever\n    change y by (5)\n    if <(y position) > [320]> then\n        go to x: (0) y: (-324)\n    end\nend\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\nset size to (100) %\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\nwhen I receive [shrink v]\nset size to (30) %\n\nwhen I receive [grow v]\nset size to (100) %\n\n@Level\n\nwhen flag clicked\nswitch costume to (1 v)\nwait until <(costume [name v]) = [8]>\nbroadcast (shrink v)\nwait until <(costume [name v]) = [9]>\nbroadcast (grow v)\n\nwhen I receive [next level v]\nnext costume\n\n@Untitled drawing (2)\n\nwhen flag clicked\nhide\n\ngo to [front v] layer\nshow\n\n