3D MMO platformer [Massive Multiplayer Online, infinite players]

Instructions: Move with WASD, rotate with arrow keys, and jump with space\nUse in turbowarp (I highly recommend it): \n\nhttps://turbowarp.org/623771575/fullscreen?fps=60&hqpen

@Stage\n\nwhen flag clicked\nshow list [turbowarp v]\nerase all\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [lag v]\nerase all\nswitch backdrop to (lag v)\nhide list [turbowarp v]\n\nwhen I receive [start v]\nshow list [turbowarp v]\nerase all\nswitch backdrop to (backdrop1 v)\n\n@Sprite1\n\n@Main\n\nwhen flag clicked\nif <<is compiled?> or <(username) = [GonSanVi]>> then\n    broadcast (start v)\nelse\n    broadcast (lag v)\nend\n\nwhen I receive [start v]\nset [qr? v] to [false]\nbroadcast (load v) and wait\nforever\n    set [/oldtime v] to (join [] (days since 2000))\n    broadcast (MMO v)\n    broadcast (update v) and wait\n    broadcast (render v) and wait\n    set [/deltatime v] to (join [] ((86400) * ((days since 2000) - (/oldTime))))\n    set [/fps v] to (round ((1) / (/deltaTime)))\n    if <(/deltaTime) > [0.075]> then\n        set [/deltatime v] to [0.075]\n    end\n    if <<(QR?) = [true]> and <not <<key (q v) pressed?> and <key (r v) pressed?>>>> then\n        broadcast (reset v) and wait\n    end\n    set [qr? v] to <<key (q v) pressed?> and <key (r v) pressed?>>\nend\n\nwhen I receive [reset v]\nstop [other scripts in sprite v]\nbroadcast (start v)\n\n@Load\n\nwhen I receive [load v]\ndelete all of [aabbs v]\nadd AABB at [0] [0] [0] size (_pSize) (_pSize) (_pSize) mode [player]\nadd AABB at [0] [-50] [0] size [100] [25] [100] mode [ground]\nadd AABB at [0] [-50] [325] size [100] [25] [100] mode [ground]\nadd AABB at [325] [-50] [325] size [100] [25] [100] mode [ground]\nadd AABB at [525] [-50] [325] size [100] [25] [100] mode [ground]\nadd AABB at [425] [5] [325] size [15] [30] [100] mode [lava]\nadd AABB at [525] [-50] [525] size [25] [25] [100] mode [ground]\nadd AABB at [525] [-50] [725] size [25] [25] [100] mode [ground]\nadd AABB at [525] [0] [725] size [25] [25] [15] mode [lava]\nadd AABB at [525] [-50] [925] size [100] [25] [100] mode [ground]\nadd AABB at [325] [-50] [925] size [100] [25] [100] mode [Bounce]\nadd AABB at [-325] [-50] [325] size [100] [25] [100] mode [ground]\nadd AABB at [-325] [-50] [475] size [100] [25] [100] mode [ground]\nadd AABB at [125] [250] [925] size [100] [25] [100] mode [Ground]\nadd AABB at [125] [250] [1050] size [100] [25] [100] mode [Ground]\nadd AABB at [125] [250] [1400] size [100] [25] [100] mode [Ground]\nadd AABB at [-125] [250] [1400] size [50] [25] [100] mode [Ground]\nadd AABB at [-300] [250] [1400] size [25] [25] [100] mode [Ground]\nadd AABB at [-500] [250] [1400] size [25] [25] [100] mode [Ground]\nadd AABB at [-750] [250] [1400] size [100] [25] [100] mode [Ground]\nadd AABB at [-950] [250] [1400] size [100] [25] [100] mode [Ground]\nadd AABB at [-950] [100] [1200] size [100] [25] [100] mode [Ground]\nadd AABB at [-950] [100] [1000] size [100] [25] [100] mode [Ground]\nadd AABB at [-750] [100] [1000] size [100] [25] [100] mode [Ground]\nadd AABB at [-750] [100] [800] size [100] [25] [100] mode [Ground]\nadd AABB at [-550] [100] [800] size [100] [25] [100] mode [Ground]\nadd AABB at [-550] [100] [600] size [100] [25] [100] mode [Ground]\nadd AABB at [-550] [100] [475] size [100] [25] [100] mode [Ground]\nadd AABB at [-750] [150] [1000] size [20] [25] [100] mode [Lava]\nadd AABB at [-750] [150] [800] size [20] [25] [100] mode [Lava]\nadd AABB at [-550] [130] [475] size [50] [5] [50] mode [Double]\nadd AABB at [725] [50] [325] size [100] [125] [100] mode [Ground]\nadd AABB at [1200] [150] [325] size [100] [25] [100] mode [Ground]\nadd AABB at [1400] [150] [325] size [100] [25] [100] mode [Ground]\nadd AABB at [590] [100] [325] size [35] [25] [100] mode [M1]\nadd AABB at [325] [25] [325] size [50] [50] [100] mode [M2]\nadd AABB at [525] [25] [925] size [100] [50] [100] mode [M4]\nadd AABB at [1400] [300] [325] size [25] [125] [100] mode [Lava]\nadd AABB at [1600] [150] [325] size [100] [25] [100] mode [Ground]\nadd AABB at [1600] [180] [325] size [50] [5] [50] mode [BrownB]\nadd AABB at [-950] [250] [1600] size [90] [25] [90] mode [Brown]\nadd AABB at [-950] [250] [1800] size [90] [25] [90] mode [Brown]\nadd AABB at [-950] [250] [2000] size [90] [25] [90] mode [Brown]\nadd AABB at [-950] [250] [2200] size [100] [25] [100] mode [Ground]\nadd AABB at [-950] [325] [1400] size [100] [50] [100] mode [M6]\nadd AABB at [-950] [250] [2405] size [25] [25] [95] mode [Brown]\nadd AABB at [-850] [250] [2600] size [25] [25] [100] mode [Brown]\nadd AABB at [-750] [250] [2800] size [25] [25] [100] mode [Brown]\nadd AABB at [-850] [250] [3000] size [25] [25] [100] mode [Brown]\nadd AABB at [-950] [250] [3200] size [100] [25] [25] mode [Brown]\nadd AABB at [-1150] [250] [3200] size [100] [25] [100] mode [Ground]\nadd AABB at [-1150] [280] [3200] size [50] [5] [50] mode [End]\nset [time v] to [0]\nset [updatetime? v] to [false]\n\ndefine add AABB at (x) (y) (z) size (sx) (sy) (sz) mode (m)\nadd (x) to [aabbs v]\nadd (y) to [aabbs v]\nadd (z) to [aabbs v]\nadd (sx) to [aabbs v]\nadd (sy) to [aabbs v]\nadd (sz) to [aabbs v]\nadd (m) to [aabbs v]\n\n@Update\n\nwhen I receive [update v]\nUpdate\n\ndefine Update\nplayer Physics\ncamera\nsort\n\ndefine player Physics\nchange [_pyvel v] by ((-Gravity) * (/deltaTime))\nif <(_pYVel) < [-750]> then\n    set [_pyvel v] to [-750]\nend\nchange [_py v] by (round ((_pYVel) * (/deltaTime)))\ncheck player collisions\nif <(ground?) > [0]> then\n    change [ground? v] by (() - (/deltaTime))\nend\nif <[collisions v] contains [ground]?> then\n    repeat until <not <[collisions v] contains [ground]?>>\n        if <(_pYVel) > [0]> then\n            change [_py v] by (-1)\n        else\n            change [_py v] by (1)\n        end\n        check player collisions\n    end\n    set [_pyvel v] to [0]\nend\nchange [_py v] by (-3)\ncheck player collisions\nif <[collisions v] contains [ground]?> then\n    set [ground? v] to [0.15]\n    set [*doubled? v] to [false]\nend\nchange [_py v] by (3)\nif <(updateTime?) = [true]> then\n    change [time v] by (/deltaTime)\nend\nif <<not <(^LastFrameSpace) = [true]>> and <<key (space v) pressed?> and <<(ground?) > [0]> or <(*doubled?) = [true]>>>> then\n    set [_pyvel v] to [500]\n    set [ground? v] to [0]\n    if <(*double?) = [true]> then\n        if <(*doubled?) = [true]> then\n            set [*doubled? v] to [false]\n        else\n            set [*doubled? v] to [true]\n        end\n    end\nend\nif <(_pY) < [-350]> then\n    reset\nend\ncheck player collisions\nif <[collisions v] contains [bounce]?> then\n    set [_pyvel v] to [900]\nend\nif <[collisions v] contains [lava]?> then\n    reset\nend\nif <[collisions v] contains [double]?> then\n    set [*double? v] to [true]\n    delete block (item ((item # of [double] in [collisions v]) + (1)) of [collisions v])\n    set [text v] to [3]\n    set [texttimer v] to [3.5]\nend\nif <[collisions v] contains [BrownB]?> then\n    set [*clouds? v] to [true]\n    delete block (item ((item # of [BrownB] in [collisions v]) + (1)) of [collisions v])\n    set [text v] to [5]\n    set [texttimer v] to [3.5]\nend\nif <<[collisions v] contains [M1]?> and <(*double?) = [false]>> then\n    set [text v] to [1]\n    set [texttimer v] to [4]\nend\nif <[collisions v] contains [M2]?> then\n    set [text v] to [2]\n    set [texttimer v] to [0.1]\nend\nif <[collisions v] contains [M4]?> then\n    set [text v] to [4]\n    set [texttimer v] to [0.1]\nend\nif <<[collisions v] contains [M6]?> and <(*clouds?) = [false]>> then\n    set [text v] to [6]\n    set [texttimer v] to [0.1]\nend\nif <[collisions v] contains [End]?> then\n    delete block (item ((item # of [End] in [collisions v]) + (1)) of [collisions v])\n    set [text v] to [7]\n    set [texttimer v] to [4]\n    set [updatetime? v] to [false]\nend\nif <<<key (w v) pressed?> or <key (s v) pressed?>> or <<key (a v) pressed?> or <key (d v) pressed?>>> then\n    change xz (() - ((-Speed) * ((/deltaTime) * (((=YSin) * (<key (w v) pressed?> - <key (s v) pressed?>)) + ((=YCos) * (<key (a v) pressed?> - <key (d v) pressed?>)))))) ((-Speed) * ((/deltaTime) * (((=YCos) * (<key (w v) pressed?> - <key (s v) pressed?>)) - ((=YSin) * (<key (a v) pressed?> - <key (d v) pressed?>)))))\n    if <[aabbs v] contains [end]?> then\n        set [updatetime? v] to [true]\n    end\nend\nreplace item (1) of [aabbs v] with (_pX)\nreplace item (2) of [aabbs v] with (_pY)\nreplace item (3) of [aabbs v] with (_pZ)\nset [^lastframespace v] to <key (space v) pressed?>\n\ndefine check player collisions\ndelete all of [collisions v]\nset [i v] to [0]\nrepeat ((length of [aabbs v]) / (7))\n    change [i v] by (7)\n    if <not <[collisions v] contains (item (i) of [aabbs v])?>> then\n        AABB (item ((i) - (6)) of [aabbs v]) (item ((i) - (5)) of [aabbs v]) (item ((i) - (4)) of [aabbs v]) (_pX) (_pY) (_pZ) size (item ((i) - (3)) of [aabbs v]) (item ((i) - (2)) of [aabbs v]) (item ((i) - (1)) of [aabbs v]) (_pSize) (_pSize) (_pSize)\n        if <(out?) = [true]> then\n            if <<(item (i) of [aabbs v]) = [brown]> and <(*clouds?) = [true]>> then\n                add [ground] to [collisions v]\n            else\n                add (item (i) of [aabbs v]) to [collisions v]\n                add ((i) / (7)) to [collisions v]\n            end\n        end\n    end\nend\n\ndefine AABB (x1) (y1) (z1) (x2) (y2) (z2) size (sx1) (sy1) (sz1) (sx2) (sy2) (sz2)\nset [out? v] to <<([abs v] of ((x1) - (x2)) ) < ((sx1) + (sx2))> and <<([abs v] of ((y1) - (y2)) ) < ((sy1) + (sy2))> and <([abs v] of ((z1) - (z2)) ) < ((sz1) + (sz2))>>>\n\nwhen I receive [load v]\nreset\nset [*double? v] to [false]\nset [*clouds? v] to [false]\n\ndefine change xz (x) (z)\nchange [_px v] by (round (x))\ncheck player collisions\nif <[collisions v] contains [ground]?> then\n    repeat until <not <[collisions v] contains [ground]?>>\n        if <(x) > [0]> then\n            change [_px v] by (-1)\n        else\n            change [_px v] by (1)\n        end\n        check player collisions\n    end\nend\nchange [_pz v] by (round (z))\ncheck player collisions\nif <[collisions v] contains [ground]?> then\n    repeat until <not <[collisions v] contains [ground]?>>\n        if <(z) > [0]> then\n            change [_pz v] by (-1)\n        else\n            change [_pz v] by (1)\n        end\n        check player collisions\n    end\nend\n\ndefine camera\nif  then\n    set [=rotx v] to \n    set [=roty v] to [50]\n    set [=xcos v] to ([cos v] of (=RotX) )\n    set [=xsin v] to ([sin v] of (=RotX) )\n    set [=ycos v] to ([cos v] of (=RotY) )\n    set [=ysin v] to ([sin v] of (=RotY) )\n    set [_scrollx v] to [2100]\n    set [_scrolly v] to [1700]\n    set [_scrollz v] to [-700]\nelse\n    change [=rotx v] by ((/deltaTime) * ((125) * (<key (up arrow v) pressed?> - <key (down arrow v) pressed?>)))\n    if <(=RotX) > [0]> then\n        set [=rotx v] to [0]\n    end\n    if <(=RotX) < [-60]> then\n        set [=rotx v] to [-60]\n    end\n    change [=roty v] by ((/deltaTime) * ((125) * (<key (left arrow v) pressed?> - <key (right arrow v) pressed?>)))\n    set [=xcos v] to ([cos v] of (=RotX) )\n    set [=xsin v] to ([sin v] of (=RotX) )\n    set [=ycos v] to ([cos v] of (=RotY) )\n    set [=ysin v] to ([sin v] of (=RotY) )\n    set [_scrollx v] to ((_pX) + ((400) * ((=XCos) * (=YSin))))\n    set [_scrolly v] to ((_pY) + ((-400) * (=XSin)))\n    set [_scrollz v] to ((_pZ) + ((-400) * ((=XCos) * (=YCos))))\nend\n\ndefine sort\ndelete all of [renderorder v]\ndelete all of [dists v]\nset [i v] to [0]\nrepeat ((length of [aabbs v]) / (7))\n    change [i v] by (7)\n    set [$dist v] to (round ((((_scrollX) - (item ((i) - (6)) of [aabbs v])) * ((_scrollX) - (item ((i) - (6)) of [aabbs v]))) + ((((_scrollY) - ((item ((i) - (5)) of [aabbs v]) - (<not <<(item (i) of [aabbs v]) = [cloud]> or <(item (i) of [aabbs v]) = [player]>>> * (playerH)))) * ((_scrollY) - ((item ((i) - (5)) of [aabbs v]) - (<not <<(item (i) of [aabbs v]) = [cloud]> or <(item (i) of [aabbs v]) = [player]>>> * (playerH))))) + (((_scrollZ) - (item ((i) - (4)) of [aabbs v])) * ((_scrollZ) - (item ((i) - (4)) of [aabbs v]))))))\n    add dist ($dist)\nend\n\ndefine add dist (d)\nset [i2 v] to [1]\nrepeat until <not <(d) < (item (i2) of [dists v])>>\n    if <(d) < (item (i2) of [dists v])> then\n        change [i2 v] by (1)\n    end\nend\ninsert ($dist) at (i2) of [dists v] \ninsert ((length of [renderorder v]) + (1)) at (i2) of [renderorder v] \n\ndefine reset\nset [=rotx v] to [-40]\nset [=roty v] to [0]\nset [_px v] to [0]\nset [_py v] to [0]\nset [_pz v] to [0]\nset [_pyvel v] to [0]\nset [-gravity v] to [-1000]\nset [-speed v] to [225]\nset [_psize v] to [12]\nset [fov v] to [400]\nset [playerh v] to [65]\nset [texttimer v] to [0]\n\ndefine delete block (i)\nrepeat (7)\n    delete (((i) * (7)) - (6)) of [aabbs v]\nend\n\n@Render\n\ndefine fill (ax) (ay) (bx) (by) (cx) (cy) resolution: (res)\nset [lena v] to ([sqrt v] of ((((bx) - (cx)) * ((bx) - (cx))) + (((by) - (cy)) * ((by) - (cy)))) )\nset [lenb v] to ([sqrt v] of ((((ax) - (cx)) * ((ax) - (cx))) + (((ay) - (cy)) * ((ay) - (cy)))) )\nset [lenc v] to ([sqrt v] of ((((ax) - (bx)) * ((ax) - (bx))) + (((ay) - (by)) * ((ay) - (by)))) )\nset [peri v] to ((1) / (((lena) + (lenb)) + (lenc)))\nset [incx v] to (((((lena) * (ax)) + ((lenb) * (bx))) + ((lenc) * (cx))) * (peri))\nset [incy v] to (((((lena) * (ay)) + ((lenb) * (by))) + ((lenc) * (cy))) * (peri))\nset [ind v] to ([sqrt v] of ((((((lenb) + (lenc)) - (lena)) * (((lenc) + (lena)) - (lenb))) * (((lena) + (lenb)) - (lenc))) * (peri)) )\nset [aox v] to ((incx) - (ax))\nset [aoy v] to ((incy) - (ay))\nset [box v] to ((incx) - (bx))\nset [boy v] to ((incy) - (by))\nset [cox v] to ((incx) - (cx))\nset [coy v] to ((incy) - (cy))\nif <<(lena) < (lenb)> and <(lena) < (lenc)>> then\n    set [td v] to ([sqrt v] of (((Aox) * (Aox)) + ((Aoy) * (Aoy))) )\nelse\n    if <(lenb) > (lenc)> then\n        set [td v] to ([sqrt v] of (((Cox) * (Cox)) + ((Coy) * (Coy))) )\n    else\n        set [td v] to ([sqrt v] of (((Box) * (Box)) + ((Boy) * (Boy))) )\n    end\nend\nset [rate v] to ((((td) * (2)) - (ind)) / ((td) * (4)))\nset [td v] to [1]\ngo to x: (round (incx)) y: (round (incy))\nset pen size to (ind)\npen down\nrepeat ([ceiling v] of (([log v] of ((res) / (ind)) ) / ([log v] of (rate) )) )\n    set [td v] to ((td) * (rate))\n    set pen size to ((ind) * (td))\n    go to x: (((Aox) * (td)) + (ax)) y: (((Aoy) * (td)) + (ay))\n    go to x: (((Box) * (td)) + (bx)) y: (((Boy) * (td)) + (by))\n    go to x: (((Cox) * (td)) + (cx)) y: (((Coy) * (td)) + (cy))\n    go to x: (((Aox) * (td)) + (ax)) y: (((Aoy) * (td)) + (ay))\nend\nset pen size to (res)\ngo to x: (ax) y: (ay)\ngo to x: (bx) y: (by)\ngo to x: (cx) y: (cy)\ngo to x: (ax) y: (ay)\npen up\n\nwhen I receive [load v]\nswitch costume to (. v)\nset size to ((1) / ()) %\nswitch costume to (big v)\n\nwhen I receive [render v]\nRender\nbroadcast (text v) and wait\n\ndefine AABB verts (x) (y) (z) (sx) (sy) (sz)\ndelete all of [. v]\nRotationMatrix ((x) + (sx)) ((y) + (sy)) ((z) + (sz))\nRotationMatrix ((x) - (sx)) ((y) + (sy)) ((z) + (sz))\nRotationMatrix ((x) + (sx)) ((y) - (sy)) ((z) + (sz))\nRotationMatrix ((x) - (sx)) ((y) - (sy)) ((z) + (sz))\nRotationMatrix ((x) + (sx)) ((y) + (sy)) ((z) - (sz))\nRotationMatrix ((x) - (sx)) ((y) + (sy)) ((z) - (sz))\nRotationMatrix ((x) + (sx)) ((y) - (sy)) ((z) - (sz))\nRotationMatrix ((x) - (sx)) ((y) - (sy)) ((z) - (sz))\n\ndefine RotationMatrix (x) (y) (z)\nxyz ((x) - (_scrollX)) ((y) - (_scrollY)) ((z) - (_scrollZ))\nxyz (((z) * (=YSin)) + ((x) * (=YCos))) (y) (((z) * (=YCos)) - ((x) * (=YSin)))\nxyz (x) (((y) * (=XCos)) - ((z) * (=XSin))) (((z) * (=XCos)) + ((y) * (=XSin)))\nif <(z) < [0.3]> then\n    set [z v] to [0.3]\nelse\n    set [render? v] to [true]\nend\nadd (((x) * (FOV)) / (z)) to [. v]\nadd (((y) * (FOV)) / (z)) to [. v]\n\ndefine render AABB (x) (y) (z) (sx) (sy) (sz)\nif <(item (i2) of [aabbs v]) = [Ground]> then\n    set pen color to (#0669c9)\nend\nif <(item (i2) of [aabbs v]) = [Lava]> then\n    set pen color to (#ff0000)\nend\nif <(item (i2) of [aabbs v]) = [Bounce]> then\n    set pen color to (#faff0e)\nend\nif <(item (i2) of [aabbs v]) = [cloud]> then\n    set pen color to (#8c8c8c)\nend\nif <(item (i2) of [aabbs v]) = [Player]> then\n    set pen color to (#ffffff)\nend\nif <(item (i2) of [aabbs v]) = [Double]> then\n    set pen color to (#ff743d)\nend\nif <(item (i2) of [aabbs v]) = [BrownB]> then\n    set pen color to (#888888)\nend\nif <(item (i2) of [aabbs v]) = [brown]> then\n    set pen color to (#ffffff)\nend\nif <(item (i2) of [aabbs v]) = [end]> then\n    set pen color to (#56ff1e)\nend\nif <(letter (1) of (item (i2) of [aabbs v])) = [M]> then\n    set pen color to (#808080)\n    set pen (transparency v) to (70)\nend\nset [render? v] to [false]\nAABB verts (x) (y) (z) (sx) (sy) (sz)\nif <(render?) = [true]> then\n    if <(_scrollX) > ((x) + (sx))> then\n        change pen (brightness v) by (-10)\n        fill (item (1) of [. v]) (item (2) of [. v]) (item (5) of [. v]) (item (6) of [. v]) (item (9) of [. v]) (item (10) of [. v]) resolution: (1)\n        fill (item (13) of [. v]) (item (14) of [. v]) (item (5) of [. v]) (item (6) of [. v]) (item (9) of [. v]) (item (10) of [. v]) resolution: (1)\n        change pen (brightness v) by (10)\n    else\n        if <(_scrollX) < ((x) - (sx))> then\n            change pen (brightness v) by (-10)\n            fill (item (3) of [. v]) (item (4) of [. v]) (item (7) of [. v]) (item (8) of [. v]) (item (11) of [. v]) (item (12) of [. v]) resolution: (1)\n            fill (item (15) of [. v]) (item (16) of [. v]) (item (7) of [. v]) (item (8) of [. v]) (item (11) of [. v]) (item (12) of [. v]) resolution: (1)\n            change pen (brightness v) by (10)\n        end\n    end\n    if <(_scrollY) > ((y) + (sy))> then\n        fill (item (1) of [. v]) (item (2) of [. v]) (item (11) of [. v]) (item (12) of [. v]) (item (9) of [. v]) (item (10) of [. v]) resolution: (1)\n        fill (item (3) of [. v]) (item (4) of [. v]) (item (11) of [. v]) (item (12) of [. v]) (item (1) of [. v]) (item (2) of [. v]) resolution: (1)\n    else\n        if <(_scrollY) < ((y) - (sy))> then\n            change pen (brightness v) by (-20)\n            fill (item (5) of [. v]) (item (6) of [. v]) (item (15) of [. v]) (item (16) of [. v]) (item (13) of [. v]) (item (14) of [. v]) resolution: (1)\n            fill (item (7) of [. v]) (item (8) of [. v]) (item (15) of [. v]) (item (16) of [. v]) (item (5) of [. v]) (item (6) of [. v]) resolution: (1)\n            change pen (brightness v) by (20)\n        end\n    end\n    if <(_scrollZ) > ((z) + (sz))> then\n        change pen (brightness v) by (-15)\n        fill (item (1) of [. v]) (item (2) of [. v]) (item (5) of [. v]) (item (6) of [. v]) (item (3) of [. v]) (item (4) of [. v]) resolution: (1)\n        fill (item (7) of [. v]) (item (8) of [. v]) (item (5) of [. v]) (item (6) of [. v]) (item (3) of [. v]) (item (4) of [. v]) resolution: (1)\n    else\n        if <(_scrollZ) < ((z) - (sz))> then\n            change pen (brightness v) by (-5)\n            fill (item (9) of [. v]) (item (10) of [. v]) (item (13) of [. v]) (item (14) of [. v]) (item (11) of [. v]) (item (12) of [. v]) resolution: (1)\n            fill (item (15) of [. v]) (item (16) of [. v]) (item (13) of [. v]) (item (14) of [. v]) (item (11) of [. v]) (item (12) of [. v]) resolution: (1)\n        end\n    end\nend\n\ndefine Render\nerase all\nset [i v] to [0]\nrepeat (length of [renderorder v])\n    change [i v] by (1)\n    set [i2 v] to ((item (i) of [renderorder v]) * (7))\n    if <not <(letter (1) of (item (i2) of [aabbs v])) = [M]>> then\n        render AABB (item ((i2) - (6)) of [aabbs v]) (item ((i2) - (5)) of [aabbs v]) (item ((i2) - (4)) of [aabbs v]) (item ((i2) - (3)) of [aabbs v]) (item ((i2) - (2)) of [aabbs v]) (item ((i2) - (1)) of [aabbs v])\n    end\nend\n\ndefine xyz (x) (y) (z)\nset [x v] to (x)\nset [y v] to (y)\nset [z v] to (z)\n\n@MMO\n\ndefine encode\nset [i v] to [0]\nset [out v] to []\nrepeat (length of (To Encode))\n    change [i v] by (1)\n    switch costume to (letter (i) of (To Encode))\n    if <(length of (costume [number v])) = [1]> then\n        set [out v] to (join (OUT) (join [0] (costume [number v])))\n    else\n        set [out v] to (join (OUT) (costume [number v]))\n    end\nend\n\ndefine add (x) to encode\nset [to encode v] to (join (To Encode) (join (x) [ƒ]))\n\ndefine decode\ndelete all of [decoded v]\nset [i v] to [0]\nset [out v] to []\nrepeat ((length of (To Decode)) / (2))\n    change [i v] by (2)\n    switch costume to (join (letter ((i) - (1)) of (To Decode)) (letter (i) of (To Decode)))\n    if <(costume [name v]) = [ƒ]> then\n        add (OUT) to [decoded v]\n        set [out v] to []\n    else\n        set [out v] to (join (OUT) (costume [name v]))\n    end\nend\n\ndefine tick\nget other players\ncheck duplicated\nget this frame data\nAdd data\nchange [frames v] by (1)\nset [players# v] to ((length of [usernames v]) + (1))\ncalculate threshold & inactivityFrames\nif <(frames) > (threshold)> then\n    encode\n    set to cloud (OUT)\n    set [to encode v] to []\n    add (username) to encode\n    add (join [»] ((round ((timer) * (10))) mod (100))) to encode\n    set [frames v] to [0]\nend\nif <[aabbs v] contains [cloud]?> then\n    delete other players\nend\nadd players\n\ndefine calculate threshold & inactivityFrames\nif <(Players#) > [15]> then\n    set [threshold v] to ((Players#) / (3))\n    set [inactivityframes v] to ((Players#) / (3))\nelse\n    set [threshold v] to [5]\n    set [inactivityframes v] to [5]\nend\n\ndefine get other players\nset [i2 v] to [0]\nset [to decode v] to (☁ 1)\ndecode\nadd to player list?\nset [to decode v] to (☁ 2)\ndecode\nadd to player list?\nset [to decode v] to (☁ 3)\ndecode\nadd to player list?\nset [to decode v] to (☁ 4)\ndecode\nadd to player list?\nset [to decode v] to (☁ 5)\ndecode\nadd to player list?\nset [to decode v] to (☁ 6)\ndecode\nadd to player list?\nset [to decode v] to (☁ 7)\ndecode\nadd to player list?\nset [to decode v] to (☁ 8)\ndecode\nadd to player list?\nset [to decode v] to (☁ 9)\ndecode\nadd to player list?\nset [to decode v] to (☁ 10)\ndecode\nadd to player list?\n\ndefine add to player list?\nchange [i2 v] by (1)\nif <(item (i2) of [last update v]) = [0]> then\n    replace item (i2) of [last update v] with (join (item (1) of [decoded v]) (item (2) of [decoded v]))\nend\nif <not <(join (item (1) of [decoded v]) (item (2) of [decoded v])) = (item (i2) of [last update v])>> then\n    replace item (i2) of [last update v] with (join (item (1) of [decoded v]) (item (2) of [decoded v]))\n    if <not <(username) = (item (1) of [decoded v])>> then\n        if <[all players v] contains (item (1) of [decoded v])?> then\n            delete\n        end\n        set [i v] to [0]\n        repeat (length of [decoded v])\n            change [i v] by (1)\n            add (item (i) of [decoded v]) to [all players v]\n        end\n        repeat (inactivityFrames)\n            set [i v] to ((length of [decoded v]) - (dataFrameEncoded))\n            repeat (dataFrameEncoded)\n                change [i v] by (1)\n                add (item (i) of [decoded v]) to [all players v]\n            end\n        end\n    end\nend\n\ndefine set to cloud (x)\nif <(pick random (1) to (10)) = [1]> then\n    set [☁ 1 v] to (x)\nelse\n    if <(pick random (1) to (9)) = [1]> then\n        set [☁ 2 v] to (x)\n    else\n        if <(pick random (1) to (8)) = [1]> then\n            set [☁ 3 v] to (x)\n        else\n            if <(pick random (1) to (7)) = [1]> then\n                set [☁ 4 v] to (x)\n            else\n                if <(pick random (1) to (6)) = [1]> then\n                    set [☁ 5 v] to (x)\n                else\n                    if <(pick random (1) to (5)) = [1]> then\n                        set [☁ 6 v] to (x)\n                    else\n                        if <(pick random (1) to (4)) = [1]> then\n                            set [☁ 7 v] to (x)\n                        else\n                            if <(pick random (1) to (3)) = [1]> then\n                                set [☁ 8 v] to (x)\n                            else\n                                if <(pick random (1) to (2)) = [1]> then\n                                    set [☁ 9 v] to (x)\n                                else\n                                    set [☁ 10 v] to (x)\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine delete\nset [i v] to ((item # of (item (1) of [decoded v]) in [all players v]) - (1))\nif <not <(item (2) of [decoded v]) = (item ((i) + (2)) of [all players v])>> then\n    repeat until <<(letter (1) of (item ((i) + (2)) of [all players v])) = [»]> or <(i) > (length of [all players v])>>\n        if <not <(letter (1) of (item ((i) + (2)) of [all players v])) = [»]>> then\n            delete (i) of [all players v]\n        end\n        change [i v] by (1)\n    end\nend\n\ndefine reset last update\ndelete all of [last update v]\nrepeat (10)\n    add [0] to [last update v]\nend\n\ndefine check duplicated\ndelete all of [usernames v]\nset [i v] to (length of [all players v])\nrepeat (length of [all players v])\n    change [i v] by (-1)\n    if <(letter (1) of (item ((i) + (1)) of [all players v])) = [»]> then\n        if <[usernames v] contains (item (i) of [all players v])?> then\n            repeat until <(letter (1) of (item ((i) + (2)) of [all players v])) = [»]>\n                delete (i) of [all players v]\n            end\n        else\n            add (item (i) of [all players v]) to [usernames v]\n        end\n    end\nend\nset [i v] to [0]\nforever\n    change [i v] by (1)\n    if <<(item (i) of [all players v]) > [9999999999999999]> or <(i) > (length of [all players v])>> then\n        stop [this script v]\n    end\n    if <(item (i) of [all players v]) < [99999]> then\n        delete (i) of [all players v]\n    end\nend\n\ndefine get this frame data\ndelete all of [this frame v]\nset [i v] to [0]\nrepeat (length of [usernames v])\n    change [i v] by (1)\n    set [i2 v] to (item # of (item (i) of [usernames v]) in [all players v])\n    add (item (i) of [usernames v]) to [this frame v]\n    change [i2 v] by (2)\n    repeat (dataFrameEncoded)\n        add (item (i2) of [all players v]) to [this frame v]\n        delete (i2) of [all players v]\n    end\n    if <<(letter (1) of (item ((i2) + (1)) of [all players v])) = [»]> or <((item # of (item (i) of [usernames v]) in [all players v]) + (1)) = (length of [all players v])>> then\n        delete ((i2) - (1)) of [all players v]\n        delete ((i2) - (2)) of [all players v]\n    end\nend\n\ndefine Add data\nadd (_pX) to encode\nadd (_pY) to encode\nadd (_pZ) to encode\nset [dataframeencoded v] to [3]\n\nwhen I receive [load v]\nreset last update\ndelete all of [all players v]\nset [to encode v] to []\nadd (username) to encode\n\nwhen I receive [mmo v]\ntick\n\ndefine delete other players\nset [i v] to ((item # of [cloud] in [aabbs v]) - (6))\nrepeat (7)\n    delete (i) of [aabbs v]\nend\nif <[aabbs v] contains [cloud]?> then\n    delete other players\nend\n\ndefine add players\nset [i v] to [0]\nrepeat ((length of [this frame v]) / (4))\n    change [i v] by (4)\n    add player at (item ((i) - (2)) of [this frame v]) (item ((i) - (1)) of [this frame v]) (item (i) of [this frame v])\nend\n\ndefine add player at (x) (y) (z)\nadd (x) to [aabbs v]\nadd (y) to [aabbs v]\nadd (z) to [aabbs v]\nadd (_pSize) to [aabbs v]\nadd (_pSize) to [aabbs v]\nadd (_pSize) to [aabbs v]\nadd [cloud] to [aabbs v]\n\n@TextEngine\n\ndefine _calcWW (text) (width) (firstwidth) (cspace) (spacewidth)\ndelete all of [_ww0 v]\ndelete all of [_ww1 v]\ndelete all of [_ww2 v]\nset [_i3 v] to [1]\nset [_i4 v] to [0]\nset [_i5 v] to [0]\nset [_i6 v] to [0]\nset [_i7 v] to (firstwidth)\nrepeat (length of (text))\n    if <(letter (_i3) of (text)) = [ ]> then\n        if <(_i4) = [0]> then\n            if <((_i7) + ((_i5) - (cspace))) > (width)> then\n                insert [1] at (1) of [_ww0 v] \n                add [0] to [_ww1 v]\n                add [0] to [_ww2 v]\n                set [_i6 v] to [1]\n            end\n            change [_i7 v] by ((_i5) - (cspace))\n        else\n            if <((_i7) + ((spacewidth) + (_i5))) > (width)> then\n                if <(_i4) > (_i6)> then\n                    add (_i7) to [_ww1 v]\n                    add (((_i4) - (_i6)) - (1)) to [_ww2 v]\n                end\n                set [_i6 v] to (_i4)\n                set [_i7 v] to ((_i5) - (cspace))\n            else\n                change [_i7 v] by ((spacewidth) + (_i5))\n            end\n        end\n        add [1] to [_ww0 v]\n        set [_i4 v] to (length of [_ww0 v])\n        set [_i5 v] to [0]\n    else\n        switch costume to (blank v)\n        switch costume to (join (letter (_i3) of (text)) [_])\n        set [_i9 v] to ((costume [number v]) - (1))\n        if <(_i9) > [0]> then\n            set [_i8 v] to (item (_i9) of [_chwidth v])\n            if <((_i5) + (_i8)) > (width)> then\n                if <(_i4) > (_i6)> then\n                    add (_i7) to [_ww1 v]\n                    add (((_i4) - (_i6)) - (1)) to [_ww2 v]\n                end\n                add ((_i5) - (cspace)) to [_ww1 v]\n                add ((length of [_ww0 v]) - (_i4)) to [_ww2 v]\n                add [1] to [_ww0 v]\n                set [_i4 v] to (length of [_ww0 v])\n                set [_i5 v] to ((_i8) + (cspace))\n                set [_i6 v] to (_i4)\n                set [_i7 v] to ((-1) * ((cspace) + (spacewidth)))\n            else\n                change [_i5 v] by ((_i8) + (cspace))\n            end\n            add (_i9) to [_ww0 v]\n        end\n    end\n    change [_i3 v] by (1)\nend\nif <(length of [_ww0 v]) > (_i6)> then\n    if <(_i4) = [0]> then\n        if <((_i7) + ((_i5) - (cspace))) > (width)> then\n            insert [1] at (1) of [_ww0 v] \n            add [0] to [_ww1 v]\n            add [0] to [_ww2 v]\n            set [_i6 v] to [1]\n        end\n        change [_i7 v] by ((_i5) - (cspace))\n    else\n        if <((_i7) + ((spacewidth) + (_i5))) > (width)> then\n            if <(_i4) > (_i6)> then\n                add (_i7) to [_ww1 v]\n                add (((_i4) - (_i6)) - (1)) to [_ww2 v]\n            end\n            set [_i6 v] to (_i4)\n            set [_i7 v] to ((_i5) - (cspace))\n        else\n            change [_i7 v] by ((spacewidth) + (_i5))\n        end\n    end\n    add (_i7) to [_ww1 v]\n    add ((length of [_ww0 v]) - (_i6)) to [_ww2 v]\nend\n\nwhen flag clicked\npen up\nLoad | Font [Parabolic]\nhide\nswitch costume to (blank v)\nset size to (100000) %\nswitch costume to ( _ v)\ngo to x: (0) y: (0)\npoint in direction (90)\nset rotation style [don't rotate v]\n\ndefine Clear | Character Data\nswitch costume to (blank v)\nswitch costume to ((costume [number v]) - (1))\nif <((costume [number v]) - (1)) > (length of [_chindex v])> then\n    set [_i0 v] to ((costume [number v]) - (1))\nelse\n    set [_i0 v] to (length of [_chindex v])\nend\ndelete all of [_chindex v]\ndelete all of [_chwidth v]\ndelete all of [_chdata0 v]\ndelete all of [_chdata1 v]\ndelete all of [_chdata2 v]\ndelete all of [_chdata3 v]\nrepeat (_i0)\n    add [__] to [_chdata0 v]\n    add [none] to [_chdata1 v]\n    add [] to [_chdata2 v]\n    add [] to [_chdata3 v]\n    add ((length of [_chdata0 v]) + (1)) to [_chindex v]\n    add ((1) * (0)) to [_chwidth v]\n    repeat (25)\n        add [] to [_chdata0 v]\n        add [] to [_chdata1 v]\n        add [] to [_chdata2 v]\n        add [] to [_chdata3 v]\n    end\nend\nadd [__] to [_chdata0 v]\nadd [none] to [_chdata1 v]\nadd [] to [_chdata2 v]\nadd [] to [_chdata3 v]\n\ndefine Load | Font (fontname)\nset [_i0 v] to (item # of (fontname) in [_fontname v])\nif <(_i0) < [1]> then\n    stop [this script v]\nend\nset [_i0 v] to (item (_i0) of [_fontindex v])\nset [_i1 v] to (item (_i0) of [_fontdata v])\nchange [_i0 v] by (2)\nrepeat (item ((_i0) - (1)) of [_fontdata v])\n    set [_i2 v] to (item (_i0) of [_fontdata v])\n    replace item (_i2) of [_chwidth v] with (item ((_i0) + (1)) of [_fontdata v])\n    set [_i3 v] to (item (_i2) of [_chindex v])\n    if <not <(item ((_i3) - (1)) of [_chdata1 v]) = (_i1)>> then\n        replace item ((_i3) - (1)) of [_chdata1 v] with (_i1)\n        replace item ((_i3) - (1)) of [_chdata2 v] with []\n        replace item ((_i3) - (1)) of [_chdata3 v] with []\n        _unpackDef (_i2) (_i3) (item ((_i0) + (2)) of [_fontdata v])\n    end\n    change [_i0 v] by (3)\nend\n\ndefine Set Pen Color | RGBA (r) (g) (b) (a)\nset pen color to ((round (b)) + ((256) * ((round (g)) + ((256) * ((round (r)) + ((256) * (round (a))))))))\n\ndefine _unpackDef (id) (idx) (d)\nset [_i5 v] to (length of (d))\nset [_i6 v] to (idx)\nset [_i7 v] to [1]\nset [_i8 v] to [0]\nrepeat until <(_i7) > (_i5)>\n    if <(item (_i6) of [_chdata0 v]) = [__]> then\n        insert [] at (_i6) of [_chdata0 v] \n        insert [] at (_i6) of [_chdata1 v] \n        insert [] at (_i6) of [_chdata2 v] \n        insert [] at (_i6) of [_chdata3 v] \n        change [_i8 v] by (1)\n    end\n    set [_i9 v] to []\n    repeat until < [;] contains (letter (_i7) of (d))?>\n        set [_i9 v] to (join (_i9) (letter (_i7) of (d)))\n        change [_i7 v] by (1)\n    end\n    change [_i7 v] by (1)\n    if <(_i9) = ((1) * (_i9))> then\n        replace item (_i6) of [_chdata0 v] with ((1) * (_i9))\n    else\n        replace item (_i6) of [_chdata0 v] with (_i9)\n    end\n    set [_i9 v] to []\n    repeat until < [;] contains (letter (_i7) of (d))?>\n        set [_i9 v] to (join (_i9) (letter (_i7) of (d)))\n        change [_i7 v] by (1)\n    end\n    change [_i7 v] by (1)\n    if <(_i9) = ((1) * (_i9))> then\n        replace item (_i6) of [_chdata1 v] with ((1) * (_i9))\n    else\n        replace item (_i6) of [_chdata1 v] with (_i9)\n    end\n    set [_i9 v] to []\n    repeat until < [;] contains (letter (_i7) of (d))?>\n        set [_i9 v] to (join (_i9) (letter (_i7) of (d)))\n        change [_i7 v] by (1)\n    end\n    change [_i7 v] by (1)\n    if <(_i9) = ((1) * (_i9))> then\n        replace item (_i6) of [_chdata2 v] with ((1) * (_i9))\n    else\n        replace item (_i6) of [_chdata2 v] with (_i9)\n    end\n    set [_i9 v] to []\n    repeat until < [;] contains (letter (_i7) of (d))?>\n        set [_i9 v] to (join (_i9) (letter (_i7) of (d)))\n        change [_i7 v] by (1)\n    end\n    change [_i7 v] by (1)\n    if <(_i9) = ((1) * (_i9))> then\n        replace item (_i6) of [_chdata3 v] with ((1) * (_i9))\n    else\n        replace item (_i6) of [_chdata3 v] with (_i9)\n    end\n    change [_i6 v] by (1)\nend\nif <(_i8) > [0]> then\n    set [_i5 v] to (id)\n    repeat ((length of [_chindex v]) - (_i5))\n        change [_i5 v] by (1)\n        replace item (_i5) of [_chindex v] with ((item (_i5) of [_chindex v]) + (_i8))\n    end\nend\n\ndefine _getWidth (text) (size) (cspace)\nset [_width v] to [0]\nset [_i0 v] to [1]\nset [_i1 v] to [0]\nrepeat (length of (text))\n    switch costume to (blank v)\n    switch costume to (join (letter (_i0) of (text)) [_])\n    set [_i2 v] to ((costume [number v]) - (1))\n    if <(_i2) > [0]> then\n        change [_width v] by (((size) * (item (_i2) of [_chwidth v])) + (cspace))\n        change [_i1 v] by (1)\n    end\n    change [_i0 v] by (1)\nend\nif <(_i1) > [0]> then\n    change [_width v] by ((-1) * (cspace))\nend\n\ndefine New Lines | Number (lines) Size (size) Space (lspace)\nchange [_y v] by (((lines) + <(lines) = []>) * (((size) + ((12) * <(size) = []>)) * ((-1) - ((0.7) * ((lspace) + <(lspace) = []>)))))\n\ndefine Print | Pos (x) (y) Size (size) (width) Bounds (xmin) (xmax) Space (cspace) Style (weight) (slant) Underline (ul.height) (ul.weight) Align (al.x) (al.y) Text (text)\npen up\nset [_i8 v] to ((size) + ((12) * <(size) = []>))\nif <not <(_i8) > [0]>> then\n    set [_x v] to ((1) * (x))\n    set [_y v] to ((1) * (y))\n    switch costume to ( _ v)\n    stop [this script v]\nend\nset [_i7 v] to (((width) + <(width) = []>) * (_i8))\nset [_i9 v] to (([tan v] of (slant) ) * (_i8))\nset [_i2 v] to ((al.x) + (((0.5) * <(al.x) = [c]>) + <(al.x) = [r]>))\nset [_i3 v] to ((al.y) + (((0.5) * <(al.y) = [c]>) + <(al.y) = [t]>))\nset [_i4 v] to (((cspace) + <(cspace) = []>) * ((0.27) * (_i8)))\nset pen size to ((0.125) * (((weight) + <(weight) = []>) * (_i8)))\n_printText (text) ((1) * (x)) ((y) - ((_i3) * (_i8))) ((xmin) + (<(xmin) = []> * ((-1) / (0)))) ((xmax) + (<(xmax) = []> * ((1) / (0)))) (_i4) (ul.height) (((weight) + <(weight) = []>) * ((ul.weight) + <(ul.weight) = []>)) ((-1) * (_i2))\n\ndefine Get Width | Size (size) (width) Space (cspace) Text (text)\n_getWidth (text) (((size) + ((12) * <(size) = []>)) * ((width) + <(width) = []>)) (((cspace) + <(cspace) = []>) * ((0.27) * ((size) + ((12) * <(size) = []>))))\n\ndefine Print WW | Pos (x) (y) Size (size) (width) Bounds (xmin) (xmax) (ymax) (ymin) Space (cspace) (lspace) Style (weight) (slant) Underline (ul.height) (ul.weight) Align (al.x) (al.y) Text (text)\npen up\nset [_i0 v] to ((size) + ((12) * <(size) = []>))\nif <not <(_i0) > [0]>> then\n    set [_x v] to ((1) * (x))\n    set [_y v] to ((1) * (y))\n    switch costume to ( _ v)\n    stop [this script v]\nend\nset [_i0 v] to (((width) + <(width) = []>) * (_i0))\nset [_i1 v] to ((xmin) + ((-230) * <(xmin) = []>))\nset [_i2 v] to ((xmax) + ((230) * <(xmax) = []>))\nset [_i3 v] to (item (1) of [_chwidth v])\nset [_i4 v] to (((0.27) * ((cspace) + <(cspace) = []>)) / ((width) + <(width) = []>))\n_calcWW (text) (((_i2) - (_i1)) / (_i0)) (<not <(x) = []>> * (((x) - (_i1)) / (_i0))) (_i4) ((_i4) + (_i3))\nset [_i7 v] to (_i0)\nset [_i8 v] to ((size) + ((12) * <(size) = []>))\nset [_i3 v] to ((al.x) + (((0.5) * <(al.x) = [c]>) + <(al.x) = [r]>))\nset [_i0 v] to ((lspace) + <(lspace) = []>)\nif <(al.y) = []> then\n    set [_i4 v] to [1]\nelse\n    if <(al.y) = ((1) * (al.y))> then\n        set [_i4 v] to (al.y)\n    else\n        if <(al.y) = [b]> then\n            set [_i4 v] to ((length of [_ww1 v]) - <<(item (1) of [_ww2 v]) = [0]> and <(x) = []>>)\n        else\n            if <(al.y) = [c]> then\n                set [_i4 v] to ((0.5) * ((((0.7) * (_i0)) / (((0.7) * (_i0)) + (1))) + ((length of [_ww1 v]) - <<(item (1) of [_ww2 v]) = [0]> and <(x) = []>>)))\n            else\n                set [_i4 v] to (((0.7) * (_i0)) / (((0.7) * (_i0)) + (1)))\n            end\n        end\n    end\nend\nset [_i5 v] to ((0.1) * ((((ul.weight) + <(ul.weight) = []>) * ((weight) + <(weight) = []>)) * (_i8)))\nif <(ymax) = []> then\n    set [_i6 v] to ((1) / (0))\nelse\n    set [_i6 v] to ((ymax) - (_i0))\nend\nset [_i9 v] to (([tan v] of (slant) ) * (_i8))\n_printWW ((((1) - (_i3)) * (_i1)) + ((_i3) * (_i2))) (x) ((1) - <(x) = []>) ((1) * (y)) (_i6) ((ymin) + (<(ymin) = []> * ((-1) / (0)))) (((cspace) + <(cspace) = []>) * ((0.27) * (_i8))) ((_i8) * ((-1) - ((0.7) * (_i0)))) ((0.125) * (((weight) + <(weight) = []>) * (_i8))) ((ul.height) * (_i8)) (_i5) ((ul.height) * (_i9)) <not <(ul.height) = []>> ((-1) * ((_i3) * (_i7))) (_i4)\n\ndefine _printText (text) (x) (y) (xmin) (xmax) (cspace) (ul.height) (ul.weight) (al.x)\nset [_x v] to (x)\nset [_y v] to (y)\nif <not <(al.x) = [0]>> then\n    set [_width v] to [0]\n    _getWidth (text) (_i7) (cspace)\n    change [_x v] by ((al.x) * (_width))\nend\nset [_bq v] to ([ceiling v] of (((0.075) * ([sqrt v] of ((_i7) * (_i8)) )) + (0.5)) )\nset [_bq2 v] to ((4) * ((_bq) * (_bq)))\nset [_i0 v] to [1]\nif <<(xmin) = ((-1) / (0))> and <(xmax) = ((1) / (0))>> then\n    if <(_i9) = [0]> then\n        repeat (length of (text))\n            switch costume to (blank v)\n            switch costume to (join (letter (_i0) of (text)) [_])\n            if <(costume [number v]) > [1]> then\n                _printCh ((costume [number v]) - (1))\n                change [_x v] by (cspace)\n            end\n            change [_i0 v] by (1)\n        end\n    else\n        repeat (length of (text))\n            switch costume to (blank v)\n            switch costume to (join (letter (_i0) of (text)) [_])\n            if <(costume [number v]) > [1]> then\n                _printChSl ((costume [number v]) - (1))\n                change [_x v] by (cspace)\n            end\n            change [_i0 v] by (1)\n        end\n    end\nelse\n    repeat (length of (text))\n        switch costume to (blank v)\n        switch costume to (join (letter (_i0) of (text)) [_])\n        if <(costume [number v]) > [1]> then\n            if <not <<(_x) < (xmin)> or <((_x) + ((_i7) * (item ((costume [number v]) - (1)) of [_chwidth v]))) > (xmax)>>> then\n                _printChSl ((costume [number v]) - (1))\n            else\n                change [_x v] by ((_i7) * (item ((costume [number v]) - (1)) of [_chwidth v]))\n            end\n            change [_x v] by (cspace)\n        end\n        change [_i0 v] by (1)\n    end\nend\nswitch costume to ( _ v)\nif <not <(ul.height) = []>> then\n    set pen size to ((0.1) * (((ul.weight) + <(ul.weight) = []>) * (_i8)))\n    set [_i1 v] to ((x) + ((al.x) * (_width)))\n    if <(_i1) < (xmin)> then\n        set [_i1 v] to (xmin)\n    end\n    go to x: (((_i1) + ((_i9) * (ul.height))) - ((0.13) * (_i7))) y: ((y) + ((ul.height) * (_i8)))\n    pen down\n    set [_i2 v] to ((_x) - (cspace))\n    if <(_i2) > (xmax)> then\n        set [_i2 v] to (xmax)\n    end\n    set x to (((_i2) + ((_i9) * (ul.height))) + ((0.13) * (_i7)))\n    pen up\nend\n\ndefine _printWW (x) (firstx) (firstline) (y) (ymax) (ymin) (cspace) (lspace) (wt) (ul.height) (ul.weight) (ul.offset) <undl> (al.x) (al.y)\nswitch costume to ( _ v)\nset [_x v] to (x)\nset [_y v] to ((y) - (((al.y) - (1)) * (lspace)))\nset [_i0 v] to [1]\nset [_i1 v] to [1]\nif <(item (1) of [_ww2 v]) = [0]> then\n    change [_i0 v] by (1)\n    change [_i1 v] by (1)\n    if <(firstline) = [1]> then\n        change [_y v] by (lspace)\n    end\nend\nrepeat until <<not <(_y) > (ymax)>> or <(_i0) > (length of [_ww1 v])>>\n    change [_i1 v] by ((item (_i0) of [_ww2 v]) + (1))\n    change [_i0 v] by (1)\n    change [_y v] by (lspace)\nend\nset [_bq v] to ([ceiling v] of (((0.075) * ([sqrt v] of ((_i7) * (_i8)) )) + (0.5)) )\nset [_bq2 v] to ((4) * ((_bq) * (_bq)))\nrepeat until <<(_y) < (ymin)> or <(_i0) > (length of [_ww1 v])>>\n    if <(_i0) = (firstline)> then\n        set [_x v] to (firstx)\n    else\n        set [_x v] to ((x) + ((al.x) * (item (_i0) of [_ww1 v])))\n    end\n    set pen size to (wt)\n    if <(_i9) = [0]> then\n        repeat (item (_i0) of [_ww2 v])\n            _printCh (item (_i1) of [_ww0 v])\n            change [_x v] by (cspace)\n            change [_i1 v] by (1)\n        end\n    else\n        repeat (item (_i0) of [_ww2 v])\n            _printChSl (item (_i1) of [_ww0 v])\n            change [_x v] by (cspace)\n            change [_i1 v] by (1)\n        end\n    end\n    if <undl> then\n        set pen size to (ul.weight)\n        if <(_i0) = (firstline)> then\n            go to x: (((firstx) + (ul.offset)) - ((0.13) * (_i7))) y: ((_y) + (ul.height))\n        else\n            go to x: ((((x) + ((al.x) * (item (_i0) of [_ww1 v]))) + (ul.offset)) - ((0.13) * (_i7))) y: ((_y) + (ul.height))\n        end\n        pen down\n        set x to ((((_x) - (cspace)) + (ul.offset)) + ((0.13) * (_i7)))\n        pen up\n    end\n    change [_i0 v] by (1)\n    change [_i1 v] by (1)\n    change [_y v] by (lspace)\nend\nif <((length of [_ww1 v]) - <(item (1) of [_ww2 v]) = [0]>) > [0]> then\n    change [_y v] by ((-1) * (lspace))\nend\ndelete all of [_ww0 v]\ndelete all of [_ww1 v]\ndelete all of [_ww2 v]\n\ndefine _printCh (id)\nset [_i2 v] to (item (id) of [_chindex v])\nif <(item (_i2) of [_chdata1 v]) = [Q]> then\n    repeat (item (_i2) of [_chdata0 v])\n        change [_i2 v] by (1)\n        go to x: ((_x) + ((_i7) * (item (_i2) of [_chdata0 v]))) y: ((_y) + ((_i8) * (item (_i2) of [_chdata1 v])))\n        pen down\n        repeat (item (_i2) of [_chdata2 v])\n            change [_i2 v] by (1)\n            if <(item (_i2) of [_chdata0 v]) = [L]> then\n                go to x: ((x position) + ((_i7) * (item (_i2) of [_chdata1 v]))) y: ((y position) + ((_i8) * (item (_i2) of [_chdata2 v])))\n            else\n                set [_i3 v] to (((_i7) * (item (_i2) of [_chdata0 v])) / (_bq2))\n                set [_i4 v] to ((((_i7) * (item (_i2) of [_chdata1 v])) / (_bq)) + ((_i3) / (2)))\n                set [_i5 v] to (((_i8) * (item (_i2) of [_chdata2 v])) / (_bq2))\n                set [_i6 v] to ((((_i8) * (item (_i2) of [_chdata3 v])) / (_bq)) + ((_i5) / (2)))\n                repeat (_bq)\n                    go to x: ((x position) + (_i4)) y: ((y position) + (_i6))\n                    change [_i4 v] by (_i3)\n                    change [_i6 v] by (_i5)\n                    go to x: ((x position) + (_i4)) y: ((y position) + (_i6))\n                    change [_i4 v] by (_i3)\n                    change [_i6 v] by (_i5)\n                end\n            end\n        end\n        pen up\n    end\nelse\n    repeat (item (_i2) of [_chdata0 v])\n        change [_i2 v] by (1)\n        go to x: ((_x) + ((_i7) * (item (_i2) of [_chdata0 v]))) y: ((_y) + ((_i8) * (item (_i2) of [_chdata1 v])))\n        pen down\n        repeat (item (_i2) of [_chdata2 v])\n            change [_i2 v] by (1)\n            go to x: ((x position) + ((_i7) * (item (_i2) of [_chdata0 v]))) y: ((y position) + ((_i8) * (item (_i2) of [_chdata1 v])))\n        end\n        pen up\n    end\nend\nchange [_i2 v] by (1)\nchange pen size by (1)\nrepeat (item (_i2) of [_chdata0 v])\n    change [_i2 v] by (1)\n    go to x: ((_x) + ((_i7) * (item (_i2) of [_chdata0 v]))) y: ((_y) + ((_i8) * (item (_i2) of [_chdata1 v])))\n    pen down\n    pen up\nend\nchange pen size by (-1)\nchange [_x v] by ((_i7) * (item (id) of [_chwidth v]))\n\ndefine _printChSl (id)\nset [_i2 v] to (item (id) of [_chindex v])\nif <(item (_i2) of [_chdata1 v]) = [Q]> then\n    repeat (item (_i2) of [_chdata0 v])\n        change [_i2 v] by (1)\n        go to x: ((_x) + (((_i7) * (item (_i2) of [_chdata0 v])) + ((_i9) * (item (_i2) of [_chdata1 v])))) y: ((_y) + ((_i8) * (item (_i2) of [_chdata1 v])))\n        pen down\n        repeat (item (_i2) of [_chdata2 v])\n            change [_i2 v] by (1)\n            if <(item (_i2) of [_chdata0 v]) = [L]> then\n                go to x: ((x position) + (((_i7) * (item (_i2) of [_chdata1 v])) + ((_i9) * (item (_i2) of [_chdata2 v])))) y: ((y position) + ((_i8) * (item (_i2) of [_chdata2 v])))\n            else\n                set [_i3 v] to ((((_i7) * (item (_i2) of [_chdata0 v])) + ((_i9) * (item (_i2) of [_chdata2 v]))) / (_bq2))\n                set [_i4 v] to (((((_i7) * (item (_i2) of [_chdata1 v])) + ((_i9) * (item (_i2) of [_chdata3 v]))) / (_bq)) + ((_i3) / (2)))\n                set [_i5 v] to (((_i8) * (item (_i2) of [_chdata2 v])) / (_bq2))\n                set [_i6 v] to ((((_i8) * (item (_i2) of [_chdata3 v])) / (_bq)) + ((_i5) / (2)))\n                repeat (_bq)\n                    go to x: ((x position) + (_i4)) y: ((y position) + (_i6))\n                    change [_i4 v] by (_i3)\n                    change [_i6 v] by (_i5)\n                    go to x: ((x position) + (_i4)) y: ((y position) + (_i6))\n                    change [_i4 v] by (_i3)\n                    change [_i6 v] by (_i5)\n                end\n            end\n        end\n        pen up\n    end\nelse\n    repeat (item (_i2) of [_chdata0 v])\n        change [_i2 v] by (1)\n        go to x: ((_x) + (((_i7) * (item (_i2) of [_chdata0 v])) + ((_i9) * (item (_i2) of [_chdata1 v])))) y: ((_y) + ((_i8) * (item (_i2) of [_chdata1 v])))\n        pen down\n        repeat (item (_i2) of [_chdata2 v])\n            change [_i2 v] by (1)\n            go to x: ((x position) + (((_i7) * (item (_i2) of [_chdata0 v])) + ((_i9) * (item (_i2) of [_chdata1 v])))) y: ((y position) + ((_i8) * (item (_i2) of [_chdata1 v])))\n        end\n        pen up\n    end\nend\nchange [_i2 v] by (1)\nchange pen size by (1)\nrepeat (item (_i2) of [_chdata0 v])\n    change [_i2 v] by (1)\n    go to x: ((_x) + (((_i7) * (item (_i2) of [_chdata0 v])) + ((_i9) * (item (_i2) of [_chdata1 v])))) y: ((_y) + ((_i8) * (item (_i2) of [_chdata1 v])))\n    pen down\n    pen up\nend\nchange pen size by (-1)\nchange [_x v] by ((_i7) * (item (id) of [_chwidth v]))\n\nwhen I receive [text v]\ntic\n\ndefine tic\nset pen color to (#1b1b1b)\nset [i v] to [0]\nrepeat ((length of [this frame v]) / (4))\n    change [i v] by (4)\n    RotationMatrix (item ((i) - (2)) of [this frame v]) ((item ((i) - (1)) of [this frame v]) + (30)) (item (i) of [this frame v])\n    if <[0.3] < (z)> then\n        Print | Pos (x) (y) Size (((15) * (FOV)) / (z)) [] Bounds [] [] Space [] Style [] [] Underline [] [] Align [0.5] [] Text (item ((i) - (3)) of [this frame v])\n    end\nend\nif <(TextTimer) > [0]> then\n    Print WW | Pos [] [-100] Size [20] [] Bounds [-220] [220] [] [-170] Space [] [] Style [1.25] [] Underline [] [] Align [0.5] [] Text (item (Text) of [texts v])\n    change [texttimer v] by (() - (/deltaTime))\nelse\nend\nif  then\n    Print | Pos  [-140] Size [80] [] Bounds [] [] Space [] Style [1.3] [] Underline [] [] Align [0.5] [0] Text [MMO]\nelse\n    if <(Players#) = [1]> then\n        Print | Pos [-220] [160] Size [22] [] Bounds [] [] Space [] Style [1.3] [] Underline [] [] Align [0] [1] Text [1 player \(you\)]\n    else\n        Print | Pos [-220] [160] Size [22] [] Bounds [] [] Space [] Style [1.3] [] Underline [] [] Align [0] [1] Text (join (Players#) [ players])\n    end\n    Print | Pos [220] [160] Size [22] [] Bounds [] [] Space [] Style [1.3] [] Underline [] [] Align [1] [1] Text ((round ((time) * (10))) / (10))\nend\n\ndefine xyz (x) (y) (z)\nset [x v] to (x)\nset [y v] to (y)\nset [z v] to (z)\n\ndefine RotationMatrix (x) (y) (z)\nxyz ((x) - (_scrollX)) ((y) - (_scrollY)) ((z) - (_scrollZ))\nxyz (((z) * (=YSin)) + ((x) * (=YCos))) (y) (((z) * (=YCos)) - ((x) * (=YSin)))\nxyz (x) (((y) * (=XCos)) - ((z) * (=XSin))) (((z) * (=XCos)) + ((y) * (=XSin)))\nset [x v] to (((x) * (FOV)) / (z))\nset [y v] to (((y) * (FOV)) / (z))\n\n@Play on scratch\n\nwhen flag clicked\nhide\n\nwhen I receive [lag v]\nshow\n\nwhen this sprite clicked\nhide\nbroadcast (start v)\n\n