3d MMO platformer

Instructions: ||3D MMO platformer||\n\nMMO means massively multyplayer online game, that means that very much players can play together online.\n\nZoom with the mouse wheel, all other Instructions are all in game.\n\nSpam the green flag to prevent lag.\n\nIf it lags, try it here: https://turbowarp.org/651332587?hqpen

@Stage\n\nwhen flag clicked\nforever\n    play sound [Jim-Yosef-Arrow-NCS-Release-1 v] until done\nend\n\n@Blank\n\n@Cloud\n\ndefine init cloud\nset [player id v] to (pick random (999) to (999999))\nset [next post on cloud v] to [16]\nset [next active check v] to [30]\ndelete all of [x v]\ndelete all of [y v]\ndelete all of [z v]\ndelete all of [name x v]\ndelete all of [name y v]\ndelete all of [name z v]\ndelete all of [record_other players v]\ndelete all of [active players v]\ndelete all of [active players ids v]\ndelete all of [real cloud data v]\ndelete all of [opponents record v]\ndelete all of [last v]\ndelete all of [active check v]\ndelete all of [record v]\nadd (join [=] (☁ cloud 1)) to [real cloud data v]\nadd (join [=] (☁ cloud 2)) to [real cloud data v]\nadd (join [=] (☁ cloud 3)) to [real cloud data v]\nadd (join [=] (☁ cloud 4)) to [real cloud data v]\nadd (join [=] (☁ cloud 5)) to [real cloud data v]\nadd (join [=] (☁ cloud 6)) to [real cloud data v]\nadd (join [=] (☁ cloud 7)) to [real cloud data v]\nadd (join [=] (☁ cloud 8)) to [real cloud data v]\nadd (join [=] (☁ cloud 9)) to [real cloud data v]\nadd (join [=] (☁ cloud 10)) to [real cloud data v]\n\nwhen I receive [mmo v]\nset [cloned v] to [0]\ndownload cloud\ndecode\nif <(tick) = (next post on cloud)> then\n    encode\n    send to cloud (pick random (1) to (10))\n    set [next post on cloud v] to ((tick) + (16))\nend\nif <(tick) = (next active check)> then\n    active check\n    set [next active check v] to ((tick) + (30))\nend\nif <[aabbs v] contains [cloud]?> then\n    delete other players\nend\n\ndefine download cloud\ndelete all of [cloud data v]\nimport [1] (join [=] (☁ cloud 1))\nimport [2] (join [=] (☁ cloud 2))\nimport [3] (join [=] (☁ cloud 3))\nimport [4] (join [=] (☁ cloud 4))\nimport [5] (join [=] (☁ cloud 5))\nimport [6] (join [=] (☁ cloud 6))\nimport [7] (join [=] (☁ cloud 7))\nimport [8] (join [=] (☁ cloud 8))\nimport [9] (join [=] (☁ cloud 9))\nimport [10] (join [=] (☁ cloud 10))\n\ndefine import (id) (data)\nif <(item (id) of [real cloud data v]) = (data)> then\n    stop [this script v]\nend\nreplace item (id) of [real cloud data v] with (data)\nadd (data) to [cloud data v]\n\ndefine encode\nprepare encoding\nset [i v] to [1]\nset [encoded v] to []\nrepeat (length of [encode v])\n    set [i2 v] to [1]\n    repeat (length of (item (i) of [encode v]))\n        switch costume to (letter (i2) of (item (i) of [encode v]))\n        if <(costume [number v]) < [10]> then\n            set [encoded v] to (join (encoded) (join [0] (costume [number v])))\n        else\n            set [encoded v] to (join (encoded) (costume [number v]))\n        end\n        change [i2 v] by (1)\n    end\n    set [encoded v] to (join (encoded) [53])\n    change [i v] by (1)\nend\n\ndefine prepare encoding\ndelete all of [encode v]\nadd (player id) to [encode v]\nadd (round (_pX)) to [encode v]\nadd (round (_pY)) to [encode v]\nadd (round (_pZ)) to [encode v]\nadd (username) to [encode v]\nadd (timer) to [encode v]\nrecord\ndelete all of [record v]\n\ndefine send to cloud (wich cloud?)\nif <[1] = (wich cloud?)> then\n    set [☁ cloud 1 v] to (encoded)\nend\nif <[2] = (wich cloud?)> then\n    set [☁ cloud 2 v] to (encoded)\nend\nif <[3] = (wich cloud?)> then\n    set [☁ cloud 3 v] to (encoded)\nend\nif <[4] = (wich cloud?)> then\n    set [☁ cloud 4 v] to (encoded)\nend\nif <[5] = (wich cloud?)> then\n    set [☁ cloud 5 v] to (encoded)\nend\nif <[6] = (wich cloud?)> then\n    set [☁ cloud 6 v] to (encoded)\nend\nif <[7] = (wich cloud?)> then\n    set [☁ cloud 7 v] to (encoded)\nend\nif <[8] = (wich cloud?)> then\n    set [☁ cloud 8 v] to (encoded)\nend\nif <[9] = (wich cloud?)> then\n    set [☁ cloud 9 v] to (encoded)\nend\nif <[10] = (wich cloud?)> then\n    set [☁ cloud 10 v] to (encoded)\nend\n\ndefine decode\nset [i v] to [1]\nrepeat (length of [cloud data v])\n    set [i2 v] to [2]\n    set [n v] to [1]\n    set [decoded v] to []\n    repeat ((length of (item (i) of [cloud data v])) / (2))\n        switch costume to (join (letter (i2) of (item (i) of [cloud data v])) (letter ((i2) + (1)) of (item (i) of [cloud data v])))\n        if <(costume [name v]) = [~]> then\n            do something\n            set [decoded v] to []\n            change [n v] by (1)\n        else\n            set [decoded v] to (join (decoded) (costume [name v]))\n        end\n        change [i2 v] by (2)\n    end\n    change [i v] by (1)\nend\n\ndefine do something\nif <(n) = [1]> then\n    if <not <[active players ids v] contains (decoded)?>> then\n        if <(cloned) = [0]> then\n            if <[active players ids v] contains []?> then\n                replace item (item # of [] in [active players ids v]) of [active players ids v] with (decoded)\n            else\n                add (decoded) to [active players ids v]\n                add [0] to [active players v]\n                add [0] to [x v]\n                add [0] to [y v]\n                add [0] to [z v]\n                add [0] to [name x v]\n                add [0] to [name y v]\n                add [0] to [name z v]\n                add [0] to [last v]\n                add [0] to [active check v]\n                repeat (50)\n                    add [0] to [opponents record v]\n                end\n            end\n            if <not <(decoded) = (player id)>> then\n                set [get id v] to (decoded)\n                set [cloned v] to [1]\n                create clone of (figur2 v)\n            end\n        else\n            stop [this script v]\n        end\n    end\n    set [place v] to (item # of (decoded) in [active players ids v])\nend\nif <(n) = [2]> then\n    replace item (place) of [x v] with (decoded)\nend\nif <(n) = [3]> then\n    replace item (place) of [y v] with (decoded)\nend\nif <(n) = [4]> then\n    replace item (place) of [z v] with (decoded)\nend\nif <(n) = [5]> then\n    replace item (place) of [active players v] with (decoded)\nend\nif <(n) = [6]> then\n    replace item (place) of [active check v] with (decoded)\nend\nif <<(n) > [6]> and <(n) < [31]>> then\n    if <(decoded) = []> then\n        replace item (((place) * (50)) - ((56) - (n))) of [opponents record v] with [0]\n    else\n        replace item (((place) * (50)) - ((56) - (n))) of [opponents record v] with (decoded)\n    end\nend\n\ndefine active check\nset [i v] to [1]\nrepeat (length of [active players ids v])\n    if <(item (i) of [last v]) = (item (i) of [active check v])> then\n        if <(i) = (length of [active players ids v])> then\n            delete (i) of [x v]\n            delete (i) of [y v]\n            delete (i) of [z v]\n            delete (i) of [name x v]\n            delete (i) of [name y v]\n            delete (i) of [name z v]\n            delete (i) of [active players v]\n            delete (i) of [active players ids v]\n            delete (i) of [active check v]\n            delete (i) of [last v]\n        else\n            replace item (i) of [x v] with []\n            replace item (i) of [y v] with []\n            replace item (i) of [z v] with []\n            replace item (i) of [name x v] with []\n            replace item (i) of [name y v] with []\n            replace item (i) of [name z v] with []\n            replace item (i) of [active players v] with []\n            replace item (i) of [active players ids v] with []\n            replace item (i) of [active check v] with []\n            replace item (i) of [last v] with []\n        end\n    end\n    replace item (i) of [last v] with (item (i) of [active check v])\n    change [i v] by (1)\nend\n\ndefine record\nset [i v] to [3]\nrepeat ((length of [record v]) / (3))\n    add (item ((i) - (2)) of [record v]) to [encode v]\n    add (item ((i) - (1)) of [record v]) to [encode v]\n    add (item (i) of [record v]) to [encode v]\n    change [i v] by (3)\nend\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\nwhen I receive [start v]\nstop [other scripts in sprite v]\nforever\n    set [/oldtime v] to (days since 2000)\n    broadcast (mmo v)\n    broadcast (tick opponents v)\n    broadcast (update v)\n    broadcast (render v)\n    change [tick v] by (1)\nend\n\nset [/deltatime v] to (join [] ((86400) * ((days since 2000) - (/oldTime))))\nset [/fps v] to (round ((1) / (/deltaTime)))\n\nwhen I receive [reset v]\nstop [other scripts in sprite v]\nbroadcast (start v)\n\nwhen flag clicked\nreset timer\nif <is turbowarp?> then\n    set [/deltatime v] to [0.035]\nelse\n    set [/deltatime v] to [0.075]\nend\nset [area v] to [1]\nset [tick v] to [0]\ninit cloud\nbroadcast (load v) and wait\nforever\n    download cloud\n    decode\n    if <[aabbs v] contains [cloud]?> then\n        delete other players\n    end\nend\n\nwhen I receive [cutscene v]\nstop [other scripts in sprite v]\n\nbroadcast (render v) and wait\n\nbroadcast (update v) and wait\n\n@Figur2\n\nwhen I start as a clone\nset [id v] to (get id)\nset [place v] to (item # of (id) in [active players ids v])\nwait ((2) / (30)) seconds\nset [i v] to [55]\nset [active_check v] to (item (place) of [active check v])\nset [my x v] to (item (place) of [x v])\nset [my y v] to (item (place) of [y v])\nset [my z v] to (item (place) of [z v])\nset [next x v] to (item (place) of [x v])\nset [next y v] to (item (place) of [y v])\nset [next z v] to (item (place) of [z v])\nadd AABB at (My x) (My y) (my z) size (_pSize) (_pSize) (_pSize) mode [cloud]\n\nwhen I receive [tick opponents v]\nif <[active players ids v] contains (id)?> then\n    if <(place) > [0]> then\n        if <(active_check) = (item (place) of [active check v])> then\n            if <([floor v] of (([tick v] of [cloud v]) / (2)) ) = (([tick v] of [cloud v]) / (2))> then\n                change [i v] by (3)\n            end\n            change [my x v] by ((item ((((place) * (50)) - (50)) + ((i) - (2))) of [opponents record v]) / (2))\n            change [my y v] by ((item ((((place) * (50)) - (50)) + ((i) - (1))) of [opponents record v]) / (2))\n            change [my z v] by ((item ((((place) * (50)) - (50)) + (i)) of [opponents record v]) / (2))\n        else\n            set [my x v] to (Next x)\n            set [my y v] to (Next y)\n            set [my z v] to (next z)\n            set [next x v] to (item (place) of [x v])\n            set [next y v] to (item (place) of [y v])\n            set [next z v] to (item (place) of [z v])\n            set [i v] to [0]\n        end\n        set [active_check v] to (item (place) of [active check v])\n        add AABB at (My x) (My y) (my z) size (_pSize) (_pSize) (_pSize) mode [cloud]\n    end\nelse\n    delete this clone\nend\n\nwhen flag clicked\nhide\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]\nreplace item (place) of [name x v] with (x)\nreplace item (place) of [name y v] with ((y) + (30))\nreplace item (place) of [name z v] with (z)\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\nif <not <([floor v] of (([tick v] of [cloud v]) / (2)) ) = (([tick v] of [cloud v]) / (2))>> then\n    set [last-xpos v] to (_pX)\n    set [last-ypos v] to (_pY)\n    set [last-zpos v] to (_pZ)\nend\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]?> or <[collisions v] contains [locked]?>> then\n    repeat until <not <<[collisions v] contains [ground]?> or <[collisions v] contains [locked]?>>>\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]?> or <[collisions v] contains [locked]?>> 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]> or <(fly?) = [true]>>>>> then\n    start sound [action_jump v]\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            if <not <(fly?) = [true]>> then\n                set [*doubled? v] to [true]\n            end\n        end\n    end\nend\nif <(_pY) < [-350]> then\n    start sound [roblox-death-sound_1_wqgeWFl v]\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    start sound [roblox-death-sound_1_wqgeWFl v]\n    reset\nend\nif <[collisions v] contains [M1]?> then\n    set [text v] to [1]\nelse\n    if <[collisions v] contains [M2]?> then\n        if <[aabbs v] contains [locked]?> then\n            set [text v] to [2]\n        else\n            set [text v] to [15]\n        end\n    else\n        if <[collisions v] contains [M3]?> then\n            set [text v] to [3]\n        else\n            if <[collisions v] contains [M4]?> then\n                set [text v] to [4]\n            else\n                if <[collisions v] contains [M5]?> then\n                    set [text v] to [5]\n                else\n                    if <[collisions v] contains [M6]?> then\n                        set [text v] to [6]\n                    else\n                        if <[collisions v] contains [M7]?> then\n                            set [text v] to [7]\n                        else\n                            if <[collisions v] contains [M9]?> then\n                                set [text v] to [9]\n                            else\n                                if <[collisions v] contains [M10]?> then\n                                    set [text v] to [10]\n                                else\n                                    if <[collisions v] contains [M11]?> then\n                                        set [text v] to [11]\n                                    else\n                                        if <[collisions v] contains [M12]?> then\n                                            set [text v] to [12]\n                                        else\n                                            if <[collisions v] contains [M13]?> then\n                                                set [text v] to [13]\n                                            else\n                                                if <[collisions v] contains [M14]?> then\n                                                    set [text v] to [14]\n                                                else\n                                                    set [text v] to [0]\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\nif <[collisions v] contains [button]?> then\n    delete block (item ((item # of [button] in [collisions v]) + (1)) of [collisions v])\n    broadcast (cutscene v)\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])\nend\nif <[collisions v] contains [fly]?> then\n    set [fly? v] to [true]\n    delete block (item ((item # of [fly] in [collisions v]) + (1)) of [collisions v])\nend\nif <[collisions v] contains [speed]?> then\n    set [-speed v] to [750]\n    delete block (item ((item # of [speed] in [collisions v]) + (1)) of [collisions v])\nend\nif <[collisions v] contains [teleport]?> then\n    set [_px v] to [-10000]\n    set [_py v] to [0]\n    set [_pz v] to [-10000]\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?>\nif <([floor v] of (([tick v] of [cloud v]) / (2)) ) = (([tick v] of [cloud v]) / (2))> then\n    add ((_pX) - (last-xpos)) to [record v]\n    add ((_pY) - (last-ypos)) to [record v]\n    add ((_pZ) - (last-zpos)) to [record v]\nend\n\nset [text v] to [3]\nset [texttimer v] to [3.5]\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]) = [invisible]> 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 [entfernung v] to [400]\nset [-speed v] to [225]\nset [*double? v] to [false]\nset [fly? v] to [false]\n\ndefine change xz (x) (z)\nchange [_px v] by (round (x))\ncheck player collisions\nif <<[collisions v] contains [ground]?> or <[collisions v] contains [locked]?>> then\n    repeat until <not <<[collisions v] contains [ground]?> or <[collisions v] contains [locked]?>>>\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]?> or <[collisions v] contains [locked]?>> then\n    repeat until <not <<[collisions v] contains [ground]?> or <[collisions v] contains [locked]?>>>\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\n\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 ((length of [dists v]) + (1))\n    if <not <(d) < (item (i2) of [dists v])>> then\n        insert ($dist) at (i2) of [dists v] \n        insert ((length of [renderorder v]) + (1)) at (i2) of [renderorder v] \n        stop [this script v]\n    end\n    change [i2 v] by (1)\nend\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 [_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\nset [text v] to [0]\n\nwhen I receive [cutscene v]\nset [entfernung v] to [400]\nset [_scrollx v] to [0]\nset [_scrolly v] to [200]\nset [_scrollz v] to [0]\nset [=rotx v] to [-20]\nset [=roty v] to [-270]\nset [=xcos v] to ([cos v] of (=RotX) )\nset [=xsin v] to ([sin v] of (=RotX) )\nset [=ycos v] to ([cos v] of (=RotY) )\nset [=ysin v] to ([sin v] of (=RotY) )\nsort\nbroadcast (render v)\n\nbroadcast (cutscene v)\n\nbroadcast (start v)\n\nset [text v] to [8]\n\nwhen [up arrow v] key pressed\nif <not <key (up arrow v) pressed?>> then\n    change [entfernung v] by (-30)\n    if <(entfernung) < [0]> then\n        set [entfernung v] to [0]\n    end\nend\n\nwhen [down arrow v] key pressed\nif <not <key (down arrow v) pressed?>> then\n    change [entfernung v] by (30)\nend\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 [-9900] [-50] [-9900] size [100] [25] [100] mode [ground]\nadd AABB at [-9900] [-50] [-10100] size [100] [25] [100] mode [ground]\nadd AABB at [-10100] [-50] [-9900] size [100] [25] [100] mode [ground]\nadd AABB at [-10100] [-50] [-10100] size [100] [25] [100] mode [ground]\nadd AABB at [-10000] [-50] [-10400] size [150] [25] [150] mode [ground]\nadd AABB at [-9900] [-15] [-10400] size [25] [10] [25] mode [double]\nadd AABB at [-10000] [-15] [-10400] size [25] [10] [25] mode [fly]\nadd AABB at [-10100] [-15] [-10400] size [25] [10] [25] mode [speed]\nadd AABB at [-10000] [7] [-10000] size [20] [13] [5] mode [M10]\nadd AABB at [-10000] [7] [-10275] size [20] [13] [5] mode [M11]\nadd AABB at [-9900] [7] [-10360] size [20] [13] [5] mode [M12]\nadd AABB at [-10000] [7] [-10360] size [20] [13] [5] mode [M13]\nadd AABB at [-10100] [7] [-10360] size [20] [13] [5] mode [M14]\nadd AABB at [-300] [75] [0] size [25] [100] [75] mode [locked]\nadd AABB at [0] [7] [0] size [20] [13] [5] mode [M1]\nadd AABB at [-350] [-50] [0] size [150] [25] [150] mode [ground]\nadd AABB at [-350] [75] [-100] size [75] [100] [25] mode [ground]\nadd AABB at [-350] [75] [100] size [75] [100] [25] mode [ground]\nadd AABB at [-450] [75] [0] size [25] [100] [125] mode [ground]\nadd AABB at [-350] [200] [0] size [125] [25] [125] mode [ground]\nadd AABB at [-265] [7] [100] size [5] [13] [20] mode [M2]\nadd AABB at [425] [-50] [325] size [75] [25] [100] mode [ground]\nadd AABB at [275] [-50] [325] size [75] [25] [100] mode [ground]\nadd AABB at [50] [-50] [325] size [150] [25] [100] mode [ground]\nadd AABB at [250] [-10] [325] size [25] [15] [100] mode [lava]\nadd AABB at [325] [-10] [275] size [50] [15] [50] mode [lava]\nadd AABB at [425] [-10] [375] size [50] [15] [50] mode [lava]\nadd AABB at [200] [7] [400] size [5] [13] [20] mode [M3]\nadd AABB at [475] [7] [250] size [20] [13] [5] mode [M4]\nadd AABB at [550] [-50] [0] size [75] [25] [75] mode [Bounce]\nadd AABB at [800] [-50] [-250] size [75] [25] [75] mode [Bounce]\nadd AABB at [1200] [-50] [-400] size [75] [25] [75] mode [Bounce]\nadd AABB at [1500] [200] [-400] size [100] [25] [100] mode [Ground]\nadd AABB at [1575] [300] [-400] size [25] [75] [100] mode [Ground]\nadd AABB at [1500] [257] [-400] size [5] [13] [20] mode [M5]\nadd AABB at [1500] [200] [-200] size [100] [25] [100] mode [invisible]\nadd AABB at [1700] [250] [-200] size [100] [25] [100] mode [invisible]\nadd AABB at [1700] [350] [-400] size [100] [25] [100] mode [Ground]\nadd AABB at [1750] [400] [-650] size [50] [25] [50] mode [Ground]\nadd AABB at [1650] [200] [-1000] size [50] [25] [50] mode [bounce]\nadd AABB at [1650] [300] [-1100] size [100] [100] [25] mode [lava]\nadd AABB at [1650] [200] [-1225] size [100] [25] [100] mode [ground]\nadd AABB at [1650] [200] [-1425] size [100] [25] [100] mode [ground]\nadd AABB at [1650] [230] [-1425] size [50] [10] [50] mode [button]\nadd AABB at [1650] [257] [-1350] size [20] [13] [5] mode [M7]\nadd AABB at [1725] [257] [-1425] size [5] [13] [20] mode [M9]\nadd AABB at [-350] [-15] [0] size [40] [10] [40] mode [teleport]\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]\nif <(letter (1) of (m)) = [m]> then\n    add (x) to [aabbs v]\n    add ((y) - (22)) to [aabbs v]\n    add (z) to [aabbs v]\n    add [5] to [aabbs v]\n    add [9] to [aabbs v]\n    add [5] to [aabbs v]\n    add [schild] to [aabbs v]\nend\n\nadd AABB at [1650] [200] [-750] size [25] [25] [25] mode [Ground]\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)\n\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)\nset pen (transparency v) to (0)\nif <<(item (i2) of [aabbs v]) = [Ground]> or <(item (i2) of [aabbs v]) = [invisible]>> 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]> or <<(item (i2) of [aabbs v]) = [fly]> or <(item (i2) of [aabbs v]) = [speed]>>> 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]) = [teleport]> then\n    set pen color to (#56ff1e)\nend\nif <(letter (1) of (item (i2) of [aabbs v])) = [M]> then\n    set pen color to (#944e00)\nend\nif <(item (i2) of [aabbs v]) = [schild]> then\n    set pen color to (#ffa441)\nend\nif <(item (i2) of [aabbs v]) = [locked]> then\n    set pen color to (#848484)\nend\nif <(item (i2) of [aabbs v]) = [button]> then\n    set pen color to (#ff0000)\nend\nset [render? v] to [false]\nAABB verts (x) (y) (z) (sx) (sy) (sz)\nif <not <<(item (i2) of [aabbs v]) = [invisible]> and <not <(_scrollY) < ((item ((i2) - (5)) of [aabbs v]) - (50))>>>> then\n    if <(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\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    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])\nend\n\ndefine xyz (x) (y) (z)\nset [x v] to (x)\nset [y v] to (y)\nset [z v] to (z)\n\n\n\nset pen (transparency v) to (0)\n\nwhen I receive [cutscene v]\nwait (1) seconds\nset [text v] to [8]\nrepeat (75)\n    replace item ((item # of [locked] in [aabbs v]) - (4)) of [aabbs v] with ((item ((item # of [locked] in [aabbs v]) - (4)) of [aabbs v]) - (1))\n    replace item ((item # of [locked] in [aabbs v]) - (1)) of [aabbs v] with ((item ((item # of [locked] in [aabbs v]) - (1)) of [aabbs v]) - (1))\n    Render\n    broadcast (text v) and wait\nend\ndelete ((item # of [locked] in [aabbs v]) - (6))\nwait (1) seconds\nbroadcast (start v)\n\nRender\nbroadcast (text v) and wait\n\nbroadcast (start v)\n\nbroadcast (cutscene v)\n\ndefine delete (block)\nrepeat (7)\n    delete (block) of [aabbs v]\nend\n\n@TextEngine\n\ndefine 3d projection x (x) y (y) z (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)))\nPrint | Pos (((x) * (FOV)) / (z)) (((y) * (FOV)) / (z)) Size [] [] Bounds [] [] Space [] Style [] [] Underline [] [] Align [c] [] Text (item (idx) of [active players v])\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\nerase all\npen up\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 flag clicked\nset [text v] to [0]\nset [frame v] to [0]\nLoad | Font [parabolic]\n\ndefine render\nset [idx v] to [1]\nset [active players v] to [0]\ngo to [front v] layer\nrepeat (length of [active players ids v])\n    if <not <(item (idx) of [active players ids v]) = []>> then\n        change [active players v] by (1)\n    end\n    change [idx v] by (1)\nend\nSet Pen Color | RGBA [0] [0] [0] []\nPrint | Pos [-230] [145] Size [20] [0.75] Bounds [] [] Space [] Style [] [] Underline [] [] Align [] [] Text (join [active players: ] (active players))\nset [idx v] to [1]\nrepeat (length of [active players ids v])\n    if <not <(item (idx) of [active players ids v]) = (player id)>> then\n        3d projection x (item (idx) of [name x v]) y (item (idx) of [name y v]) z (item (idx) of [name z v])\n    end\n    change [idx v] by (1)\nend\nif <(Text) > [0]> then\n    Print WW | Pos [] [-100] Size [20] [] Bounds [] [] [] [] Space [] [] Style [] [] Underline [] [] Align [c] [] Text (item (Text) of [text v])\nend\n\nerase all\n\nwhen I receive [text v]\nrender\n\ndefine xyz (x) (y) (z)\nset [x v] to (x)\nset [y v] to (y)\nset [z v] to (z)\n\n@UI designs\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset size to (100) %\nswitch costume to (title hud v)\nshow\ncreate clone of (_myself_ v)\ngo to x: (0) y: (-30)\ngo to [front v] layer\nswitch costume to (play button v)\nrepeat until <<mouse down?> and <touching (mouse-pointer v)?>>\n    if <touching (mouse-pointer v)?> then\n        change size by (((120) - (size)) * (0.4))\n    else\n        change size by (((100) - (size)) * (0.4))\n    end\nend\nhide\nbroadcast (start v)\n\nwhen I receive [start v]\ndelete this clone\n\n@UI designs2\n\nwhen flag clicked\nswitch costume to (costume2 v)\nforever\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\n