(BUG FIXED!) Cave~ A mobile platformer 

Instructions: NO ADVERTISING!\n------------------------------------------------------------------------\nInstructions:\nArrow keys, WASD, or mobile controls\nDon't touch spikes or lava\nThe trampoline is bouncy (well obviously, xD)\n-------------------------------------------------------------------------

@Stage\n\n@player\n\nwait (10) seconds\nshow\nswitch costume to (costume1 v)\ngo to x: (-219) y: (2)\nforever\n    change [movement y v] by (-0.5)\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [movement x v] by (-.7)\n    end\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(x position) < (mouse x)>>> then\n        change [movement x v] by (.7)\n    end\n    set [movement x v] to ((Movement X) * (0.9))\n    change x by (Movement X)\n    if <touching (level v)?> then\n        change y by (1)\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change y by (1)\n                        if <touching (level v)?> then\n                            change y by (1)\n                            if <touching (level v)?> then\n                                change y by (-6)\n                                change x by ((Movement X) * (-1))\n                                if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(y position) < (mouse y)>>> then\n                                    set [movement y v] to [8]\n                                    if <(Movement X) > [0]> then\n                                        set [movement x v] to [-8]\n                                    else\n                                        set [movement x v] to [8]\n                                    end\n                                else\n                                    set [movement x v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (Movement Y)\n    if <touching (level v)?> then\n        change y by ((Movement Y) * (-1))\n        set [movement y v] to [0]\n    end\n    change y by (-0.5)\n    if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(y position) < (mouse y)>>> and <touching (level v)?>> then\n        set [movement y v] to [8]\n    end\n    change y by (0.5)\n    if <<touching (spikes v)?> or <touching (toxic liquid v)?>> then\n        broadcast (death v) and wait\n    end\nend\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\ngo to x: (-219) y: (2)\nforever\n    change [movement y v] by (-0.5)\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [movement x v] by (-.7)\n        switch costume to (costume2 v)\n    end\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(x position) < (mouse x)>>> then\n        change [movement x v] by (.7)\n        switch costume to (costume1 v)\n    end\n    set [movement x v] to ((Movement X) * (0.9))\n    change x by (Movement X)\n    if <touching (level v)?> then\n        change y by (1)\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change y by (1)\n                        if <touching (level v)?> then\n                            change y by (1)\n                            if <touching (level v)?> then\n                                change y by (-6)\n                                change x by ((Movement X) * (-1))\n                                if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(y position) < (mouse y)>>> then\n                                    set [movement y v] to [8]\n                                    if <(Movement X) > [0]> then\n                                        set [movement x v] to [-8]\n                                    else\n                                        set [movement x v] to [8]\n                                    end\n                                else\n                                    set [movement x v] to [-2]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (Movement Y)\n    if <touching (level v)?> then\n        change y by ((Movement Y) * (-1))\n        set [movement y v] to [0]\n    end\n    change y by (-0.5)\n    if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(y position) < (mouse y)>>> and <touching (level v)?>> then\n        set [movement y v] to [8]\n    end\n    change y by (-0.5)\n    if <touching (spikes v)?> then\n        go to x: (-209) y: (33)\n    end\n    if <touching (bouncy  v)?> then\n        set [movement y v] to [17]\n    end\nend\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\n\nwhen flag clicked\nforever\n    if <(x position) > [235]> then\n        broadcast (next level v)\n        go to x: (-219) y: (2)\n        set [movement x v] to [0]\n        set [movement y v] to [0]\n    end\nend\n\n@spikes\n\nwhen flag clicked\nshow\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume1 v)\nforever\n    go [backward v] (1) layers\nend\n\n@level\n\nwhen flag clicked\nshow\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume1 v)\nshow\n\nwhen flag clicked\nstart sound [Alan Walker - Force v]\n\n@bouncy \n\nwhen flag clicked\nhide\nswitch costume to (costume3 v)\n\nwhen I receive [play v]\nshow\n\nnext costume\n\nwhen I receive [play v]\n\nwhen I receive [play v]\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        start sound [Cartoon Sound Effect - Bounce v]\n        repeat (3)\n            next costume\n        end\n        repeat (3)\n            switch costume to ((costume [number v]) - (1))\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <([costume # v] of [level v]) = [1]> then\n        hide\n    else\n        if <([costume # v] of [level v]) = [2]> then\n            hide\n        else\n            if <([costume # v] of [level v]) = [3]> then\n                hide\n            else\n                if <([costume # v] of [level v]) = [4]> then\n                    show\n                    go to x: (-106) y: (-91)\n                else\n                    if <([costume # v] of [level v]) = [5]> then\n                        hide\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        start sound [Cartoon Sound Effect - Bounce v]\n        repeat (3)\n            next costume\n        end\n        repeat (3)\n            switch costume to ((costume [number v]) - (1))\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\nwhen flag clicked\nforever\n    go [backward v] (2) layers\nend\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        repeat (3)\n            next costume\n            wait (0.001) seconds\n        end\n        repeat (3)\n            switch costume to ((costume [number v]) - (1))\n            wait (0.001) seconds\n        end\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\ngo to [front v] layer\n\n