Dark - A Mobile Friendly Platformer

Instructions: Game by: @C9M09B \n=============================================\nMobile controls may be a little hard, but other than that, hope you enjoy!\n\nUpdate: 2 new levels! 9/1/19\nAll coding by me.\n \nSong by Vexento.\n---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=\nThere may be a few lags, if you find any, please tell me in the comments. :)\n---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=\n\n#Dark #Games #Platformer #Mobile #C9M09B #Spikes #Play #Player #Fun #Ground #Black #Grey #FunGame

@Stage\n\nwhen flag clicked\nset volume to (100) %\nforever\n    play sound [vexento-masked-heroes-1-AHM56EBq6 \(1\) v] until done\nend\n\nwhen I receive [end v]\nrepeat (10)\n    change volume by (-10)\n    wait (0.5) seconds\nend\n\n@Player\n\nwhen I receive [next level v]\nset [yv v] to [0]\nset [xv v] to [0]\ngo to x: (-200) y: (0)\nset [ghost v] effect to (0)\n\nwhen flag clicked\npoint in direction (90)\nset [xvel v] to [0]\nset [yvel v] to [0]\nforever\n    set size to (size) %\n    set [size v] to [100]\n    show\n    set rotation style [all around v]\n    if <<<mouse down?> and <(x position) > (mouse x)>> or <key (left arrow v) pressed?>> then\n        change [xv v] by (-1)\n    end\n    if <<<mouse down?> and <(x position) < (mouse x)>> or <key (right arrow v) pressed?>> 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 (levels v)?> then\n        change y by (1)\n        if <touching (levels v)?> then\n            change y by (1)\n            if <touching (levels v)?> then\n                change y by (1)\n                if <touching (levels v)?> then\n                    change y by (1)\n                    if <touching (levels v)?> then\n                        change y by (1)\n                        if <touching (levels v)?> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                            if <<<mouse down?> and <(y position) < (mouse y)>> or <key (up arrow v) pressed?>> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-7]\n                                else\n                                    set [xv v] to [7]\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 (-1)\n    if <touching (levels v)?> then\n        if <<<mouse down?> and <(y position) < (mouse y)>> or <key (up arrow v) pressed?>> then\n            set [yv v] to [17]\n        end\n    end\n    change y by (1)\n    change [yv v] by (-1)\n    set [yv v] to ((Yv) * (0.99))\n    change y by (Yv)\n    if <touching (levels v)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    hide variable [xv v]\n    if <(x position) > [230]> then\n        broadcast (next level v)\n    end\n    if <(y position) < [-170]> then\n        go to x: (-200) y: (0)\n    end\n    if touching\nend\n\nwhen flag clicked\ngo to x: (-200) y: (0)\n\ndefine if touching\nif <touching (spikes v)?> then\n    set [ghost v] effect to (100)\n    start sound [whoop v]\n    set [yv v] to [0]\n    set [xv v] to [0]\n    set size to (100) %\n    set [ghost v] effect to (0)\n    go to x: (-200) y: (0)\n    point in direction (90)\nend\nif <touching (1 v)?> then\n    set [yv v] to [20]\nend\nif <touching (speed v)?> then\n    set [xv v] to [21]\nend\n\nwhen [r v] key pressed\nset [yv v] to [0]\nset [xv v] to [0]\ngo to x: (-200) y: (0)\nset [ghost v] effect to (0)\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\n@Levels\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen flag clicked\nshow\nforever\n    if <(costume [number v]) = [11]> then\n        broadcast (End v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nshow\n\nhide\nwait (1) seconds\n\n@Thumbnail\n\nwhen flag clicked\ngo to [front v] layer\nshow\nforever\n    set [ghost v] effect to (100)\n    go to [front v] layer\nend\n\nset [ghost v] effect to (0)\ngo to [front v] layer\nshow\n\n@Spikes\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nshow\n\n@1\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nwait (1) seconds\nshow\n\n@Player Shadow\n\nwhen flag clicked\nforever\n    set size to (size) %\n    set [ghost v] effect to (86)\n    go to (player v)\nend\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nwait (1) seconds\nshow\n\n