Adventure - A Mobile Platformer

Instructions: PC:\nWASD or Arrow keys to move\n\nMobile:\nPress the screen

@Stage\n\nwhen flag clicked\nswitch backdrop to (home screen v)\n\nwhen I receive [play v]\nswitch backdrop to (adventure time v)\nforever\n    if <(Level) = [13]> then\n        switch backdrop to (adventurane river v)\n    end\nend\n\n@Player\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nswitch costume to (player2 v)\nrepeat (10)\n    change [ghost v] effect by (5)\n    change size by (-5)\nend\ndelete this clone\n\ndefine Reset Level\nswitch costume to (player1 v)\nclear graphic effects\ngo to x: (-200) y: (30)\nset [x v v] to [0]\nset [y v v] to [0]\nset size to (100) %\nshow\n\ndefine Die\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nReset Level\n\nwhen [r v] key pressed\nReset Level\n\nwhen I receive [play v]\nswitch costume to (player1 v)\nset [level v] to [1]\nset size to (100) %\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 v] by (.9)\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 v] by (-.9)\n    end\n    set [x v v] to ((X v) * (0.9))\n    change x by (X v)\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 x by ((X v) * (-2))\n                            change y by (-5)\n                            if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > ((y position) + (20))>>> then\n                                if <(X v) > [0]> then\n                                    set [x v v] to [-5]\n                                else\n                                    set [x v v] to [5]\n                                end\n                                set [y v v] to [13]\n                            else\n                                set [x v v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y v v] by (-0.8)\n    change y by (Y v)\n    if <touching (ground v)?> then\n        change y by ((Y v) * (-1))\n        set [y v 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) + (20))>>> then\n            set [y v v] to [12]\n        end\n    end\n    change y by (1)\n    if <<touching (spikes v)?> or <touching (death wheel v)?>> then\n        Die\n    end\nend\n\nwhen I receive [play v]\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I receive [play v]\nforever\n    if <(x position) > [239]> then\n        broadcast (Next costume v)\n        change [level v] by (1)\n        Reset Level\n    end\nend\n\n@Ground\n\nwhen I receive [next costume v]\nnext costume\n\nwhen I receive [play v]\nshow\nswitch costume to (ground1 v)\ngo to x: (0) y: (0)\n\nwhen flag clicked\nhide\n\n@Spikes\n\nwhen I receive [next costume v]\nnext costume\n\nwhen I receive [play v]\nshow\nswitch costume to (spike1 v)\ngo to x: (0) y: (0)\nforever\n    go to [back v] layer\nend\n\nwhen flag clicked\nhide\n\n@Text\n\nwhen I receive [next costume v]\nnext costume\n\nwhen I receive [play v]\nshow\nswitch costume to (text1 v)\ngo to x: (0) y: (0)\n\nwhen flag clicked\nhide\n\n@Death Wheel\n\nwhen I receive [play v]\nforever\n    go to [back v] layer\n    turn left (5) degrees\n    if <(Level) = [1]> then\n        hide\n    end\n    if <(Level) = [11]> then\n        go to x: (160) y: (35)\n        show\n    end\n    if <(Level) = [12]> then\n        go to x: (106) y: (74)\n    end\n    if <(Level) = [13]> then\n        hide\n    end\n    if <(Level) = [16]> then\n        go to x: (-133) y: (-23)\n        set size to (78) %\n        show\n    end\n    if <(Level) = [17]> then\n        set size to (100) %\n        go to x: (188) y: (72)\n    end\n    if <(Level) = [18]> then\n        hide\n    end\nend\n\nwhen flag clicked\nhide\n\n@Pearl of light\n\nwhen flag clicked\nswitch costume to (pearl of light v)\ngo to x: (-8) y: (129)\npoint in direction (90)\nshow\nforever\n    repeat (10)\n        change y by (1)\n    end\n    repeat (10)\n        change y by (-1)\n    end\n    if <(Level) = [20]> then\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\nwhen I receive [next costume v]\nnext costume\n\n@Title\n\nwhen flag clicked\nshow\ngo to x: (0) y: (100)\nforever\n    repeat (10)\n        change y by (0.5)\n    end\n    repeat (10)\n        change y by (-0.5)\n    end\nend\n\nwhen I receive [play v]\nstop [other scripts in sprite v]\nhide\n\n@Play Button\n\nwhen flag clicked\ngo to x: (0) y: (-70)\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (-20)\n        if <mouse down?> then\n            broadcast (Play v)\n            hide\n            stop [this script v]\n        end\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\n@TN\n\nwhen flag clicked\nshow\ngo to [front v] layer\nset [ghost v] effect to (100)\n\n