Finding Kitty // A Mobile-Friendly Platformer

Instructions: PART 4 IS NOW OUT! https://scratch.mit.edu/projects/319512297/\n\nControls - \nMobile - Tap or swipe\nComputer - Arrow keys\nPress S to skip a level\n\nTiny Square is safely home - but where is Kitty? Find out in this adventure!

@Stage\n\n@Player\n\nwhen flag clicked\ngo to [front v] layer\nbroadcast (Start v)\ngo to x: (0) y: (0)\nshow\n\nwhen I receive [start v]\nswitch costume to (costume1 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 (#55b786)?> then\n        change y by (1)\n        if <touching color (#55b786)?> then\n            change y by (1)\n            if <touching color (#55b786)?> then\n                change y by (1)\n                if <touching color (#55b786)?> then\n                    change y by (1)\n                    if <touching color (#55b786)?> then\n                        change y by (1)\n                        if <touching color (#55b786)?> 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 (#55b786)?> 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 (#55b786)?> 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 (#ffe6a1)?> 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 (#9600b7)?> 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 [2017-01-17_-_Forgotten_-_David_Fesliyan v] until done\nend\n\nwhen flag clicked\nforever\n    if <touching (note v)?> then\n        go to x: (-168) y: (-51)\n    end\nend\n\n@Platforms\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\nif <(costume [number v]) = [5]> then\n    broadcast (moving quicksand v)\nend\nif <(costume [number v]) = [6]> then\n    broadcast (more quicksand v)\nend\nif <(costume [number v]) = [7]> then\n    broadcast (hide quicksand v)\n    broadcast (show note v)\nend\nif <(costume [number v]) = [8]> then\n    broadcast (note hide v)\nend\nif <(costume [number v]) = [11]> then\n    broadcast (end v)\nend\n\nwhen [s v] key pressed\nbroadcast (next level v)\n\n@Quicksand\n\nwhen flag clicked\nhide\nset size to (100) %\nforever\n    glide (1) secs to x: (92) y: (-19)\n    glide (1) secs to x: (20) y: (-19)\nend\n\nwhen I receive [moving quicksand v]\nshow\n\nwhen I receive [more quicksand v]\nshow\ncreate clone of (_myself_ v)\nset size to (50) %\n\nwhen I start as a clone\ngo to x: (-150) y: (-19)\nset size to (50) %\nforever\n    glide (1) secs to x: (-100) y: (-19)\n    glide (1) secs to x: (-150) y: (-19)\nend\n\nwhen I receive [hide quicksand v]\nhide\ndelete this clone\n\n@Note\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen I receive [show note v]\nshow\ngo to [front v] layer\n\nwhen this sprite clicked\nnext costume\n\nwhen I receive [note hide v]\nhide\n\n@thumb\n\nwhen flag clicked\nhide\n\n