RANDOM Platformer -2

Instructions: Always jump on mountain/ hill levels or else you will fall in to quick sand or don’t run it to walls \n\nUse arrow keys. \n\nSometimes you get the same level.\n\nFirst project above 50 views\n\nLet’s  get this to 750 views, 45 hearts and 35 stars than I’ll add 10 more levels I know you can do it

@Stage\n\nwhen flag clicked\nforever\n    play sound [Alan Walker - Faded \(Instrumental Version\).mp3 v] until done\nend\n\n@Player\n\nwhen flag clicked\ngo to x: (-192) y: (-96)\nset [yv v] to [0]\nset [xv v] to [0]\n\n\n\npoint in direction (90)\n\nwhen flag clicked\nset rotation style [left-right v]\n\nwhen flag clicked\nforever\n    switch costume to (costume1 v)\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [xv v] by (-1.2)\n        point in direction (-90)\n    else\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            change [xv v] by (1.2)\n            point in direction (90)\n        end\n    end\n    set [xv v] to ((xv) * (0.85))\n    change x by (xv)\n    if <<touching (ground v)?> or <touching (mover v)?>> then\n        change y by (1)\n        if <<touching (ground v)?> or <touching (mover v)?>> then\n            change y by (1)\n            if <<touching (ground v)?> or <touching (mover v)?>> then\n                change y by (1)\n                if <<touching (ground v)?> or <touching (mover v)?>> then\n                    change y by (1)\n                    if <<touching (ground v)?> or <touching (mover v)?>> then\n                        change y by (1)\n                        if <<touching (ground v)?> or <touching (mover v)?>> then\n                            change x by ((xv) * (-1))\n                            change y by (-5)\n                            if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                set [yv v] to [10]\n                                if <(xv) > [0]> then\n                                    set [xv v] to [-5]\n                                else\n                                    set [xv v] to [5]\n                                end\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <(yv) < [-5]>> then\n        change [yv v] by (-1)\n    else\n        change [yv v] by (-2)\n    end\n    change y by (yv)\n    if <<touching (ground v)?> or <touching (mover v)?>> then\n        change y by ((yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <touching (ground v)?>> then\n        change [yv v] by (15)\n        change y by (1)\n    end\nend\n\nwhen flag clicked\nforever\n    switch costume to (costume2 v)\nend\n\nwhen flag clicked\nforever\n    if <(x position) = [240]> then\n        broadcast (next level v)\n        go to x: (-192) y: (-113)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(y position) = [-180]> or <(y position) = [-181]>> then\n        death\n        set [yv v] to [0]\n    end\nend\n\ndefine death\nclear graphic effects\nrepeat (8)\n    change [ghost v] effect by (15)\nend\ngo to x: (-192) y: (-80)\nclear graphic effects\n\nwhen flag clicked\nforever\n    if <touching color (#ff0000)?> then\n        death\n        set [yv v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    \nend\n\nwhen flag clicked\ngo to [front v] layer\ngo [backward v] (1) layers\n\n@ground\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\n\nwhen I receive [next level v]\nswitch costume to (pick random (2) to (28))\nrepeat (10)\n    go to x: (0) y: (0)\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [5]> then\n        wait (1) seconds\n        glide (3) secs to x: (286) y: (22)\n        wait (1) seconds\n        glide (1.5) secs to x: (0) y: (0)\n        wait (1) seconds\n    end\nend\n\nforever\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [7]> then\n        go to x: (0) y: (-8)\n    end\nend\n\nforever\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [10]> then\n        broadcast (you can’t wall jump v)\n    end\nend\n\nwhen flag clicked\nforever\n    if  then\n        broadcast (byebye v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [11]> then\n        wait (1) seconds\n        go to x: (0) y: (0)\n        wait (1) seconds\n        glide (1) secs to x: (122) y: (89)\n        wait (1) seconds\n        glide (1) secs to x: (11) y: (121)\n        wait (1) seconds\n        glide (0.1) secs to x: (126) y: (151)\n        wait (1) seconds\n        glide (1) secs to x: (21) y: (184)\n        wait (1) seconds\n        glide (2) secs to x: (334) y: (181)\n        go to x: (0) y: (0)\n    end\nend\n\nwait (1) seconds\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [20]> then\n        wait (5) seconds\n        glide (3) secs to x: (286) y: (0)\n        wait (3) seconds\n        glide (1.5) secs to x: (0) y: (0)\n        wait (1) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [25]> then\n        glide (1.5) secs to x: (0) y: (0)\n        go to x: (0) y: (0)\n        wait (1) seconds\n        go to x: (87) y: (44)\n        wait (1) seconds\n        go to x: (225) y: (46)\n        wait (1) seconds\n        go to x: (365) y: (52)\n        wait (1) seconds\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\nclear graphic effects\nchange [ghost v] effect by (100)\ngo to [front v] layer\n\n@lava\n\n