Pixel || A Platformer

Instructions: Move with arrow keys / w a d / jump with space\n\n9 Levels!\n\n\nThanks for 88 ❤️ and 64 ⭐️!\n\n7/20/2021 #28 German Games Trending!

@Stage\n\nwhen flag clicked\nset volume to (100) %\nforever\n    play sound [Vexento - Pixel Party v] until done\n    wait (5) seconds\nend\n\nwhen I receive [game over v]\nstop all sounds\nplay sound [Lose v] until done\nset volume to (0) %\n\n@Player\n\nwhen flag clicked\nshow\nset [lives v] to [3]\npoint in direction (90)\nset [level: v] to [1]\ngo to x: (-180) y: (50)\nforever\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [speed x v] by (1.5)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [speed x v] by (-1.5)\n    end\n    change x by (Speed X)\n    if <touching (level v)?> then\n        change x by ((Speed X) * (-1))\n        set [speed x v] to [0]\n    else\n        set [speed x v] to ((Speed X) * (0.8))\n    end\n    change y by (Speed Y)\n    if <touching (level v)?> then\n        change y by ((Speed Y) * (-1))\n        set [speed y v] to [0]\n        if <(Lock) = [0]> then\n            if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <key (space v) pressed?>> then\n                start sound [Mario_Jump_-_Gaming_Sound_Effect v]\n                set [speed y v] to [11]\n                set [lock v] to [1]\n            end\n        end\n    else\n        change [speed y v] by (-1)\n        set [lock v] to [0]\n    end\n    if <touching (spikes v)?> then\n        broadcast (Damage v)\n        change [lives v] by (-1)\n        start sound [Crunch v]\n        repeat (10)\n            change [ghost v] effect by (10)\n            change y by (5)\n            turn right (5) degrees\n        end\n        wait (0.5) seconds\n        point in direction (90)\n        go to x: (-180) y: (50)\n        set [ghost v] effect to (0)\n    end\n    if <touching (flag v)?> then\n        set [level: v] to (([costume # v] of [level v]) + (1))\n        start sound [Ding Sound Effect v]\n        go to x: (-180) y: (50)\n    end\nend\n\nwhen [r v] key pressed\ngo to x: (-200) y: (-100)\n\nwhen I receive [game over v]\nhide\n\n@Level\n\nwhen flag clicked\nswitch costume to (level 1 v)\nforever\n    switch costume to (Level:)\nend\n\n@Clouds\n\nwhen flag clicked\nforever\n    go to x: (268) y: (130)\n    glide (pick random (3) to (4)) secs to x: (-268) y: (130)\nend\n\n@Cover\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\ngo to [front v] layer\n\n@Spikes\n\nwhen flag clicked\nhide\nforever\n    if <(Level:) = [2]> then\n        show\n        switch costume to (1 v)\n    end\n    if <(Level:) = [3]> then\n        hide\n    end\n    if <(Level:) = [4]> then\n        show\n        switch costume to (2 v)\n    end\n    if <(Level:) = [5]> then\n        switch costume to (3 v)\n    end\n    if <(Level:) = [6]> then\n        switch costume to (4 v)\n    end\n    if <(Level:) = [7]> then\n        switch costume to (5 v)\n    end\n    if <(Level:) = [8]> then\n        hide\n    end\nend\n\nswitch costume to (5 v)\n\n@Live 1\n\nwhen flag clicked\nswitch costume to (kostüm1 v)\nforever\n    if <(LIVES) = [0]> then\n        switch costume to (kostüm2 v)\n        broadcast (Game Over v)\n        wait (99999999999999999999999999999999999999999999) seconds\n    end\nend\n\n@Live 2\n\nwhen flag clicked\nswitch costume to (kostüm1 v)\nforever\n    if <(LIVES) = [1]> then\n        switch costume to (kostüm2 v)\n    end\nend\n\n@Live 3\n\nwhen flag clicked\nswitch costume to (kostüm1 v)\nforever\n    if <(LIVES) = [2]> then\n        switch costume to (kostüm2 v)\n    end\nend\n\n@Damage\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\nwhen I receive [damage v]\nif <(LIVES) = [0]> then\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\nelse\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\nend\n\n@Text\n\nwhen flag clicked\nhide\n\nwhen I receive [game over v]\nswitch costume to (game over text v)\nshow\n\n@Flag\n\nwhen flag clicked\nshow\nforever\n    if <(Level:) = [9]> then\n        hide\n    end\nend\n\n