New Year Platformer

Instructions: -- New Year Platformer | A platformer -- \nby @Ellyflower\n\nI hope you like and enjoy it\n\n-= Story =-\n \nYou are must deliver the red envelope to a part of the town! Can you do it?\n✎ Platfomer Difficulty: ★★☆☆☆\n\n[] controls []\n\nWASD / Arrow keys\nhold and move for mobile\n\n☎ If there are any bugs or glitches, please tell me \n\n⚠️ Only if you ⭐️ the project, you can advertise \n\ntag\n#anything\n#37 trending :D afternoon jan 19 2023\n#26 trending :D night 9:12 in jan 19 2023\n#36 trending :D morning jan 20 9:21

@Stage\n\nwhen flag clicked\nset volume to (100) %\nforever\n    play sound [nhạc v] until done\nend\n\nwhen I receive [hide v]\nset volume to (0) %\nstop [other scripts in sprite v]\n\n@player\n\nwhen flag clicked\nset [background v] to [1]\nset [y v] to [0]\nset [x v] to [0]\nhide variable [background v]\nhide variable [y v]\nhide variable [x v]\ngo to [front v] layer\nshow\nset size to (90) %\nswitch costume to (player v)\nset drag mode [not draggable v]\ngo to x: (-54) y: (-31)\npoint in direction (90)\nbroadcast (play v)\n\nwhen I receive [play v]\nforever\n    if <<<mouse down?> and <(x position) > (mouse x)>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n        change [x v] by (-2)\n    end\n    if <<<mouse down?> and <(x position) < (mouse x)>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n        change [x v] by (2)\n    end\n    set [x v] to ((x) * (0.8))\n    change x by (x)\n    if <touching (stage v)?> then\n        change y by (1)\n        if <touching (stage v)?> then\n            change y by (1)\n            if <touching (stage v)?> then\n                change y by (1)\n                if <touching (stage v)?> then\n                    change y by (1)\n                    if <touching (stage v)?> then\n                        change y by (1)\n                        if <touching (stage v)?> then\n                            change x by ((x) * (-1))\n                            change y by (-5)\n                            if <<<mouse down?> and <(y position) < (mouse y)>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n                                if <(x) > [0]> then\n                                    set [x v] to [-7]\n                                else\n                                    set [x v] to [7]\n                                end\n                                set [y v] to [20]\n                            else\n                                set [x 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 (stage v)?> then\n        if <<<mouse down?> and <(y position) < (mouse y)>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n            set [y v] to [13]\n        end\n    end\n    change y by (1.2)\n    change [y v] by (-1)\n    change y by (y)\n    if <touching (stage v)?> then\n        change y by ((y) * (-0.8))\n        set [y v] to [0]\n    end\n    if <(x position) > [230]> then\n        broadcast (next v)\n        broadcast (s v)\n        start sound [Coin v]\n        set [y v] to [0]\n        set [x v] to [0]\n    end\n    if <[230] < (y position)> then\n        broadcast (next v)\n        broadcast (s v)\n        start sound [Coin v]\n        set [x v] to [0]\n        set [y v] to [0]\n    end\nend\n\nwhen I receive [hide v]\nhide\nstop [other scripts in sprite v]\n\ndefine Move to\nset [x v] to [0]\nset [y v] to (x)\nif <<(background) = [3]> or <(background) = [8]>> then\n    go to x: (-200) y: (200)\nelse\n    if <<(background) = [4]> or <(background) = [10]>> then\n        go to x: (-200) y: (200)\n    else\n        if <(background) = [5]> then\n            go to x: (-200) y: (10)\n        else\n            if <(background) = [2]> then\n                go to x: (-200) y: (200)\n            else\n                if <(background) = [1]> then\n                    go to x: (-200) y: (200)\n                else\n                    if <(background) = [6]> then\n                        go to x: (-200) y: (10)\n                    else\n                        if <(background) = [7]> then\n                            go to x: (-200) y: (200)\n                        else\n                            if <(background) = [11]> then\n                                go to x: (-200) y: (-31)\n                            else\n                                if <(background) = [9]> then\n                                    go to x: (-200) y: (-31)\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset [pitch v] effect to (-20)\nset volume to (40) %\nforever\n    if <touching (skpie v)?> then\n        if <not <(background) = [5]>> then\n            go to x: (-200) y: (200)\n            set [x v] to [0]\n            set [y v] to (x)\n            start sound [Crunch v]\n        end\n        if <(background) = [5]> then\n            go to x: (-200) y: (10)\n            set [x v] to [0]\n            set [y v] to (x)\n            start sound [Crunch v]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<mouse down?> and <(x position) > (mouse x)>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n        switch costume to (player2 v)\n    end\n    if <<<mouse down?> and <(x position) < (mouse x)>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n        switch costume to (player v)\n    end\n    if <<<mouse down?> and <(y position) > (mouse y)>> or <<key (down arrow v) pressed?> or <key (s v) pressed?>>> then\n        switch costume to (player4 v)\n    end\n    if <touching (green grass v)?> then\n        go to x: (-200) y: (200)\n        start sound [Crunch v]\n    end\nend\n\nwhen I receive [s v]\nMove to\n\n@stage\n\nwhen I receive [next v]\nnext costume\n\nwhen flag clicked\ngo to [front v] layer\nshow\nswitch costume to (10 v)\n\nwhen I receive [hide v]\nhide\n\n@sun\n\nwhen flag clicked\nset size to (100) %\ngo to [back v] layer\nshow\nbroadcast (play v)\n\nwhen I receive [play v]\ngo to x: (0) y: (0)\nforever\n    repeat until <(size) > [150]>\n        change size by (0.3)\n    end\n    repeat until <(size) < [100]>\n        change size by (-0.3)\n    end\nend\n\nwhen I receive [hide v]\nhide\nstop [other scripts in sprite v]\n\n@text\n\nwhen flag clicked\ngo to [front v] layer\nshow\nswitch costume to (1 v)\nclear graphic effects\nset [ghost v] effect to (100)\n\nwhen I receive [play v]\nwait (1) seconds\nrepeat (5)\n    wait (0.5) seconds\n    repeat (15)\n        change [ghost v] effect by (-5)\n    end\n    play sound [pop v] until done\n    wait (0.5) seconds\n    repeat (15)\n        change [ghost v] effect by (5)\n    end\n    next costume\nend\n\nwhen I receive [hide v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [play v]\nforever\n    if <(background) = [5]> then\n        clear graphic effects\n        set [ghost v] effect to (100)\n        switch costume to (8 v)\n        wait (2) seconds\n        repeat (15)\n            change [ghost v] effect by (-5)\n        end\n        start sound [pop v]\n        wait (1) seconds\n        repeat (15)\n            change [ghost v] effect by (5)\n        end\n        stop [this script v]\n    end\nend\n\nwhen I receive [play v]\nforever\n    if <(background) = [10]> then\n        clear graphic effects\n        set [ghost v] effect to (100)\n        switch costume to (5 v)\n        wait (2) seconds\n        repeat (15)\n            change [ghost v] effect by (-7)\n        end\n        play sound [Magic Spell v] until done\n        wait (1) seconds\n        repeat (15)\n            change [ghost v] effect by (7)\n        end\n    end\nend\n\n@like and favorite\n\nwhen flag clicked\nhide\nwait (5) seconds\nforever\n    if <(background) = [4]> then\n        go to x: (160) y: (110)\n        switch costume to (bảng hiệu v)\n        show\n        go to [front v] layer\n        repeat (11)\n            change y by (-6)\n        end\n        repeat (7)\n            change y by (3)\n        end\n        repeat (6)\n            change y by (-2)\n        end\n        wait until <<touching (mouse-pointer v)?> and <mouse down?>>\n        repeat (17)\n            change y by (7)\n        end\n        hide\n        stop [this script v]\n    end\n    if <(background) = [10]> then\n        hide\n    end\nend\n\nwhen I receive [hide v]\nhide\nstop [other scripts in sprite v]\n\nwhen flag clicked\nhide\nwait (5) seconds\nforever\n    if <(background) = [8]> then\n        go to x: (140) y: (110)\n        switch costume to (bảng hiệu v)\n        show\n        go to [front v] layer\n        repeat (11)\n            change y by (-6)\n        end\n        repeat (7)\n            change y by (3)\n        end\n        repeat (6)\n            change y by (-2)\n        end\n        wait until <<touching (mouse-pointer v)?> and <mouse down?>>\n        repeat (17)\n            change y by (7)\n        end\n        hide\n        stop [this script v]\n    end\nend\n\n@cloud\n\nwhen flag clicked\nhide\nforever\n    create clone of (_myself_ v)\n    wait (pick random (4) to (6)) seconds\nend\n\nwhen I start as a clone\nshow\nswitch costume to (pick random (1) to (3))\ngo [backward v] (12) layers\ngo to x: (300) y: (pick random (80) to (120))\nforever\n    set [ghost v] effect to (0)\n    glide (8) secs to x: (-300) y: (y position)\n    repeat (20)\n        change [ghost v] effect by (6)\n    end\n    wait (0.5) seconds\n    delete this clone\nend\n\nwhen I receive [hide v]\nhide\nstop [other scripts in sprite v]\n\n@obstable\n\nwhen I receive [next v]\nnext costume\nchange [background v] by (1)\n\nwhen flag clicked\nset [background v] to [0]\nshow\nswitch costume to ( v)\ngo [backward v] (7) layers\n\nwhen I receive [hide v]\nhide\n\n@skpie\n\nwhen flag clicked\nswitch costume to (sự nguy hiểm10 v)\nset [brightness v] effect to (-20)\nshow\ngo [backward v] (1) layers\n\nwhen I receive [next v]\nnext costume\n\n@green grass\n\nwhen flag clicked\nshow\n\n@red evelope\n\nwhen I start as a clone\nshow\nset [ghost v] effect to (0)\nset size to (pick random (40) to (60)) %\nset [ghost v] effect to (pick random (20) to (70))\ngo to x: (500) y: (pick random (20) to (180))\nglide (pick random (1.07) to (5)) secs to x: (-240) y: (pick random (-100) to (180))\nif <touching (_edge_ v)?> then\n    repeat (10)\n        change [ghost v] effect by (5)\n    end\nend\ndelete this clone\n\nwhen flag clicked\nhide\nforever\n    wait (0.4) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I receive [hide v]\nhide\nstop [other scripts in sprite v]\n\n@Sprite1\n\nwhen flag clicked\nhide\n\nwhen [9 v] key pressed\ngo to [front v] layer\nshow\n\n