Spectre || A Platformer

Instructions: arrows or WASD u know what to do by now

@Stage\n\nwhen flag clicked\n\nwhen I receive [start v]\nforever\n    play sound [Alan Walker - Spectre.mp3 v] until done\nend\n\n@Player\n\ndefine Blink\nswitch costume to (costume1 v)\nwait (1.5) seconds\nswitch costume to (costume2 v)\nwait (.1) seconds\nswitch costume to (costume3 v)\nwait (.1) seconds\nswitch costume to (costume4 v)\nwait (.2) seconds\nswitch costume to (costume3 v)\nwait (.1) seconds\nswitch costume to (costume2 v)\nwait (.1) seconds\n\nwhen I receive [start game v]\nforever\n    if <touching (next v)?> then\n        broadcast (next v)\n        wait (.1) seconds\n        hide\n        wait (.5) seconds\n        show\n        go to x: (-201) y: (-180)\n        set [ghost v] effect to (80)\n        repeat (10)\n            change y by (((-5) - (y position)) * (0.2))\n            change [ghost v] effect by (-10)\n        end\n    end\n    if <touching (dangers v)?> then\n        hide\n        wait (.5) seconds\n        show\n        go to x: (-201) y: (-180)\n        set [ghost v] effect to (80)\n        repeat (10)\n            change y by (((-5) - (y position)) * (0.2))\n            change [ghost v] effect by (-10)\n        end\n    end\nend\n\nchange [level v] by (1)\n\nwhen I receive [start game v]\nhide\nwait (1) seconds\nshow\ngo to x: (-201) y: (-180)\nset [ghost v] effect to (80)\nrepeat (10)\n    change y by (((-5) - (y position)) * (0.2))\n    change [ghost v] effect by (-10)\nend\nforever\n    go to [front v] layer\n    if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n        change [xvel v] by (-1)\n    end\n    if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n        change [xvel v] by (1)\n    end\n    set [xvel v] to ((Xvel) * (0.9))\n    change x by (Xvel)\n    if <touching (ground v)?> then\n        change y by (1)\n        if <touching (ground v)?> then\n            change y by (1)\n            if <touching (ground v)?> then\n                change y by (1)\n                if <touching (ground v)?> then\n                    change y by (1)\n                    if <touching (ground v)?> then\n                        change y by (1)\n                        if <touching (ground v)?> then\n                            change y by (1)\n                            if <touching (ground v)?> then\n                                change y by (1)\n                                if <touching (ground v)?> then\n                                    change x by ((Xvel) * (-1))\n                                    change y by (-7)\n                                    if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n                                        if <(Xvel) > [0]> then\n                                            set [xvel v] to [-5]\n                                        else\n                                            set [xvel v] to [5]\n                                        end\n                                        set [yvel v] to [10]\n                                    else\n                                        set [xvel v] to [0]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yvel v] by (-1)\n    change y by (Yvel)\n    if <touching (ground v)?> then\n        change y by ((Yvel) * (-1))\n        set [yvel v] to [0]\n    end\n    change y by (-1)\n    if <touching (ground v)?> then\n        if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n            set [yvel v] to [15]\n        end\n    end\n    change y by (1)\nend\n\nwhen flag clicked\n\nwhen I receive [start v]\nswitch costume to (costume1 v)\nshow\ngo to x: (-10) y: (-109)\n\n    Blink\nend\n\n@Ground\n\nwhen flag clicked\nswitch costume to (1 v)\ngo to x: (0) y: (0)\n\nwhen I receive [start game v]\nset [level v] to [1]\nswitch costume to (Level)\n\nwhen I receive [next v]\nnext costume\n\n@Back\n\nwhen flag clicked\ngo to [front v] layer\nswitch costume to (costume3 v)\n\nwhen I receive [sky change v]\nnext costume\n\nwhen I receive [start v]\ngo to [back v] layer\nswitch costume to (costume1 v)\n\n@Dangers\n\nwhen flag clicked\nhide\nswitch costume to (1-1 v)\n\nwhen I receive [next v]\nshow\nnext costume\n\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [start game v]\nswitch costume to (1-1 v)\nshow\n\ngo to [front v] layer\n\nwhen flag clicked\nwait until <(costume [name v]) = [1-6]>\nbroadcast (sky change v)\n\n@Next\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\n    set [ghost v] effect to (100)\nend\n\n@World-Level+Text\n\nwhen flag clicked\nswitch costume to (1-1 v)\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [next v]\nshow\nnext costume\n\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [start game v]\nswitch costume to (1-1 v)\nshow\n\nwhen I receive [start game v]\nshow\n\nwhen flag clicked\nwait until <(costume [number v]) = [9]>\nwait (5) seconds\nnext costume\n\n@Title\n\nwhen flag clicked\n\nwhen flag clicked\n\nwhen I receive [start game v]\nstop [other scripts in sprite v]\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\nclear graphic effects\n\nwhen I receive [start v]\nforever\n    change [color v] effect by (5)\n    wait (.2) seconds\nend\n\nwhen I receive [start v]\nshow\ngo to x: (2400) y: (101)\nset [ghost v] effect to (80)\nrepeat (25)\n    change x by (((-5) - (x position)) * (0.2))\n    change [ghost v] effect by (-10)\nend\n\n@Button\n\nwhen flag clicked\n\nwhen flag clicked\n\nwhen I receive [start v]\nshow\ngo to x: (-2400) y: (0)\nset [ghost v] effect to (80)\nrepeat (25)\n    change x by (((-5) - (x position)) * (0.2))\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [start v]\nset [ghost v] effect to (0)\nrepeat until <<touching (mouse-pointer v)?> and <mouse down?>>\n    if <touching (mouse-pointer v)?> then\n        set size to (120) %\n        set [ghost v] effect to (15)\n    else\n        set size to (100) %\n        set [ghost v] effect to (0)\n    end\nend\nset size to (100) %\nclear graphic effects\nbroadcast (Start Game v)\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\nclear graphic effects\n\n@Thumbnail\n\nwhen flag clicked\nhide\n\n@words\n\nwhen flag clicked\ngo to [front v] layer\nset [ghost v] effect to (0)\nhide\nwait (3) seconds\ngo to [front v] layer\nset [x v] to [30]\nshow\ngo to x: (300) y: (0)\nrepeat until <(x position) = [0]>\n    set [x v] to ((x) / (1.1))\n    change x by ((0) - (x))\nend\n\nwhen flag clicked\nwait (5) seconds\nbroadcast (Fade v)\nforever\n    change [ghost v] effect by (5)\nend\n\nwhen I receive [start screen v]\nhide\n\nwait (1) seconds\n\n@Sprite1\n\nwhen flag clicked\nwait (1) seconds\ngo to [front v] layer\ngo to x: (0) y: (0)\nset [sine v] to [0]\npoint in direction (90)\nforever\n    change [sine v] by (7.5)\n    point in direction ((([sin v] of (sine) ) * (15)) + (90))\n    set size to ((([sin v] of ((sine) * (2)) ) * (25)) + (100)) %\nend\n\nwhen I receive [fade v]\nforever\n    change [ghost v] effect by (5)\nend\n\nstop [other scripts in sprite v]\n\npoint in direction (90)\n\nwhen flag clicked\nwait (1) seconds\nshow\nwait (7) seconds\nbroadcast (start v)\nhide\n\nwhen flag clicked\nwait (1) seconds\nplay sound [TheFatRat - Jackpot \(Jackpot EP Track 1\).mp3 v] until done\n\n