☁Valley2 - A Platformer☁ #games #all

Instructions: thanks for over 1000 views!!! my most popular game ever.   1100 for more levels i will make it hard.\nmore levels\n{ instructions }\n<< arrow keys or W,A,S,D to move >>\n---\nWelcome to Valley - A Platformer! avoid dangers and try to complete it with the least amount of skips possible!\nhave fun!\n---\nplease don't spam generic... because well this IS generic ... I know. also theres NO need to hate on this project, or on any other projects. hate hurts and makes the creator feel bad and lose motivation to make more projects. btw I'm not making this for fame... ok? I'm just making this because I enjoyed making this simple platformer to take a break from all those loads and loads of intro requests. XD anyway I hope you enjoy the game! :)\nalso ads will be reported >:(\n---\nabout the game\n- 14 levels!\n- 400+ blocks of code\n---\nlove and fave if you enjoyed! and follow for more cool projects! =)\n---\ncomment something like: "I found the secret levels!" or "I unlocked the secret skin!" to troll people XD! there are no secret levels or skins btw!......YET

@Stage\n\n@ground\n\nwhen flag clicked\ngo to x: (1) y: (-8)\nforever\n    switch costume to (level)\nend\n\ngo to [front v] layer\n\nwhen I receive [next v]\n\n@lava\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    switch costume to (level)\nend\n\nwhen flag clicked\nforever\n    glide (1) secs to x: (0) y: (15)\n    glide (1) secs to x: (0) y: (0)\nend\n\n@danger\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\nforever\n    switch costume to (level)\nend\n\n@skip\n\nwhen flag clicked\nset [☁ skips v] to [0]\nhide\n\nwhen this sprite clicked\nchange [level v] by (1)\nchange [☁ skips v] by (1)\nbroadcast (next v)\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        set [ghost v] effect to (10)\n        set size to (105) %\n    else\n        set [ghost v] effect to (0)\n        set size to (100) %\n    end\nend\n\nwhen I receive [doneee v]\nhide\n\nwhen I receive [begin now v]\nset size to (100) %\nshow\ngo to x: (165) y: (161)\nforever\n    go to [front v] layer\nend\n\nwhen flag clicked\nforever\n    if <(level) = [14]> then\n        hide\n    else\n        show\n    end\nend\n\n@mute\n\nwhen this sprite clicked\nif <(volume) = [100]> then\n    set volume to (0) %\n    switch costume to (muted v)\nelse\n    set volume to (100) %\n    switch costume to (unmuted v)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [doneee v]\nhide\n\nwhen flag clicked\nset size to (100) %\nforever\n    if <touching (mouse-pointer v)?> then\n        set [ghost v] effect to (10)\n        set size to (105) %\n    else\n        set [ghost v] effect to (0)\n        set size to (100) %\n    end\nend\n\nwhen I receive [begin now v]\nset volume to (100) %\nswitch costume to (unmuted v)\ngo to [front v] layer\nshow\ngo to x: (200) y: (161)\nforever\n    play sound (pick random (1) to (6)) until done\nend\n\nplay sound [Elektronomia - Sky High \[NCS Release\] v] until done\n\n@saw\n\nwhen flag clicked\nforever\n    go to [back v] layer\n    turn right (4) degrees\nend\n\nwhen flag clicked\ngo to x: (0) y: (-130)\nset size to (65) %\nset [brightness v] effect to (20)\nforever\n    if <<(level) = [2]> or > then\n        show\n    else\n        hide\n    end\nend\n\n@transition\n\nwhen flag clicked\nhide\ngo to [front v] layer\ngo to x: (0) y: (347)\n\nwhen I receive [trans v]\ngo to x: (0) y: (0)\nshow\nset [ghost v] effect to (100)\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nwait (.3) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\nswitch costume to (pick random (1) to (6))\nshow\nrepeat until <(round (y position)) = [0]>\n    go to [front v] layer\n    change y by (((0) - (y position)) / (5))\nend\nrepeat until <(round (y position)) = [347]>\n    go to [front v] layer\n    change y by (15)\nend\nhide\n\nwhen I receive [next v]\nwait (.000000000000000000000001) seconds\nbroadcast (trans v)\n\nswitch costume to (pick random (1) to (6))\nshow\nrepeat until <(round (y position)) = [0]>\n    go to [front v] layer\n    change y by (((0) - (y position)) / (5))\nend\nrepeat until <(round (y position)) = [347]>\n    go to [front v] layer\n    change y by (((347) - (y position)) / (5))\nend\nhide\n\n@Sprite1\n\nwhen flag clicked\nhide\nforever\n    if <(level) = [20]> then\n        show variable [☁ skips v]\n        go to [front v] layer\n        show\n    else\n        hide variable [☁ skips v]\n        hide\n    end\nend\n\n@text\n\nwhen flag clicked\nforever\n    switch costume to (level)\n    if <touching (player2 v)?> then\n        set [ghost v] effect to (50)\n        go to [front v] layer\n    else\n        clear graphic effects\n    end\nend\n\n@thumb\n\nwhen flag clicked\nhide\n\nshow\ngo to [front v] layer\n\n@Love fave\n\nwhen flag clicked\nset [costume v] to [0]\nhide\nforever\n    if <not <<(LOVED__) = [1]> and <(FAVED___) = [1]>>> then\n        wait (pick random (30) to (40)) seconds\n        switch costume to (costume1 v)\n        go to x: (0) y: (50)\n        show\n        go to [front v] layer\n        start sound [pop v]\n        repeat (9)\n            change y by (-6)\n        end\n        repeat (5)\n            change y by (3)\n        end\n        repeat (5)\n            change y by (-1)\n        end\n        wait (2) seconds\n        repeat (15)\n            change y by (7)\n        end\n        hide\n    end\n    if <(Costume) > [0]> then\n        hide\n        stop [this script v]\n    end\nend\n\n@player2\n\nwhen I receive [begin v]\nrepeat (60)\n    if <<<key (left arrow v) pressed?> or <<(x position) > (mouse x)> and <mouse down?>>> or <<<key (right arrow v) pressed?> or <<(mouse x) > (x position)> and <mouse down?>>> or <<<key (up arrow v) pressed?> or <<(mouse y) > (y position)> and <mouse down?>>> or <<<<touching (ground v)?> or <touching color (#00ff2c)?>> and <key (up arrow v) pressed?>> or <<<touching (ground v)?> or <touching color (#00ff2c)?>> and <<(mouse y) > (y position)> and <mouse down?>>>>>>> then\n        set [kickout v] to [0]\n    else\n        change [kickout v] by (1)\n    end\n    wait (1) seconds\nend\nif <(Kickout) = [60]> then\n    stop [all v]\nend\n\ndefine write (val) to encoded\nset [letter # v] to [1]\nrepeat (length of (val))\n    set [encodied v] to (join (encodied) (item # of (letter (letter #) of (val)) in [code v]))\n    change [letter # v] by (1)\nend\nset [encodied v] to (join (encodied) [00])\n\nwhen flag clicked\nset [max players v] to [4]\nset [my player # v] to [0]\nbroadcast (setups v) and wait\nswitch backdrop to (joining v)\nbroadcast (join game v) and wait\nif <(My Player #) > [0]> then\n    set [☁ p1 v] to [2]\nelse\n    set [☁ p1 v] to [3]\nend\nbroadcast (begin v)\n\ndefine send cloud data\nset [encodied v] to []\nwrite (username) to encoded\nwrite (round ((timer) * (10))) to encoded\nwrite (round (x position)) to encoded\nwrite (round (y position)) to encoded\nwrite (costume [number v]) to encoded\nwrite ([costume # v] of [ground v]) to encoded\nset cloud # (My Player #) to (encodied)\n\nwhen [timer v] > (Timer)\nif <(My Player #) = [1]> then\n    set [☁ p1 v] to []\n    set [my player # v] to []\nelse\n    if <(My Player #) = [2]> then\n        set [☁ p2 v] to []\n        set [my player # v] to []\n    else\n        if <(My Player #) = [3]> then\n            set [☁ p3 v] to []\n            set [my player # v] to []\n        else\n            if <(My Player #) = [4]> then\n                set [☁ p4 v] to []\n                set [my player # v] to []\n            else\n                if <(My Player #) = [5]> then\n                    set [☁ p5 v] to []\n                    set [my player # v] to []\n                else\n                    if <(My Player #) = [6]> then\n                        set [☁ p6 v] to []\n                        set [my player # v] to []\n                    else\n                        if <(My Player #) = [7]> then\n                            set [☁ p7 v] to []\n                            set [my player # v] to []\n                        else\n                            if <(My Player #) = [8]> then\n                                set [☁ p8 v] to []\n                                set [my player # v] to []\n                            else\n                                if <(My Player #) = [9]> then\n                                    set [☁ p9 v] to []\n                                    set [my player # v] to []\n                                else\n                                    set [☁ p10 v] to []\n                                    set [my player # v] to []\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nswitch costume to (trail v)\nrepeat (10)\n    change [ghost v] effect by (10)\n    change size by (-1)\nend\ndelete this clone\n\nwhen I receive [restart v]\nstart sound [Crunch v]\nset [x v] to [0]\nset [y v] to [0]\ngo to x: (x spawn) y: (y spawn)\n\nwhen flag clicked\nbroadcast (BEGIN NOW v)\n\nhide\n\ndefine run engine\nchange [y v] by (-0.5)\nif <<<key (left arrow v) pressed?> or <<mouse down?> and <(x position) > (mouse x)>>> or <key (a v) pressed?>> then\n    switch costume to (rightt v)\n    change [x v] by (-.6)\nend\nif <<<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> or <key (d v) pressed?>> then\n    switch costume to (left v)\n    change [x v] by (.6)\nend\nset [x v] to ((x) * (0.9))\nchange x by (x)\nif <touching (ground v)?> then\n    change y by (1)\n    if <touching (ground v)?> then\n        change y by (1)\n        if <touching (ground v)?> then\n            change y by (1)\n            if <touching (ground v)?> then\n                change y by (1)\n                if <touching (ground v)?> then\n                    change y by (1)\n                    if <touching (ground v)?> then\n                        change y by (1)\n                        if <touching (ground v)?> then\n                            change y by (-6)\n                            change x by ((x) * (-1))\n                            if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n                                set [y v] to [7]\n                                if <(x) > [0]> then\n                                    set [x v] to [-10]\n                                else\n                                    set [x v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nchange y by (y)\nif <touching (ground v)?> then\n    change y by ((y) * (-1))\n    set [y v] to [0]\nend\nchange y by (-0.5)\nif <<<touching (ground v)?> and <key (up arrow v) pressed?>> or <<<touching (ground v)?> and <<mouse down?> and <(mouse y) > (y position)>>> or <<touching (ground v)?> and <key (w v) pressed?>>>> then\n    switch costume to (up v)\n    set [y v] to [7.5]\nend\nchange y by (0.5)\nif <<touching (danger v)?> or <<touching (saw v)?> or <touching (lava v)?>>> then\n    broadcast (Restart v)\nend\n\ncreate clone of (_myself_ v)\n\nset [moving_? v] to [y]\n\nset [moving_? v] to [y]\n\nset [moving_? v] to [y]\n\nset [moving_? v] to [n]\n\npoint in direction (90)\ngo to x: (x spawn) y: (y spawn)\n\nwhen I receive [next v]\ngo to x: (x spawn) y: (y spawn)\n\nwhen I receive [begin now v]\nset [color v] effect to (50)\nset [level v] to [1]\nshow\nset [x spawn v] to [-199]\nset [y spawn v] to [-76]\ngo to x: (x spawn) y: (y spawn)\nswitch costume to (1 v)\nswitch backdrop to (backdrop3 v)\nset size to (40) %\nset [x v] to [0]\nset [y v] to [0]\nforever\n    run engine\nend\n\nset rotation style [left-right v]\n\nset [brightness v] effect to (-7)\n\nset [moving_? v] to [y]\n\nwhen flag clicked\nforever\n    switch costume to (costume1 v)\nend\n\nwhen flag clicked\nforever\n    if <<<key (left arrow v) pressed?> or <<<key (right arrow v) pressed?> or > or <key (d v) pressed?>>> or <key (a v) pressed?>> then\n        set [moving_? v] to [y]\n    else\n        set [moving_? v] to [n]\n    end\nend\n\nif <<<touching (ground v)?> and <key (up arrow v) pressed?>> or <<touching (ground v)?> and <key (w v) pressed?>>> then\n    set [moving_? v] to [up]\nend\n\n\n\nif <(MOVING_?) = [u]> then\n    switch costume to (up v)\nend\n\nif <(y position) > [-60]> then\n    set [moving_? v] to [u]\nelse\n    set [moving_? v] to [n]\nend\n\nrepeat until <(costume [number v]) = [6]>\n\nset [moving_? v] to [n]\n\nif <(MOVING_?) = [y]> then\n    wait (.01) seconds\n    next costume\nelse\n    switch costume to (1 v)\nend\n\ncreate clone of (_myself_ v)\n\nforever\n    if <(MOVING_?) = [y]> then\n        wait (.01) seconds\n        next costume\n    else\n        switch costume to (1 v)\n    end\nend\n\nswitch costume to (up v)\n\nwhen flag clicked\nforever\n    if <not <<key (w v) pressed?> or <<key (a v) pressed?> or <<key (d v) pressed?> or <<key (up arrow v) pressed?> or <<key (right arrow v) pressed?> or <<key (left arrow v) pressed?> or <mouse down?>>>>>>>> then\n        switch costume to (center v)\n    end\nend\n\nset [brightness v] effect to (-9)\n\nset rotation style [left-right v]\n\nclear graphic effects\nset [brightness v] effect to (-7)\nrepeat (10)\n    change y by (6)\n    change [ghost v] effect by (10)\nend\nset [brightness v] effect to (-7)\nrepeat (10)\n    change y by (-1)\n    change [ghost v] effect by (-10)\nend\n\nwhen flag clicked\nforever\n    if <(level) = [18]> then\n        set [x spawn v] to [-200]\n        set [y spawn v] to [10]\n    else\n        set [x spawn v] to [-199]\n        set [y spawn v] to [-76]\n    end\nend\n\n@opponents\n\ndefine begin decode of (encode)\nset [opponents: encodied v] to (encode)\nset [opponents: letter # v] to [1]\n\ndefine value=read from encode\nset [value v] to []\nforever\n    set [idx v] to (join (letter (opponents: letter #) of (opponents: encodied)) (letter ((opponents: letter #) + (1)) of (opponents: encodied)))\n    change [opponents: letter # v] by (2)\n    if <(idx) < [1]> then\n        stop [this script v]\n    end\n    set [value v] to (join (value) (item (idx) of [code v]))\nend\n\ndefine setup players\nset [color v] effect to (90)\nset [offline v] to [100]\nhide\nset [player # v] to [1]\nrepeat ((MAX PLAYERS) - (1))\n    create clone of (_myself_ v)\n    change [player # v] by (1)\nend\n\nwhen I receive [begin v]\nforever\n    if <(My Player #) = (player #)> then\n        hide\n        set [offline v] to [100]\n    else\n        tick\n    end\nend\n\ndefine value=Cloud # (player)\nif <(player) = [1]> then\n    set [value v] to (☁ P1)\nelse\n    if <(player) = [2]> then\n        set [value v] to (☁ P2)\n    else\n        if <(player) = [3]> then\n            set [value v] to (☁ P3)\n        else\n            if <(player) = [4]> then\n                set [value v] to (☁ P4)\n            else\n                if <(player) = [5]> then\n                    set [value v] to (☁ P5)\n                else\n                    if <(player) = [6]> then\n                        set [value v] to (☁ P6)\n                    else\n                        if <(player) = [7]> then\n                            set [value v] to (☁ P7)\n                        else\n                            if <(player) = [8]> then\n                                set [value v] to (☁ P8)\n                            else\n                                if <(player) = [9]> then\n                                    set [value v] to (☁ P9)\n                                else\n                                    set [value v] to (☁ P10)\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [setups v]\nsetup players\n\ndefine tick\nvalue=Cloud # (player #)\nif <(join [A] (value)) = (last value)> then\n    change [offline v] by (1)\n    if <(offline) = [100]> then\n        hide\n    end\nelse\n    set [last value v] to (join [A] (value))\n    if <(offline) > [99]> then\n        show\n    end\n    set [offline v] to [0]\nend\nbegin decode of (value)\nvalue=read from encode\nsay (value)\nvalue=read from encode\nvalue=read from encode\nset x to (value)\nvalue=read from encode\nset y to (value)\nvalue=read from encode\nswitch costume to (value)\nvalue=read from encode\nif <(value) = ([costume # v] of [ground v])> then\n    show\nelse\n    hide\nend\n\nwhen I receive [join game v]\nvalue=Cloud # (player #)\nset [last value v] to (join [A] (value))\nwait (3) seconds\nvalue=Cloud # (player #)\nif <(join [A] (value)) = (last value)> then\n    set [my player # v] to (player #)\nend\n\nwhen flag clicked\nset size to (70) %\n\n@Connection Statements\n\nwhen flag clicked\nforever\n    switch costume to (Connecting)\nend\n\nwhen I receive [begin v]\nhide\n\nwhen flag clicked\nshow\n\n