Christmas! - Platformer

Instructions: Use arrow keys to move (mobile controls are glitchy because player has a hitbox) \nPls love, fav and follow me!

@Stage\n\nwhen flag clicked\nswitch backdrop to (cenário1 v)\n\n@player\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    go to (hitbox v)\nend\n\nwhen flag clicked\nset rotation style [left-right v]\nforever\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        point in direction (90)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        point in direction (-90)\n    end\nend\n\n@hitbox\n\nwhen I start as a clone\nset [ghost v] effect to (0)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen flag clicked\ngo to [front v] layer\nset rotation style [left-right v]\ngo to x: (-204) y: (-76)\nforever\n    change [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 [x v] by (-1)\n        point in direction (-90)\n    end\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [x v] by (1)\n        point in direction (90)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching (levels v)?> then\n        change y by (1)\n    end\n    change y by (y)\n    if <touching (levels v)?> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-0.5)\n    if <<touching (levels v)?> and <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <((mouse y) - (y position)) > [50]>>>>> then\n        set [y v] to [10]\n    end\n    if <touching (levels v)?> then\n        change y by (1)\n        if <touching (levels v)?> then\n            change y by (1)\n            if <touching (levels v)?> then\n                change y by (1)\n                if <touching (levels v)?> then\n                    change y by (1)\n                    if <touching (levels v)?> then\n                        change y by (1)\n                        if <touching (levels v)?> then\n                            change y by (-6)\n                            if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <((mouse y) - (y position)) > [50]>>>> then\n                                set [y v] to [10]\n                                if <(x) > [0]> then\n                                    set [x v] to [-10]\n                                else\n                                    set [x v] to [10]\n                                end\n                            else\n                                change x by ((x) * (-1))\n                                set [x v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    if <(x position) = [244]> then\n        next backdrop\n        go to x: (-204) y: (-76)\n    end\n    if <touching (water v)?> then\n        go to x: (-204) y: (-76)\n    end\nend\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\nend\n\n@levels\n\nwhen flag clicked\nforever\n    switch costume to ([backdrop # v] of [_stage_ v])\nend\n\n@snowflakes\n\nwhen flag clicked\nhide\nforever\n    wait (0.1) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nnext costume\nshow\ngo to x: (pick random (-217) to (217)) y: (164)\npoint in direction (pick random (-217) to (217))\nforever\n    change y by (-10)\n    if <touching (_edge_ v)?> then\n        delete this clone\n    end\nend\n\nwhen flag clicked\nforever\n    play sound [Santa Claus Is Coming To Town - Instrumental v] until done\nend\n\n@snowflakes2\n\nwhen flag clicked\nhide\nforever\n    wait (0.2) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nshow\ngo to x: (pick random (-217) to (217)) y: (164)\npoint in direction (pick random (-217) to (217))\nforever\n    change y by (-10)\n    if <touching (_edge_ v)?> then\n        delete this clone\n    end\nend\n\n@snowflakes3\n\nwhen flag clicked\nhide\nforever\n    wait (0.4) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nshow\nnext costume\ngo to x: (pick random (-217) to (217)) y: (164)\npoint in direction (pick random (-217) to (217))\nforever\n    change y by (-10)\n    if <touching (_edge_ v)?> then\n        delete this clone\n    end\nend\n\n@thumb\n\nwhen flag clicked\nshow\nforever\n    change [ghost v] effect by (1000)\n    go to [front v] layer\nend\n\n@Candy\n\nwhen backdrop switches to [cenário1 v]\nshow\ngo to x: (16) y: (-66)\n\nwhen backdrop switches to [cenário2 v]\nshow\ngo to x: (51) y: (-7)\n\nwhen backdrop switches to [cenário3 v]\nshow\ngo to x: (52) y: (81)\n\nwhen backdrop switches to [cenário4 v]\nshow\ngo to x: (148) y: (100)\n\nwhen flag clicked\nshow\nforever\n    if <<touching (player v)?> or <touching (hitbox v)?>> then\n        hide\n        broadcast (mensagem 1 v)\n    end\nend\n\nwhen backdrop switches to [cenário5 v]\nhide\n\nwhen flag clicked\nforever\n    wait (0.02) seconds\n    next costume\nend\n\n@ counter\n\nwhen flag clicked\nswitch costume to (fantasia1 v)\n\nwhen I receive [mensagem 1 v]\nnext costume\n\n@tree\n\nwhen flag clicked\nforever\n    wait (0.5) seconds\n    next costume\nend\n\n@water\n\nwhen flag clicked\nforever\n    hide\n    if <([backdrop # v] of [_stage_ v]) = [3]> then\n        show\n    end\nend\n\n