Capsule 2 ~ A Mobile Friendly Platformer

Instructions: Use arrow keys or mobile!\ni am @korean_builder okay?\ni added some new levels.\nFOLLOW @BOOKDOG17!\npls don't advertise\nTOP - LOVED???? :0 thanks! (me could not have done this without @bookdog17 :)

@Stage\n\n@Sprite3\n\nwhen I receive [end v]\nshow\ngo to [front v] layer\n\nwhen flag clicked\nhide variable [level v]\nhide\n\n@bookdog17\n\nwhen flag clicked\nforever\n    if <(LEVEL) = [5]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nhide\n\n@thumb\n\nwhen flag clicked\ngo to [back v] layer\nshow variable [level v]\nhide\n\nshow\ngo to [front v] layer\n\n@Mobile3\n\nwhen flag clicked\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        broadcast (Up v)\n    end\nend\n\ngo to [front v] layer\n\n@Mobile2\n\nwhen flag clicked\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        broadcast (Right v)\n    end\nend\n\ngo to [front v] layer\n\n@Mobile1\n\nwhen flag clicked\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        broadcast (Left v)\n    end\nend\n\ngo to [front v] layer\n\n@Dangers\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\n@Sprite2\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\n@particles\n\nwhen flag clicked\nhide\n\nwhen I receive [make particles v]\nforever\n    wait (0.1) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\ngo to [front v] layer\nshow\ngo to x: (230) y: (pick random (-200) to (200))\npoint in direction (pick random (-105) to (-75))\nset [ghost v] effect to (100)\nrepeat (5)\n    change [ghost v] effect by (-10)\nend\nrepeat until <(x position) < [-230]>\n    move (10) steps\nend\nrepeat (5)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen I receive [make particles v]\nforever\n    switch costume to (pick random (1) to (3))\nend\n\n@level\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\n\n@Player\n\nwhen I start as a clone\nset [brightness v] effect to (30)\nset size to (100) %\nswitch costume to (trail v)\nrepeat (10)\n    change size by (-5)\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\ndefine play game\nset rotation style [left-right v]\nswitch costume to (hitbox v)\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    point in direction (90)\n    change [x v] by (.7)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [x v] by (-.7)\n    point in direction (-90)\nend\nchange x by (X)\nset [x v] to ((X) * (0.9))\nif <touching (level v)?> then\n    change y by (0.5)\n    if <touching (level v)?> then\n        change y by (0.5)\n        if <touching (level v)?> then\n            change y by (0.5)\n            if <touching (level v)?> then\n                change y by (0.5)\n                if <touching (level v)?> then\n                    change y by (0.5)\n                    if <touching (level v)?> then\n                        change y by (0.5)\n                        if <touching (level v)?> then\n                            change y by (0.5)\n                            if <touching (level v)?> then\n                                change y by (0.5)\n                                if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <key (w v) pressed?>> then\n                                    if <[0] < (X)> then\n                                        set [x v] to [-7]\n                                    else\n                                        set [x v] to [7]\n                                    end\n                                    set [y v] to [10]\n                                else\n                                    set [x v] to ((X) * (-1.3))\n                                    change x by (X)\n                                    set [x v] to [0]\n                                    change x by ((X) / (5))\n                                end\n                                change y by (-4)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nchange [y v] by (-.7)\nchange y by (Y)\nif <touching (level v)?> then\n    set [y v] to ((Y) * (-0.25))\n    change y by (Y)\n    if <touching (level v)?> then\n        change y by (Y)\n        if <touching (level v)?> then\n            change y by (Y)\n            if <touching (level v)?> then\n                change y by (Y)\n            end\n        end\n    end\nend\nchange y by (-1)\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <touching (level v)?>> then\n    set [y v] to [13]\nend\nchange y by (1)\nif <touching (sprite2 v)?> then\n    broadcast (Next Level v)\n    change [level v] by (-9)\nend\nif <touching (dangers v)?> then\n    go to x: (-216) y: (-55)\n    set [x v] to [0]\n    set [y v] to [0]\nend\nswitch costume to (move v)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nshow\nset [level v] to [1]\ngo to x: (-216) y: (-55)\nset [x v] to [0]\nset [y v] to [0]\nforever\n    play game\nend\n\nwhen I receive [next level v]\ngo to x: (-216) y: (-55)\nset [x v] to [0]\nset [y v] to [0]\nchange [level v] by (1)\n\nwhen I receive [left v]\npoint in direction (-90)\nchange [x v] by (-.7)\nchange x by (X)\nset [x v] to ((X) * (0.9))\n\nwhen I receive [right v]\npoint in direction (90)\nchange [x v] by (.7)\nchange x by (X)\nset [x v] to ((X) * (0.9))\n\nwhen I receive [up v]\nif <touching (level v)?> then\n    set [y v] to [13]\nend\n\nchange [y v] by (13)\n\nrepeat until <(LEVEL) = [5]>\nend\n\nwhen flag clicked\nforever\n    if <(LEVEL) = [7]> then\n        hide\n        broadcast (End v)\n    end\nend\n\nwhen I receive [re v]\ngo to x: (-216) y: (-55)\nset [x v] to [0]\nset [y v] to [0]\n\n@Sprite1\n\nwhen flag clicked\nbroadcast (Make Particles v)\n\n@Reset\n\nwhen flag clicked\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        broadcast (re v)\n    end\nend\n\n