(DEMO) Twinkling Valleys || A Scrolling Platformer

Instructions: 62% Done!\n\nUse arrow keys or WASD to move.\nClick on the player to open chat, click on the player again to close it.\nAvoid falling and spikes.\nAdmire the great game.\nLeave a love and favorite and, maybe a follow?\nOh, and I have LOTS of pet cats.\nHere they are -\n\n(=^･w･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･ω･^=)\n(=^･w･^=)\n\nSpecial kitty that is different from all the others -\n\n(＾• ω •＾)

@Stage\n\nwhen flag clicked\nforever\n    play sound [Amadeus Legendary EDM Release v] until done\nend\n\n@Blank\n\n@Player\n\nwhen flag clicked\ndelete all of [chat v]\nadd [Hi!] to [chat v]\nadd [Come with me!] to [chat v]\nadd [Ok!] to [chat v]\nadd [Nice!] to [chat v]\nadd [Look at me!] to [chat v]\nadd [Be careful!] to [chat v]\nadd [lol] to [chat v]\nadd [Bye!] to [chat v]\nadd [No thanks.] to [chat v]\n\nwhen flag clicked\nshow list [chat v]\nset [is the chat open v] to [0]\nforever\n    if <<key (t v) pressed?> or <<touching (mouse-pointer v)?> and <mouse down?>>> then\n        if <(is the chat open) = [1]> then\n            set [is the chat open v] to [0]\n        else\n            set [is the chat open v] to [1]\n        end\n        wait until <<not <<touching (mouse-pointer v)?> and <mouse down?>>> and <not <key (t v) pressed?>>>\n    end\n    Chat\nend\n\ndefine Chat\nif <(is the chat open) = [1]> then\n    if <key (1 v) pressed?> then\n        set [chat v] to [1]\n        say (item (CHAT) of [chat v])\n        wait (2) seconds\n        say []\n        set [chat v] to [0]\n    else\n        if <key (2 v) pressed?> then\n            set [chat v] to [2]\n            say (item (CHAT) of [chat v])\n            wait (2) seconds\n            say []\n            set [chat v] to [0]\n        else\n            if <key (3 v) pressed?> then\n                set [chat v] to [3]\n                say (item (CHAT) of [chat v])\n                wait (2) seconds\n                say []\n                set [chat v] to [0]\n            else\n                if <key (4 v) pressed?> then\n                    set [chat v] to [4]\n                    say (item (CHAT) of [chat v])\n                    wait (2) seconds\n                    say []\n                    set [chat v] to [0]\n                else\n                    if <key (5 v) pressed?> then\n                        set [chat v] to [5]\n                        say (item (CHAT) of [chat v])\n                        wait (2) seconds\n                        say []\n                        set [chat v] to [0]\n                    else\n                        if <key (6 v) pressed?> then\n                            set [chat v] to [6]\n                            say (item (CHAT) of [chat v])\n                            wait (2) seconds\n                            say []\n                            set [chat v] to [0]\n                        else\n                            if <key (7 v) pressed?> then\n                                set [chat v] to [7]\n                                say (item (CHAT) of [chat v])\n                                wait (2) seconds\n                                say []\n                                set [chat v] to [0]\n                            else\n                                if <key (8 v) pressed?> then\n                                    set [chat v] to [8]\n                                    say (item (CHAT) of [chat v])\n                                    wait (2) seconds\n                                    say []\n                                    set [chat v] to [0]\n                                else\n                                    if <key (9 v) pressed?> then\n                                        set [chat v] to [9]\n                                        say (item (CHAT) of [chat v])\n                                        wait (2) seconds\n                                        say []\n                                        set [chat v] to [0]\n                                    else\n                                        set [chat v] to [0]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset [my player # v] to [0]\nset [max players v] to [10]\nbroadcast (setup opponents v) and wait\nbroadcast (join game v) and wait\nset [connect v] to [Connecting]\nif <(MY PLAYER #) > [0]> then\n    set [connect v] to [Connected]\nelse\n    set [connect v] to [Full]\nend\nbroadcast (begin v)\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 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 send cloud data\nset [encoded v] to []\nwrite (costume [number v]) to encoded\nwrite (username) to encoded\nwrite (round ((timer) * (10))) to encoded\nwrite (Player: x) to encoded\nwrite (Player: y) to encoded\nwrite (CHAT) to encoded\nset cloud # (MY PLAYER #) to (encoded)\n\nwhen flag clicked\nbroadcast (Green flag v) and wait\nbroadcast (Play Game v) and wait\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\n\nwhen I receive [play game v]\nset [level v] to [1]\nforever\n    broadcast (Reset v) and wait\n    broadcast (Setup v) and wait\n    Reset\n    repeat until <(EXIT) > []>\n        Tick\n        broadcast (Tick v)\n    end\n    if <(EXIT) = [win]> then\n        Game - Win\n    else\n        set [exit v] to []\n    end\nend\n\ndefine Tick\nif <touching (ladder v)?> then\n    change [sx v] by ((2) * (<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<((mouse x) - (20)) > (x position)> and <mouse down?>>> - <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<((mouse x) + (20)) < (x position)> and <mouse down?>>>))\n    set [sx v] to ((sx) * (0.63))\nelse\n    change [sx v] by ((1.8) * (<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<((mouse x) - (20)) > (x position)> and <mouse down?>>> - <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<((mouse x) + (20)) < (x position)> and <mouse down?>>>))\n    set [sx v] to ((sx) * (0.79))\nend\nif <([abs v] of (sx) ) > [0.9]> then\n    Change Player x by (round (sx))\nend\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) + (20)) > (y position)> and <mouse down?>>> then\n    if <(in air) < [3]> then\n        if <(sy) > [-2]> then\n            set [sy v] to [13.2]\n        end\n    end\nend\nif <touching (bouncy v)?> then\n    set [sy v] to [21]\nend\nif <touching (ladder v)?> then\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) + (20)) > (y position)> and <mouse down?>>> then\n        change [player: y v] by (6)\n    end\n    if <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<((mouse y) - (20)) > (y position)> and <mouse down?>>> then\n        change [player: y v] by (-6)\n    end\n    set [sy v] to [0]\nelse\n    if <(sy) > [-20]> then\n        change [sy v] by (-1.3)\n    end\nend\nChange player y by (sy)\n Test - Die\nset [scroll x v] to (Player: x)\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nPosition\nchange [scroll y v] by (round (((Player: y) - (SCROLL Y)) / (10)))\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nPosition\nif <(Player: y) < [-180]> then\n    set [exit v] to [die]\nend\n\nif <<<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<((mouse x) - (20)) > (x position)> and <mouse down?>>> or <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<((mouse x) + (20)) < (x position)> and <mouse down?>>>> or <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) - (20)) > (y position)> and <mouse down?>>> or <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<((mouse y) + (20)) > (y position)> and <mouse down?>>>>> then\n    set [timeout v] to [1000]\nelse\n    change [timeout v] by (-1)\nend\n\nif <(Timeout) < [1]> then\n    broadcast (timeout v)\n    hide\nend\n\ndefine Change Player x by (sx)\nchange [player: x v] by (sx)\nPosition\nif <touching (platforms v)?> then\n    repeat (8)\n        change [player: y v] by (1)\n        Position\n        if <not <touching (platforms v)?>> then\n            stop [this script v]\n        end\n    end\n    change [player: y v] by (-8)\n    if <touching (platforms v)?> then\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) - (5)) > (y position)> and <mouse down?>>> then\n            if <(sx) > [0]> then\n                set [sx v] to [-16]\n            else\n                set [sx v] to [16]\n            end\n            set [sy v] to [12]\n        end\n        Position\n    end\n    repeat until <not <touching (platforms v)?>>\n        change [player: x v] by ((([abs v] of (sx) ) / (sx)) * (-1))\n        Position\n    end\nend\n\ndefine Change player y by (sy)\nchange [player: y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (platforms v)?>>\n    change [player: y v] by ((([abs v] of (sy) ) / (sy)) * (-1))\n    if <(sy) < [0]> then\n        set [in air v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\nif <touching (jump_through v)?> then\n    if <(sy) < [0]> then\n        change [player: y v] by ((sy) * (-1))\n        set [sy v] to [0]\n        set [in air v] to [0]\n        Position\n    end\nend\n\ndefine Position\ngo to x: ((Player: x) - (SCROLL X)) y: ((Player: y) - (SCROLL Y))\n\ndefine  Test - Die\nif <<touching (spinny v)?> or <touching (danger v)?>> then\n    set [exit v] to [die]\n    Reset\nend\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\nset [ghost v] effect to (0)\n\nwhen flag clicked\nforever\n    if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) + (20)) > (y position)> and <mouse down?>>> and <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<((mouse x) + (15)) > (x position)> and <mouse down?>>>> then\n        switch costume to (right up v)\n    else\n        if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) + (20)) > (y position)> and <mouse down?>>> and <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<((mouse x) - (15)) < (x position)> and <mouse down?>>>> then\n            switch costume to (left up v)\n        else\n            if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) + (20)) > (y position)> and <mouse down?>>> then\n                switch costume to (up v)\n            else\n                if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<((mouse x) - (20)) > (x position)> and <mouse down?>>> then\n                    switch costume to (right v)\n                else\n                    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<((mouse x) + (20)) < (x position)> and <mouse down?>>> then\n                        switch costume to (left v)\n                    else\n                        switch costume to (middle v)\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [timeout v]\nhide\n\ndefine Reset\nif <(CHECKPOINT) = [0]> then\n    set [player: x v] to [-100]\n    set [player: y v] to [-60]\n    set [scroll y v] to (Player: y)\n    set [scroll x v] to (Player: x)\nelse\n    if <(CHECKPOINT) = [1]> then\n        set [player: x v] to [1400]\n        set [player: y v] to [-95]\n        set [scroll y v] to (Player: y)\n        set [scroll x v] to (Player: x)\n    else\n        if <(CHECKPOINT) = [2]> then\n            set [player: x v] to [1800]\n            set [player: y v] to [945]\n            set [scroll y v] to (Player: y)\n            set [scroll x v] to (Player: x)\n        else\n            if <(CHECKPOINT) = [3]> then\n                set [player: x v] to [265]\n                set [player: y v] to [2440]\n                set [scroll y v] to (Player: y)\n                set [scroll x v] to (Player: x)\n            end\n        end\n    end\nend\nset [sx v] to [0]\nset [sy v] to [0]\nset [in air v] to [10]\nset [timeout v] to [1000]\nset [exit v] to []\nset size to (100) %\nshow\nset rotation style [left-right v]\n\nwhen flag clicked\nforever\n    set size to (110) %\nend\n\nwhen I start as a clone\nforever\n    set size to (110) %\nend\n\nwhen [r v] key pressed\nReset\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 v]) for (2) seconds\nelse\n    if <(chat) = [2]> then\n        say (item (2) of [chat v]) for (2) seconds\n    else\n        if <(chat) = [3]> then\n            say (item (3) of [chat v]) for (2) seconds\n        else\n            if <(chat) = [4]> then\n                say (item (4) of [chat v]) for (2) seconds\n            else\n                if <(chat) = [5]> then\n                    say (item (5) of [chat v]) for (2) seconds\n                else\n                    if <(chat) = [6]> then\n                        say (item (6) of [chat v]) for (2) seconds\n                    else\n                        if <(chat) = [7]> then\n                            say (item (7) of [chat v]) for (2) seconds\n                        else\n                            if <(chat) = [8]> then\n                                say (item (8) of [chat v]) for (2) seconds\n                            else\n                                if <(chat) = [9]> then\n                                    say (item (9) of [chat 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\nwhen [timer v] > (0)\nhide\n\n@Platforms\n\nwhen I receive [green flag v]\nhide\nset [platforms: x v] to [0]\nset [platforms: y v] to [0]\nswitch costume to (1 v)\nClone at [480] [0]\nClone at [480] [0]\nClone at [630] [0]\nClone at [450] [2]\nClone at [360] [150]\nClone at [0] [0]\nClone at [-200] [400]\nClone at [-600] [600]\nClone at [-800] [520]\nClone at [-800] [495]\nClone at [600] [500]\nClone at [1250] [300]\nClone at [1500] [300]\n\nwhen I receive [tick v]\nposition ((Platforms: x) - (SCROLL X)) ((Platforms: y) - (SCROLL Y))\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at (x) (y)\ncreate clone of (_myself_ v)\nchange [platforms: x v] by (x)\nchange [platforms: y v] by (y)\nnext costume\n\n@Danger\n\nwhen I receive [green flag v]\nhide\nset [danger: x v] to [0]\nset [danger: y v] to [0]\nswitch costume to (1 v)\nClone at [480] [0]\nClone at [480] [0]\nClone at [360] [165]\n\nwhen I receive [tick v]\nposition ((Danger: x) - (SCROLL X)) ((Danger: y) - (SCROLL Y))\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at (x) (y)\ncreate clone of (_myself_ v)\nchange [danger: x v] by (x)\nchange [danger: y v] by (y)\nnext costume\n\n@Checkpoint\n\nwhen [m v] key pressed\nset [mouse v] to (join ((mouse x) + (SCROLL X)) (join [,] (join [ ] ((mouse y) + (SCROLL Y)))))\nshow variable [mouse v]\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((Checkpoint: x) - (SCROLL X)) ((Checkpoint: y) - (SCROLL Y))\nif <(costume [name v]) = [closed]> then\n    if <touching (player v)?> then\n        switch costume to (open v)\n        set [brightness v] effect to (30)\n        change [checkpoint v] by (1)\n    end\nend\ngo to [front v] layer\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at (x) (y)\nset [checkpoint: x v] to (x)\nset [checkpoint: y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nhide\nset [checkpoint v] to [0]\nset [checkpoint: x v] to [0]\nset [checkpoint: y v] to [0]\nswitch costume to (closed v)\nClone at [1400] [-95]\nClone at [1800] [945]\nClone at [265] [2435]\nset [checkpoint: x v] to [-99999]\n\n@@StratfordJames Tree\n\nwhen I receive [tick v]\nposition ((@StratfordJames Tree: x) - (SCROLL X)) ((@StratfordJames Tree: y) - (SCROLL Y))\n\ndefine position (x) (y)\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 [green flag v]\nhide\nset [@stratfordjames tree: x v] to [0]\nset [@stratfordjames tree: y v] to [0]\nswitch costume to (1 v)\nClone at [-91] [-58]\nClone at [1527] [-39]\nClone at [1758] [120]\nset [@stratfordjames tree: x v] to [-99999]\n\nClone at [0] [-128]\n\ndefine Clone at (x) (y)\nset [@stratfordjames tree: x v] to (x)\nset [@stratfordjames tree: y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\ngo [backward v] (5) layers\n\n@Me Tree\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at (x) (y)\nset [me tree: x v] to (x)\nset [me tree: y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [green flag v]\nhide\nset [me tree: x v] to [0]\nset [me tree: y v] to [0]\nswitch costume to (1 v)\nClone at [300] [0]\nClone at [600] [0]\nset [me tree: x v] to [-99999]\n\nClone at [692] [-68]\nClone at [1514] [114]\n\nwhen I receive [tick v]\nposition ((Me Tree: x) - (SCROLL X)) ((Me Tree: y) - (SCROLL Y))\n\nwhen flag clicked\ngo [backward v] (5) layers\n\n@Chat\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nshow\nset [ghost v] effect to (100)\nforever\n    set size to (0) %\n    wait until <(is the chat open) = [1]>\n    repeat (10)\n        set size to ((size) + (((100) - (size)) / (3))) %\n        change [ghost v] effect by (-10)\n    end\n    wait until <(is the chat open) = [0]>\n    repeat (10)\n        set size to ((size) + (((0) - (size)) / (3))) %\n        change [ghost v] effect by (10)\n    end\nend\n\ndefine GO\ngo to [front v] layer\ngo to [front v] layer\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nshow\nset [ghost v] effect to (100)\nforever\n    GO\nend\n\n@Notification\n\nwhen flag clicked\ngo to x: (0) y: (50)\nhide\nwait (pick random (7) to (15)) seconds\nshow\nrepeat until <(y position) < [6]>\n    change y by (((5) - (y position)) / (6))\nend\nwait (3.5) seconds\nrepeat until <(y position) > [49.5]>\n    change y by (((y position) + (5)) / (5))\nend\nhide\nforever\n    wait (pick random (14) to (26)) seconds\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\nend\n\nwhen I receive [alert v]\nstop [other scripts in sprite v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nhide\n\nwhen I receive [tick v]\ngo to [front v] layer\n\n@Tip\n\nwhen flag clicked\ngo to x: (0) y: (50)\nhide\nwait (pick random (10) to (15)) seconds\nshow\nrepeat until <(y position) < [6]>\n    change y by (((5) - (y position)) / (6))\nend\nwait (3.5) seconds\nrepeat until <(y position) > [49.5]>\n    change y by (((y position) + (5)) / (5))\nend\nhide\nforever\n    wait (pick random (14) to (26)) seconds\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\nend\n\nwhen I receive [alert v]\nstop [other scripts in sprite v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nhide\n\nwhen I receive [tick v]\ngo to [front v] layer\n\n@Sun\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [back v] layer\n\nwhen flag clicked\nforever\n    next costume\n    wait (0.04) seconds\nend\n\n@Thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nwait (0.2) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n