Elements 3:Darkness || A Platformer

Instructions: You are on a journey through the dark world and are trying to escape.\n\nControls:\nUse the arrow keys to move.

@Stage\n\nwhen I receive [start v]\nswitch backdrop to (night v)\nforever\n    if <(Level) = [11]> then\n        switch backdrop to (lighter v)\n    end\n    if <(Level) = [12]> then\n        switch backdrop to (even lighter v)\n    end\n    if <(Level) = [13]> then\n        switch backdrop to (light v)\n    end\nend\n\n@Player\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nset [level v] to [1]\nReset Level\nforever\n    if <key (right arrow v) pressed?> then\n        change [x v] by (.9)\n    end\n    if <key (left arrow v) pressed?> then\n        change [x v] by (-.9)\n    end\n    set [x v] to ((x) * (.9))\n    change x by (x)\n    if <touching (ground v)?> then\n        change y by (1)\n        if <touching (ground v)?> then\n            change y by (1)\n            if <touching (ground v)?> then\n                change y by (1)\n                if <touching (ground v)?> then\n                    change y by (1)\n                    if <touching (ground v)?> then\n                        change y by (1)\n                        if <touching (ground v)?> then\n                            change x by ((x) * (-1))\n                            change y by (-5)\n                            if <key (up arrow v) pressed?> 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?> then\n            set [y v] to [12]\n        end\n    end\n    change y by (1)\n    if <touching (spikes v)?> then\n        Die\n    end\n    if <touching (trampolines v)?> then\n        set [y v] to [17]\n    end\nend\n\ndefine Reset Level\nclear graphic effects\ngo to x: (-200) y: (0)\nset [x v] to [0]\nset [y v] to [0]\nshow\n\ndefine Die\nrepeat (5)\n    hide\n    wait (0.1) seconds\n    show\n    wait (0.1) seconds\nend\nhide\nwait (0.5) seconds\nReset Level\n\nwhen [r v] key pressed\nReset Level\n\nwhen I receive [start v]\nforever\n    if <(x position) > [236]> then\n        Reset Level\n        change [level v] by (1)\n    end\nend\n\n@Ground\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nforever\n    show\n    switch costume to (Level)\nend\n\n@Spikes\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nforever\n    show\n    go to [back v] layer\n    switch costume to (Level)\nend\n\n@Words\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\ngo to [front v] layer\nforever\n    show\n    switch costume to (Level)\nend\n\n@Trampolines\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\nforever\n    show\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\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) %\nreset timer\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\n@Screen\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\n\nwhen I receive [start v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\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)\nrepeat (40)\n    move ((timer) * (9)) steps\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\n