The Underworld- A ☁ Scrolling Platformer       #games #all #Multiplayer

Instructions: Please don't forget to Love and Fave. I spent over 1 entire week to complete this project and this is my first time making a scrolling platformer. Don't forget to follow me too!, also I might be online when you are playing.\n\n　　　　also go check out this project===> \n　　 https://scratch.mit.edu/projects/511649144/\n\n                ▬▬▬ Smoother gameplay ▬▬▬\n              Spam that flag for better gameplay :)\n         https://turbowarp.org/494212757 for 60 FPS\n              Close all tabs if open (for lesser lag)\n\n                            ▬▬▬ Story ▬▬▬\n            You and your friends were having a party,\n     when suddenly you (and your friends) were pulled \n                                  into a portal....\n\n    a portal that you didn't know will take you to the \n                                 Underworld.\n                 ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n\n                   ▬▬▬ The Underworld ▬▬▬\n                A place beneath the depth of Earth.\n                 The world is always burning there\n                 ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n\n                      ▬▬▬ Instructions ▬▬▬\n                   Use arrow keys, WSAD, Click. \n                                    to move.\n                   Click on your self to see the. \n                              numbers to chat.\n                          You can swim on lava.\n                   Dodge spikes and all dangers.\n             Click on yourself to change skin color.\n                                R to restart\n                ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\nCan we get this on trending please?\n\n                         ▬▬▬ #TAGS ▬▬▬\n#games #☁ #Friends #Enjoy #Multiplayer #2 weeks #LoveN'Fave #IHopeYouHaveABeautifulDay #Bye #Hi #Nice #Barrels #Realsm #Winner #;) #AlanWalker?! #Marshmello #Fave #Love #2Weeks #Follow #3D #Play #Hard? #CloudData #REFLEX #xxREFLEXxx #JC_ProGold\n\n\nArt of the day:-\n\n            ──────▄▀▄─────▄▀▄\n            ─────▄█░░▀▀▀▀▀░░█▄\n            ─▄▄──█░░░░░░░░░░░█──▄▄\n            █▄▄█─█░░▀░░┬░░▀░░█─█▄▄█\n\n\n\nAlso for the people who read my secret messages, if you click on the UFO on top of the player, YOU CAN CHANGE THE ITEM\n\n\n\n\n\nNice

@Stage\n\nwhen flag clicked\nforever\n    if <(time of day) = [day]> then\n        switch costume to (day v)\n    else\n        switch costume to (night v)\n    end\nend\n\nwhen I receive [night v]\nset [time of day v] to [night]\n\nwhen I receive [day v]\nset [time of day v] to [day]\n\nwhen flag clicked\nforever\n    play sound (pick random (1) to (5)) until done\nend\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 (x) to encoded\nwrite (y) to encoded\nwrite (CHAT) to encoded\nset cloud # (MY PLAYER #) to (encoded)\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 <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    change [sx v] by (-1.7)\nend\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n    change [sx v] by (1.7)\nend\nset [sx v] to ((sx) * (0.8))\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 down?> and <(mouse y) > ((y position) + (15))>>> then\n    if <(in air) < [3]> then\n        set [sy v] to [12]\n    end\nend\nif <touching (water v)?> then\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > ((y position) + (15))>>> then\n        change [y v] by (2)\n    end\n    if <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<mouse down?> and <(mouse y) < ((y position) - (15))>>> then\n        change [y v] by (-2)\n    end\n    if <(water tick) > [0]> then\n        change [sy v] by (-0.9)\n    else\n        change [sy v] by (0.9)\n    end\n    if <(water tick) > [15]> then\n        set [water tick v] to [-15]\n    end\n    change [water tick v] by (0.0000001)\nelse\n    change [sy v] by (-1.3)\nend\nChange player y by (sy)\n Test - Die\nset [scroll x v] to (x)\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nPosition\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (10)))\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nif <(SCROLL X) > [8230]> then\n    set [scroll x v] to [8230]\nend\nPosition\nif <(y) < [-179]> then\n    set [exit v] to [die]\nend\nif <<<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> or <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>>> or <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > ((y position) + (20))>>>> then\n    set [timeout v] to [2000]\nelse\n    change [timeout v] by (-1)\nend\nif <key (r v) pressed?> then\n    broadcast (Transition v)\n    set [exit v] to [restart]\nend\nif <(Timeout) < [1]> then\n    if <not <(username) = [JC_ProGold]>> then\n        broadcast (timeout v)\n        hide\n    end\nend\n\ndefine Change Player x by (sx)\nchange [x v] by (sx)\nPosition\nif <<touching (level v)?> or <<touching (darkness barriers v)?> or <touching (light barriers v)?>>> then\n    repeat (8)\n        change [y v] by (1)\n        Position\n        if <not <<touching (level v)?> or <<touching (darkness barriers v)?> or <touching (light barriers v)?>>>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-8)\n    if <<touching (level v)?> or <<touching (darkness barriers v)?> or <touching (light barriers v)?>>> then\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > ((y position) + (15))>>> 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 (level v)?> or <<touching (darkness barriers v)?> or <touching (light barriers v)?>>>>\n        change [x v] by ((([abs v] of (sx) ) / (sx)) * (-1))\n        Position\n    end\nend\n\ndefine Change player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <<touching (level v)?> or <<touching (darkness barriers v)?> or <touching (light barriers v)?>>>>\n    change [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\n\ndefine Position\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\ndefine  Test - Die\nif <touching (spikes 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\nwait (1) seconds\nbroadcast (win v)\n\nwhen flag clicked\nforever\n    if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > ((y position) + (15))>>> and <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>>> then\n        switch costume to (up right v)\n    else\n        if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > ((y position) + (15))>>> and <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>>> then\n            switch costume to (up left v)\n        else\n            if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > ((y position) + (15))>>> then\n                switch costume to (up v)\n            else\n                if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n                    switch costume to (right v)\n                else\n                    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n                        switch costume to (left v)\n                    else\n                        switch costume to (front 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 [x v] to [-100]\n    set [y v] to [-60]\n    set [scroll y v] to (y)\n    set [scroll x v] to (x)\nelse\n    if <(CHECKPOINT) = [1]> then\n        set [x v] to [1359]\n        set [y v] to [600]\n        set [scroll y v] to (y)\n        set [scroll x v] to (x)\n    else\n        if <(CHECKPOINT) = [2]> then\n            set [x v] to [2344]\n            set [y v] to [730]\n            set [scroll y v] to (y)\n            set [scroll x v] to (x)\n        else\n            if <(CHECKPOINT) = [3]> then\n                set [x v] to [2886]\n                set [y v] to [450]\n                set [scroll y v] to (y)\n                set [scroll x v] to (x)\n            else\n                if <(CHECKPOINT) = [4]> then\n                    set [x v] to [5781]\n                    set [y v] to [20]\n                    set [scroll y v] to (y)\n                    set [scroll x v] to (x)\n                else\n                    if <(CHECKPOINT) = [5]> then\n                        set [x v] to [7025]\n                        set [y v] to [-7]\n                        set [scroll y v] to (y)\n                        set [scroll x v] to (x)\n                    end\n                end\n            end\n        end\n    end\nend\nset [sx v] to [0]\nset [sy v] to [0]\nset [water tick v] to [-7]\nset [in air v] to [10]\nset [timeout v] to [1000]\nset [exit v] to []\nset size to (120) %\nshow\npoint in direction (90)\nset rotation style [left-right v]\n\nwhen flag clicked\nbroadcast (Green flag v) and wait\nbroadcast (Play Game v) and wait\n\nwhen I receive [win v]\nstop [other scripts in sprite v]\nhide\n\nwhen this sprite clicked\nchange [color v] effect by (3)\n\nwhen flag clicked\nset [color v] effect to (0)\n\n@Opponents\n\ndefine Decode chat (#)\nif <(#) = [0]> then\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\ndefine setup players\nhide\nset [offline v] to [100]\nset [player # v] to [1]\npoint in direction (90)\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\ndefine tick\nvalue = cloud # (player #)\nif <(join (value) [A]) = (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 (value) [A])\n    if <(offline) > [99]> then\n        show\n    end\n    set [offline v] to [0]\nend\nbegin decode of (value)\nvalue = read from encoded\nswitch costume to (value)\nvalue = read from encoded\nif <<<(y position) < [-160]> or <[160] < (y position)>> or <<(x position) < [-220]> or <[220] < (x position)>>> then\n    think []\n    set [ghost v] effect to (0)\n    go to [front v] layer\n    if on edge, bounce\n    set rotation style [all around v]\n    switch costume to (arrow v)\n    point towards (player v)\nelse\n    set [ghost v] effect to (10)\n    set rotation style [don't rotate v]\n    think (value)\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))\nvalue = read from encoded\nbroadcast (Decode chat v)\n\nwhen I receive [join game v]\nvalue = cloud # (player #)\nset [last value v] to (join (value) [A])\nwait (3) seconds\nvalue = cloud # (player #)\nif <(join (value) [A]) = (last value)> then\n    set [my player # v] to (player #)\nend\n\nwhen I receive [decode chat v]\nDecode chat (value)\n\nwhen I receive [begin v]\nforever\n    if <(MY PLAYER #) = (player #)> then\n        set [offline v] to [100]\n    else\n        tick\n    end\nend\n\nwhen I receive [setup opponents v]\nsetup players\n\nwhen I receive [win v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [decode chat v]\nDecode chat (value)\n\n@Spikes\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((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 [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I receive [green flag v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (1 v)\nClone at [480] [0]\nClone at [480] [0]\nClone at [480] [0]\nClone at [0] [360]\nClone at [-480] [0]\nClone at [0] [360]\nClone at [480] [0]\nClone at [480] [360]\nClone at [480] [-360]\nClone at [480] [0]\nClone at [0] [-360]\nClone at [480] [360]\nClone at [0] [-360]\nClone at [480] [-360]\nClone at [480] [0]\nClone at [1465] [0]\nClone at [480] [0]\nClone at [0] [360]\nClone at [480] [0]\nClone at [480] [0]\nClone at [-480] [-360]\nClone at [480] [0]\nClone at [480] [0]\nClone at [480] [0]\nClone at [0] [360]\nClone at [-480] [0]\n\n@Words\n\nwhen I receive [play game v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (1 v)\nif <((1) + (1)) = [2]> then\n    Clone at [120] [70]\n    Clone at [833] [210]\n    Clone at [1738] [1018]\n    Clone at [2868] [890]\n    Clone at [3387] [692]\n    Clone at [3865] [356]\n    Clone at [4555] [6]\n    Clone at [5888] [118]\n    Clone at [7305] [365]\n    Clone at [7876] [48]\nend\nset [x v] to [-99999]\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((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)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\nnext costume\n\n@water\n\nwhen I receive [green flag v]\nset [swing amount v] to [19]\nset [swing amount v] to ((round ((swing amount) / (2))) * (2))\nset [water tick v] to [-12]\nset [x v] to [0]\nset [y v] to [0]\nset [sy v] to [0]\nhide\nswitch costume to (1 v)\nClone at [480] [0]\nClone at [480] [0]\nClone at [480] [0]\nClone at [480] [0]\nClone at [480] [0]\nClone at [480] [0]\nClone at [480] [0]\nClone at [480] [0]\nClone at [480] [50]\nClone at [480] [0]\nClone at [480] [0]\nClone at [480] [0]\nClone at [480] [-50]\nClone at [480] [0]\nClone at [480] [0]\nClone at [480] [0]\nClone at [480] [0]\nClone at [480] [0]\nClone at [480] [0]\nClone at [480] [0]\nClone at [480] [0]\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <(water tick) > [0]> then\n    change [sy v] by (0.7)\nelse\n    change [sy v] by (-0.7)\nend\nif <(water tick) > ((swing amount) - (1))> then\n    set [water tick v] to ((swing amount) * (-1))\nend\nchange [water tick v] by (1)\nchange y by (sy)\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 [x v] by (x)\nchange [y v] by (y)\nnext costume\n\n@Checkpoints\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <(costume [name v]) = [Closed]> then\n    if <touching (player v)?> then\n        start sound [Ding Sound Effect v]\n        switch costume to (open v)\n        change [checkpoint v] by (1)\n    end\nend\ngo to [back 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 [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nhide\nset [checkpoint v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (closed v)\nClone at [1359] [577]\nClone at [2344] [690]\nClone at [2886] [450]\nClone at [5781] [-17]\nClone at [7025] [-39]\nset [x v] to [-99999]\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 [c v] key pressed\nhide variable [mouse v]\n\n@Exit\n\nwhen I receive [green flag v]\nhide\n\nwhen flag clicked\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (exit v)\nClone at [8323] [-50]\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <touching (player v)?> then\n    set [exit v] to [win]\nend\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 [x v] to (x)\nset [y v] to (y)\n\n@Connectecd\n\nwhen I receive [timeout v]\ngo to x: (0) y: (0)\nclear graphic effects\nswitch costume to (timeout v)\nshow\ngo to [front v] layer\nstop [all v]\n\nwhen flag clicked\nclear graphic effects\nswitch costume to (connecting v)\ngo to x: (130) y: (130)\nforever\n    wait (3) seconds\n    if <(CONNECT) = [Connected]> then\n        switch costume to (connected v)\n        wait (2) seconds\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n    else\n        if <(CONNECT) = [Full]> then\n            switch costume to (full v)\n        else\n            switch costume to (connecting v)\n        end\n    end\nend\n\n@Background\n\nwhen flag clicked\nforever\n    go to [back v] layer\n    if <(time of day) = [day]> then\n        switch costume to (day hills v)\n    else\n        switch costume to (night hills v)\n    end\nend\n\nwhen I receive [tick v]\nGo to (((((Movement ID) * (480)) - ((SCROLL X) / (6))) mod (960)) - (480)) (Y)\n\nwhen I start as a clone\npoint in direction (90)\nset [ghost v] effect to (0)\ngo to [back v] layer\nset [movement id v] to [0]\nhide\n\ndefine Go to (x) (y)\ngo to x: (x) y: (y)\nif <<(x position) = (x)> and <(y position) = (y)>> then\n    show\nelse\n    hide\nend\ngo to [back v] layer\n\nwhen flag clicked\ncreate clone of (_myself_ v)\nset [movement id v] to [-1]\n\nwhen I receive [day v]\nrepeat (1)\n    delete this clone\nend\ncreate clone of (_myself_ v)\nset [movement id v] to [-1]\n\nwhen I receive [night v]\nrepeat (1)\n    delete this clone\nend\ncreate clone of (_myself_ v)\nset [movement id v] to [-1]\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) + (((80) - (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\nwhen [timer v] > (0.01)\nset [ghost v] effect to (100)\n\nwhen flag clicked\nhide\ngo to x: (-160) y: (65)\nshow\nset [ghost v] effect to (100)\n\n@Win Screen\n\nwhen flag clicked\nhide\n\nwhen I receive [win v]\nset [ghost v] effect to (100)\nshow\nswitch costume to (blank v)\nset size to (150) %\nswitch costume to (win screen2 v)\nrepeat until <(size) < [101]>\n    go to [front v] layer\n    switch costume to (blank v)\n    change size by (((100) - (size)) / (7))\n    switch costume to (win screen2 v)\n    change [ghost v] effect by (-5)\n    set x to (((((pick random (0) to (1)) * (2)) - (1)) * ((size) - (100))) * (0.75))\n    set y to (((((pick random (0) to (1)) * (2)) - (1)) * ((size) - (100))) * (0.75))\nend\ngo to x: (0) y: (0)\nwait (2.30) seconds\nswitch costume to (costume1 v)\nrepeat (8)\n    next costume\nend\n\n@TN\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (tn v)\nforever\n    show\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\n@Sprite2\n\n@Sprite3\n\n@Sprite4\n\n@Sprite5\n\n@Sprite6\n\n@Sprite7\n\n@Sprite8\n\n@Sprite9\n\n@Sprite10\n\n@Sprite11\n\n@Sprite12\n\n@Sprite1\n\n@Sprite13\n\n@Level\n\nwhen I receive [green flag v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (1 v)\nClone at [480] [0]\nClone at [480] [0]\nClone at [480] [0]\nClone at [0] [360]\nClone at [-480] [0]\nClone at [0] [360]\nClone at [480] [0]\nClone at [480] [0]\nClone at [480] [0]\nClone at [480] [0]\nClone at [0] [-360]\nClone at [480] [360]\nClone at [0] [-360]\nClone at [480] [-360]\nClone at [480] [0]\nClone at [1465] [0]\nClone at [480] [0]\nClone at [0] [360]\nClone at [480] [0]\nClone at [480] [0]\nClone at [-480] [-360]\nClone at [480] [0]\nClone at [480] [0]\nClone at [480] [0]\nClone at [0] [360]\nClone at [-480] [0]\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((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 [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen flag clicked\ngo to [front v] layer\n\n@ASSETS\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\n@Sprite15\n\nwhen flag clicked\nshow\nset size to (100) %\nswitch costume to (costume14 v)\nforever\n    glide (0.001) secs to (player v)\nend\n\nwhen this sprite clicked\nnext costume\n\nwhen this sprite clicked\nif <(costume [number v]) = [3]> then\n    broadcast (Million views pls v)\nend\n\nwhen I receive [million views pls v]\nset size to (0) %\nhide\n\nwhen I receive [repeat v]\nshow\nset size to (100) %\n\nwhen flag clicked\nforever\n    if <<touching (mouse-pointer v)?> and <(costume [number v]) = [1]>> then\n        say [click on me to customize]\n    else\n        say []\n    end\nend\n\n@Sprite14\n\nwhen flag clicked\nset size to (0) %\nhide\nforever\n    glide (0.001) secs to (player v)\nend\n\nwhen flag clicked\nforever\n    next costume\nend\n\nwhen I receive [million views pls v]\nset size to (100) %\nshow\n\nwhen this sprite clicked\nset size to (0) %\nhide\nbroadcast (repeat v)\n\n