Platformer Part-1 (Normal)

Instructions: ╔∘ ★ ∘══════╗\n::PLATFORMER::\n╚══════∘ ★ ∘╝\n@jindalsargun\nLove, fav, remix, and follow! \nPart-01 - https://scratch.mit.edu/projects/511930996/\nPart-02 - https://scratch.mit.edu/projects/520595337/\nPart-03 - https://scratch.mit.edu/projects/524135352/\nPart-04 - https://scratch.mit.edu/projects/526959655/\nPart-05 - https://scratch.mit.edu/projects/528697474/\nPart-06 - https://scratch.mit.edu/projects/529835140/\nPart-07 - https://scratch.mit.edu/projects/530465929/\nPart-08 - https://scratch.mit.edu/projects/532679243/\nPart-09 - https://scratch.mit.edu/projects/535570060/\nPart-10 - https://scratch.mit.edu/projects/538021056/  \nPart-11 - https://scratch.mit.edu/projects/540774309/\nPart-12 - https://scratch.mit.edu/projects/542317456/\n✧ - - - - ✧ - - - - ✧ - - - - ✧ - - - - ✧ - - - - ✧ - - - - ✧\n                               INSTRUCTIONS\nPress WASD or arrow buttons to move.\nAvoid lava (red) and spikes (grey).\nThere are 12 levels.\nEvery level is possible.\n     ✧ - - - - ✧ - - - - ✧ - - - - ✧ - - - - ✧ - - - - ✧ - - - - ✧\n                                    UPDATES\n7th April 2021 - shared\n8th April 2021 - did some changes in the costumes.\n                       - added background music\n9th April 2021 - debugging\n                       - added outro\n12th April 2021 - added another level\n                         - added a few more spikes\n                         - added mute and unmute button\n13th April 2021 - increased difficulty level\n                         - added another level\n                         - changed background music 'cause I got bored\n                         - added the tail kinda thing behind it\n14th April 2021 - removed the tail kinda thing behind. \n                            the player 'cause I hated it     \n1st May 2021 - added more detail on a request in the.                        comments.\n13th May 2021 - made it mobile-friendly in response to a comment\n✧ - - - - ✧ - - - - ✧ - - - - ✧ - - - - ✧ - - - - ✧ - - - - ✧

@Stage\n\nwhen flag clicked\nhide\nforever\n    switch costume to ((Level) + (1))\nend\n\nwhen I receive [tn v]\nforever\n    forever\n        switch backdrop to (backdrop2 v)\n    end\nend\n\n@thumbnail\n\nwhen [timer v] > ()\npoint in direction (90)\nset size to (100) %\ngo to x: (0) y: (375)\nrepeat (30)\n    change y by ((y position) / (-5))\nend\n\nwhen flag clicked\nforever\n    reset timer\nend\n\nwhen flag clicked\nforever\n    show\n    go to [front v] layer\n    go [forward v] (1000) layers\n    set [ghost v] effect to (100)\n    go to x: (0) y: (400)\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [13]> then\n        wait (3) seconds\n        broadcast (tn v)\n    end\nend\n\n@object\n\nwhen flag clicked\nset [1' v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nforever\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [x v] by (.8)\n    end\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < [50]>>> then\n        change [x v] by (-0.8)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\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 ((x) * (-1))\n                            change y by (-5)\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y v] by (-1)\n    change y by (y)\n    if <touching (ground v)?> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <touching (ground v)?> then\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            set [y v] to [13]\n        end\n    end\n    if <[228] < (x position)> then\n        set [x v] to [0]\n        set [y v] to [0]\n        go to x: (-222) y: (-72)\n        point in direction (90)\n        change [level v] by (1)\n    end\n    if <<touching (spikes v)?> or <touching (lava v)?>> then\n        repeat (5)\n            change [ghost v] effect by (20)\n        end\n        set [y v] to [0]\n        set [x v] to [0]\n        set [ghost v] effect to (0)\n        go to x: (-222) y: (-72)\n    end\n    if <(Level) = [13]> then\n        broadcast (end v)\n    end\nend\n\nwhen I receive [start v]\ngo to x: (-222) y: (-72)\nshow\n\nwhen I receive [tn v]\nhide\n\n@ground\n\nwhen flag clicked\nset [level v] to [0]\nhide\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\nset [level v] to [1]\ngo to [front v] layer\nshow\n\nwhen I receive [tn v]\nhide\n\n@gold\n\nwhen flag clicked\nforever\n    if <(Level) = [13]> then\n        show\n    end\nend\n\nwhen I receive [start v]\nhide\n\nwhen I receive [tn v]\nforever\n    hide\nend\n\n@story\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to [front v] layer\nshow\nwait (3) seconds\nrepeat (4)\n    next costume\n    wait (2) seconds\nend\nbroadcast (start v)\nforever\n    hide\nend\n\nwhen I receive [tn v]\nhide\n\n@spikes\n\nwhen flag clicked\nset [level v] to [0]\nhide\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [start v]\ngo to [front v] layer\nshow\n\nwhen I receive [tn v]\nhide\n\n@lava\n\nwhen flag clicked\nset [level v] to [0]\ngo to [front v] layer\nhide\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [start v]\ngo to [front v] layer\nshow\n\nwhen I receive [tn v]\nhide\n\n@outro\n\nwhen I start as a clone\nshow\nset [ghost v] effect to (100)\nset size to (pick random (10) to (355)) %\ngo to x: (600) y: (pick random (-167) to (167))\nset [ghost v] effect to (pick random (65) to (112))\nglide (pick random (2) to (6)) secs to x: (-300) y: (pick random (-167) to (167))\nrepeat (10)\n    set [color v] effect to (20)\nend\ndelete this clone\n\nwhen I receive [tn v]\ngo to [front v] layer\nhide\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I receive [tn v]\nforever\n    next costume\nend\n\n@Outro\n\nwhen flag clicked\nhide\n\nwhen I receive [tn v]\ngo to x: (0) y: (0)\ngo to [front v] layer\nswitch costume to (costume2 v)\nshow\nforever\n    point towards (mouse-pointer v)\nend\n\n@MUTE button\n\nwhen flag clicked\nswitch costume to (unmute v)\nhide\nforever\n    play sound [Amadeus Legendary EDM Release v] until done\nend\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\nforever\n    go to [front v] layer\n    show\nend\n\nwhen this sprite clicked\nif <(costume [name v]) = [unmute]> then\n    play sound [click v] until done\n    switch costume to (mute v)\n    forever\n        stop all sounds\n    end\nend\nif <(costume [name v]) = [mute]> then\n    play sound [click v] until done\n    switch costume to (unmute v)\n    play sound [Amadeus Legendary EDM Release v] until done\nend\n\n