Bad jokes- a Platformer SCROLLING EDITION

Instructions: Bad jokes- a Platformer Scrolling Edition\n\n-Use arrow keys or WAD to move\n-Don't touch red or fall, or you will have to start over.\n-The light blue lines are checkpoints\n-Get to the dark blue line to win\n-Try to get the lowest time\n\n- @Rocket-Flier helped me with a huge bug and he said that he used a trick from @Griffpatch\n\n\nChange log:\n- 5-20-19 Shared\n- 5-21-19 Added checkpoints, made scrolling faster

@Stage\n\nwhen flag clicked\nforever\n    play sound [Press Start Upbeat Inspiring Game Music by HeatleyBros v] until done\nend\n\n@Ball\n\nwhen flag clicked\nset [y v] to [-75]\nset [x v] to [0]\nhide variable [time: v]\nhide variable [☁ lowest time v]\nhide variable [☁ finishes: v]\nset [x- pos. v] to [0]\nset [y- pos. v] to [0]\ngo to x: (0) y: (-50)\nrepeat until <(X- Pos.) < [-3673]>\n    Script <<touching color (#001026)?> or <touching color (#000f26)?>>\nend\nchange [☁ finishes: v] by (1)\nset [x- pos. v] to [-3674]\nset [time: v] to ([floor v] of (timer) )\nif <(Time:) < (☁ Lowest Time)> then\n    set [☁ lowest time v] to (Time:)\nend\nshow variable [☁ finishes: v]\nshow variable [time: v]\nshow variable [☁ lowest time v]\n\ndefine Script <>\nset x to (0)\nshow\ngo to [front v] layer\nchange [y- pos. v] by (-1)\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [change x v] by (1)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [change x v] by (-1)\nend\nset [change x v] to ((Change X) * (0.875))\nset [x? v] to (Change X)\nchange x by (Change X)\nif <<touching color (#001026)?> or <touching color (#000000)?>> then\n    change y by (1)\n    if <<touching color (#001026)?> or <touching color (#000000)?>> then\n        change y by (1)\n        if <<touching color (#001026)?> or <touching color (#000000)?>> then\n            change y by (1)\n            if <<touching color (#001026)?> or <touching color (#000000)?>> then\n                change y by (1)\n                if <<touching color (#001026)?> or <touching color (#000000)?>> then\n                    change x by ((Change X) * (-1))\n                    change y by (-4)\n                    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                        if <(Change X) > [0]> then\n                            set [change x v] to [-9]\n                        else\n                            set [change x v] to [9]\n                        end\n                        set [y- pos. v] to [10]\n                    else\n                        set [change x v] to [0]\n                    end\n                end\n            end\n        end\n    end\nend\nchange y by (Y- Pos.)\nif <<touching color (#001026)?> or <touching color (#000000)?>> then\n    change y by ((Y- Pos.) * (-1))\n    set [y- pos. v] to [0]\n    if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n        set [y- pos. v] to [13]\n    end\nend\nif <<touching color (#cb501d)?> or <(y position) < [-170]>> then\n    set x to (0)\n    set [x- pos. v] to (X)\n    set y to (Y)\n    set [y- pos. v] to [0]\nend\nif <touching color (#39bda9)?> then\n    if <([abs v] of (X- Pos.) ) < [1200]> then\n        set [x v] to [-1104]\n        set [y v] to [15]\n    else\n        set [x v] to [-2383]\n        set [y v] to [-145]\n    end\nend\nchange [x- pos. v] by ((x position) * (-1))\nset x to (0)\nbroadcast (Tick v)\n\nset [y- pos. v] to [0]\n\n@1\n\nwhen flag clicked\nset [x- pos. v] to [0]\nforever\n    if <(x position) < [-458]> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [tick v]\nset x to (X- Pos.)\n\nchange x by (X- Pos.)\n\n@2\n\nwhen flag clicked\nset y to (0)\nset [x- pos. v] to [0]\nforever\n    if <<(x position) < [-458]> or <(x position) > [450]>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [tick v]\nset x to ((X- Pos.) + (460))\n\n@3\n\nwhen flag clicked\nset y to (0)\nset [x- pos. v] to [0]\nforever\n    if <<(x position) < [-458]> or <(x position) > [472]>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [tick v]\nset x to ((X- Pos.) + (930))\n\n@4\n\nwhen flag clicked\nset y to (0)\nset [x- pos. v] to [0]\nforever\n    if <<(x position) < [-432]> or <(x position) > [273]>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [tick v]\nset x to ((X- Pos.) + (1362))\n\n@5\n\nwhen flag clicked\nset y to (0)\nset [x- pos. v] to [0]\nforever\n    if <<(x position) < [-439]> or <(x position) > [464]>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [tick v]\nset x to ((X- Pos.) + (1890))\n\n@6\n\nwhen flag clicked\nset y to (0)\nset [x- pos. v] to [0]\nforever\n    if <<(x position) < [-458]> or <(x position) > [364]>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [tick v]\nset x to ((X- Pos.) + (2335))\n\n@7\n\nwhen flag clicked\nset y to (0)\nset [x- pos. v] to [0]\nforever\n    if <<(x position) < [-555]> or <(x position) > [476]>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [tick v]\nset x to ((X- Pos.) + (2795))\n\n@8\n\nwhen I receive [tick v]\nset x to ((X- Pos.) + (3200))\n\nwhen flag clicked\nset y to (0)\nset [x- pos. v] to [0]\nforever\n    if <<(x position) < [-336]> or <(x position) > [345]>> then\n        hide\n    else\n        show\n    end\nend\n\n@9\n\nwhen flag clicked\nset y to (0)\nset [x- pos. v] to [0]\nforever\n    if <<(x position) < [-336]> or <(x position) > [466]>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [tick v]\nset x to ((X- Pos.) + (3660))\n\n@Background\n\nwhen flag clicked\nhide\nforever\n    create clone of (_myself_ v)\n    wait (pick random (2.5) to (4)) seconds\nend\n\nwhen I start as a clone\ngo to [back v] layer\ngo to x: (240) y: (0)\nshow\nset [ghost v] effect to (pick random (90) to (95))\nset size to (pick random (90) to (110)) %\npoint in direction (pick random (75) to (105))\nrepeat until <(x position) < [-235]>\n    change x by (-1.5)\n    go [backward v] (1) layers\nend\ndelete this clone\n\n@Sprite1\n\nwhen flag clicked\nforever\n    show\n    set [ghost v] effect to (100)\n    go to [front v] layer\n    go to x: (0) y: (0)\nend\n\n