Pixel Dash 1 Platformer

Instructions: Arrow or WASD keys to move!!! Be shore to first watch the trailer before playing so you know the story by going to my studio, link bellow!!! NEW GOAL\n50 hearts and likes for the actual platformer part 2, so please like and star, I means alot!\nIt is out Pixel Dash Part Two! https://scratch.mit.edu/projects/454571762/!!!!

@Stage\n\nwhen I receive [level passed v]\nif <(levels) = [5]> then\n    next backdrop\nend\n\nwhen flag clicked\nswitch backdrop to (sky v) and wait\nforever\n    play sound [Alan Walker - Nebula \(New Song 2019\) v] until done\nend\n\n@player\n\ndefine fast\nrepeat (6)\n    if <touching (levels v)?> then\n        change y by (1)\n    end\nend\n\ndefine ycoll\nrepeat until <not <touching (levels v)?>>\n    if <(y) > [0]> then\n        change y by (-1)\n    else\n        change y by (1)\n    end\nend\n\ndefine xcoll\nrepeat until <not <touching (levels v)?>>\n    if <(x) > [0]> then\n        change x by (-1)\n    else\n        change x by (1)\n    end\nend\n\nwhen I receive [start game v]\ngo to x: (-212) y: (-75)\npoint in direction (90)\nset rotation style [left-right v]\nset [x v] to [0]\nset [y v] to [0]\nset [levels v] to [0]\nforever\n    change [y v] by (-1)\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [x v] by (1)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [x v] by (-1)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching (levels v)?> then\n        fast\n        if <touching (levels v)?> then\n            change y by (-6)\n            xcoll\n            if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                set [y v] to [12]\n                if <([abs v] of (x) ) = (x)> then\n                    set [x v] to [-8]\n                else\n                    set [x v] to [8]\n                end\n            else\n                set [x v] to [0]\n            end\n        end\n    end\n    change y by (y)\n    if <touching (levels v)?> then\n        ycoll\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <(y) < [0]>> then\n            set [y v] to [14]\n        else\n            set [y v] to [0]\n        end\n    end\n    if <touching (line v)?> then\n        go to x: (-212) y: (-75)\n        broadcast (level passed v)\n        change [levels v] by (1)\n    end\n    if <touching (spike v)?> then\n        fade away\n    end\n    if <touching (lava v)?> then\n        fade away\n    end\n    if <touching (robots v)?> then\n        fade away\n    end\n    if <touching (lasers v)?> then\n        fade away\n    end\nend\n\ndefine fade away\nrepeat (20)\n    change [ghost v] effect by (5)\nend\ngo to x: (-212) y: (-75)\nrepeat (1)\n    change [ghost v] effect by (-100)\nend\n\nwhen flag clicked\nswitch costume to (pixel man v)\n\n@Levels\n\nwhen I receive [level passed v]\nnext costume\n\nwhen flag clicked\nshow\nswitch costume to (level 1 v)\n\n@line\n\n@Boss\n\nwhen I receive [level passed v]\nif <(levels) = [10]> then\n    go to x: (-80) y: (59)\n    show\n    broadcast (boss reached v)\nend\n\nwhen I receive [boss reached v]\nwait (1) seconds\nsay [I am the king of this land!] for (6) seconds\nsay [How dare you disturb me!] for (4) seconds\nsay [Now you will feel the tolerance of your acts!] for (6) seconds\nsay [Robots Attack!  ] for (4) seconds\nhide\nwait (1) seconds\nbroadcast (robots v)\n\nwhen flag clicked\nhide\n\nwhen I receive [next attack v]\ngo to x: (-88) y: (209)\nshow\nwait (1) seconds\nsay [Wow!] for (2) seconds\nsay [Your stronger than I thought!] for (4) seconds\nsay [But you're no match for my powers.] for (6) seconds\nbroadcast (lasers! v)\n\nwhen I receive [lasers! v]\nwait (1) seconds\n\nwhen I receive [boss dead v]\nwait (1) seconds\nhide\nwait (1) seconds\ngo to x: (-78) y: (61)\nshow\nwait (1) seconds\nsay [Nooo!] for (2) seconds\nsay [You have defeated me! ] for (6) seconds\nwait (1) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nwait (1) seconds\nbroadcast (end v)\n\n@spike\n\nwhen I receive [level passed v]\nnext costume\n\nwhen flag clicked\nswitch costume to (spike 1 v)\n\n@Sprite1\n\nwhen flag clicked\ngo [forward v] (5) layers\nshow\n\nwhen this sprite clicked\nhide\nbroadcast (start game v)\n\n@Robots\n\nwhen I receive [robots v]\nhide\nrepeat (10)\n    create clone of (_myself_ v)\n    wait (2) seconds\nend\nbroadcast (Next Attack v)\n\nwhen flag clicked\nhide\n\ndefine robot move\nmove (move speed) steps\n\nwhen I start as a clone\ngo to x: (201) y: (-74)\nshow\nwait (1) seconds\nset [move speed v] to [-10]\nforever\n    robot move\nend\n\nwhen I start as a clone\nwait until <not <touching (_edge_ v)?>>\nforever\n    if <touching (_edge_ v)?> then\n        hide\n    end\nend\n\n@lava\n\nwhen I receive [level passed v]\nnext costume\n\nwhen flag clicked\nswitch costume to (lava1 v)\n\n@Sprite5\n\nwhen flag clicked\nhide\n\nshow\ngo [forward v] (10) layers\n\n@lasers\n\nwhen I receive [lasers! v]\nswitch costume to (costume2 v)\nshow\nwait (2) seconds\nhide\nwait (2) seconds\nswitch costume to (costume1 v)\nshow\nwait (2) seconds\nhide\nwait (2) seconds\nswitch costume to (costume1 v)\nshow\nwait (2) seconds\nhide\nwait (2) seconds\nswitch costume to (costume2 v)\nshow\nwait (2) seconds\nhide\nwait (2) seconds\nswitch costume to (costume1 v)\nshow\nwait (2) seconds\nhide\nwait (2) seconds\nswitch costume to (costume2 v)\nshow\nwait (2) seconds\nhide\nbroadcast (boss dead v)\nstop [this script v]\n\nwhen flag clicked\nhide\n\n@Sprite3\n\nwhen I receive [end v]\nwait (1) seconds\nshow\nwait (1) seconds\nswitch costume to (costume2 v)\nwait (1) seconds\nsay [Hello!] for (2) seconds\nwait (1) seconds\nbroadcast (ending v)\n\nwhen flag clicked\nhide\nswitch costume to (start v)\ngo to x: (56) y: (-66)\n\n@Sprite6\n\nwhen flag clicked\nhide\ngo [forward v] (2) layers\nswitch costume to (costume1 v)\n\nwhen I receive [ending v]\nwait (1) seconds\nshow\nwait (1) seconds\nswitch costume to (costume2 v)\nwait (4) seconds\nswitch costume to (costume3 v)\nwait (4) seconds\nswitch costume to (costume4 v)\nwait (4) seconds\nswitch costume to (costume5 v)\n\n@Text\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\n\nwhen I receive [level passed v]\nnext costume\n\n