LASERS || a mobile platformer

Instructions: Hi! This is my first and huge adventure platformer which took a really long time so I really hope you enjoy! \n\nUse arrow keys/WASD to control your character, down/S arrow to crouch. There are 11 levels and try to get through them all! Crouching is a vital mechanic. You cannot beat the game without it.\n\nThere is also a secret ending you can get pretty easily, you just have to follow the light...\n\nFor anybody who is having trouble with the Ancient Door level, I fixed it. Once you put in the key, the player has to be physically touching to door for it to open.\n\nPlease heart and star for a sequel!!\n\n(don't look in the code you won't find any secret)

@Stage\n\n@Paul\n\nwhen flag clicked\nset [~cloneid v] to [sprite]\nset [.level v] to [1]\nbroadcast (nextNevel v)\nforever\n    Movement\n    Costume\n    if <(~isDead) = [false]> then\n        if <(x position) > [240]> then\n            change [.level v] by (1)\n            broadcast (nextNevel v)\n        end\n        if <(y position) < [-155]> then\n            Dead\n        end\n        if <touching (obstacles v)?> then\n            Dead\n        end\n    end\nend\n\ndefine Movement\nswitch costume to (hitbox v)\nset rotation style [don't rotate v]\nset [~xinput v] to (<key (d v) pressed?> - <key (a v) pressed?>)\nchange [~xspeed v] by ((~xInput) * (2))\nset [~xspeed v] to ((~xSpeed) * (0.8))\nchange [~yspeed v] by (-2)\nchange y by (~ySpeed)\nif <(~ySpeed) < [0]> then\n    repeat until <not <touching (ground v)?>>\n        change y by (1)\n        set [~yspeed v] to [0]\n        set [~canjump v] to [true]\n    end\nelse\n    repeat until <not <touching (ground v)?>>\n        change y by (-1)\n        set [~yspeed v] to [0]\n        set [~canjump v] to [false]\n    end\nend\nchange x by (~xSpeed)\nif <<key (w v) pressed?> and <(~canJump) = [true]>> then\n    set [~yspeed v] to [25]\n    set [~canjump v] to [false]\nend\nset [~slope v] to [0]\nrepeat until <<(~slope) = [8]> or <not <touching (ground v)?>>>\n    change [~slope v] by (1)\n    change y by (1)\nend\nif <(~slope) = [8]> then\n    change x by ((~xSpeed) * (-1))\n    change y by ((~slope) * (-1))\n    set [~xspeed v] to [0]\nend\n\ndefine Costume\nset rotation style [left-right v]\nif <not <(~xInput) = [0]>> then\n    point in direction ((~xInput) * (90))\nend\nif <(~ySpeed) > [0]> then\n    switch costume to (jump v)\nelse\n    if <(~ySpeed) < [-5]> then\n        switch costume to (fall v)\n    else\n        switch costume to (walk v)\n    end\nend\n\nwhen I receive [nextnevel v]\nif <(~cloneID) = [sprite]> then\n    set [ghost v] effect to (100)\n    set [~xspeed v] to [0]\n    set [~yspeed v] to [0]\n    set [~isdead v] to [false]\n    set x to (-200)\n    point in direction (90)\n    Movement\n    Costume\n    go to [front v] layer\n    show\n    clear graphic effects\nend\n\ndefine Dead\nset [ghost v] effect to (100)\nset [~isdead v] to [true]\nset [~cloneid v] to [0]\nrepeat (4)\n    create clone of (_myself_ v)\n    change [~cloneid v] by (1)\nend\nset [~cloneid v] to [sprite]\nwait (1) seconds\nbroadcast (nextNevel v)\n\nwhen I start as a clone\nshow\ngo to [front v] layer\nswitch costume to (join [PaulParticle] (~cloneID))\nclear graphic effects\nset rotation style [all around v]\nset [~yspeed v] to [15]\nset [~xspeed v] to (pick random (-15) to (15))\nrepeat (50)\n    ParticleMovement\nend\ndelete this clone\n\ndefine ParticleMovement\nchange [~yspeed v] by (-2)\nset [~xspeed v] to ((~xSpeed) * (0.9))\nchange y by (~ySpeed)\nchange x by (~xSpeed)\nrepeat until <not <touching (ground v)?>>\n    change y by (1)\n    set [~yspeed v] to [0]\nend\nif <touching (_edge_ v)?> then\n    delete this clone\nend\n\nwhen I receive [nextnevel v]\nrepeat (10)\n    delete this clone\nend\n\n@Ground\n\nwhen I receive [nextnevel v]\nswitch costume to (.level)\n\nwhen flag clicked\nshow\ngo to [front v] layer\ngo to x: (0) y: (0)\n\n@Text\n\nwhen I receive [nextnevel v]\nswitch costume to (.level)\nchange y by (12)\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\nforever\n    change y by (((0) - (y position)) / (3))\nend\n\n@Obstacles\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\n\nwhen I receive [nextnevel v]\nswitch costume to (.level)\n\n@Simple Plaftformer Thumbnail\n\nwhen flag clicked\nhide\ngo to [front v] layer\n\n