Adventure 3 - A Mobile Platformer

Instructions: You'll only understand the concept if you play Adventure 2 first (by concept i meant what you are looking for).\nhttps://scratch.mit.edu/projects/405557423\n\nControls:\nArrow keys, WASD or use the mouse pointer to move around

@Stage\n\nwhen I receive [start v]\nswitch backdrop to (hills of denturinia v)\nforever\n    if <<(Level) > [3]> and <(Level) < [17]>> then\n        switch backdrop to (cave of hearts v)\n    else\n        switch backdrop to (sky v)\n    end\nend\n\n@Player\n\nwhen flag clicked\nset [level v] to [1]\nhide\n\ndefine Reset Level\ngo to x: (-200) y: (0)\nswitch costume to (player1 v)\nset [x v] to [0]\nset [y v] to [0]\nclear graphic effects\nshow\n\nwhen I receive [start v]\nReset Level\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) < (x position)>>> then\n        change [x v] by (-.8)\n    end\n    set [x v] to ((x) * (.9))\n    change x by (x)\n    if <touching (ground v)?> then\n        change y by (2)\n        if <touching (ground v)?> then\n            change y by (2)\n            if <touching (ground v)?> then\n                change y by (2)\n                if <touching (ground v)?> then\n                    change y by (2)\n                    if <touching (ground v)?> then\n                        change y by (2)\n                        if <touching (ground v)?> then\n                            change y by (-5)\n                            change x by ((x) * (-2))\n                            if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > ((y position) + (10))>>> then\n                                if <(x) > [0]> then\n                                    set [x v] to [-5]\n                                else\n                                    set [x v] to [5]\n                                end\n                                set [y v] to [13]\n                            else\n                                set [x v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y v] by (-0.8)\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) + (10))>>> then\n            set [y v] to [12]\n        end\n    end\n    change y by (1)\n    if <<touching (spikes v)?> or <(y position) < [-178]>> then\n        Die\n    end\nend\n\nwhen I receive [start v]\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nswitch costume to (player2 v)\nrepeat (10)\n    change size by (-5)\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\nwhen I receive [start v]\nforever\n    if <(x position) > [239]> then\n        change [level v] by (1)\n        Reset Level\n    end\nend\n\ndefine Die\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nReset Level\n\n@Ground\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\npoint in direction (90)\nswitch costume to (ground1 v)\nshow\nforever\n    go to x: (0) y: (0)\n    switch costume to (Level)\nend\n\n@Spikes\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\npoint in direction (90)\nswitch costume to (spikes1 v)\nshow\nforever\n    go to x: (0) y: (0)\n    switch costume to (Level)\nend\n\n@Words\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\npoint in direction (90)\nswitch costume to (words1 v)\nshow\ngo to [front v] layer\nforever\n    go to x: (0) y: (0)\n    switch costume to (Level)\nend\n\n@Cave\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\ngo to [back v] layer\nhide\ngo to x: (0) y: (0)\npoint in direction (90)\nswitch costume to (cave v)\nforever\n    if <(Level) = [3]> then\n        show\n    else\n        hide\n    end\nend\n\n@Logo\n\nwhen I receive [start v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen flag clicked\nshow\ngo to [front v] layer\ngo to x: (0) y: (30)\npoint in direction (90)\nset [ghost v] effect to (0)\nset size to (0) %\nrepeat (20)\n    change [ghost v] effect by (-5)\n    turn right (18) degrees\n    change size by (7)\nend\nwait (2) seconds\nbroadcast (Start v)\n\nhide\nbroadcast (Start v)\n\n@Screen\n\nwhen I receive [start v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\n\nhide\n\n@Name\n\nwhen I receive [start v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen flag clicked\nshow\nclear graphic effects\ngo to x: (-240) y: (-100)\nset size to (200) %\npoint in direction (90)\nreset timer\nrepeat (40)\n    move ((timer) * (9)) steps\nend\n\nhide\n\n@Diamond of Gold\n\nwhen flag clicked\nswitch costume to (pearl of light v)\ngo to x: (0) y: (0)\npoint in direction (90)\nhide\nforever\n    switch costume to (Level)\n    repeat (10)\n        change y by (1)\n    end\n    repeat (10)\n        change y by (-1)\n    end\n    if <(Level) = [19]> then\n        show\n        if <touching (player v)?> then\n            repeat (20)\n                turn right (15) degrees\n                change [ghost v] effect by (5)\n            end\n        end\n    end\nend\n\n@TN\n\nwhen flag clicked\nforever\n    show\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\nhide\n\n