Dark || Platformer

Instructions: Welcome little fellow to a scary adventure\n\nWhat you got to do: Play with your hands\n\nLoved and Favorited by - @TeachMeToHowl\n\nControls: W A S D and Arrow Keys \n(This can be played on mobile) (All levels are possible)\n\nCredits: All platform games    You the viewer   This is a gift for - \n(@Berricake, Shadow_Kid21, @-NerdAnimator-, And @TeachMeToHowl)\n\nHashtags: #Platformer #Scary #Dark #Games #Music #Halloween

@Stage\n\nwhen flag clicked\nforever\n    play sound [hollow-knight-ost-enter-hallownest-youtubemp3free v] until done\nend\n\nwhen flag clicked\nswitch backdrop to (dark v)\n\n@Platforms\n\nwhen I receive [end v]\n\nhide\n\nwhen flag clicked\nshow\ngo to [front v] layer\nswitch costume to (01 v)\n\nwhen I receive [levelup v]\nnext costume\n\nwhen I receive [now v]\n\n@Spikes\n\nhide\n\nwhen flag clicked\ngo to [front v] layer\nshow\nswitch costume to (01 v)\n\nwhen I receive [levelup v]\nnext costume\n\nwhen I receive [now v]\n\n@Dark\n\nwhen flag clicked\nhide\n\nshow\n\n@Effects\n\nwhen flag clicked\nshow\nforever\n    go to [back v] layer\n    set [ghost v] effect to (50)\n    go to x: (0) y: (0)\n    glide (8) secs to x: (-500) y: (0)\nend\n\nhide\n\nwhen I receive [next level v]\nstop [other scripts in sprite v]\nforever\n    go to [back v] layer\n    set [ghost v] effect to (50)\n    go to x: (0) y: (0)\n    glide (5) secs to x: (-500) y: (0)\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [now v]\n\n@Particals\n\nwhen flag clicked\nwait (0.1) seconds\nset [gameyo v] to [false]\nResetGhosting\nforever\n    if <(GameYo) = [false]> then\n        create clone of (_myself_ v)\n    else\n        delete this clone\n    end\nend\n\nhide\n\ndefine ResetGhosting\nset [ghost v] effect to (100)\n\nwhen I start as a clone\nswitch costume to (pick random (1) to (2))\ngo [backward v] (100) layers\nResetGhosting\nshow\ngo to (random position v)\nrepeat (10)\n    change [ghost v] effect by (-4)\n    move (-1) steps\nend\nrepeat (10)\n    move (-1) steps\n    turn right (15) degrees\nend\nrepeat (10)\n    move (1) steps\n    turn right (15) degrees\nend\nrepeat (10)\n    change [ghost v] effect by (4)\n    move (1) steps\nend\ndelete this clone\n\ndefine Fade| In Or Out?| (inorout  ) Speed| (speed)\nif <(inorout  ) = [in]> then\n    repeat (speed)\n        change [ghost v] effect by (-10)\n    end\nend\nif <(inorout  ) = [out]> then\n    repeat (speed)\n        change [ghost v] effect by (10)\n    end\nend\n\nwhen I receive [now v]\n\n@More stuff\n\nwhen flag clicked\nshow\nclear graphic effects\nforever\n    go to (player v)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\npoint in direction (pick random (1) to (360))\nset [color v] effect to (pick random (1) to (200))\nrepeat (20)\n    move (5) steps\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\nwhen I receive [now v]\n\n@Player Light\n\nwhen flag clicked\nhide\nset [size v] to [0]\nset [clone # v] to [1]\ncreate clone of (_myself_ v)\nset [size v] to [22]\nset [clone # v] to [2]\ncreate clone of (_myself_ v)\nset [size v] to [45]\nset [clone # v] to [3]\ncreate clone of (_myself_ v)\nset [size v] to [67]\nset [clone # v] to [4]\ncreate clone of (_myself_ v)\n\nhide\n\nwhen I start as a clone\nshow\nswitch costume to (Clone #)\nforever\n    change [size v] by (5)\n    go to (player v)\n    set size to ((100) + (([cos v] of (size) ) * (10))) %\n    set [brightness v] effect to (([sin v] of ((size) * (3)) ) * (2))\n    go to [back v] layer\nend\n\nwhen I receive [now v]\n\nhide\n\n@Player\n\nwhen flag clicked\nset size to (65) %\ngo to [front v] layer\nswitch costume to (costume1 v)\nset [ghost v] effect to (0)\nshow\ngo to x: (-180) y: (-50)\nset [level v] to [1]\nset [x v] to [0]\nset [y2 v] to [0]\npoint in direction (90)\nforever\n    change [y2 v] by (-1)\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(x position) > (mouse x)>>> then\n        switch costume to (costume2 v)\n        change [x v] by (-0.7)\n    end\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        switch costume to (costume1 v)\n        change [x v] by (0.7)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching (platforms v)?> then\n        change y by (1)\n    end\n    if <touching (platforms v)?> then\n        change y by (1)\n    end\n    if <touching (platforms v)?> then\n        change y by (1)\n    end\n    if <touching (platforms v)?> then\n        change y by (1)\n    end\n    if <touching (platforms v)?> then\n        change y by (-4)\n        change x by ((x) * (-1))\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            set [y2 v] to [10]\n            if <([abs v] of (x) ) = (x)> then\n                set [x v] to [-5]\n            else\n                set [x v] to [5]\n            end\n        else\n            set [x v] to [0]\n        end\n    end\n    change y by (y2)\n    if <touching (platforms v)?> then\n        change y by ((0) - (y2))\n        set [y2 v] to [1]\n    end\n    change y by (-1)\n    if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> and <touching (platforms v)?>> then\n        set [y2 v] to [15]\n    end\n    change y by (1)\n    if <(y position) > [180]> then\n        set [y2 v] to [0]\n    end\nend\n\nhide\n\nwhen I receive [now v]\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    if <<key (b v) pressed?> or <touching (spikes v)?>> then\n        go to x: (-180) y: (-50)\n        broadcast (dead v)\n    end\n    if <(x position) > [246]> then\n        go to x: (-180) y: (-50)\n        broadcast (levelup v)\n        change [level v] by (1)\n    end\n    if <(Level) = [15]> then\n        broadcast (end v)\n        stop [other scripts in sprite v]\n    end\nend\n\n@Moon\n\nwhen flag clicked\ngo to [back v] layer\nshow\ngo to x: (218) y: (160)\nset size to (100) %\nforever\n    repeat (40)\n        change size by (0.4)\n    end\n    repeat (40)\n        change size by (-0.4)\n    end\nend\n\nhide\n\nwhen I receive [now v]\n\n