Squroll, a platformer

Instructions: [ORIGINALLY SHARED IN 2016]\n<-------  To minimize glitchiness, double-click green flag\n\nHow to play (rules in game)\n  -arrow keys or wasd to move\n  -red will restart you\n  -orange is bouncy\n  -purple teleports you\n  -get to the right side of the screen\nPLEASE FOLLOW ME (it helps)

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop5 v)\n\nwhen I receive [end v]\nswitch backdrop to (backdrop6 v)\n\n@Bipmap Game\n\ncreate clone of (_myself_ v)\n\nwhen I receive [start v]\nhide variable [time v]\nshow\nreset timer\n\nshow\n\nwhen I receive [fade v]\nrepeat (50)\n    change volume by (-2)\nend\n\nwhen I receive [end v]\nswitch costume to (costume1 v)\n\ndefine None\nrepeat until <<(round (x position)) = (round (x))> and <(round (y position)) = (round (y))>>\n    change x by (((round (x)) - (round (x position))) / (speed))\n    change y by (((round (y)) - (round (y position))) / (speed))\nend\ngo to x: (x) y: (y)\n\nwhen I receive [next v]\ncreate clone of (_myself_ v)\nnext costume\nshow\ngo to [front v] layer\ngo to x: (-470) y: (0)\nSmooth Glide x: (0) y: (0) speed: (5)\nwait (1) seconds\n\nwhen flag clicked\nhide variable [☁ best v]\nhide variable [time v]\nshow variable [time v]\nset [time v] to [0]\nhide variable [time v]\ngo to [front v] layer\nswitch costume to (costume35 v)\n\nwhen I start as a clone\nwait (1) seconds\ndelete this clone\n\nwhen I receive [start v]\n\nwhen I receive [end v]\nset [time v] to (timer)\nshow variable [time v]\nshow variable [☁ best v]\nif <(☁ best) > (time)> then\n    set [☁ best v] to (time)\nend\nwait (0.2) seconds\nforever\n    switch costume to (costume1 v)\n    stop [other scripts in sprite v]\nend\n\nwhen I receive [last v]\nhide variable [☁ best v]\nhide variable [time v]\n\nwhen flag clicked\nset volume to (100) %\nswitch costume to (costume35 v)\nhide\ngo to x: (0) y: (0)\nforever\n    play sound [DEAF KEV - Invincible \[NCS Release\].mp3 v] until done\n    play sound [Vexento - Digital Kiss.mp3 v] until done\nend\n\ngo to x: (0) y: (0)\n\nset [☁ best v] to [261.138]\n\n@Vector Game2\n\nwhen I start as a clone\nwait (1) seconds\ndelete this clone\n\ndefine None\nrepeat until <<(round (x position)) = (round (x))> and <(round (y position)) = (round (y))>>\n    change x by (((round (x)) - (round (x position))) / (speed))\n    change y by (((round (y)) - (round (y position))) / (speed))\nend\ngo to x: (x) y: (y)\n\ncreate clone of (_myself_ v)\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [front v] layer\nswitch costume to (costume3 v)\n\nwhen I receive [next v]\ncreate clone of (_myself_ v)\nnext costume\nshow\ngo to [front v] layer\ngo to x: (-470) y: (0)\nSmooth Glide x: (0) y: (0) speed: (5)\nwait (1) seconds\n\nwhen flag clicked\nforever\n    hide\nend\n\nplay sound [Korg M1 Legacy - rave Piano Fun!.mp3 v] until done\n\n@Sprite2\n\nturn left (10) degrees\n\nwhen flag clicked\nswitch costume to (costume4 v)\nwait (0.2) seconds\nforever\n    create clone of (_myself_ v)\n    go to [front v] layer\n    if <<<touching color (#ff0000)?> or <touching color (#ffff00)?>> or <touching color (#070a07)?>> then\n        broadcast (2 v)\n        wait (0.01) seconds\n        set [xv v] to [0]\n        set [yv v] to [0]\n        point in direction (90)\n        go to x: (-194) y: (-81)\n    end\n    if <(x position) > [238]> then\n        if <([costume # v] of [bipmap game v]) = [31]> then\n            broadcast (fade v) and wait\n        else\n            go to x: (-194) y: (-81)\n            broadcast (next v)\n            set [xv v] to [0]\n            set [yv v] to [0]\n            wait (0.4) seconds\n        end\n    end\n    if <touching color (#ff9400)?> then\n        set [yv v] to [16]\n    end\n    if <touching color (#cc99ff)?> then\n        point in direction (90)\n        broadcast (1 v)\n        set [xv v] to [0]\n        set [yv v] to [0]\n        if <([costume # v] of [bipmap game v]) = [11]> then\n            go to x: (169) y: (150)\n        else\n            if <([costume # v] of [bipmap game v]) = [12]> then\n                go to x: (127) y: (-79)\n            else\n                go to x: (34) y: (-79)\n            end\n        end\n    end\n    if <touching color (#99b2ff)?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [yv v] to [4]\n        else\n            set [yv v] to [-2]\n        end\n    end\nend\n\ngo to x: (-200) y: (-120)\n\npoint in direction (90)\n\npoint in direction (90)\n\nwhen I start as a clone\nset [ghost v] effect to (0)\nif <touching color (#99b2ff)?> then\n    switch costume to (costume6 v)\nelse\n    switch costume to (costume5 v)\nend\nrepeat (15)\n    change [ghost v] effect by (7)\nend\ndelete this clone\n\ngo to x: (229) y: (-98)\n\nset [yv v] to [-10]\n\nswitch costume to (costume4 v)\n\ngo to x: (127) y: (-79)\n\nif <touching color (#000000)?> then\n    change x by ((speed) * (-1))\nend\n\nset [xv v] to [0]\n\nforever\nend\n\nchange x by ((speed) * (-1))\n\nif  then\nend\n\nwhen flag clicked\ngo to x: (-194) y: (-81)\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    turn right ((Xv) * (2.5)) degrees\n    change [yv v] by (-0.5)\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [xv v] by (0.7)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [xv v] by (-0.7)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <touching color (#000008)?> then\n        change y by (1)\n        if <touching color (#000008)?> then\n            change y by (1)\n            if <touching color (#000008)?> then\n                change y by (1)\n                if <touching color (#000008)?> then\n                    change y by (1)\n                    if <touching color (#000008)?> then\n                        change y by (1)\n                        if <touching color (#000008)?> then\n                            change x by ((Xv) * (-1))\n                            change x by (-1)\n                            change y by (-5)\n                            change x by (1)\n                            if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-8]\n                                else\n                                    set [xv v] to [8]\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 y by (Yv)\n    if <touching color (#000008)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#000008)?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [yv v] to [10]\n        end\n    end\n    change y by (1)\nend\n\nwhen flag clicked\nhide\n\npoint towards (mouse-pointer v)\n\nwhen I receive [start v]\nwait (0.5) seconds\nshow\ngo to x: (-194) y: (-81)\npoint in direction (90)\n\nbroadcast (fade v)\n\nwhen I receive [last v]\nstop [other scripts in sprite v]\n\nshow\n\nwhen I receive [start v]\nforever\n    if <key (r v) pressed?> then\n        broadcast (2 v)\n        wait (0.01) seconds\n        set [xv v] to [0]\n        set [yv v] to [0]\n        point in direction (90)\n        go to x: (-194) y: (-81)\n        wait until <not <key (r v) pressed?>>\n    end\nend\n\n@Sprite3\n\nwhen I receive [1 v]\nset [ghost v] effect to (100)\nswitch costume to (costume2 v)\ngo to [front v] layer\nshow\nrepeat (3.333333333333333)\n    change [ghost v] effect by (-30)\nend\nrepeat (3.333333333333333)\n    change [ghost v] effect by (30)\nend\ngo [backward v] (9) layers\nhide\n\nwhen I receive [2 v]\nset [ghost v] effect to (100)\nswitch costume to (costume1 v)\ngo to [front v] layer\nshow\nrepeat (3.333333333333333)\n    change [ghost v] effect by (-30)\nend\nrepeat (3.333333333333333)\n    change [ghost v] effect by (30)\nend\ngo [backward v] (9) layers\nhide\nset [color v] effect to (0)\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwait until <not <key (r v) pressed?>>\n\nrepeat (3.333333333333333)\n    change [ghost v] effect by (30)\nend\ngo [backward v] (9) layers\nhide\nset [color v] effect to (0)\n\nwhen I receive [fade v]\nset [ghost v] effect to (100)\nswitch costume to (costume3 v)\ngo to [front v] layer\nshow\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\nbroadcast (end v)\nwait (1) seconds\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nshow\n\nwhen I receive [last v]\nset [ghost v] effect to (100)\nswitch costume to (costume4 v)\ngo to [front v] layer\nshow\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\n\n@moving\n\nwhen flag clicked\nforever\n    go to x: (-74) y: (-81)\n    glide (2) secs to x: (-74) y: (-298)\n    glide (3) secs to x: (-74) y: (-81)\nend\n\nshow\n\ngo to [front v] layer\n\ngo to x: (0) y: (0)\n\ngo to x: (-79) y: (-96)\n\nwhen flag clicked\nhide\nforever\n    if <([costume # v] of [bipmap game v]) = [10]> then\n        switch costume to (costume2 v)\n        show\n        go to [front v] layer\n        go [backward v] (1) layers\n    else\n        hide\n    end\nend\n\nset [time v] to [0]\nforever\n    change [time v] by (1)\n    go to x: (item (time) of [l v]) y: (item (time) of [u v])\nend\n\n@moving2\n\nwhen flag clicked\nhide\nforever\n    if <([costume # v] of [bipmap game v]) = [9]> then\n        switch costume to (costume1 v)\n        show\n        go to [front v] layer\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    go to x: (-134) y: (-125)\n    glide (2) secs to x: (148) y: (-125)\n    glide (2) secs to x: (-134) y: (-125)\nend\n\n@moving3\n\nwhen flag clicked\nhide\nforever\n    if <([costume # v] of [bipmap game v]) = [29]> then\n        switch costume to (costume1 v)\n        show\n        go to [front v] layer\n        go [backward v] (1) layers\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    go to x: (-79) y: (-96)\n    glide (1) secs to x: (-79) y: (55)\n    glide (1) secs to x: (-79) y: (-96)\nend\n\nshow\n\ngo to [front v] layer\n\ngo to x: (0) y: (0)\n\n@Thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\ngo to [front v] layer\n\nwhen I receive [thumb v]\nshow\nset [ghost v] effect to (100)\nrepeat (20)\n    change [ghost v] effect by (-5)\n    go to [front v] layer\nend\nwait (1) seconds\nbroadcast (start v)\nrepeat (20)\n    change [ghost v] effect by (5)\n    go to [front v] layer\nend\n\nwhen I receive [start v]\nforever\n    show\n    go to [front v] layer\n    go to x: (0) y: (0)\nend\n\nshow\n\n@Sprite4\n\ngo to x: (127) y: (-79)\n\nif <touching color (#000000)?> then\n    change x by ((speed) * (-1))\nend\n\nset [xv v] to [0]\n\nchange x by ((speed) * (-1))\n\nif  then\nend\n\nwhen I start as a clone\nset [ghost v] effect to (0)\nif <touching color (#99b2ff)?> then\n    switch costume to (costume6 v)\nelse\n    switch costume to (costume5 v)\nend\nrepeat (15)\n    change [ghost v] effect by (7)\nend\ndelete this clone\n\nwhen flag clicked\nshow\ngo to x: (-103) y: (-41)\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    create clone of (_myself_ v)\n    change [yv v] by (-0.5)\n    if <touching color (#000000)?> then\n        if <(Xv) > [0]> then\n            set [xv v] to [-8]\n        else\n            set [xv v] to [8]\n        end\n        set [yv v] to [10]\n    else\n        set [xv v] to [0]\n    end\n    change y by (Yv)\nend\n\ngo to x: (-150) y: (-16)\n\nwhen I receive [start v]\nhide\n\nset [time v] to [0]\nforever\n    change [time v] by (1)\n    go to x: (item (time) of [l v]) y: (item (time) of [u v])\nend\n\n@Sprite1\n\nwhen flag clicked\nshow\ngo to x: (310) y: (-58)\nSmooth Glide x: (59) y: (-58) speed: (5)\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((120) - (size)) * (0.2))\n        if <mouse down?> then\n            broadcast (thumb v) and wait\n        end\n    else\n        change size by (((100) - (size)) * (0.2))\n    end\nend\n\nwhen I receive [start v]\nhide\nstop [other scripts in sprite v]\n\ndefine None\nrepeat until <<(round (x position)) = (round (x))> and <(round (y position)) = (round (y))>>\n    change x by (((round (x)) - (round (x position))) / (speed))\n    change y by (((round (y)) - (round (y position))) / (speed))\nend\ngo to x: (x) y: (y)\n\ngo to x: (59) y: (-58)\n\nbroadcast (start v)\n\n@Sprite5\n\nwhen I receive [end v]\ngo to [front v] layer\ngo [backward v] (4) layers\nshow\nswitch costume to (costume4 v)\nset size to (200) %\nswitch costume to (costume1 v)\nstart sound [DJVI - Moonstone.mp3 v]\ngo to x: (0) y: (-500)\nwait (3) seconds\nrepeat (1000)\n    change y by (1)\nend\nbroadcast (last v)\n\nwhen flag clicked\nhide\n\n