Confused - A Platformer

Instructions: Use arrow keys or mouse to get around, spikes = bad, find your way home.\n\nTHIS A A DEMO, *VERY EASY*\n\nhttps://scratch.mit.edu/projects/333941243/

@Stage\n\n@Death\n\nwhen flag clicked\ngo to x: (36) y: (28)\nhide\nwait until <(Mode) = [Game]>\nshow\nforever\n    switch costume to (Level)\n    if <touching (character v)?> then\n        broadcast (Shake v)\n    end\nend\n\nwhen I receive [shake v]\nrepeat (26)\n    go to x: (([x position v] of [level v]) + (36)) y: (([y position v] of [level v]) + (28))\nend\n\n@animation\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\ngo to [front v] layer\n\nwhen I receive [slide v]\ngo to [front v] layer\nswitch costume to (slide 1 v)\nshow\ngo to x: (-200) y: (0)\nglide (0.12) secs to x: (0) y: (0)\nnext costume\nglide (0.3) secs to x: (450) y: (0)\nglide (0.3) secs to x: (1000) y: (0)\nhide\n\n@Level\n\nwhen flag clicked\nset [shake v] to [0]\ngo to x: (0) y: (0)\nhide\nwait until <(Mode) = [Game]>\nshow\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [shake v]\nset [shake v] to [5]\nrepeat (2)\n    change [shake v] by (-2.5)\n    go to x: (pick random (Shake) to (join [-] (Shake))) y: (pick random (Shake) to (join [-] (Shake)))\nend\ngo to x: (0) y: (0)\nset [shake v] to [0]\n\nforever\n\nrepeat until <(Shake) = [0]>\n\n@Character\n\nwhen I start as a clone\nrepeat (10)\n    change size by (-8)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen flag clicked\nwait until <(Mode) = [Game]>\nforever\n    create clone of (_myself_ v)\n    wait (0.06) seconds\nend\n\nwhen flag clicked\nhide\ngo to x: (-225) y: (-96)\nset [ghost v] effect to (100)\ngo to [front v] layer\npoint in direction (90)\nhide\nwait until <(Mode) = [Game]>\nset [level v] to [1]\nshow\nset [yv v] to [0]\nset [xv v] to [0]\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\ngo to x: (-225) y: (-96)\nforever\n    if <touching (death v)?> then\n        broadcast (Collapse v)\n        start sound [Spike Effect v]\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        go to x: (-225) y: (-96)\n        set [yv v] to [0]\n        set [xv v] to [0]\n        repeat (20)\n            change [ghost v] effect by (-5)\n        end\n    end\n    if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<(x position) < (mouse x)> and <mouse down?>>>> then\n        turn right (15) degrees\n        change [xv v] by (0.65)\n    end\n    if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<(mouse x) < (x position)> and <mouse down?>>>> then\n        turn left (15) degrees\n        change [xv v] by (-0.65)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <touching (level v)?> then\n        change y by (1)\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change y by (1)\n                        if <touching (level 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?> or <<((y position) + (30)) < (mouse y)> and <mouse down?>>>> then\n                                start sound [Jump Effect v]\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-3]\n                                else\n                                    set [xv v] to [3]\n                                end\n                                set [yv v] to [8]\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-1)\n    change y by (Yv)\n    if <touching (level v)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <key (r v) pressed?> then\n        broadcast (Collapse v)\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        go to x: (-225) y: (-96)\n        set [yv v] to [0]\n        set [xv v] to [0]\n        repeat (20)\n            change [ghost v] effect by (-5)\n        end\n    end\n    if <touching (trampolines v)?> then\n        start sound [Bounce Effect v]\n        set [yv v] to [18]\n    else\n        if <touching (level v)?> then\n            if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<((y position) + (30)) < (mouse y)> and <mouse down?>>>> then\n                start sound [Jump Effect v]\n                set [yv v] to [11]\n            end\n        end\n    end\n    if <[-220] > (x position)> then\n        change [xv v] by (3)\n    end\n    if <(x position) > [210]> then\n        broadcast (slide v)\n        start sound [Finish Effect v]\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        go to x: (-225) y: (-96)\n        change [level v] by (1)\n        set [yv v] to [0]\n        set [xv v] to [0]\n        repeat (20)\n            change [ghost v] effect by (-5)\n        end\n    end\n    change y by (1)\nend\n\n@Cloud Moving 2\n\nwhen I start as a clone\nshow\nforever\n    set size to (pick random (80) to (100)) %\n    go to x: (400) y: (pick random (50) to (120))\n    glide (pick random (6) to (8)) secs to x: (-300) y: (y position)\nend\n\nwhen flag clicked\nhide\nset [ghost v] effect to (50)\ngo to [back v] layer\nrepeat (1)\n    create clone of (_myself_ v)\n    wait (pick random (7) to (10)) seconds\nend\n\nwhen flag clicked\nforever\n    clear graphic effects\nend\n\n@Cloud Moving\n\nwhen I start as a clone\nshow\nforever\n    set size to (pick random (80) to (100)) %\n    go to x: (-400) y: (pick random (50) to (120))\n    glide (pick random (6) to (8)) secs to x: (250) y: (y position)\nend\n\nwhen flag clicked\nhide\nset [ghost v] effect to (50)\ngo to [back v] layer\nrepeat (1)\n    create clone of (_myself_ v)\n    wait (pick random (7) to (10)) seconds\nend\n\nwhen flag clicked\nforever\n    clear graphic effects\nend\n\n@Thumbnail\n\nwhen flag clicked\nhide\n\n