☁ Sunshine Valley - A Multiplayer Scrolling Platformer  ☁  #games
@Stage\n\nwhen [m v] key pressed\nshow variable [mouse x,y v]\nset [mouse x,y v] to (join ((mouse x) + (SCROLL X)) (join [,] ((mouse y) + (SCROLL Y))))\n\nwhen flag clicked\nhide variable [time v]\n\nwhen I receive [begin v]\nset [time v] to [0]\nforever\n    if <(win) = [0]> then\n        wait (1) seconds\n        change [time v] by (1)\n    else\n        set [time v] to (time)\n        stop [this script v]\n    end\nend\n\nwhen I receive [you win! v]\n\nwhen flag clicked\nset [win v] to [0]\n\nwhen flag clicked\nforever\n    play sound [Different Heaven v] until done\nend\n\n@Player\n\nwhen flag clicked\nset [pause v] to [0]\nforever\n    if <<<touching (mouse-pointer v)?> and <mouse down?>> and <not <key (t v) pressed?>>> then\n        broadcast (Mobile v)\n    end\nend\n\nwhen I receive [mobile v]\nbroadcast (Chat Open v)\nask [Pick a number to chat] and wait\nset [chat v] to (answer)\nsay (item (Chat) of [chat list v])\nbroadcast (Chat Close v)\nwait (2) seconds\nsay []\nset [chat v] to [0]\n\nwhen I receive [begin v]\n\nset [chat words v] to [0]\nbroadcast (hide v)\n\nforever\n\nChat\nif  then\n    if <(Chat) = [1]> then\n        broadcast (hide v)\n        set [chat words v] to [0]\n    else\n        set [chat words v] to [1]\n        broadcast (show v)\n    end\n    wait until <<not <<touching (mouse-pointer v)?> and <mouse down?>>> and <not <key (t v) pressed?>>>\nend\n\nwhen I receive [begin v]\nset [chat v] to [0]\nshow list [chat v]\nforever\n    Chat\nend\n\nwhen I receive [play game v]\nset [connected? v] to [0]\n\ndefine Position\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\n\ndefine Change Player x by (sx)\npoint in direction (90)\nchange [x v] by (sx)\nPosition\nif <touching (platforms v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (platforms v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    if <<<(y position) < (mouse y)> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        if <(sx) > [0]> then\n            set [sx v] to [-16]\n        else\n            set [sx v] to [16]\n        end\n        set [in air v] to [0]\n    else\n        set [sx v] to [0]\n    end\n    repeat until <not <touching (platforms v)?>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\nbroadcast (Green Flag v) and wait\nbroadcast (Play Game v) and wait\n\ndefine Change Player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (platforms v)?>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\n\ndefine Game On\nset [collected v] to [0]\nset [y v] to [0]\nset [x v] to [0]\nset [sx v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset [ghost v] effect to (0)\nset size to (100) %\n\ndefine Test - Die\nif <touching (danger v)?> then\n    set [exit v] to [die]\nend\n\ndefine Game - Die\nset [exit v] to []\n\ndefine Game - Win\nrepeat (50)\n    point towards (exit v)\n    turn right (65) degrees\n    move ((distance to [exit v]) / (2)) steps\n    change size by (-1)\n    change [ghost v] effect by (2)\nend\nhide\nchange [level v] by (1)\nwait (1) seconds\n\ndefine Tick\nif <(did) = [50]> then\n    if <not <key (2 v) pressed?>> then\n        switch costume to (normal v)\n    end\n    if <<<(mouse x) < (x position)> and <mouse down?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n        switch costume to (left v)\n        change [sx v] by (-2)\n    end\n    if <<<(x position) < (mouse x)> and <mouse down?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n        switch costume to (right v)\n        change [sx v] by (2)\n    end\n    if <<<<(y position) < (mouse y)> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> and <<<(mouse x) < (x position)> and <mouse down?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>>> then\n        switch costume to (left up v)\n    end\n    if <<<<(y position) < (mouse y)> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> and <<<(x position) < (mouse x)> and <mouse down?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>>> then\n        switch costume to (right up v)\n    end\n    set [sx v] to ((sx) * (0.8))\n    if <([abs v] of (sx) ) > [0.9]> then\n        Change Player x by (round (sx))\n    end\n    if <<<(y position) < (mouse y)> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        if <(in air) < [4]> then\n            set [sy v] to [16]\n        end\n    end\n    if <(sy) > [-20]> then\n        change [sy v] by (-2)\n    end\n    Change Player y by (sy)\n    Test - Die\n    set [scroll x v] to (x)\n    if <(SCROLL X) < [0]> then\n        set [scroll x v] to [0]\n    end\n    change [scroll y v] by (round (((y) - (SCROLL Y)) / (10)))\n    if <(SCROLL Y) < [0]> then\n        set [scroll y v] to [0]\n    end\n    Position\n    if <(y) < [-180]> then\n        set [exit v] to [die]\n    end\n    if <(x) < [-220]> then\n        set [x v] to [-220]\n    end\nelse\n    switch costume to (costume1 v)\n    stop [this script v]\nend\n\nwhen flag clicked\nhide\nset [max players v] to [8]\nset [my player # v] to [0]\nbroadcast (Connecting v)\nbroadcast (Setup Others v) and wait\nbroadcast (Join Game v) and wait\nif <(MY PLAYER #) > [0]> then\n    broadcast (Connected v)\n    start sound [Connect v]\nelse\n    broadcast (Full v)\n    start sound [Disconnect v]\nend\nbroadcast (Begin v)\n\ndefine set cloud # (player) to (value)\nif <(player) = [1]> then\n    set [☁ p1 v] to (value)\nelse\n    if <(player) = [2]> then\n        set [☁ p2 v] to (value)\n    else\n        if <(player) = [3]> then\n            set [☁ p3 v] to (value)\n        else\n            if <(player) = [4]> then\n                set [☁ p4 v] to (value)\n            else\n                if <(player) = [5]> then\n                    set [☁ p5 v] to (value)\n                else\n                    if <(player) = [6]> then\n                        set [☁ p6 v] to (value)\n                    else\n                        if <(player) = [7]> then\n                            set [☁ p7 v] to (value)\n                        else\n                            if <(player) = [8]> then\n                                set [☁ p8 v] to (value)\n                            else\n                                if <(player) = [9]> then\n                                    set [☁ p9 v] to (value)\n                                else\n                                    if <(player) = [10]> then\n                                        set [☁ p10 v] to (value)\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine write (val) to encoded\nset [letter # v] to [1]\nrepeat (length of (val))\n    set [encoded v] to (join (encoded) (item # of (letter (letter #) of (val)) in [code v]))\n    change [letter # v] by (1)\nend\nset [encoded v] to (join (encoded) [00])\n\nwhen I receive [begin v]\nforever\n    if <(MY PLAYER #) > [0]> then\n        send cloud data\n    end\nend\n\ndefine send cloud data\nset [encoded v] to []\nwrite (username) to encoded\nwrite (round ((timer) * (10))) to encoded\nwrite (x) to encoded\nwrite (y) to encoded\nwrite (Chat Words) to encoded\nset cloud # (MY PLAYER #) to (encoded)\n\ndefine Chat\nif <(Chat) = [1]> then\n    if <key (1 v) pressed?> then\n        set [chat v] to [1]\n        say (item (1) of [chat list v])\n        wait (2) seconds\n        say []\n        set [chat words v] to [0]\n    else\n        if <key (2 v) pressed?> then\n            set [chat words v] to [2]\n            say (item (2) of [chat list v])\n            wait (2) seconds\n            say []\n            set [chat words v] to [0]\n        else\n            if <key (3 v) pressed?> then\n                set [chat words v] to [3]\n                say (item (3) of [chat list v])\n                wait (2) seconds\n                say []\n                set [chat words v] to [0]\n            else\n                if <key (4 v) pressed?> then\n                    set [chat words v] to [4]\n                    say (item (4) of [chat list v])\n                    wait (2) seconds\n                    say []\n                    set [chat words v] to [0]\n                else\n                    if <key (5 v) pressed?> then\n                        set [chat words v] to [5]\n                        say (item (5) of [chat list v])\n                        wait (2) seconds\n                        say []\n                        set [chat words v] to [0]\n                    else\n                        if <key (6 v) pressed?> then\n                            set [chat words v] to [6]\n                            say (item (6) of [chat list v])\n                            wait (2) seconds\n                            say []\n                            set [chat words v] to [0]\n                        else\n                            if <key (7 v) pressed?> then\n                                set [chat words v] to [7]\n                                say (item (7) of [chat list v])\n                                wait (2) seconds\n                                say []\n                                set [chat words v] to [0]\n                            else\n                                if <key (8 v) pressed?> then\n                                    set [chat words v] to [8]\n                                    say (item (8) of [chat list v])\n                                    wait (2) seconds\n                                    say []\n                                    set [chat words v] to [0]\n                                else\n                                    if <key (9 v) pressed?> then\n                                        set [chat words v] to [9]\n                                        say (item (9) of [chat list v])\n                                        wait (2) seconds\n                                        say []\n                                        set [chat words v] to [0]\n                                    else\n                                        set [chat words v] to [0]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [connected v]\nset [connected? v] to [1]\nshow\n\nwhen I receive [connecting v]\nhide\n\nwhen I receive [play game v]\nforever\n    if <(Connected?) = [1]> then\n        broadcast (Reset v) and wait\n        broadcast (Setup v) and wait\n        Game On\n        repeat until <(EXIT) > []>\n            Tick\n            broadcast (Tick v)\n        end\n        if <(EXIT) = [win]> then\n            Game - Win\n        else\n            Game - Die\n        end\n    end\nend\n\nwhen I receive [connected v]\nset [level v] to [1]\n\nwhen flag clicked\nforever\n    if <touching color (#faff00)?> then\n        broadcast (You Win! v)\n        hide\n    end\nend\n\nwhen flag clicked\nset [did v] to [50]\n\nadd [Hello] to [chat list v]\nadd [Follow Me] to [chat list v]\nadd [I have to go :\)] to [chat list v]\nadd [Look a Spike!] to [chat list v]\nadd [LOL] to [chat list v]\nadd [Help !] to [chat list v]\nadd [Be Careful !] to [chat list v]\nadd [Okay !] to [chat list v]\nadd [Bye !] to [chat list v]\n\nset [exit v] to [die]\n\nwhen flag clicked\nset [die v] to [0]\n\nif <touching (saws v)?> then\n    set [exit v] to [die]\nend\n\nwhen I receive [jump buy v]\nif <<<(y position) < (mouse y)> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n    if <(in air) < [10]> then\n        set [sy v] to [16]\n    end\nend\n\nwhen I receive [setup v]\nset [did v] to [50]\nset [level v] to [1]\nset [t v] to [0]\nTick\n\nwhen I receive [pause v]\nset [did v] to [0]\n\nwhen [t v] key pressed\nbroadcast (Chat Open v)\nask [Pick a number to chat] and wait\nset [chat v] to (answer)\nsay (item (Chat) of [chat list v])\nbroadcast (Chat Close v)\nwait (2) seconds\nsay []\nset [chat v] to [0]\n\nset [☁ p1 v] to [0]\n\n@Others\n\nwhen I receive [begin v]\nset [names v] to [1]\nforever\n    if <key (n v) pressed?> then\n        if <(names) = [1]> then\n            wait until <not <key (n v) pressed?>>\n            set [names v] to [0]\n        else\n            wait until <not <key (n v) pressed?>>\n            set [names v] to [1]\n        end\n    end\nend\n\nwhen I receive [setup others v]\nsetup players\n\ndefine setup players\nhide\nset [offline v] to [100]\nset [player # v] to [1]\nrepeat ((MAX PLAYERS) - (1))\n    create clone of (_myself_ v)\n    change [player # v] by (1)\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                                    if <(player) = [10]> then\n                                        set [value v] to (☁ P10)\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [begin v]\nforever\n    if <(MY PLAYER #) = (player #)> then\n        set [offline v] to [100]\n        hide\n    else\n        Tick\n    end\nend\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 encoded\nif <(names) = [1]> then\n    say (join (player #) (join [:] (value)))\nelse\n    say []\nend\nvalue = read from encoded\nvalue = read from encoded\nset x to ((value) - (SCROLL X))\nvalue = read from encoded\nset y to (((value) - (SCROLL Y)) + (8))\nvalue = read from encoded\nbroadcast (Decode Chat v)\n\ndefine begin decode of (encoded)\nset [encoded v] to (encoded)\nset [letter # v] to [1]\n\ndefine value = read from encoded\nset [value v] to []\nforever\n    set [idx v] to (join (letter (letter #) of (encoded)) (letter ((letter #) + (1)) of (encoded)))\n    change [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\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\ndefine Decode Chat (chat)\nif <(chat) = [1]> then\n    say (item (1) of [chat list v]) for (2) seconds\nelse\n    if <(chat) = [2]> then\n        say (item (2) of [chat list v]) for (2) seconds\n    else\n        if <(chat) = [3]> then\n            say (item (3) of [chat list v]) for (2) seconds\n        else\n            if <(chat) = [4]> then\n                say (item (4) of [chat list v]) for (2) seconds\n            else\n                if <(chat) = [5]> then\n                    say (item (5) of [chat list v]) for (2) seconds\n                else\n                    if <(chat) = [6]> then\n                        say (item (6) of [chat list v]) for (2) seconds\n                    else\n                        if <(chat) = [7]> then\n                            say (item (7) of [chat list v]) for (2) seconds\n                        else\n                            if <(chat) = [8]> then\n                                say (item (8) of [chat list v]) for (2) seconds\n                            else\n                                if <(chat) = [9]> then\n                                    say (item (9) of [chat list v]) for (2) seconds\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [decode chat v]\nDecode Chat (value)\n\n@Platforms\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((Platforms: x) - (SCROLL X)) ((Platforms: y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [platforms: x v] to [0]\nset [platforms: y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (1 1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\n\ndefine Position (x) (y)\nset size to (100) %\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [platforms: x v] by (x)\nchange [platforms: y v] by (y)\nnext costume\n\nnext costume\nnext costume\n\ncreate clone of (_myself_ v)\n\n@DANGER\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((DANGER: x) - (SCROLL X)) ((DANGER: y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [danger: x v] to [0]\nset [danger: y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (costume1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\n\ndefine Position (x) (y)\ngo to [back v] layer\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [danger: x v] by (x)\nchange [danger: y v] by (y)\nnext costume\n\n@Landscape\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((Platforms: x) - (SCROLL X)) ((Platforms: y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [platforms: x v] to [0]\nset [platforms: y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\n\ndefine Position (x) (y)\nset size to (100) %\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [platforms: x v] by (x)\nchange [platforms: y v] by (y)\nnext costume\n\nnext costume\nnext costume\n\ncreate clone of (_myself_ v)\n\n@Joining\n\nwhen flag clicked\nhide\n\nwhen I receive [begin v]\nhide\n\nwhen I receive [connecting v]\nswitch costume to (joining v)\nshow\n\nwhen I receive [connected v]\ngo [forward v] (1322) layers\nswitch costume to (connected v)\nshow\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nstart sound [Connect v]\n\nwhen I receive [full v]\nswitch costume to (full  v)\nshow\n\n@Loading\n\nwhen flag clicked\ngo [forward v] (213) layers\nset size to (100) %\nhide\npoint in direction (90)\nclear graphic effects\ngo to x: (0) y: (-80)\n\nwhen I receive [connecting v]\nrepeat (11)\n    create clone of (_myself_ v)\n    turn right (40) degrees\nend\n\nwhen I receive [connected v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen I start as a clone\nshow\nset [ghost v] effect to (100)\nforever\n    repeat (20)\n        turn right (7.5) degrees\n        change [ghost v] effect by (-6)\n        change size by (1)\n    end\n    repeat (20)\n        turn right (7.5) degrees\n        change [ghost v] effect by (6)\n        change size by (-1)\n    end\nend\n\n@TB\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\nend\n\ngo to [front v] layer\n\n@STAR\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((DANGER: x) - (SCROLL X)) ((DANGER: y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [danger: x v] to [0]\nset [danger: y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (costume1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\n\ndefine Position (x) (y)\ngo to [back v] layer\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [danger: x v] by (x)\nchange [danger: y v] by (y)\nnext costume\n\n@Arrows\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((DANGER: x) - (SCROLL X)) ((DANGER: y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [danger: x v] to [0]\nset [danger: y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (costume1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\n\ndefine Position (x) (y)\ngo to [back v] layer\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [danger: x v] by (x)\nchange [danger: y v] by (y)\nnext costume\n\n@WIN\n\nwhen I receive [you win! v]\nset [win v] to [1]\nshow variable [time v]\nswitch costume to (win screen v)\ngo to [front v] layer\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nbroadcast (You Win! v)\n\n@Chat\n\nwhen flag clicked\nhide\ngo to x: (-135) y: (57)\n\nwhen I receive [chat close v]\nhide\n\nwhen I receive [chat open v]\ngo to [front v] layer\nshow\n\nwhen this sprite clicked\nbroadcast (Chat Close v)\n\nwhen [t v] key pressed\nshow\n\nbroadcast (chat hide quiick v)\n\n@notif\n\nwhen flag clicked\nhide\nforever\n    go [backward v] (1) layers\nend\n\ngo to [front v] layer\n\nwhen I receive [menu v]\nhide\n\nwhen I receive [begin v]\ngo to x: (0) y: (50)\nhide\nforever\n    wait (pick random (5) to (10)) seconds\n    if <(Pause) = [0]> then\n        show\n        repeat until <(y position) < [6]>\n            change y by (((5) - (y position)) / (6))\n        end\n        wait (3.5) seconds\n        repeat until <(y position) > [49.5]>\n            change y by (((y position) + (5)) / (5))\n        end\n        hide\n    end\nend\n\nwhen I receive [you win! v]\nstop [all v]\n\n@Coins\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((Collectables: x) - (SCROLL X)) ((Collectables: y) - (SCROLL Y))\nif <touching (player v)?> then\n    change [collected v] by (1)\n    delete this clone\nend\nif <(coin hide) = [show]> then\n    switch costume to (costume1 v)\nelse\n    if <(coin hide) = [0]> then\n        switch costume to (coins v)\n    end\nend\n\nwhen I receive [setup v]\nset [coins v] to [0]\nhide\nset [collectables: x v] to [0]\nset [collectables: y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (coin1 v)\n    Clone at x: [150] y: [40]\n    Clone at x: [370] y: [-10]\n    Clone at x: [535] y: [-10]\n    Clone at x: [935] y: [150]\n    Clone at x: [1200] y: [150]\n    Clone at x: [1980] y: [200]\n    Clone at x: [1980] y: [150]\n    Clone at x: [1980] y: [100]\n    Clone at x: [2496] y: [180]\n    Clone at x: [2820] y: [125]\n    Clone at x: [2870] y: [125]\n    Clone at x: [2920] y: [125]\n    Clone at x: [3320] y: [270]\n    Clone at x: [3495] y: [360]\n    Clone at x: [3680] y: [250]\nend\nset [collectables: x v] to [-9999999999]\n\ncreate clone of (_myself_ v)\n\nnext costume\nnext costume\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    go to [front v] layer\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nset [collectables: x v] to (x)\nset [collectables: y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nbroadcast (Setup v)\nset [level v] to [1]\n\nwhen I receive [you win! v]\nstop [all v]\n\nwhen I receive [show v]\n\nswitch costume to (coins v)\n\nwhen flag clicked\nset [coin hide v] to [0]\n\nset [collected v] to [300]\n\n@shop\n\nwhen I receive [tick v]\nif <touching (mouse-pointer v)?> then\n    repeat until <(size) > [115]>\n        change [size v] by (.9)\n        change size by (size)\n    end\n    if <mouse down?> then\n        broadcast (shop v)\n        set [coin hide v] to [show]\n        hide\n        wait until <not <mouse down?>>\n    end\nelse\n    repeat until <(size) < [101]>\n        set [size v] to [-.8]\n        change [size v] by (-.9)\n        change size by (size)\n    end\nend\n\nwhen I receive [begin v]\nset [size v] to [.8]\nshow\nrepeat (40)\n    change [ghost v] effect by (-3)\nend\n\nwhen flag clicked\ngo to [front v] layer\nhide\ngo to x: (0) y: (0)\nchange [ghost v] effect by (100)\n\nwhen flag clicked\ngo to x: (-193) y: (-156)\nset size to (100) %\n\nwhen I receive [he going v]\nset [coin hide v] to [0]\nshow\n\n@coins\n\n@Engine\n\nwhen flag clicked\nhide\nCloning\nforever\n    if <(refresh) = (YOUR NUMBER)> then\n        set [refresh v] to (YOUR NUMBER)\n    else\n        broadcast (refresh v)\n        Cloning\n    end\nend\n\nwhen I start as a clone\nshow\nforever\n    set [x offset v] to ((X) - (((((length of (COLLECTED)) + (1)) / (2)) - (clone counter)) * ((SIZE) / (10))))\n    set size to (SIZE) %\n    go to x: ((X) + ((SPACING) * (x offset))) y: (Y)\n    switch costume to (letter (clone counter) of (COLLECTED))\nend\n\ndefine Cloning\nset [clone counter v] to [1]\nrepeat (length of (COLLECTED))\n    create clone of (_myself_ v)\n    change [clone counter v] by (1)\nend\n\nwhen I receive [refresh v]\ndelete this clone\n\nwhen flag clicked\nset [collected v] to [0]\nset [size v] to [150]\nset [spacing v] to [1]\n\nset [your number v] to [0]\nset [x v] to [0]\nset [y v] to [0]\n\n@idk\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\nwhen I receive [love/fav v]\nchange [ghost v] effect by (5)\nchange [collected v] by (10)\nrepeat (30)\n    change size by ((20) - ((size) * (0.2)))\n    change [ghost v] effect by (-5)\nend\nwait (0.5) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\n@detector\n\nwhen flag clicked\n\ndefine Detect (thing) at (x) (y)\nswitch costume to (empty v)\nset size to (27000) %\ngo to x: (x) y: (y)\nset size to (100) %\nswitch costume to (thing)\nif <touching (mouse-pointer v)?> then\n    set [touching v] to (costume [name v])\nend\n\nwhen flag clicked\nforever\n    wait until <(touching) = [love]>\n    wait (0.2) seconds\n    if <(touching) = [love]> then\n        change [actions \(love/fave\) v] by (1)\n        broadcast (love/fav v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    wait until <(touching) = [fave]>\n    wait (0.2) seconds\n    if <(touching) = [fave]> then\n        change [actions \(love/fave\) v] by (1)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nwait until <(Actions \(love/fave\)) = [2]>\nchange [diamonds v] by (100)\n\nwhen I receive [begin v]\nshow\nset [ghost v] effect to (100)\nset [actions \(love/fave\) v] to [0]\nforever\n    set [touching v] to [none]\n    Detect [love] at [-201] [-220]\n    Detect [fave] at [-201] [-220]\nend\n\n@shop2\n\nwhen I receive [shop v]\nset [did v] to [0]\nshow\ngo [forward v] (2) layers\n\nbroadcast (shop v)\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nset [did v] to [50]\nbroadcast (he going v)\nhide\n\n@jump boost\n\nwhen I receive [shop v]\nswitch costume to (costume1 v)\nshow\ngo to [front v] layer\nforever\n    set [brightness v] effect to (0)\n    forever\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (30)\n            if <<mouse down?> and <<(already clicked) = [0]> and <[20] < (COLLECTED)>>> then\n                switch costume to (costume2 v)\n                set [t v] to [now]\n                change [collected v] by (-20)\n                set [already clicked v] to [1]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset [already clicked v] to [0]\nhide\n\nwhen I receive [he going v]\nhide\n\nset [collected v] to [300]\n\nwhen I receive [tick v]\nif <(t) = [now]> then\n    forever\n        broadcast (jump buy v)\n    end\nend\n\n@pause\n\nwhen flag clicked\nswitch costume to (pause v)\nhide\nwait (3) seconds\nshow\n\nwhen I receive [begin v]\nforever\n    go to [front v] layer\n    if <touching (mouse-pointer v)?> then\n        repeat until <(size) > [115]>\n            change [size v] by (.9)\n            change size by (size)\n        end\n        if <<mouse down?> and <(pause) = [0]>> then\n            set [coin hide v] to [show]\n            broadcast (pause v)\n            hide\n        end\n    else\n        repeat until <(size) < [101]>\n            set [size v] to [-.8]\n            change [size v] by (-.9)\n            change size by (size)\n        end\n    end\nend\n\nwait (1) seconds\n\nforever\nend\n\nset [pause v] to [0]\n\nwhen I receive [unpause v]\nshow\n\nshow\n\n@pause jr\n\nwhen flag clicked\nclear graphic effects\nhide\n\nwhen I receive [pause v]\nshow\ngo [forward v] (3) layers\n\nwhen I receive [unpause v]\nhide\nclear graphic effects\n\n@Timer\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\nforever\n    Change Costume to (join [Glow-] (letter (Score: Index) of (time)))\n    change size by ((1) * ((150) - (size)))\nend\n\ndefine Setup\nhide\ngo to x: (-137) y: (36)\nswitch costume to (glow-9 v)\nset size to (200) %\nset [score: index v] to [1]\nrepeat (6)\n    create clone of (_myself_ v)\n    change x by ((size) / (10))\n    change [score: index v] by (1)\nend\n\ndefine Change Costume to (costume)\nif <not <(costume) = (costume [name v])>> then\n    switch costume to (costume)\n    set size to (100) %\nend\n\nwhen I receive [begin v]\ngo to [front v] layer\nset [ghost v] effect to (100)\nshow\nset [time v] to [0]\nset [time taken v] to [0]\nSetup\n\nwhen I receive [stop timer v]\nstop [other scripts in sprite v]\nstop [this script v]\n\nset x to ((((Score: Index) - (0.5)) - ((length of (time)) / (2))) * ((size) / (2)))\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen I receive [pause v]\nclear graphic effects\n\nwhen I receive [unpause v]\nset [ghost v] effect to (500)\n\nwhen I receive [you win! v]\nset [ghost v] effect to (500)\n\nbroadcast (stop timer v)\n\n@yes\n\nwhen flag clicked\nhide\n\nwhen I receive [tick v]\ngo to [front v] layer\nif <touching (mouse-pointer v)?> then\n    repeat until <(size) > [115]>\n        change [size v] by (.9)\n        change size by (size)\n    end\n    if <mouse down?> then\n        broadcast (unpause v)\n        broadcast (Setup v)\n        set [coin hide v] to [0]\n        set [time v] to [0]\n    end\nelse\n    repeat until <(size) < [101]>\n        set [size v] to [-.8]\n        change [size v] by (-.9)\n        change size by (size)\n    end\nend\n\nwhen I receive [pause v]\nshow\n\nwhen I receive [unpause v]\nhide\n\n@no\n\nwhen I receive [tick v]\ngo to [front v] layer\nif <touching (mouse-pointer v)?> then\n    repeat until <(size) > [115]>\n        change [size v] by (.9)\n        change size by (size)\n    end\n    if <mouse down?> then\n        broadcast (unpause v)\n        hide\n        set [coin hide v] to [0]\n        set [did v] to [50]\n    end\nelse\n    repeat until <(size) < [101]>\n        set [size v] to [-.8]\n        change [size v] by (-.9)\n        change size by (size)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [pause v]\nshow\n\nwhen I receive [setup v]\nhide\n\nwhen I receive [begin v]\nhide\n\n
✧ Sunshine Valley ✧\n✧ A Multiplayer Scrolling Platformer  ✧\n \nTOP LOVED 7/27/22\n\n ✧ ✧ ✧ How To Play  ✧ ✧ ✧\n ➜ Use Arrow Keys or WASD to move on PC.\n ➜ This game is Mobile Freindly!\n ➜ Collect the star to win the game\n ➜ Look out for Spikes!\n ➜ Collect coins and buy stuff from the shop\n ➜ Press T or tap the player to chat\n ➜ Love or Fav for 10 free coins!\n ➜ Pause the game to check your time\n\n ➜ Server 2: \n https://scratch.mit.edu/projects/716793629/ \n\n   If the game is laggy, play here:\n   https://turbowarp.org/716786604/fullscreen? \n   interpolate&hqpen\n\n   Don't forget to leave a ❤️ and ⭐️if you enjoyed and \n   maybe even a follow. I worked very hard on this \n   game and would really appreciate it : )\n\n   ✧✧✧ Credits ✧✧✧\n   ➜ @Stratfordjames for the notifier and some assets\n   ➜ @JTHEJET for Game engine\n   ➜ Music from Different Heaven\n   ➜ Rest by me @--Patrixx--\n   \n   ✧✧✧ Tags ✧✧✧\n   #SunshineValley #Sunshine #Valley\n    #--Patrixx-- #Multiplayer #Scrolling \n   #MobileFriendly #Mobile  #Platformer \n   #MultiplayerScrollingPlatformer #Trending #Games \n\n   Follow me for more fun games!\n\n   Changelog\n   V1.0 - Initial Release 7/24/22