TriColor | A Platformer

Instructions: Here's my entry!\nEnjoy!\nArrow Keys, avoid spikes.\nAll levels possible.\nFULL SCREEN\nLove favorite if you enjoyed, follow for more!

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop9 v)\nwait until <(backdrop [number v]) = [9]>\nbroadcast (end v)\n\nwhen I receive [start v]\nforever\n    play sound [Tobu - Candyland \[NCS Release\].mp3 v] until done\n    play sound [Tobu - Roots v] until done\nend\n\nchange [pitch v] effect by (-10)\n\n@Player\n\nwhen I receive [message1 v]\n\nwhen I receive [start v]\nset rotation style [left-right v]\nset size to (100) %\nset [xv v] to [0]\nset [yv v] to [0]\ngo to x: (-190) y: (0)\nforever\n    if <key (right arrow v) pressed?> then\n        change [xv v] by (1)\n        point in direction (90)\n    end\n    if <key (left arrow v) pressed?> then\n        change [xv v] by (-1)\n        point in direction (-90)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <touching color (#ffffff)?> then\n        change y by (1)\n        if <touching color (#ffffff)?> then\n            change y by (1)\n            if <touching color (#ffffff)?> then\n                change y by (1)\n                if <touching color (#ffffff)?> then\n                    change y by (1)\n                    if <touching color (#ffffff)?> then\n                        change y by (1)\n                        if <touching color (#ffffff)?> then\n                            change x by ((Xv) * (-2))\n                            change y by (-5)\n                            if <<<mouse down?> and <(mouse y) > (y position)>> or <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]\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 color (#ffffff)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#ffffff)?> then\n        if <key (up arrow v) pressed?> then\n            set [yv v] to [13]\n        end\n    end\n    change y by (1)\n    if <<touching (_edge_ v)?> and <(x position) > [230]>> then\n        next costume\n        next backdrop\n        go to x: (-190) y: (0)\n        broadcast (message1 v)\n        set [xv v] to [0]\n    end\n    if <touching (spikes v)?> then\n        go to x: (-190) y: (0)\n        set [xv v] to [0]\n    end\nend\n\nwhen flag clicked\n\nwait (0.02) seconds\n\nwhen I receive [start v]\nswitch costume to (costume6 v)\nshow\nset [times died v] to [0]\nset [levels completed v] to [0]\nset [amount of lost lives v] to [0]\nset [score v] to [0]\n\nwhen flag clicked\nhide variable [score v]\nhide\n\nwhen I receive [start v]\nforever\n    if <touching (_edge_ v)?> then\n        if <(y position) < [-160]> then\n            go to x: (0) y: (180)\n            set [score v] to [0]\n            set [wait time v] to [10]\n        end\n    end\nend\n\n\n    go to x: (-175) y: (-95)\nend\n\nbroadcast (message1 v)\n\nwhen flag clicked\nforever\n    if <mouse down?> then\n        if <(x position) > (mouse x)> then\n            change [xv v] by (-1)\n            point in direction (-90)\n        end\n        if <(mouse x) > (x position)> then\n            change [xv v] by (1)\n            point in direction (90)\n        end\n    end\nend\n\nbroadcast (start v)\n\n\n\nnext backdrop\n\ngo to x: (-190) y: (0)\n\nwhen I receive [end v]\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\n@Spikes\n\nwhen I receive [message1 v]\nnext costume\n\nwhen flag clicked\nshow\nhide\nswitch costume to (costume1 v)\n\nwhen I receive [end v]\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen I receive [start v]\nshow\n\n@Intro\n\nwhen flag clicked\nset [speed v] to [10]\ngo to x: (-24) y: (-180)\nrepeat (55)\n    set [speed v] to ((speed) * (0.95))\n    change y by (speed)\nend\nwait (1) seconds\nset [speed v] to [4]\nrepeat (55)\n    set [speed v] to ((speed) * (1.05))\n    change y by (speed)\nend\nbroadcast (start v)\nnext backdrop\nhide\n\nglide (1) secs to x: (-24) y: (0)\n\nwhen flag clicked\nerase all\nshow\nswitch costume to (costume8 v)\ncreate clone of (_myself_ v)\nset volume to (100) %\nstart sound [TheFatRat - Windfall _Tasty Release_.mp3 v]\nwait (2.7) seconds\nrepeat (20)\n    change volume by (-5)\nend\n\nwhen I start as a clone\nswitch costume to (costume2 v)\ngo to x: (-24) y: (180)\nrepeat (55)\n    change y by ((-1) * (speed))\nend\nwait (1) seconds\nrepeat (55)\n    change y by ((-1) * (speed))\nend\n\nbroadcast (message1 v)\n\n@Songs\n\nwhen flag clicked\nhide\n\ngo to x: (-170) y: (170)\n\ndefine fade\nreset timer\nset [ghost v] effect to (100)\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\nwait (3) seconds\nrepeat (50)\n    change [ghost v] effect by (2)\nend\n\nwhen I receive [start v]\nshow\nforever\n    switch costume to (costume2 v)\n    fade\n    wait (190.5) seconds\n    next costume\n    fade\n    wait (192.5) seconds\nend\n\nswitch costume to (costume2 v)\n\n@Effects\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\ngo to (random position v)\nset size to (pick random (40) to (80)) %\nset [brightness v] effect to (pick random (20) to (40))\nset [ghost v] effect to (pick random (50) to (80))\nshow\nglide (1) secs to (random position v)\ndelete this clone\n\nwhen I receive [start v]\nrepeat (10)\n    create clone of (_myself_ v)\nend\nforever\n    create clone of (_myself_ v)\n    wait (0.2) seconds\n    go to [back v] layer\nend\n\n@Thumban\n\nwhen flag clicked\nhide\n\nshow\n\n