Scarce || A Platformer

Instructions:                 Welcome to Scarce || A Platformer\n_____________________________________________\n\nscarce\n/skers/\nadjective\n(especially of food, money, or some other resource) insufficient for the demand. \n\n\n                                    Rules\n_____________________________________________\n\nUse arrow keys or wasd key to move (tap on mobile)\nAvoid spikes\nThat's it\nHave Fun! :)\n\n\nAll levels are possible. \n

@Stage\n\nwhen flag clicked\nforever\n    play sound [Lost In The Woods - PaulRHJT v] until done\nend\n\n@Player\n\ndefine Platformer physics\nchange [yv v] by (-1)\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(x position) > (mouse x)>>> then\n    change [xv v] by (-1)\n    switch costume to (costume2 v)\nend\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n    change [xv v] by (1)\n    switch costume to (costume1 v)\nend\nset [xv v] to ((Xv) * (0.9))\nchange x by (Xv)\nif <<touching (ground v)?> or <touching (moving platforms v)?>> then\n    change y by (1)\nend\nif <<touching (ground v)?> or <touching (moving platforms v)?>> then\n    change y by (1)\nend\nif <<touching (ground v)?> or <touching (moving platforms v)?>> then\n    change y by (1)\nend\nif <<touching (ground v)?> or <touching (moving platforms v)?>> then\n    change y by (1)\nend\nif <<touching (ground v)?> or <touching (moving platforms v)?>> then\n    change y by (-4)\n    change x by ((Xv) * (-1))\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > ((y position) + (20))>>> then\n        set [yv v] to [15]\n        if <(Xv) > [0]> then\n            set [xv v] to [-10]\n        else\n            set [xv v] to [10]\n        end\n    end\nend\nchange y by (Yv)\nif <<touching (ground v)?> or <touching (moving platforms v)?>> then\n    change y by ((Yv) * (-1))\n    set [yv v] to [0]\nend\nchange y by (-1)\nif <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > ((y position) + (20))>>> and <<touching (ground v)?> or <touching (moving platforms v)?>>> then\n    set [yv v] to [15]\nend\nchange y by (1)\nif <touching (spikes v)?> then\n    go to x: (-180) y: (0)\nend\nif <(y position) < [-180]> then\n    go to x: (-180) y: (0)\nend\nif <(x position) > [220]> then\n    change [level v] by (1)\n    go to x: (-180) y: (0)\n    broadcast (NEW LEVEL v)\nend\nif <touching (trampolins v)?> then\n    set [yv v] to [25]\nend\n\nwhen I receive [start v]\nshow\nset [level v] to [1]\ngo to x: (-190) y: (-72)\nforever\n    Platformer physics\nend\n\nwhen flag clicked\nhide\n\n@ground\n\nwhen I receive [new level v]\nforever\n    switch costume to (LEVEL)\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\n@Thumbnail\n\nwhen flag clicked\nshow\nwait (1.5) seconds\nbroadcast (start v)\n\nwhen I receive [start v]\nhide\n\n@Clouds\n\nwhen flag clicked\nrepeat (5)\n    create clone of (_myself_ v)\n    wait (1) seconds\n    hide\nend\n\nwhen I start as a clone\nforever\n    switch costume to (pick random (1) to (4))\n    set size to (pick random (40) to (70)) %\n    go to [back v] layer\n    set [ghost v] effect to (pick random (5) to (20))\n    if <(pick random (1) to (2)) = [1]> then\n        show\n        go to x: (-200) y: (pick random (20) to (180))\n        repeat (80)\n            change x by (5)\n        end\n        hide\n        wait (pick random (1) to (5)) seconds\n    end\n    if <(pick random (1) to (2)) = [2]> then\n        show\n        go to x: (220) y: (pick random (20) to (180))\n        repeat (80)\n            change x by (-7)\n        end\n        hide\n        wait (pick random (1) to (5)) seconds\n    end\nend\n\n@Story\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\nforever\n    switch costume to (LEVEL)\nend\n\n@Spikes\n\nwhen flag clicked\nhide\n\nwhen I receive [new level v]\nshow\nforever\n    switch costume to (LEVEL)\nend\n\n@trampolins\n\nwhen flag clicked\nhide\nforever\n    if <(LEVEL) = [11]> then\n        show\n    else\n        hide\n    end\nend\n\n