Up side down! || A multiplayer scrolling platformer 

Instructions: Sequel is out!!!!!!!!!!!!\nLink - https://scratch.mit.edu/projects/419514116/ .\n\nPlease get this trending!!\nThanks!\nWOW! 100 loves and 81 favorites in 5 days??!!! Thank you so much!!!\n\nHi, everyone!!! A just make a multiplayer scrolling platformer. This is my 2nd multiplayer platformer. Hope you like it!!\nThis project is my most complicated project until now!!\nI spent days making this game, so please love, favorite and follow me for more games like this!!!!\nControls - \nArrow keys or sad to move(mobile friendly)\nT to chat!\nN to toggle names!\nCheckpoints also available!!\nI also fixed about 10 glitches, I hope there are no more glitches, if they do please help me fix them. Thanks!\n\nAnyways, thanks for playing this game!!

@Stage\n\n@1\n\nwhen [1 v] key pressed\nif <(username) = [the_bee_1234]> then\n    set [checkpoints v] to [1]\nend\n\nwhen [2 v] key pressed\nif <(username) = [the_bee_1234]> then\n    set [checkpoints v] to [2]\nend\n\nwhen [3 v] key pressed\nif <(username) = [the_bee_1234]> then\n    set [checkpoints v] to [3]\nend\n\nwhen [4 v] key pressed\nif <(username) = [the_bee_1234]> then\n    set [checkpoints v] to [4]\nend\n\nwhen [5 v] key pressed\nif <(username) = [the_bee_1234]> then\n    set [checkpoints v] to [5]\nend\n\n@2\n\n@3\n\n@4\n\n@5\n\n@player\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        change [a: chats v] by (1)\n        if <(A: chats) = [1]> then\n            broadcast (1st caht v)\n        else\n            if <(A: chats) = [10]> then\n                broadcast (10 chat v)\n            else\n                if <(A: chats) = [30]> then\n                    broadcast (30 chat v)\n                end\n            end\n        end\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            change [a: chats v] by (1)\n            if <(A: chats) = [1]> then\n                broadcast (1st caht v)\n            else\n                if <(A: chats) = [10]> then\n                    broadcast (10 chat v)\n                else\n                    if <(A: chats) = [30]> then\n                        broadcast (30 chat v)\n                    end\n                end\n            end\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                change [a: chats v] by (1)\n                if <(A: chats) = [1]> then\n                    broadcast (1st caht v)\n                else\n                    if <(A: chats) = [10]> then\n                        broadcast (10 chat v)\n                    else\n                        if <(A: chats) = [30]> then\n                            broadcast (30 chat v)\n                        end\n                    end\n                end\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                    change [a: chats v] by (1)\n                    if <(A: chats) = [1]> then\n                        broadcast (1st caht v)\n                    else\n                        if <(A: chats) = [10]> then\n                            broadcast (10 chat v)\n                        else\n                            if <(A: chats) = [30]> then\n                                broadcast (30 chat v)\n                            end\n                        end\n                    end\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                        change [a: chats v] by (1)\n                        if <(A: chats) = [1]> then\n                            broadcast (1st caht v)\n                        else\n                            if <(A: chats) = [10]> then\n                                broadcast (10 chat v)\n                            else\n                                if <(A: chats) = [30]> then\n                                    broadcast (30 chat v)\n                                end\n                            end\n                        end\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                            change [a: chats v] by (1)\n                            if <(A: chats) = [1]> then\n                                broadcast (1st caht v)\n                            else\n                                if <(A: chats) = [10]> then\n                                    broadcast (10 chat v)\n                                else\n                                    if <(A: chats) = [30]> then\n                                        broadcast (30 chat v)\n                                    end\n                                end\n                            end\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                                change [a: chats v] by (1)\n                                if <(A: chats) = [1]> then\n                                    broadcast (1st caht v)\n                                else\n                                    if <(A: chats) = [10]> then\n                                        broadcast (10 chat v)\n                                    else\n                                        if <(A: chats) = [30]> then\n                                            broadcast (30 chat v)\n                                        end\n                                    end\n                                end\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                                    change [a: chats v] by (1)\n                                    if <(A: chats) = [1]> then\n                                        broadcast (1st caht v)\n                                    else\n                                        if <(A: chats) = [10]> then\n                                            broadcast (10 chat v)\n                                        else\n                                            if <(A: chats) = [30]> then\n                                                broadcast (30 chat v)\n                                            end\n                                        end\n                                    end\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                                        change [a: chats v] by (1)\n                                        if <(A: chats) = [1]> then\n                                            broadcast (1st caht v)\n                                        else\n                                            if <(A: chats) = [10]> then\n                                                broadcast (10 chat v)\n                                            else\n                                                if <(A: chats) = [30]> then\n                                                    broadcast (30 chat v)\n                                                end\n                                            end\n                                        end\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\ndefine Position\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\nwhen flag clicked\nset [a: chats v] to [0]\nset [scroll y v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nset [scroll x v] to [0]\nshow list [chat v]\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 [inair v] by (1)\nPosition\nrepeat until <not <<<<touching (platform v)?> or <touching (moving platformes v)?>> or <touching (platform2 v)?>> or <touching (moving platformes2 v)?>>>\n    if <(sy) < [0]> then\n        change [y v] by (1)\n    else\n        change [y v] by (-1)\n        set [inair v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\n\ndefine GAME ON\nset [x v] to [0]\nset [y v] to [0]\nset [sy v] to [0]\nset [sx v] to [0]\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [inair v] to [0]\nset [exit v] to []\nset size to (100) %\nset [ghost v] effect to (0)\nshow\nif <(Checkpoints) = [1]> then\n    set [x v] to [600]\n    set [y v] to [-150]\nelse\n    if <(Checkpoints) = [2]> then\n        set [x v] to [1832]\n        set [scroll y v] to [-260]\n        set [scroll x v] to [1832]\n        set [y v] to [-265]\n    else\n        if <(Checkpoints) = [3]> then\n            set [x v] to [2447]\n            set [scroll x v] to [2447]\n            set [scroll y v] to [-1249]\n            set [y v] to [-1249]\n        else\n            if <(Checkpoints) = [4]> then\n                set [x v] to [3157]\n                set [scroll x v] to [3157]\n                set [scroll y v] to [-334]\n                set [y v] to [-334]\n            else\n                if <(Checkpoints) = [5]> then\n                    set [x v] to [3236]\n                    set [scroll x v] to [3236]\n                    set [scroll y v] to [151]\n                    set [y v] to [151]\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\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 <<<(mouse x) < (x position)> and <mouse down?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n    change [sx v] by (-2)\nend\nif <<<(x position) < (mouse x)> and <mouse down?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n    change [sx v] by (2)\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 <<<(y position) < (mouse y)> and <mouse down?>> or <<key (down arrow v) pressed?> or <key (s v) pressed?>>> then\n    if <(inair) < [4]> then\n        set [sy v] to [-16]\n    end\nend\nif <(sy) > [-60]> then\n    change [sy v] by (2)\nend\nCHANGE PLAYER Y BY (sy)\nPosition\nTEST-DIE\nchange [scroll x v] by (round (((x) - (SCROLL X)) / (8)))\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nif <[6000] < (SCROLL X)> then\n    set [scroll x v] to [6000]\nend\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (8)))\nPosition\nif <(y) > [500]> then\n    set [exit v] to [die]\nend\nif <touching (spring v)?> then\n    set [sy v] to [-19.9]\nend\n\nwhen I receive [begin v]\nset [is the chat open v] to [0]\nshow list [chat v]\nforever\n    Chat\n    if <key (t v) pressed?> then\n        if <(is the chat open) = [1]> then\n            show list [chat v]\n            set [is the chat open v] to [0]\n        else\n            set [is the chat open v] to [1]\n            hide list [chat v]\n            show list [achievements! v]\n        end\n        wait until <not <key (t v) pressed?>>\n    end\n    if <key (n v) pressed?> then\n        if <(names) = [1]> then\n            set [names v] to [0]\n        else\n            set [names v] to [1]\n        end\n        wait until <not <key (n v) pressed?>>\n    end\n    if <key (a v) pressed?> then\n        if <(Achievement open????) = [1]> then\n            show list [achievements! v]\n            set [achievement open???? v] to [0]\n        else\n            hide list [achievements! v]\n            show list [chat v]\n            set [achievement open???? v] to [1]\n            set [is the chat open v] to [0]\n        end\n        wait until <not <key (a v) pressed?>>\n    end\nend\n\ndefine GAME - DIE\nset [exit v] to []\nstart sound [Danger HIt v]\nchange [a: deaths v] by (1)\nif <(A: Deaths) = [1]> then\n    broadcast (1 death v)\nelse\n    if <(A: Deaths) = [5]> then\n        broadcast (5 death v)\n    else\n        if <(A: Deaths) = [10]> then\n            broadcast (10 death v)\n        end\n    end\nend\n\ndefine TEST-DIE\nif <<<touching (dangers  v)?> or <<touching color (#ff0000)?> or <touching color (#be0000)?>>> or <touching color (#ff0000)?>> then\n    set [exit v] to [die]\nend\n\ndefine CHANGE PLAYER X By (sx)\nchange [x v] by (sx)\nPosition\nif <<<<touching (platform v)?> or <touching (moving platformes v)?>> or <touching (platform2 v)?>> or <touching (moving platformes2 v)?>> then\n    repeat (18)\n        change [y v] by (-1)\n        Position\n        if <not <<<<touching (platform v)?> or <touching (moving platformes v)?>> or <touching (platform2 v)?>> or <touching (moving platformes2 v)?>>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (18)\n    if <<<(y position) < (mouse y)> and <mouse down?>> or <<key (down arrow v) pressed?> or <key (s 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 [inair v] to [0]\n    else\n        set [sx v] to [0]\n    end\n    repeat until <not <<<<touching (platform v)?> or <touching (moving platformes v)?>> or <touching (platform2 v)?>> or <touching (moving platformes2 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\nset [max players v] to [8]\nset [my player # v] to [0]\nbroadcast (setups v) and wait\nbroadcast (joining v)\nbroadcast (join game v) and wait\nif <(My Player #) > [0]> then\n    start sound [Connect v]\n    broadcast (joined v)\nelse\n    start sound [Disconnect v]\n    broadcast (full v)\nend\nbroadcast (begin v)\n\ndefine write (val) to encoded\nset [letter # v] to [1]\nrepeat (length of (val))\n    set [encodied v] to (join (encodied) (item # of (letter (letter #) of (val)) in [code v]))\n    change [letter # v] by (1)\nend\nset [encodied v] to (join (encodied) [00])\n\nwhen I receive [begin v]\nset [level v] to [1]\nforever\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        if <(My Player #) > [0]> then\n            send cloud data\n        end\n    end\n    if <(EXIT) = [win]> then\n        Game-Win\n    else\n        GAME - DIE\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                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine send cloud data\nset [encodied v] to []\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 (encodied)\n\nwhen I receive [begin v]\nwait (5) seconds\nswitch backdrop to (blank v)\n\nhide\n\nwhen I receive [begin v]\nset [a : jumps v] to [0]\nset [a: chats v] to [0]\nset [a: deaths v] to [0]\n\nwhen I receive [begin v]\nset [a : jumps v] to [0]\nforever\n    wait until <<<mouse down?> and <(y position) < (mouse y)>> or <key (up arrow v) pressed?>>\n    change [a : jumps v] by (1)\n    wait until <<[4] > (inair)> and <not <<<mouse down?> and <(y position) < (mouse y)>> or <key (up arrow v) pressed?>>>>\n    if <(A : jumps) = [1]> then\n        broadcast (1st jump\ v)\n    else\n        if <(A : jumps) = [10]> then\n            broadcast (10 j v)\n        else\n            if <(A : jumps) = [10]> then\n                broadcast (30 jumps v)\n            else\n                if <(A : jumps) = [100]> then\n                    broadcast (100 jumps v)\n                end\n            end\n        end\n    end\nend\n\nif <(Checkpoints) = [1]> then\n    broadcast (1st check v)\nelse\n    if <(Checkpoints) = [2]> then\n        broadcast (2nd check v)\n    else\n        if <(Checkpoints) = [3]> then\n            broadcast (3rd check v)\n        else\n            if <(Checkpoints) = [4]> then\n                broadcast (4 check v)\n            else\n                if <(Checkpoints) = [5]> then\n                    broadcast (Last check v)\n                end\n            end\n        end\n    end\nend\n\n@opponents\n\ndefine Decode chat (chat)\nif <(chat) = [0]> then\n\ndefine begin decode of (encode)\nset [encodied v] to (encode)\nset [letter # v] to [1]\n\ndefine value=read from encode\nset [value v] to []\nforever\n    set [idx v] to (join (letter (letter #) of (encodied)) (letter ((letter #) + (1)) of (encodied)))\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\nset [color v] effect to (0)\nset [offline v] to [100]\nhide\nset [player # v] to [1]\nrepeat ((MAX PLAYERS) - (1))\n    create clone of (_myself_ v)\n    change [player # v] by (1)\nend\n\nwhen I receive [begin v]\nforever\n    if <(My Player #) = (player #)> then\n        hide\n        set [offline v] to [100]\n    else\n        tick\n    end\n    go to [back v] layer\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                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [setups v]\nsetup players\n\ndefine tick\nvalue=Cloud # (player #)\nif <(join [A] (value)) = (last value)> then\n    change [offline v] by (1)\n    if <(offline) = [100]> then\n        hide\n    end\nelse\n    set [last value v] to (join [A] (value))\n    if <(offline) > [99]> then\n        show\n    end\n    set [offline v] to [0]\nend\nbegin decode of (value)\nvalue=read from encode\nif <(names) = [1]> then\n    say (join (player #) (join [:] (value)))\nelse\n    say []\nend\nvalue=read from encode\nvalue=read from encode\nset x to ((value) - (SCROLL X))\nvalue=read from encode\nset y to ((value) - (SCROLL Y))\nvalue=read from encode\nbroadcast (Decode chat v)\n\nwhen I receive [join game v]\nvalue=Cloud # (player #)\nset [last value v] to (join [A] (value))\nwait (3) seconds\nvalue=Cloud # (player #)\nif <(join [A] (value)) = (last value)> then\n    set [my player # v] to (player #)\nend\n\nwhen I receive [decode chat v]\nDecode chat (value)\n\nDecode chat (value)\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\n@Checkpoints\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPOSTION ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <(costume [number v]) = [2]> then\n    if <touching (player v)?> then\n        switch costume to (open v)\n        change [checkpoints v] by (1)\n        if <(Checkpoints) = [1]> then\n            broadcast (1st check v)\n        else\n            if <(Checkpoints) = [2]> then\n                broadcast (2nd check v)\n            else\n                if <(Checkpoints) = [3]> then\n                    broadcast (3rd check v)\n                else\n                    if <(Checkpoints) = [4]> then\n                        broadcast (4 check v)\n                    else\n                        if <(Checkpoints) = [5]> then\n                            broadcast (Last check v)\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine POSTION (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 [reset v]\n\ndefine CLONE AT X (x) Y (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [x v] to [0]\nset [y v] to [0]\nset [checkpoints v] to [0]\nhide\nswitch costume to (close v)\nif <(LEVEL) = [1]> then\n    CLONE AT X [600] Y [-150]\n    CLONE AT X [1832] Y [-265]\n    CLONE AT X [2483] Y [-1249]\n    CLONE AT X [3130] Y [-340]\n    CLONE AT X [3235] Y [206]\nend\nset [x v] to [-99999999999999]\n\ndelete this clone\n\n@PLATFORM\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPOSTION ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    CLONE AT X [680] Y [11]\n    CLONE AT X [1200] Y [0]\n    CLONE AT X [2065] Y [-1500]\n    Change [100] [-1200]\nend\nset [y v] to [0]\n\ndefine POSTION (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 [reset v]\ndelete this clone\n\ndefine CLONE AT X (x) Y (y)\ncreate clone of (_myself_ v)\nset [x v] to (x)\nset [y v] to (y)\nnext costume\n\ndefine Change (x) (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nCLONE AT X [3715] Y [-1271]\n\n@DANGERs \n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\ngo to [back v] layer\nPOSTION ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    CLONE AT X [1185] Y [-51]\n    CLONE AT X [1185] Y [-51]\n    CLONE AT X [2377] Y [-1045]\nend\n\ndefine POSTION (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 [reset v]\ndelete this clone\n\ndefine CLONE AT X (x) Y (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\n@Thumbnail\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    go to x: (0) y: (0)\n    show\n    set [ghost v] effect to (100)\nend\n\n@EXIT\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 [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [y v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    set [x v] to [3250]\n    set [y v] to [317]\nend\n\nwhen I receive [begin v]\nforever\n    if <touching (player v)?> then\n        set [game finished??? v] to [yes]\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [begin v]\nforever\n    repeat (4)\n        change [y v] by (1)\n    end\n    wait (0.111111111) seconds\n    repeat (4)\n        change [y v] by (-1)\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\nhide\n\nwhen I receive [begin v]\nwait (3) seconds\nhide\n\nwhen I receive [joining v]\nswitch costume to (joining v)\nshow\n\nwhen I receive [joined v]\nswitch costume to (joined v)\nshow\n\nwhen I receive [full v]\nswitch costume to (joined2 v)\nshow\n\n@Spring\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((Checkpoint : x) - (SCROLL X)) ((Checkpoint : y) - (SCROLL Y))\nif <touching (player v)?> then\n    broadcast (SPRING v) and wait\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: (x) y: (y)\nset [checkpoint : x v] to (x)\nset [checkpoint : y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [setup v]\ngo to [back v] layer\nhide\nset [checkpoint : x v] to [0]\nset [checkpoint : y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (costume1 v)\n    Clone at x: [1185] y: [-55]\n    Clone at x: [3349] y: [230]\n    Clone at x: [3409] y: [230]\nend\nset [checkpoint : x v] to [-99999]\n\nwhen I receive [spring v]\nstart sound [Big Boing v]\nswitch costume to (costume1 v)\nrepeat (5)\n    next costume\nend\nswitch costume to (costume1 v)\n\n@Moving platformes\n\nwhen I receive [green flag v]\nhide\n\ndefine POSTION (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 [reset v]\ndelete this clone\n\ndefine CLONE AT X (x) Y (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [tick v]\nchange [frame v] by (1)\nPOSTION ((((x) - (SCROLL X)) * (1)) + (([cos v] of (frame) ) * (100))) (((y) - (SCROLL Y)) * (1))\n\nwhen I receive [setup v]\nset [x v] to [0]\nset [y v] to [0]\nhide\nif <(LEVEL) = [1]> then\n    CLONE AT X [2825] Y [-1276]\nend\nset [x v] to [-99999999999999]\n\n@PLATFORM2\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPOSTION ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    CLONE AT X [3300] Y [-2500]\nend\nset [y v] to [0]\n\ndefine POSTION (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 [reset v]\ndelete this clone\n\ndefine CLONE AT X (x) Y (y)\ncreate clone of (_myself_ v)\nset [x v] to (x)\nset [y v] to (y)\nnext costume\n\n@Moving platformes2\n\nwhen I receive [green flag v]\nhide\n\ndefine POSTION (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 [reset v]\ndelete this clone\n\ndefine CLONE AT X (x) Y (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [tick v]\nchange [frame v] by (1)\nPOSTION ((x) - (SCROLL X)) ((((y) - (SCROLL Y)) + (([cos v] of ((frame) * (1)) ) * (250))) + (10))\n\nwhen I receive [setup v]\nset [x v] to [0]\nset [y v] to [0]\nhide\nif <(LEVEL) = [1]> then\n    CLONE AT X [2800] Y [-900]\nend\nset [x v] to [-99999999999999]\n\n@Background\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPOSTION ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    CLONE AT X [680] Y [11]\n    CLONE AT X [1200] Y [0]\n    CLONE AT X [2065] Y [-700]\nend\n\ndefine POSTION (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 [reset v]\ndelete this clone\n\ndefine CLONE AT X (x) Y (y)\ncreate clone of (_myself_ v)\nset [x v] to (x)\nset [y v] to (y)\nnext costume\n\n@Spikes\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPOSTION ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine POSTION (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 [reset v]\ndelete this clone\n\ndefine CLONE AT X (x) Y (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [setup v]\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (open v)\n    CLONE AT X [3296] Y [-342]\n    CLONE AT X [3588] Y [-342]\n    CLONE AT X [2965] Y [-342]\n    CLONE AT X [3296] Y [-530]\n    CLONE AT X [3588] Y [-530]\n    CLONE AT X [2965] Y [-530]\n    CLONE AT X [3097] Y [215]\n    CLONE AT X [3461] Y [215]\n    CLONE AT X [3618] Y [215]\n    CLONE AT X [3550] Y [215]\n    CLONE AT X [3348] Y [85]\n    CLONE AT X [3507] Y [318]\nend\nset [x v] to [-99999999999999]\n\n@Wining\n\nwhen I receive [begin v]\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [begin v]\nforever\n    if <(GAME FINISHED???) = [yes]> then\n        show variable [timer v]\n        show list [chat v]\n        set [ghost v] effect to (0)\n        go to [front v] layer\n        go [forward v] (1) layers\n        set x to (500)\n        show\n        repeat (10)\n            change x by (-50)\n        end\n        stop [all v]\n    end\nend\n\nwhen flag clicked\nset [game finished??? v] to [no]\n\n@Timer\n\nwhen I receive [begin v]\nset [game finished??? v] to [no]\nhide variable [timer v]\nreset timer\n\nwhen I receive [green flag v]\nhide variable [timer v]\nreset timer\n\nwhen I receive [begin v]\nforever\n    if <(GAME FINISHED???) = [yes]> then\n        show variable [timer v]\n        set [timer v] to (timer)\n        set [timer v] to (Timer)\n        wait (1000000000000000000000000000000000000000000000000000000000000000000000) seconds\n        wait (1000000000000000000000000000000000000000000000000000000000000000000000) seconds\n        wait (1000000000000000000000000000000000000000000000000000000000000000000000) seconds\n        wait (1000000000000000000000000000000000000000000000000000000000000000000000) seconds\n        wait (1000000000000000000000000000000000000000000000000000000000000000000000) seconds\n    end\nend\n\n@clone\n\nwhen flag clicked\nshow\nset [size v] to [50]\nset [speed v] to [5]\nset [time v] to [0.1]\nset [1 v] to [0]\nset [2 v] to [0]\nset [3 v] to [0]\nset [4 v] to [0]\nset [5 v] to [0]\ngo to x: (0) y: (0)\nhide\nclone [5]\n\ndefine clone (clone num)\nswitch costume to (1 v)\nrepeat (clone num)\n    create clone of (_myself_ v)\n    next costume\nend\n\nwhen I start as a clone\nshow\nwait ((time) * (costume [name v])) seconds\nif <(costume [name v]) = [1]> then\n    forever\n        repeat (91)\n            set size to (size) %\n            change [1 v] by ((speed) / (2))\n            set x to ((([tan v] of (1) ) * (15)) - (-20))\n        end\n    end\nend\nif <(costume [name v]) = [2]> then\n    forever\n        repeat (91)\n            set size to (size) %\n            change [2 v] by ((speed) / (2))\n            set x to ((([tan v] of (2) ) * (15)) - (-10))\n        end\n    end\nend\nif <(costume [name v]) = [3]> then\n    forever\n        repeat (91)\n            set size to (size) %\n            change [3 v] by ((speed) / (2))\n            set x to ((([tan v] of (3) ) * (15)) - (0))\n        end\n    end\nend\nif <(costume [name v]) = [4]> then\n    forever\n        repeat (91)\n            set size to (size) %\n            change [4 v] by ((speed) / (2))\n            set x to ((([tan v] of (4) ) * (15)) - (10))\n        end\n    end\nend\nif <(costume [name v]) = [5]> then\n    forever\n        repeat (91)\n            set size to (size) %\n            change [5 v] by ((speed) / (2))\n            set x to ((([tan v] of (5) ) * (15)) - (20))\n        end\n    end\nend\n\nwhen I receive [begin v]\nstop [other scripts in sprite v]\ndelete this clone\n\n@Loading\n\nwhen flag clicked\nbroadcast (Signal v)\n\nwhen I receive [signal v]\ngo to x: (-70) y: (-90)\ngo to [front v] layer\nhide\nforever\n    repeat (4)\n        go to [front v] layer\n        create clone of (_myself_ v)\n        wait (0.2) seconds\n        if <(End?) = [1]> then\n            stop [this script v]\n        end\n    end\n    repeat (5)\n        wait (1) seconds\n        if <(End?) = [1]> then\n            stop [this script v]\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    turn right (RV) degrees\n    set [rv v] to ((RV) * (0.955))\nend\n\nwhen I start as a clone\nshow\nswitch costume to (costume2 v)\ngo [backward v] (1) layers\nset [rv v] to [10]\ngo to [front v] layer\nwait (1) seconds\nrepeat (2)\n    change [rv v] by (3)\nend\nwait (1) seconds\nset [rv v] to [12]\nrepeat (2)\n    change [rv v] by (3)\nend\nwait (2) seconds\ngo [backward v] (1) layers\npoint in direction (90)\ndelete this clone\n\nwhen I receive [begin v]\nstop [other scripts in sprite v]\ndelete this clone\n\n@Thank you for love and fav\n\nwhen I receive [thanks v]\nstart sound [pop v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nshow\nswitch costume to (costume2 v)\ngo to x: (0) y: (50)\nrepeat until <(y position) < [0.2]>\n    change [ghost v] effect by (-10)\n    change y by (10)\nend\nwait (4) seconds\nrepeat until <(y position) > [50]>\n    change [ghost v] effect by (10)\n    change y by (((y position) + (5)) / (5))\nend\nhide\n\nwhen I start as a clone\n\ngo to x: (0) y: (50)\nshow\ngo to [front v] layer\nrepeat (12)\n    change y by (-9)\nend\nrepeat (5)\n    change y by (3)\nend\nrepeat (5)\n    change y by (-1)\nend\nforever\n    if <touching (mouse-pointer v)?> then\n        set [ghost v] effect to (50)\n        if <(costume [number v]) = [2]> then\n            if <mouse down?> then\n                set [costume v] to [2]\n                repeat (25)\n                    change y by (10)\n                end\n                hide\n                delete this clone\n            end\n        else\n            if <(costume [number v]) = [3]> then\n                if <mouse down?> then\n                    set [costume v] to [1]\n                    repeat (25)\n                        change y by (15)\n                    end\n                    hide\n                    delete this clone\n                end\n            end\n        end\n    else\n        set [ghost v] effect to (0)\n    end\n    if <(Costume) > [0.99]> then\n        repeat (25)\n            change y by (15)\n        end\n        hide\n        delete this clone\n    end\n    hide\n    delete this clone\nend\n\nwhen flag clicked\nhide\nset [costume v] to [0.9]\n\nif <[] = [3]> then\nif <[] = [2]> then\n\nwhen I receive [begin v]\nset [costume v] to [0.9]\nwait (0.1) seconds\nset [costume v] to [0.9]\nwait (0.2) seconds\nset [costume v] to [0.9]\n\n@Love fave\n\nwhen flag clicked\nset [costume v] to [0]\nhide\nforever\n    if <not <<(FAVED___) = [1]> and <(LOVED__) = [1]>>> then\n        wait (pick random (30) to (40)) seconds\n        switch costume to (costume1 v)\n        go to x: (0) y: (50)\n        show\n        go to [front v] layer\n        start sound [pop v]\n        repeat (9)\n            change y by (-6)\n        end\n        repeat (5)\n            change y by (3)\n        end\n        repeat (5)\n            change y by (-1)\n        end\n        wait (2) seconds\n        repeat (15)\n            change y by (7)\n        end\n        hide\n    else\n        stop [this script v]\n    end\n    if <(Costume) > [0]> then\n        hide\n        stop [this script v]\n    end\nend\n\n@Detector\n\nwhen flag clicked\nhide\nset [faved___ v] to [0]\nset [loved__ v] to [0]\nset [clone id v] to [0]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [clone id v] to [1]\ncreate clone of (_myself_ v)\nwait until <<(LOVED__) = [1]> and <(FAVED___) = [1]>>\nwait (1) seconds\nbroadcast (Thanks v)\n\nwhen I start as a clone\nif <(clone id) = [0]> then\n    go to x: (-15) y: (0)\n    set [loved__ v] to [0]\n    switch costume to (love v)\n    forever\n        set [love? v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [loved__ v] to [1]\n        end\n    end\nend\nif <(clone id) = [1]> then\n    go to x: (0) y: (0)\n    switch costume to (fave v)\n    set [faved___ v] to [0]\n    forever\n        set [fav v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [faved___ v] to [1]\n        end\n    end\nend\n\n@achievements\n\nwhen flag clicked\nhide\nshow list [achievements! v]\ndelete all of [achievements! v]\nadd [1st jump!] to [achievements! v]\nadd [1st death!] to [achievements! v]\nadd [10 deaths!] to [achievements! v]\nadd [10 jumps!] to [achievements! v]\nadd [30 jumps!] to [achievements! v]\nadd [1st chat!] to [achievements! v]\nadd [10 chats!] to [achievements! v]\nadd [5 deaths] to [achievements! v]\nadd [100 junps!] to [achievements! v]\nadd [30 chats] to [achievements! v]\nadd [1st checkpoint!] to [achievements! v]\nadd [2nd checkpoint!] to [achievements! v]\nadd [3rd checkpoint!] to [achievements! v]\nadd [4th checkpoint!] to [achievements! v]\nadd [Last checkpoint!] to [achievements! v]\n\ndefine Achievement animation\ngo to [front v] layer\ngo to x: (0) y: (0)\nset size to (130) %\nshow\nset [ghost v] effect to (100)\nrepeat until <(size) < [100.3]>\n    change size by (((100) - (size)) / (5))\n    change [ghost v] effect by (-10)\nend\nset size to (100) %\nwait (2.5) seconds\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\nhide\nset [ghost v] effect to (0)\n\nwhen I receive [1st jump\ v]\ndelete (item # of [1st jump!] in [achievements! v]) of [achievements! v]\nswitch costume to (1 jump v)\nAchievement animation\n\nwhen I receive [1st caht v]\ndelete (item # of [1st chat!] in [achievements! v]) of [achievements! v]\nswitch costume to (1 chat v)\nAchievement animation\n\nwhen I receive [30 jumps v]\ndelete (item # of [30 jumps!] in [achievements! v]) of [achievements! v]\nswitch costume to (30 jumps! v)\nAchievement animation\n\nwhen I receive [10 j v]\ndelete (item # of [10 jumps!] in [achievements! v]) of [achievements! v]\nswitch costume to (10jumps v)\nAchievement animation\n\nwhen I receive [30 chat v]\ndelete (item # of [30 chats] in [achievements! v]) of [achievements! v]\nswitch costume to (30 chat v)\nAchievement animation\n\nwhen I receive [10 chat v]\ndelete (item # of [10 chats!] in [achievements! v]) of [achievements! v]\nswitch costume to (10 chat v)\nAchievement animation\n\nwhen I receive [10 death v]\ndelete (item # of [10 deaths!] in [achievements! v]) of [achievements! v]\nswitch costume to (10 deaths v)\nAchievement animation\n\nwhen I receive [1 death v]\ndelete (item # of [1st death!] in [achievements! v]) of [achievements! v]\nswitch costume to (1 death v)\nAchievement animation\n\nwhen I receive [5 death v]\ndelete (item # of [5 deaths] in [achievements! v]) of [achievements! v]\nswitch costume to (5 death/ v)\nAchievement animation\n\nwhen I receive [100 jumps v]\ndelete (item # of [100 jumps!] in [achievements! v]) of [achievements! v]\nswitch costume to (100 jumps! v)\nAchievement animation\n\nwhen I receive [1st check v]\ndelete (item # of [1st checkpoint!] in [achievements! v]) of [achievements! v]\nswitch costume to (1st checkpoint v)\nAchievement animation\n\nwhen I receive [2nd check v]\ndelete (item # of [2nd checkpoint!] in [achievements! v]) of [achievements! v]\nswitch costume to (2 v)\nAchievement animation\n\nwhen I receive [3rd check v]\ndelete (item # of [3rd checkpoint!] in [achievements! v]) of [achievements! v]\nswitch costume to (3 v)\nAchievement animation\n\nwhen I receive [4 check v]\ndelete (item # of [4th checkpoint!!] in [achievements! v]) of [achievements! v]\nswitch costume to (4 v)\nAchievement animation\n\nwhen I receive [last check v]\ndelete (item # of [Last checkpoint!] in [achievements! v]) of [achievements! v]\nswitch costume to (last v)\nAchievement animation\n\n@Thanks to scratchers\n\nwhen I receive [begin v]\ngo to x: (0) y: (0)\nif <<(username) = [TropicalCoder13]> or <(username) = [TropicalCoderTest]>> then\n    show\n    switch costume to (@tropicalcoder13 v)\n    wait (10) seconds\n    hide\nelse\n    if <<(username) = [StratfordJames]> or <(username) = [StratfordJames1]>> then\n        show\n        switch costume to (stanfordjames v)\n        wait (10) seconds\n        hide\n    else\n        if <<(username) = [0014049]> or <(username) = [0014049_Test]>> then\n            show\n            switch costume to ( 0014049 v)\n            wait (10) seconds\n            hide\n        else\n            if <<(username) = [TimMcCool]> or <(username) = [TimMcTest]>> then\n                show\n                switch costume to (timmccool v)\n                wait (10) seconds\n                hide\n            else\n                if <<(username) = [carot3]> or <<(username) = [carot3_testing]> or <<(username) = [carot3_Studios]> or <(username) = [carot3_alt]>>>> then\n                    show\n                    switch costume to (carot3 v)\n                    wait (10) seconds\n                    hide\n                else\n                    if <<(username) = [dmitry1232]> or <(username) = [dmitry1232_test]>> then\n                        show\n                        switch costume to (dmitry1232 v)\n                        wait (10) seconds\n                        hide\n                    else\n                        if <(username) = [the_bee_1234]> then\n                            show\n                            switch costume to (the_bee_1234 v)\n                            wait (10) seconds\n                            hide\n                        else\n                            if <(username) = [plant2]> then\n                                show\n                                switch costume to (the_bee_1234 v)\n                                wait (10) seconds\n                                hide\n                            else\n                                if <<(username) = [QuaXX]> or <(username) = [XXuaQ]>> then\n                                    show\n                                    switch costume to (quaxx v)\n                                    wait (10) seconds\n                                    hide\n                                else\n                                    if <<(username) = [xX_VRC_Xx]> or <(username) = [xX_VRC-Test_Xx]>> then\n                                        show\n                                        switch costume to (xx_vrc_xx v)\n                                        wait (10) seconds\n                                        hide\n                                    else\n                                        if <(username) = [MaxyBrian]> then\n                                            show\n                                            switch costume to (maxybrian v)\n                                            wait (10) seconds\n                                            hide\n                                        else\n                                            if <(username) = [I8D]> then\n                                                show\n                                                switch costume to (i8d v)\n                                                wait (10) seconds\n                                                hide\n                                            else\n                                                if <<(username) = [GonSanVi]> or <(username) = [GonSanVi_tests]>> then\n                                                    show\n                                                    switch costume to (gonsanvi v)\n                                                    wait (10) seconds\n                                                    hide\n                                                else\n                                                    hide\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\n