Snowy ||A Platformer #100%Possible #mobile_friendly

Instructions: New game shared on 7.22!\nhttps://scratch.mit.edu/projects/411723001

@Stage\n\nwhen I receive [greenflag v]\nforever\n    play sound [TheFatRat - Afterlife \(DOTA 2 Music Pack\) v] until done\nend\n\nwhen I receive [greenflag v]\nset [ghost v] effect to (1)\nforever\n    repeat (20)\n        change [brightness v] effect by (-0.25)\n    end\n    repeat (40)\n        change [brightness v] effect by (0.25)\n    end\n    repeat (20)\n        change [brightness v] effect by (-0.25)\n    end\nend\n\nwhen I receive [greenflag v]\nset volume to (100) %\nforever\n    wait until <key (m v) pressed?>\n    if <(volume) = [0]> then\n        set volume to (100) %\n    else\n        set volume to (0) %\n    end\n    wait until <not <key (m v) pressed?>>\nend\n\nwhen I receive [all win v]\nrepeat (100)\n    change volume by (-1)\nend\n\n@player\n\nwhen I receive [greenflag v]\nsetup\nforever\n    tick\n    broadcast (tick v)\n    if <(WIN) = [1]> then\n        stop [this script v]\n    end\nend\n\ndefine change y by (sy)\nchange [jump v] by (1)\nchange y by (sy)\nrepeat until <<not <touching (platformer v)?>> and <not <touching (moving plat v)?>>>\n    set [speed y v] to [0]\n    if <(sy) < [0]> then\n        change y by (1)\n        set [jump v] to [0]\n    else\n        change y by (-1)\n    end\nend\n\ndefine setup\nswitch costume to (造型2 v)\nset rotation style [left-right v]\npoint in direction (90)\nset [slope v] to [0]\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [jump v] to [5]\nif <not <(LEVEL) = [34]>> then\n    go to x: (-222) y: (-106)\nelse\n    go to x: (180) y: (-106)\nend\nif <(LEVEL) = [33]> then\n    show variable [timer v]\n    reset timer\nend\nif <(LEVEL) = [34]> then\n    hide variable [timer v]\n    if <not <key (1 v) pressed?>> then\n        set [score v] to ((timer) * (1000))\n        if <(☁ WR) > (score)> then\n            set [☁ wr v] to (score)\n        end\n    end\nend\n\ndefine tick\ndieTest\nset [timer v] to (timer)\nset [speed x v] to (speed x)\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(x position) > (mouse x)>>> then\n    change [speed x v] by (-1.5)\n    point in direction (-90)\nend\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n    change [speed x v] by (1.5)\n    point in direction (90)\nend\nset [speed x v] to ((speed x) * (0.81))\nchange x by (speed x)\nif <touching (tp v)?> then\n    set [speed y v] to [35]\n    set [jump v] to [5]\nend\nif <not <touching (water v)?>> then\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n        if <(jump) < [4]> then\n            set [speed y v] to [15]\n        end\n    end\n    change [speed y v] by (-2)\n    change y by (speed y)\nelse\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        change [speed y v] by (2.5)\n    end\n    if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n        change [speed y v] by (-0.5)\n    end\n    change [speed y v] by (-0.5)\n    change y by (speed y)\nend\n\ndefine change x by (sx)\nchange x by (sx)\nset [slope v] to [0]\nif <<touching (platformer v)?> or <touching (moving plat v)?>> then\n    repeat until <(slope) = [8]>\n        change [slope v] by (1)\n        change y by (1)\n        if <<not <touching (platformer v)?>> and <not <touching (moving plat v)?>>> then\n            stop [this script v]\n        end\n    end\n    change y by (-8)\n    repeat until <<not <touching (platformer v)?>> and <not <touching (moving plat v)?>>>\n        if <(sx) > [0]> then\n            change x by (-1)\n        else\n            change x by (1)\n        end\n    end\nend\n\ndefine dieTest\nif <(y position) < [-178]> then\n    setup\nend\nif <touching (danger v)?> then\n    setup\nend\nif <touching (fall lava v)?> then\n    setup\nend\n\nwhen I receive [greenflag v]\nset [level v] to [1]\nset [skip data v] to [0]\nforever\n    wait until <<(x position) > [235]> or <key (1 v) pressed?>>\n    if <<not <(LEVEL) = [21]>> and <<not <(LEVEL) = [26]>> and <<not <(LEVEL) = [31]>> and <not <(LEVEL) = [34]>>>>> then\n        if <key (1 v) pressed?> then\n            change [skip data v] by (1)\n        end\n        set level to ((LEVEL) + (1))\n    end\n    wait until <not <key (1 v) pressed?>>\nend\n\nwhen [j v] key pressed\nif <not <(WIN) = [1]>> then\n    ask [Choose a level\(1-21\):\(or some special codes\)] and wait\n    if <<[0.9] < (answer)> and <(answer) < [21.1]>> then\n        set level to (round (answer))\n    end\n    if <(answer) = [water]> then\n        set level to [22]\n    end\n    if <(answer) = [lava]> then\n        set level to [27]\n    end\n    if <(answer) = [final]> then\n        set level to [32]\n        broadcast (the last v)\n    end\n    answer types\nend\n\ndefine set level to (level)\nbroadcast (win v)\nset [level v] to (level)\nsetup\n\nwhen I receive [greenflag v]\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nswitch costume to (造型3 v)\nset [ghost v] effect to (50)\nrepeat (10)\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\nwhen flag clicked\nset [level v] to [1]\n\nwhen I receive [all win v]\nwait (3) seconds\nif <(skip data) = [0]> then\n    set [skip show v] to []\nelse\n    set [skip show v] to (join [\(Because I skiped ] (join (skip data) [ levels:\)]))\nend\nsay (join [Tired? Never   Haha!] (skip show)) for (3) seconds\n\nwhen I receive [all win v]\ngo to x: (125) y: (110)\n\nset [☁ wr v] to [62368]\n\nwhen I receive [greenflag v]\nset [score v] to [N]\nforever\n    if <key (h v) pressed?> then\n        show variable [record show v]\n    else\n        hide variable [record show v]\n    end\nend\n\nwhen I receive [tick v]\nif <(score) > [100000000000]> then\n    set [record show v] to (join [Your time: ] (join [-] (join [  World record: ] ((☁ WR) / (1000)))))\nelse\n    set [record show v] to (join [Your time: ] (join ((score) / (1000)) (join [  World record: ] ((☁ WR) / (1000)))))\nend\n\ndefine answer types\nif <<(answer) = [block]> or <(answer) = [blocks]>> then\n    say [686] for (1) seconds\nelse\n    if <<(answer) = [costume]> or <(answer) = [costumes]>> then\n        say [180] for (1) seconds\n    else\n        if <<(answer) = [sprite]> or <(answer) = [sprites]>> then\n            say [14] for (1) seconds\n        else\n            if <<(answer) = [code]> or <(answer) = [codes]>> then\n                say [By biggboss01] for (1) seconds\n            else\n                if <(answer) = [platformer]> then\n                    say [By biggboss01] for (1) seconds\n                else\n                    if <(answer) = [Music]> then\n                        say [theFatRat] for (1) seconds\n                    else\n                        if <(answer) = [biggboss01]> then\n                            say [He is awsome!] for (1) seconds\n                        else\n                            if <(answer) = [griffpatch]> then\n                                say [His projects are cool!] for (1) seconds\n                            else\n                                if < (answer) contains [print]?> then\n                                    say [Do you learn python?] for (1) seconds\n                                else\n                                    if <(answer) = [time]> then\n                                        say (join (current [hour v]) (join [:] (join (current [minute v]) (join [:] (current [second v]))))) for (1) seconds\n                                    else\n                                        if <(answer) = [date]> then\n                                            say (join (current [year v]) (join [.] (join (current [month v]) (join [.] (current [date v]))))) for (1) seconds\n                                        else\n                                            if <(answer) = [level]> then\n                                                say (LEVEL) for (1) seconds\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [greenflag v]\nforever\n    if <touching (water v)?> then\n        play sound [Bubbles v] until done\n    end\nend\n\nwhen I receive [greenflag v]\nforever\n    if <key (l v) pressed?> then\n        set [random v] to (pick random (1) to (9))\n        if <(random) < [7.5]> then\n            say (item (random) of [say something v]) for (1) seconds\n        else\n            if <(random) < [8.5]> then\n                say (join [HI, ] (username)) for (1) seconds\n            else\n                if <(skip data) = [0]> then\n                    say [Nice! You didn't skip any level!] for (1) seconds\n                else\n                    say (join [Oops, you skip ] (join (skip data) [ levels.])) for (1) seconds\n                end\n            end\n        end\n        wait until <not <key (l v) pressed?>>\n    end\n    if <(WIN) = [1]> then\n        stop [this script v]\n    end\nend\n\n@platformer\n\nwhen I receive [greenflag v]\nswitch costume to (l1 v)\nforever\n    switch costume to (LEVEL)\nend\n\nwhen I receive [win v]\ngo to x: (0) y: (0)\n\ngo [backward v] (1) layers\n\n@water\n\nwhen I receive [greenflag v]\nset [ghost v] effect to (50)\nswitch costume to (l1 v)\nforever\n    switch costume to (LEVEL)\nend\n\n@danger\n\nwhen I receive [greenflag v]\nswitch costume to (l1 v)\nforever\n    switch costume to (LEVEL)\nend\n\nwhen I receive [win v]\ngo to x: (0) y: (-10)\nset [ghost v] effect to (100)\nrepeat (10)\n    change y by (1)\n    change [ghost v] effect by (-10)\nend\ngo to x: (0) y: (0)\nset [ghost v] effect to (0)\n\n@tp\n\nwhen I receive [greenflag v]\nswitch costume to (l1 v)\nforever\n    switch costume to (LEVEL)\nend\n\n@thb\n\nwhen flag clicked\nswitch costume to (造型1 v)\ngo to x: (0) y: (0)\nshow\ngo to [front v] layer\nset [ghost v] effect to (100)\n\nwhen I receive [last post v]\ngo to [front v] layer\nswitch costume to (造型2 v)\nset [ghost v] effect to (0)\nstop [all v]\n\n@eyes\n\nwhen I receive [tick v]\npoint in direction (90)\ngo to (player v)\nchange x by (SPEED X)\n\nwhen I receive [greenflag v]\nswitch costume to (costume1 v)\nforever\n    wait (2.5) seconds\n    switch costume to (costume2 v)\n    wait (0.05) seconds\n    switch costume to (costume1 v)\n    wait (0.1) seconds\n    switch costume to (costume2 v)\n    wait (0.05) seconds\n    switch costume to (costume1 v)\nend\n\n@snow\n\nwhen I receive [greenflag v]\nhide\nset [ghost v] effect to (30)\nforever\n    wait (0.3) seconds\n    create clone of (_myself_ v)\nend\n\ndefine start clone (rd) (rdspeed) (rdderect)\ngo to x: (rd) y: (180)\npoint in direction (rdderect)\nrepeat ((360) / (rdspeed))\n    move (rdspeed) steps\n    if <<touching (water v)?> or <touching (danger v)?>> then\n        delete this clone\n    end\nend\ndelete this clone\n\nwhen I start as a clone\nshow\nset size to (pick random (100) to (180)) %\nstart clone (pick random (-240) to (240)) ((pick random (3) to (7)) / (2)) (pick random (170) to (190))\n\n@bcube\n\nwhen flag clicked\nset [ghost v] effect to (0)\nhide\nshow\nrepeat (70)\n    next costume\nend\nbroadcast (ghost v)\nbroadcast (greenflag v)\nrepeat (10)\n    change [ghost v] effect by (10)\n    next costume\nend\nhide\n\n@bcube2\n\nwhen flag clicked\nset [ghost v] effect to (0)\nshow\n\nwhen I receive [greenflag v]\nwait (0.5) seconds\nhide\n\nwhen I receive [ghost v]\nrepeat (10)\n    next costume\n    change [ghost v] effect by (10)\nend\n\n@fall lava\n\nwhen I receive [greenflag v]\nhide\n\nwhen I receive [the last v]\nhide\nset [ghost v] effect to (30)\nforever\n    wait ((pick random (1) to (18)) / (10)) seconds\n    repeat (pick random (1) to (3))\n        create clone of (_myself_ v)\n    end\n    if <not <(LEVEL) = [32]>> then\n        stop [this script v]\n    end\nend\n\nwhen I start as a clone\nif <(LEVEL) = [32]> then\n    show\nelse\n    delete this clone\nend\nsetup\n\nwhen I receive [tick v]\nchange [speed y v] by (-2)\nchange x by (speed x)\nchange y by (speed y)\nif <(y position) < [-179]> then\n    delete this clone\nend\n\ndefine setup\nshow\ngo to x: (36) y: (180)\nset [speed y v] to [0]\nset [speed x v] to (pick random (-2) to (2))\nset [color v] effect to (pick random (-8) to (8))\nset size to (pick random (60) to (85)) %\n\n@moving plat\n\nwhen I receive [greenflag v]\nhide\n\nwhen I receive [win v]\nif <(LEVEL) = [34]> then\n    setup\n    forever\n        change x by (speed x)\n        if <<(x position) > [60]> or <(x position) < [-160]>> then\n            set [speed x v] to ((speed x) * (-1))\n        end\n        if <not <(LEVEL) = [34]>> then\n            hide\n            stop [this script v]\n        end\n    end\nelse\n    hide\nend\n\ndefine setup\nshow\ngo to x: (60) y: (-150)\nset [speed x v] to [-5]\n\nwhen flag clicked\nhide\n\n@blackCube\n\nwhen I receive [greenflag v]\nhide\n\ndefine setup\nshow\ngo to x: (160) y: (110)\n\nwhen I receive [win v]\nif <(LEVEL) = [34]> then\n    setup\n    forever\n        if <not <(LEVEL) = [34]>> then\n            hide\n            stop [this script v]\n        end\n    end\nelse\n    hide\nend\n\nwhen I receive [the last v]\nswitch costume to (造型1 v)\nforever\n    wait (pick random (2) to (4)) seconds\n    switch costume to (造型2 v)\n    wait (0.05) seconds\n    switch costume to (造型1 v)\n    wait (0.1) seconds\n    switch costume to (造型2 v)\n    wait (0.05) seconds\n    switch costume to (造型1 v)\nend\n\nwhen flag clicked\nset [win v] to [0]\nwait (1) seconds\nwait until <touching (player v)?>\nset [win v] to [1]\nbroadcast (all win v)\n\nwhen I receive [all win v]\nsay (join [Thank you , ] (join (username) [, you find me ! You must be very tired!])) for (2.8) seconds\n\nwhen flag clicked\nhide\n\n@white fade\n\nwhen flag clicked\nhide\n\nwhen I receive [all win v]\nwait (6) seconds\nset [ghost v] effect to (100)\nshow\ngo to [front v] layer\ngo [backward v] (1) layers\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nhide\nbroadcast (last post v)\n\n