Lost in the Caves // A Mobile-Friendly Platformer

Instructions: Controls - \nMobile - Tap or swipe\nComputer - Arrow keys\nPress S to skip a level\n\nTiny Square is lost in the dark caves. Help him find his way out!\n\nEdit: TOP LOVED!!! AAA I'M SCREAMING OVER 100 LOVES AND 2000 VIEWS\nEdit: I'm getting a message a minute >w<

@Stage\n\n@Player\n\nwhen flag clicked\nshow\ngo to x: (-132) y: (-79)\nglide (.5) secs to x: (14) y: (-79)\nglide (.1) secs to x: (20) y: (-158)\ngo to x: (20) y: (194)\nglide (.8) secs to x: (20) y: (-158)\ngo to x: (20) y: (194)\nbroadcast (Start v)\n\nwhen I receive [start v]\npoint in direction (90)\nset [xvel v] to [0]\nset [yvel v] to [0]\nforever\n    set rotation style [left-right v]\n    if <<<mouse down?> and <(x position) > (mouse x)>> or <key (left arrow v) pressed?>> then\n        change [xv v] by (-1)\n    end\n    if <<<mouse down?> and <(x position) < (mouse x)>> or <key (right arrow v) pressed?>> then\n        change [xv v] by (1)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <touching color (#676767)?> then\n        change y by (1)\n        if <touching color (#676767)?> then\n            change y by (1)\n            if <touching color (#676767)?> then\n                change y by (1)\n                if <touching color (#676767)?> then\n                    change y by (1)\n                    if <touching color (#676767)?> then\n                        change y by (1)\n                        if <touching color (#676767)?> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                            if <<<mouse down?> and <(y position) < (mouse y)>> or <key (up arrow v) pressed?>> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-7]\n                                else\n                                    set [xv v] to [7]\n                                end\n                                set [yv v] to [10]\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (-1)\n    if <touching color (#676767)?> then\n        if <<<mouse down?> and <(y position) < (mouse y)>> or <key (up arrow v) pressed?>> then\n            set [yv v] to [15]\n        end\n    end\n    change y by (1)\n    change [yv v] by (-1)\n    change y by (Yv)\n    if <touching color (#676767)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    hide variable [xv v]\n    if <(x position) > [230]> then\n        broadcast (next level v)\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        set [yv v] to [0]\n        set [xv v] to [0]\n        go to x: (-200) y: (-40)\n        set [ghost v] effect to (0)\n    end\n    if <(y position) < [-158]> then\n        go to x: (-200) y: (80)\n    end\n    if <touching color (#d7d7d7)?> then\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        set [yv v] to [0]\n        set [xv v] to [0]\n        go to x: (-200) y: (-40)\n        set [ghost v] effect to (0)\n    end\n    if <touching color (#d68330)?> then\n        set [yv v] to [18]\n    end\n    set [xv v] to (Xv)\nend\n\nwhen I receive [end v]\nhide\n\nwhen flag clicked\nforever\n    play sound [Video Game Music - Mysterious Cave v] until done\nend\n\n@Platforms\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nwait (.6) seconds\nnext costume\nwait (.8) seconds\nnext costume\n\nwhen I receive [next level v]\nnext costume\nif <(costume [number v]) = [16]> then\n    broadcast (end v)\nend\n\nwhen [s v] key pressed\nbroadcast (next level v)\n\n@thumb\n\nwhen flag clicked\nhide\n\n