Explorer || A 2.5d multiplayer scrolling platformer

Instructions: If you can see a name but the player is not there it means that the player is on a different level\nServer holds up to 10 players\nT to chat\nLAGGY?\ntry https://turbowarp.org/#406379734\nIMPORTANT:\nIf it glitches just press the green flag again.\nthings to stop glitching\n1.If you are dying don't press any keys just wait till you respawn\n2.On start click the flag TWICE \n                                INSTRUCTIONS \nPress the green flag twice arrow keys to move around avoid lava and collect all the "light orbs" to unlock the portal at the end of each level.

@Stage\n\nwhen [space v] key pressed\nshow variable [mouse v]\nset [mouse v] to (join ((mouse x) + (Scroll X)) (join [,] ((mouse y) + (Scroll Y))))\n\nwhen [h v] key pressed\nhide variable [mouse v]\n\n@My Player\n\ndefine Chat\nif <(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                                    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 [cloud timer v] to [0]\nswitch costume to (costume2 v)\nset [scroll y v] to [0]\nset [scroll x v] to [-100]\nset [x v] to [-100]\nset [y 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 [in air? v] by (1)\nPosition\nrepeat until <not <touching (platforms v)?>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air? v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\n\ndefine Game On\npoint in direction (90)\nclear graphic effects\nset [x v] to [-120]\nset [y v] to [0]\nset [sy v] to [0]\nset [sx v] to [0]\nset [scroll x v] to [-100]\nset [scroll y v] to [0]\nset [in air? v] to [0]\nset [exit v] to []\nset size to (100) %\nset [ghost v] effect to (0)\nshow\n\nwhen I receive [green flag v]\nset [coins v] to [0]\nhide\ngo to [front v] layer\n\ndefine Tick\nif <not <key (any v) pressed?>> then\n    switch costume to (player-not moving v)\nend\nif <<<(mouse x) < (x position)> and <mouse down?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n    switch costume to (player-left v)\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    switch costume to (player-right v)\n    change [sx v] by (2)\nend\nset [sx v] to ((sx) * (0.85))\nif <[0.9] < ([abs v] of (sx) )> then\n    Change player x by: (round (sx))\nend\nif <<<(y position) < (mouse y)> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n    if <(in air?) < [4]> then\n        set [sy v] to [16]\n    end\nend\nif <key (up arrow v) pressed?> then\n    if <(in air?) < [4]> then\n        switch costume to (player-jumping v)\n        set [sy v] to [20]\n    end\nend\nif <(sy) > [-20]> then\n    change [sy v] by (-2)\nend\nChange player y by: (sy)\nTest - Die\nchange [scroll x v] by (round ((((x) - (Scroll X)) + ((mouse x) / (2))) / (8)))\nchange [scroll y v] by (round ((((y) - (Scroll Y)) + ((mouse y) / (4))) / (8)))\nif <(Scroll X) < [0]> then\n    set [scroll x v] to [0]\nend\nif <[2649] < (Scroll X)> then\n    set [scroll x v] to [2649]\nend\nif <(Scroll Y) < [0]> then\n    set [scroll y v] to [0]\nend\nPosition\nif <(y) < [-175]> then\n    set [exit v] to [die]\nend\n\nwhen I receive [begin v]\nset [chat open? v] to [0]\nshow list [chat v]\nforever\n    Chat\n    if <<key (t v) pressed?> or <<touching (mouse-pointer v)?> and <mouse down?>>> then\n        if <(Chat Open?) = [1]> then\n            show list [chat v]\n            set [chat open? v] to [0]\n        else\n            set [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\nend\n\ndefine Game - Die\nset [exit v] to []\nhide\n\ndefine Test - Die\nif <touching (danger v)?> then\n    set [exit v] to [die]\nend\n\ndefine Change player x by: (sx)\nchange [x v] by (sx)\nPosition\nif <touching (platforms v)?> then\n    repeat (18)\n        change [y v] by (1)\n        Position\n        if <not <touching (platforms v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-18)\n    if <<<(y position) < (mouse y)> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        if <(sx) > [0]> then\n            set [sx v] to [-16]\n        else\n            set [sx v] to [16]\n        end\n        set [in air? v] to [0]\n    else\n        set [sx v] to [0]\n    end\n    repeat until <not <touching (platforms v)?>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\nwhen flag clicked\ndelete all of [buffer v]\nset [max player # v] to [10]\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 [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]\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        Add Cloud Data\n    end\n    if <(EXIT) = [win]> then\n        Game-Win\n    else\n        Game - Die\n    end\nend\n\ndefine Set cloud position of (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                                    set [☁ p10 v] to (value)\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Add Cloud Data\nif <(My Player #) < [1]> then\n    stop [this script v]\nend\nchange [cloud timer v] by (1)\nadd (x) to [buffer v]\nadd (y) to [buffer v]\nif <(Cloud timer) < [3]> then\n    stop [this script v]\nend\nset [cloud timer v] to [0]\nset [encoded v] to []\nWrite (join (join (username) [ Level : ]) (LEVEL)) to encoded\nWrite (round ((Timer) * (10))) to encoded\nWrite (costume [number v]) to encoded\nWrite (Chat) to encoded\nWrite (LEVEL) to encoded\nrepeat (length of [buffer v])\n    Write (item (1) of [buffer v]) to encoded\n    delete (1) of [buffer v]\nend\nSet cloud position of (My Player #) to (encoded)\n\ndefine Game-Win\nrepeat (50)\n    point towards (portal v)\n    turn right (65) degrees\n    move ((distance to [mouse-pointer v]) / (20)) steps\n    change size by (-1)\n    change [ghost v] effect by (2)\nend\nhide\nchange [level v] by (1)\nwait (1) seconds\n\nwhen flag clicked\ndelete all of [buffer v]\npoint in direction (90)\n\nwhen I receive [reset v]\nset [coins v] to [0]\n\nwhen flag clicked\nset [timer v] to [1]\nforever\n    change [timer v] by (.1)\n    wait (.10) seconds\nend\n\nwhen flag clicked\nforever\n    reset timer\nend\n\n@Other Players\n\ndefine Decode chat (chat)\nif <(chat) = [0]> then\n\ndefine begin decode of (encode)\nset [encoded v] to (encode)\nset [letter # v] to [1]\n\ndefine 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\nset [offline v] to [100]\nhide\nset [player # v] to [1]\nrepeat ((Max Player #) - (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        set [offline v] to [100]\n        hide\n    else\n        Tick\n    end\n    go to [back v] layer\nend\n\ndefine Cloud # (player)\nif <(player) = [1]> then\n    set [value v] to (☁ p1)\nelse\n    if <(player) = [2]> then\n        set [value v] to (☁ p2)\n    else\n        if <(player) = [3]> then\n            set [value v] to (☁ p3)\n        else\n            if <(player) = [4]> then\n                set [value v] to (☁ p4)\n            else\n                if <(player) = [5]> then\n                    set [value v] to (☁ p5)\n                else\n                    if <(player) = [6]> then\n                        set [value v] to (☁ p6)\n                    else\n                        if <(player) = [7]> then\n                            set [value v] to (☁ p7)\n                        else\n                            if <(player) = [8]> then\n                                set [value v] to (☁ p8)\n                            else\n                                if <(player) = [9]> then\n                                    set [value v] to (☁ p9)\n                                else\n                                    set [value v] to (☁ p10)\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [setups v]\nSetup\n\ndefine Tick\nset size to (400) %\nCloud # (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]\n    begin decode of (value)\n    Read from encoded\n    if <(names) = [1]> then\n        say (join (player #) (join [: ] (value)))\n    else\n        say []\n    end\n    Read from encoded\n    Read from encoded\n    switch costume to (value)\n    Read from encoded\n    Decode chat (value)\n    Read from encoded\n    if <(value) = (LEVEL)> then\n        set [ghost v] effect to (0)\n    else\n        set [ghost v] effect to (100)\n    end\n    Read from encoded\n    repeat until <(value) = []>\n        add (value) to [buffer v]\n        Read from encoded\n    end\nend\nif <(length of [buffer v]) > [0]> then\n    set x to ((item (1) of [buffer v]) - (Scroll X))\n    delete (1) of [buffer v]\n    set y to ((item (1) of [buffer v]) - (Scroll Y))\n    delete (1) of [buffer v]\nend\nset size to (100) %\n\nwhen I receive [join game v]\nCloud # (player #)\nset [last value v] to (join [A] (value))\nwait (3) seconds\nCloud # (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\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 flag clicked\ndelete all of [buffer v]\n\nset [timer v] to [25323]\nrepeat until <(Timer) = [92]>\n    delete (Timer) of [characters v]\n    change [timer v] by (-1)\nend\n\n@Mode\n\nwhen flag clicked\nset [ghost v] effect to (10)\nhide\n\nwhen I receive [begin v]\nwait (0.4) seconds\nhide\n\nwait (3) seconds\n\nwhen I receive [joining v]\nswitch costume to (joining v)\nshow\n\nwhen I receive [joined v]\nswitch costume to (connected v)\nshow\n\nwhen I receive [full v]\nswitch costume to (full v)\nshow\n\nwhen I receive [inactive v]\nswitch costume to (inactive v)\ngo to [front v] layer\nshow\nstop [all v]\n\nwhen I receive [begin v]\nset [inactive v] to [false]\n\n@Chat\n\nwhen I receive [tick v]\nif <(Chat Open?) = [1]> then\n    show\nelse\n    hide\nend\n\nset [coins v] to [40]\n\n@Thumbnail\n\nwhen flag clicked\ngo to x: (-180) y: (79)\nforever\n    go to [front v] layer\n    hide\nend\n\nwhen [timer v] > (0)\nset [xvel v] to [0]\nshow\nrepeat until <(x position) > [17]>\n    change [xvel v] by (1)\n    change x by (Xvel)\nend\n\n@Platforms\n\nwhen I receive [green flag v]\n\nwhen I receive [tick v]\nPosition ((x) - (Scroll X)) ((y) - (Scroll Y))\n\nwhen I receive [setup v]\ngo to [back v] layer\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (level 1 1 v)\nif <(LEVEL) = [1]> then\n    Clone at x: [360] y: [0]\n    Clone at x: [400] y: [0]\n    Clone at x: [400] y: [0]\n    Clone at x: [360] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        set [y v] to [-40]\n        switch costume to (level 2 1 v)\n        Clone at x: [347] y: [0]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (level 3 1 v)\n            Clone at x: [600] y: [170]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (level 4 1 v)\n                Clone at x: [420] y: [0]\n                Clone at x: [470] y: [0]\n            else\n                if <(LEVEL) = [5]> then\n                    stop [all v]\n                end\n            end\n        end\n    end\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\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\nwhen flag clicked\nhide\nrepeat (10)\n    delete this clone\nend\n\n@2.5d effect\n\nwhen I receive [tick v]\nPosition (((x) - (Scroll X)) * ((size) / (100))) (((y) - (Scroll Y)) * ((size) / (100)))\n\nwhen I receive [setup v]\nLevels\n\nswitch costume to (costume1 v)\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 [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y) effect: (e) costume: (number or text)\nset size to (75) %\nset [brightness v] effect to (-25)\nswitch costume to (number or text)\nchange [x v] by (x)\nchange [y v] by (y)\nrepeat (e)\n    change [brightness v] effect by (.9)\n    set size to ((size) * (1.01)) %\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nhide\n\ndefine Levels\ngo to [back v] layer\nhide\nset [x v] to [-360]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    hide\n    Clone at x: [360] y: [0] effect: [20] costume: [2]\n    Clone at x: [360] y: [0] effect: [20] costume: [3]\n    Clone at x: [400] y: [0] effect: [20] costume: [4]\n    Clone at x: [400] y: [0] effect: [20] costume: [5]\n    Clone at x: [360] y: [0] effect: [20] costume: [6]\nelse\n    if <(LEVEL) = [2]> then\n        hide\n        switch costume to (level 2 1 v)\n        set [y v] to [-40]\n        Clone at x: [360] y: [0] effect: [20] costume: [7]\n        Clone at x: [347] y: [0] effect: [20] costume: [8]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (costume1 v)\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (level 4 1 v)\n                Clone at x: [360] y: [0] effect: [20] costume: [11]\n                Clone at x: [420] y: [0] effect: [20] costume: [12]\n                Clone at x: [470] y: [0] effect: [20] costume: [13]\n            else\n                if <(LEVEL) = [5]> then\n                    stop [all v]\n                end\n            end\n        end\n    end\nend\n\n@Collectables\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nnext costume\nPosition ((x) - (Scroll X)) ((y) - (Scroll Y))\nif <touching (my player v)?> then\n    change [coins v] by (1)\n    start sound [Coin v]\n    delete this clone\nend\nif <(Coins) = (COLLECTED MAX)> then\n    broadcast (Open portal v)\nend\n\nwhen I receive [setup v]\ngo to [back v] layer\ngo [backward v] (1) layers\nhide\nset [collected max v] to [0]\nset [x v] to [0]\nset [x v] to [0]\nswitch costume to (coin1 v)\nif <(LEVEL) = [1]> then\n    Clone at x: [-50] y: [13]\n    Clone at x: [100] y: [50]\n    Clone at x: [528] y: [120]\n    Clone at x: [846] y: [113]\n    Clone at x: [1145] y: [67]\n    Clone at x: [1145] y: [146]\n    Clone at x: [1495] y: [118]\n    Clone at x: [1400] y: [100]\nelse\n    if <(LEVEL) = [2]> then\n        Clone at x: [86] y: [0]\n        Clone at x: [155] y: [5]\n        Clone at x: [321] y: [26]\n        Clone at x: [452] y: [116]\n        Clone at x: [602] y: [195]\n    else\n        if <(LEVEL) = [3]> then\n            Clone at x: [-105] y: [262]\n            Clone at x: [-105] y: [350]\n            Clone at x: [-119] y: [-85]\n            Clone at x: [166] y: [205]\n            Clone at x: [759] y: [59]\n        else\n            if <(LEVEL) = [4]> then\n                Clone at x: [-85] y: [59]\n                Clone at x: [-170] y: [50]\n                Clone at x: [481] y: [87]\n                Clone at x: [670] y: [90]\n                Clone at x: [859] y: [103]\n                Clone at x: [1076] y: [73]\n                Clone at x: [1146] y: [110]\n            end\n        end\n    end\nend\nset [x v] to [-99999]\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 [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)\nchange [collected max v] by (1)\n\n@Portal\n\nwhen I receive [tick v]\nPosition ((x) - (Scroll X)) ((y) - (Scroll Y))\nif <<(costume [number v]) = [2]> and <touching (my player v)?>> then\n    set [exit v] to [Win]\nend\n\nwhen I receive [setup v]\ngo to [back v] layer\nhide\nset [x v] to [0]\nset [x v] to [0]\nswitch costume to (exit closed v)\nif <(LEVEL) = [1]> then\n    switch costume to (exit closed v)\n    Clone at x: [1743] y: [18]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (exit closed v)\n        Clone at x: [749] y: [260]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (exit closed v)\n            Clone at x: [947] y: [77]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (exit closed v)\n                Clone at x: [1266] y: [58]\n            else\n                if <(LEVEL) = [5]> then\n                    switch costume to (exit closed v)\n                    Clone at x: [-9999999999999] y: []\n                end\n            end\n        end\n    end\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 [x v] to (x)\nset [y v] to (y)\n\nwhen I receive [open portal v]\nswitch costume to (exit open v)\n\nwhen flag clicked\nhide\n\n