Slime World | A Scrolling Platformer

Instructions: Slime World | A Scrolling Platformer | ANoobLol12345\n----------------------------------------------------------------------\nHit that green flag and play https://turbowarp.org/551770149 Turbowarp link\n-Move the player using arrow keys\n-Dodge the spikes\n-Get to the end\n*Lagging may happen, just go somewhere closer to the wifi*

@Stage\n\nwhen flag clicked\nforever\n    play sound [MBB - Beach \[NCS BEST OF\] v] until done\nend\n\n@sky\n\nwhen flag clicked\ngo to [back v] layer\ngo to x: (0) y: (0)\nswitch costume to (dusk v)\nset [day v] to [1]\nforever\n    wait (20) seconds\n    fin stage\n    switch time period\n    wait (30) seconds\n    fin stage\n    wait (30) seconds\nend\n\nwhen I start as a clone\nrepeat (100)\n    change [ghost v] effect by (1)\nend\ndelete this clone\n\ndefine fin stage\ncreate clone of (_myself_ v)\ngo to [back v] layer\nnext costume\n\ndefine switch time period\nif <(day) = [1]> then\n    set [day v] to [0]\n    broadcast (dusk v)\nelse\n    set [day v] to [1]\n    broadcast (dawn v)\nend\n\n@Ground\n\nwhen I receive [tick v]\nif <(costume [name v]) = [NONE]> then\n    go to x: (0) y: (0)\n    hide\n    stop [this script v]\nelse\n    Move ((-x-) - (item (6) of [player v])) ((-y-) - (item (7) of [player v]))\nend\n\ndefine Move (x) (y)\nswitch costume to (none v)\ngo to x: (x) y: (y)\nif <<(x position) = (x)> and <(y position) = (y)>> then\n    show\nelse\n    hide\nend\nswitch costume to (-n-)\n\ndefine Clone (-x-) (-y-) (-n-)\nset [-x- v] to (-x-)\nset [-y- v] to (-y-)\nset [-n- v] to ((-n-) + (1))\nswitch costume to ((-n-) + (1))\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\n\nrepeat (10)\n\nClone ((480) * ()) [-100] [4]\n\nwhen flag clicked\nhide\nClone ((480) * (0)) [-100] [1]\nClone ((480) * (1)) [-100] [2]\nClone ((480) * (2)) [-100] [3]\nClone ((480) * (3)) [-100] [4]\nClone ((480) * (4)) [-100] [5]\nClone ((480) * (5)) [-100] [6]\nClone ((480) * (6)) [-100] [7]\nforever\n    broadcast (Tick v)\nend\n\n@Bad\n\nwhen I receive [tick v]\nif <(costume [name v]) = [NONE]> then\n    go to x: (0) y: (0)\n    hide\n    stop [this script v]\nelse\n    Move ((-x-) - (item (6) of [player v])) ((-y-) - (item (7) of [player v]))\nend\n\ndefine Clone (-x-) (-y-) (-n-)\nset [-x- v] to (-x-)\nset [-y- v] to (-y-)\nset [-n- v] to ((-n-) + (1))\nswitch costume to ((-n-) + (1))\ncreate clone of (_myself_ v)\n\ndefine Move (x) (y)\nswitch costume to (none v)\ngo to x: (x) y: (y)\nif <<(x position) = (x)> and <(y position) = (y)>> then\n    show\nelse\n    hide\nend\nswitch costume to (-n-)\n\nwhen I start as a clone\nshow\n\nwhen flag clicked\nforever\n    if <touching (you v)?> then\n        broadcast (T v)\n    end\nend\n\nwhen flag clicked\nbroadcast (T v)\n\nwhen flag clicked\nhide\nClone ((480) * (0)) [-100] [1]\nClone ((480) * (1)) [-100] [2]\nClone ((480) * (2)) [-100] [3]\nClone ((480) * (3)) [-100] [4]\nClone ((480) * (4)) [-100] [5]\nClone ((480) * (5)) [-100] [6]\nforever\n    broadcast (Tick v)\nend\n\n@You\n\ndefine Player Move\nif <<key (d v) pressed?> or <<key (right arrow v) pressed?> or <<mouse down?> and <[50] < (mouse x)>>>> then\n    replace item (1) of [player v] with ((item (1) of [player v]) + (1))\n    replace item (3) of [player v] with [90]\nend\nif <<key (a v) pressed?> or <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < [-50]>>>> then\n    replace item (1) of [player v] with ((item (1) of [player v]) - (1))\n    replace item (3) of [player v] with [-90]\nend\nreplace item (1) of [player v] with ((item (1) of [player v]) * (0.88))\nchange x by (item (1) of [player v])\nswitch costume to (item (3) of [player v])\nrepeat (10)\n    if <touching (ground v)?> then\n        change y by (1)\n    end\nend\nif <touching (ground v)?> then\n    change x by (() - (item (1) of [player v]))\n    change y by (-10)\n    if <<key (w v) pressed?> or <<key (up arrow v) pressed?> or <<mouse down?> and <[50] < (mouse y)>>>> then\n        replace item (1) of [player v] with ((6) - ((12) * <not <(item (1) of [player v]) < [0]>>))\n        replace item (2) of [player v] with [10]\n    end\nend\nchange y by (-1)\nif <<touching (ground v)?> and <<key (w v) pressed?> or <<key (up arrow v) pressed?> or <<mouse down?> and <[50] < (mouse y)>>>>> then\n    replace item (2) of [player v] with [14]\nend\nchange y by (1)\nreplace item (2) of [player v] with ((item (2) of [player v]) - (1))\nchange y by (item (2) of [player v])\nif <touching (ground v)?> then\n    change y by (() - (item (2) of [player v]))\n    replace item (2) of [player v] with [0]\nend\nreplace item (4) of [player v] with ((item (4) of [player v]) + ((x position) - ((item (4) of [player v]) - (item (6) of [player v]))))\nreplace item (5) of [player v] with ((item (5) of [player v]) + ((y position) - (((item (5) of [player v]) - (item (7) of [player v])) - (50))))\nreplace item (6) of [player v] with ((item (6) of [player v]) + (((item (4) of [player v]) - (item (6) of [player v])) / (10)))\nreplace item (7) of [player v] with ((item (7) of [player v]) + (((item (5) of [player v]) - (item (7) of [player v])) / (5)))\nset x to ((item (4) of [player v]) - (item (6) of [player v]))\nset y to (((item (5) of [player v]) - (item (7) of [player v])) - (50))\nif <(item (7) of [player v]) < [-400]> then\n    Setting\nend\n\ndefine Setting\nset size to (150) %\npoint in direction (90)\ngo to x: (0) y: (0)\ndelete (all) of [player v]\nadd [0] to [player v]\nadd [0] to [player v]\nadd [90] to [player v]\nadd [0] to [player v]\nadd [-100] to [player v]\nadd [0] to [player v]\nadd [-100] to [player v]\n\nwhen I receive [t v]\nSetting\nforever\n    Player Move\nend\n\nwhen flag clicked\nforever\n    if <touching (bad v)?> then\n        broadcast (T v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (bad2 v)?> then\n        broadcast (T v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (crown v)?> then\n        broadcast (Win v)\n    end\nend\n\n@notif\n\nwhen flag clicked\ngo to x: (0) y: (50)\nhide\nwait (pick random (8) to (15)) seconds\nshow\nrepeat until <(y position) < [6]>\n    change y by (((5) - (y position)) / (6))\nend\nwait (3.5) seconds\nrepeat until <(y position) > [49.5]>\n    change y by (((y position) + (5)) / (5))\nend\nhide\nforever\n    wait (pick random (14) to (26)) seconds\n    show\n    repeat until <(y position) < [6]>\n        change y by (((5) - (y position)) / (6))\n    end\n    wait (3.5) seconds\n    repeat until <(y position) > [49.5]>\n        change y by (((y position) + (5)) / (5))\n    end\n    hide\nend\n\nwhen I receive [alert v]\nstop [other scripts in sprite v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nhide\n\nwhen I receive [tick v]\ngo to [front v] layer\n\n