Darkness||A Platformer #All #Platformer

Instructions: Remember to ❤ And ⭐ this project please. This is Darkness, a platformer. \n\nSHOUT OUT TO @-TomToons-\n\nControls=WASD MOBILE and ARROW KEYS\n\nDarkness 1: https://scratch.mit.edu/projects/943860838\nDarkness 2: https://scratch.mit.edu/projects/972696403\n\nCredits to: @77Tigers for the beginning where you click start

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrod1 v)\nbroadcast (intro start v) and wait\nswitch backdrop to (backdrod1 v)\n\nwhen [s v] key pressed\nnext backdrop\n\n@Player\n\nwhen flag clicked\nbroadcast ( Cloud - Setup v) and wait\nset [gravity v] to [-1.5]\nset [jump force v] to [17]\nset [acceleration v] to [1.5]\nset [resistance v] to [0.82]\nReset/Begin\n\ndefine Move : (steps)\nchange [falling v] by (1)\nrepeat (steps)\n    set [last val v] to (x position)\n    change x by ((Speed X) / (steps))\n    Check Touching Block\n    if <(touching) > [0]> then\n        set x to (Last Val)\n        set [speed x v] to [0]\n    end\n    set [last val v] to (y position)\n    change y by ((Speed Y) / (steps))\n    Check Touching Block\n    if <(touching) > [0]> then\n        set y to (Last Val)\n        if <(Speed Y) < [0]> then\n            set [falling v] to [0]\n        end\n        set [speed y v] to [0]\n    end\nend\n\ndefine Check Touching Block\nif <touching (level v)?> then\n    set [touching v] to [1]\nelse\n    set [touching v] to [0]\nend\n\nwhen I receive [tick - player v]\nControls : Up/Down\nControls : Left/Right\nMove : (([abs v] of (Speed Y) ) + ([abs v] of (Speed X) ))\n\ndefine Controls : Up/Down\nif <<key (space v) pressed?> or <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>>> then\n    if <(Falling) < [3]> then\n        set [speed y v] to (Jump Force)\n    end\nend\nchange [speed y v] by (Gravity)\n\ndefine Controls : Left/Right\nif <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(x position) > (mouse x)>>>> then\n    switch costume to (rrrrrrrrrr v)\n    change [speed x v] by ((0) - (Acceleration))\nend\nif <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>>> then\n    switch costume to (lololololol v)\n    change [speed x v] by (Acceleration)\nend\nset [speed x v] to ((Speed X) * (Resistance))\n\ndefine Reset/Begin\nset [scene # v] to [1]\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [falling v] to [99]\nset [player color v] to [3]\npoint in direction (90)\nBegin Scene # [1] Go : X [-147]\nset y to (-49)\nswitch costume to (lololololol v)\n\nwhen I receive [game loop v]\nset [ghost v] effect to (0)\nforever\n    broadcast (Tick - Player v)\n    add (x position) to [my values to send v]\n    add (y position) to [my values to send v]\n    add (direction) to [my values to send v]\n    add (Scene #) to [my values to send v]\n    broadcast (Cloud - Tick v)\n    broadcast (Tick - Last v)\nend\n\ndefine Begin Scene # (num) Go : X (x)\nset [scene # v] to (num)\nif <not <(Scene #) = [10]>> then\n    set [x v] to [-150]\n    set [y v] to [-49]\n    set x to (x)\n    broadcast (Change Scene v)\n    stop [other scripts in sprite v]\n    wait (0) seconds\n    broadcast (Game Loop v)\nelse\n    set [x v] to [0]\n    set [y v] to [-70]\n    broadcast (Change Scene v)\n    broadcast (End v)\n    stop [this script v]\nend\n\nwhen I receive [loose life v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nwait (0.5) seconds\nBegin Level\n\ndefine Begin Level\nset [scene # v] to (Scene #)\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [falling v] to [99]\npoint in direction (90)\nBegin Scene # (Scene #) Go : X [-190]\nset y to (-49)\nswitch costume to (lololololol v)\n\nwhen I receive [x,y v]\ngo to x: (X) y: (Y)\n\nwhen I receive [end v]\ngo to x: (0) y: (-70)\nswitch costume to (lololololol v)\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen I receive [tick - last v]\nif <(x position) > [235]> then\n    Begin Scene # ((Scene #) + (1)) Go : X [-235]\nend\nif <<touching (ground boy v)?> or <touching (spikys o v)?>> then\n    broadcast (Loose Life v)\nend\n\n@Level\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [front v] layer\n\nwhen I receive [change scene v]\nswitch costume to (join [Scene] (Scene #))\nbroadcast (X,Y v)\n\n@GROUND BOY\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\ngo to [back v] layer\nforever\n    set [ghost v] effect to (100)\nend\n\nwhen I receive [change scene v]\nswitch costume to (blank v)\n\n@Light\n\nwhen flag clicked\nforever\n    go to [back v] layer\n    go to x: ([x position v] of [player v]) y: ([y position v] of [player v])\nend\n\n@thumb\n\nwhen flag clicked\ngo to [front v] layer\nset [ghost v] effect to (100)\n\n@SPIKYS O\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [back v] layer\n\nwhen I receive [change scene v]\nswitch costume to (blank v)\nswitch costume to (join [Scene] (Scene #))\n\n@Button\n\nwhen flag clicked\ngo to [front v] layer\ngo to x: (0) y: (-20)\nset size to (50) %\nshow\nrepeat until <<touching (mouse-pointer v)?> and <mouse down?>>\n    if <touching (mouse-pointer v)?> then\n        set size to (55) %\n    else\n        set size to (50) %\n    end\n    point in direction ((90) + (([sin v] of (movement speed) ) * (-5)))\nend\nhide\nbroadcast (message1 v)\n\nwhen flag clicked\nshow\n\nwhen I receive [message1 v]\nhide\n\n@Title\n\nwhen flag clicked\ngo to [front v] layer\nshow\ngo to x: (0) y: (-10)\nset [movement speed v] to [0]\nforever\n    point in direction ((90) + (([sin v] of (movement speed) ) * (10)))\n    change [movement speed v] by (3)\nend\n\nwhen I receive [message1 v]\nstop [other scripts in sprite v]\nhide\n\nwhen flag clicked\nshow\n\nwhen I receive [message1 v]\nhide\n\n@Sprite1\n\nwhen flag clicked\nshow\n\nwhen I receive [message1 v]\nhide\n\n