--[[ CMDS: !help - !cmd - !cmds - !commands to see the commands list in game --]] local _, msg = pcall(nil) roomloader = string.match(msg, "^(.-)%.") admin = {roomloader} win = 10 autoJoin = true teamColors = {Team1 = '00ff55', Team2 = 'ff8540', Team3 = 'ff50ee', Team4 = '00f5e5'} vnMaps = {"2654902","15339","120025","140850","157590","157687","158731","162374","360271","170157","237759","3008536","397093","184924","185492","174584","190909","180238","196520","196574","196688","202115","202719","19909","119814","120876","141355","3825570","5544185","1722099","732670","4341176","282169","142577","336442","4001757","5579518","1822724","1398686","5126550","3176454","1958837","3827122","1862978","308681","402936","1505086","1505513","1621412","1625048","181979","4717377","5224086","7031721","1627666","5226524","3514470","3335058","220239","270529","1658162","3847815","5058856","1492000","1787725","1387078","3799998","2007295","212279","5829856","5888348","5661997","4189235","5167694","6043771","2808422","3603805","5543255","5187779","6372858","5590592","4726846","1221806","1187548","1306775","3795907","4234534","5736061","2312370","1638943","3594130","1842545","4230149","466131","5400102","2972854","3644907","5264776","4641185","287754","3786946","2444219","5638527","5497240","5693893","495372","4008546","220943","1806676","5412420","2360602","1156882","215889","265771","1880802","2981609","301901","4212491","4119705","4684611","4428798","308211","5316041","3549627","485685","5641251","3561325","2992312","2424058","3685130","6356751","3936449","72395"} bcMaps = {"3471016","3456260","3988424","3690269","4627777","4763378","7370291","7110102","2294519","815336","7460000","3363331","1646448","3478040","3659983","2346943","2031184","3999992","4295473","332297","322026","275897","263730","7097819","4766009","501887","462004","408895","379254","374779","371206","371174","369468","365227","364135","356262","344010","508505","171482","182681","1301649","216173","447805","7147973","5517891","6892200","7196861","7290999","2887929","7000002","182769","176729","175280","172951","172621","170514","166430","166056","166032","164916","163531","158053","155480","155765","3500755","305567","444589","286254","1872179","169076","3999991","299983","556841","3750360","208653","169059","170007","268915","330841","3920916","258908","4000008","4895345","1383297","5444444","161023","3985463","2341982","5758150","167075","227093","496886","506032","3264848","1403454","2974387","976944","192158","1413528","3603631","215933","3343092","425884","179807","2860683","223947","208373","280949","2050389","332130","336305","157098","1737297","1134969","684566","208548","2420714","163596","197368","460961","192255","176710","163159","4632975","330933","2747525","190646","424604","492222","523270","438449","4237910","3527399","159298","162482","801683","159145","432501","608368","3337127","593530","191205","3820501","392240","1733211","500690","7000078","6833888","6784810","5198136","5138176","5112074","5056463","2819031","2676476","2241709","1657819","7504477","7013355","7000063","7116791","7066666","500748","449496","571683","510996","2574744","6137767","199710","232678","2794566","5706542","394125","4117513","295465","3984871","1018394","320483","7006068","159187","168204","435812","431873","266398","172501","186066","232675","2128560","422981","2693344","191642","171480","172520","410045","172547","376704","184648","1951944","3024606","1000006","528032","1595965","2311703","189819","187035","171776","185873","514311","314743","3734997","586901","169110","842019","157203","3200001","3668866","2858882","2692883","222910","2718406","3242049","2933390","403940","3000006","4488666","183139","2176211","4627777","4644584","315800","6041917","206396","319443","2466489","2208924","834297","2024960","560583","3199998","2738370","7062569","177652","191177","2040569","3043779","361500","4333895","3999979","184868","1580356","5522262","397467","506940","2574960","157960","184817","729863","331988","166805","284134","1802528","220352","186855","2967631","455271","497965","478236","1523082","3380788","5092739","392861","3734999","5522262","178297","1601992","261814","373105","263819","208940","564198","3659983","3338283","165186","4311255","257324","419369","596239","591528","182370","1531604","3560999","503679","172976","2130169","3089270","505619","168754","163172","166361","156720","155628","149422","155606","150664","149451","192519","912356","152260","299942","815336","292808","3907267","179488","511136","296020","1678634","3969628","655207","281948","166271","173816","394132","159932","1636814","4398794","185289","2427910","277631","2432090","375455","4595576","1225867","3848147","3860578","4660408","1526894","4313858","2925531","1705006","2996951","4594304","692650","3182006","1962695","6642996","6675248","6600067","3888888","2252731","4445580","3333223","2989803","2636519","2423300","1807217","1788490","1647131","1615949","1435902","1427980","1390405","1255359","7001001","7000066","4000010","2605186","658960","6621953","2998268","621850","1852910","3734984","3838020","6609034","4337732","6304911","3866660","3734998","3734996","3734989","3484437","3428069","2933011","4889180","2901717","2854813","2682583","2636207","2239788","2484316","1952415","1296299","720672","554154","305680","281985","249760","167333","3734999","692740","543010","541693","439092"} burlaMaps = {"7746792","7707142","7707176","7707190","7725804","7746793","7746791","7746781","7746777","7746776","7746771","7746770","7746769","7746767","7746723","7746738","7746720","7746718","7746713","7746710","7740958","7740949","7740942","7725822","7725816","7725811","7725812","7706705","7706711","7706710","7725240","7725250","7725274","7725353","7725356","7725367","7725382","7725393","7725402","7725410","7725471","7725477","7725363","7725369","7725370","7725372","7725376","7725380","7725397","7886258","7886259","7886264","7886266","7725462","7725468","7725484","7725792","7725798","7725801","7725808","7740931","7740949","7746720","7746724","7746725","7746740","7746747","7746750","7746759","7746773","7746774","7746792","7746794","7746795","7746799","7746798","7746797","7746796","7725466","7725457","7725411","7725413","7725386","7725408","7725354","7725267","7725257","7725252","7725247","7706953","7706952","7706949","7706951","7706723","7706933","7706781","7706723","7887837","7887840","7887829","7887830","7887834","7887836","7887839","7886269","7886272","7886283","7886280","7886274","7886275","7886278","7800772","7800773","7886251","7886253","7886255","7886257","7886260","7886262","7886263","7886265","7886268","7886270","7886271","7886273","7886276","7886277","7725407","7725458","7725469","7725485","7706715","7706719","7706731","7706732","7706734","7706780","7706782","7706838","7707126","7707127","7707129","7707141","7707148","7707151","7707156","7707162","7707166","7707179","7707185","7707187","7707188","7707193","7706714","7706727","7706730","7706736","7706759","7706762","7706770","7706199","7706796","7706893","7706914","7706916","7706918","7706928","7706930","7706940","7706943","7706947","7706961","7706963","7706964","7706966","7706972","7706975","7706976","7706978","7706981","7706982","7706983","7706985","7706989","7746760","7746715"} t1C = "Team1" t2C = "Team2" t3C = "Team3" t4C = "Team4" mod = "Racing" antiLevevn = false antiLeverc = false minimalist = false np = false map = 0 fourteams = false teams = {Team1 = {}, Team2 = {}, Team3 = {}, Team4 = {}} p = {T1 = 0, T2 = 0, T3 = 0, T4 = 0} first = false gameStarted = false t1N = "Team 1" t2N = "Team 2" t3N = "Team 3" t4N = "Team 4" mix_v = true mix_bc = false mix_rc = false vote = {} ban = {} ban1 = {} ban2 = {} ban3 = {} mapsAntivn = {"6135200","7008845","7121189","7121027","7121192","7762520"} mapsAntirc = {"6641062","6641147","6641130","6641108","6641063","6640755","6641141","6641097","6641144","6641111","6641110","6641087","6641075","6641132","6641101","6641090","6641077","6641069","6641067","6641064" ,"6641058","6640884","6640869","6640866","6640860","6640859","6640858","6640854","6640852","6640846","6640833","6640816","6640808","6640737","6641109","6641096"} --[[MACRO--]]macroON = true macro_time = 2000 macro_warn = 18 macro_freeze = 24 macro_keys = {[38] = "Up", [87] = "W", [90] = "Z"} macro_info = {} mice_info = {} concatenation = {} os_time = os.time function main() system.disableChatCommandDisplay(nil) for _,k in pairs({"AfkDeath", "DebugCommand", "AutoNewGame", "AutoShaman","AutoScore","AutoTimeLeft","PhysicalConsumables"}) do tfm.exec["disable"..k]() end tfm.exec.newGame(7774050) tfm.exec.setGameTime(99999) SetMapName() checkColor() ShowStartBoard() for _,admins in pairs(admin) do ui.addTextArea(99999, "Commands", admins, 5, -25, 0, 10, 0x1e3d42, 0x1e3d42) end for name in pairs(tfm.get.room.playerList) do eventNewPlayer(name) end end function toTeams() teams.Team1 = {} teams.Team2 = {} teams.Team3 = {} teams.Team4 = {} local equipo = 1 local playersTotal = {} for name, p in pairs(tfm.get.room.playerList) do table.insert(playersTotal, name) end for i = 1, #playersTotal do numJugador = math.random(#playersTotal) addPlayer = playersTotal[numJugador] table.remove(playersTotal, numJugador) if fourteams then if equipo == 1 then table.insert(teams.Team1, addPlayer) equipo = 2 elseif equipo == 2 then table.insert(teams.Team2, addPlayer) equipo = 3 elseif equipo == 3 then table.insert(teams.Team3, addPlayer) equipo = 4 elseif equipo == 4 then table.insert(teams.Team4, addPlayer) equipo = 1 end else if equipo == 1 then table.insert(teams.Team1, addPlayer) equipo = 2 elseif equipo == 2 then table.insert(teams.Team2, addPlayer) equipo = 1 end end end end function eventNewGame() for k in pairs(mice_info) do mice_info[k].adv = 0 end if gameStarted then if antiLevevn then antiLevevn = false elseif antiLeverc then antiLeverc = false elseif np then np = false end setTimeMode() SetMapName() for n,p in pairs(tfm.get.room.playerList) do if not PlayerInTeam(n) then tfm.exec.killPlayer(n) end end for _,k in pairs(ban) do table.clear(teams.Team1,k) table.clear(teams.Team2,k) table.clear(teams.Team3,k) table.clear(teams.Team4,k) end SetPlayerNameColor() first = false if mod == "RR" then tfm.exec.disableMinimalistMode(minamalist) tfm.exec.disableAfkDeath(false) elseif mod =="Racing" then tfm.exec.disableMinimalistMode(minimalist) tfm.exec.disableAfkDeath(false) elseif mod =="Bootcamp" then tfm.exec.disableMinimalistMode(minimalist) tfm.exec.disableAfkDeath(false) elseif mod =="Burlas" then tfm.exec.disableMinimalistMode(minimalist) tfm.exec.disableAfkDeath(false) elseif mod =="Mix" then tfm.exec.disableMinimalistMode(minimalist) tfm.exec.disableAfkDeath(false) elseif mod =="end" then tfm.exec.disableMinimalistMode(false) tfm.exec.disableAfkDeath(true) end end end function eventNewPlayer(plr, y) local info = {} for key in next, macro_keys do info[key] = {0, os_time() + macro_time, false, false} system.bindKeyboard(plr, key, true, true) end macro_info[plr] = info mice_info[plr] = {adv = 0} if gameStarted then if PlayerInTeam(plr) then tfm.exec.killPlayer(plr) return end if autoJoin then if fourteams then if #teams.Team1 < #teams.Team2 and #teams.Team1 < #teams.Team3 and #teams.Team1 < #teams.Team4 or #teams.Team1 == #teams.Team2 and #teams.Team1 == #teams.Team3 and #teams.Team1 == #teams.Team4 or #teams.Team2 > #teams.Team1 and #teams.Team2 > #teams.Team3 and #teams.Team2 > #teams.Team4 and #teams.Team1 == #teams.Team3 and #teams.Team1 == #teams.Team4 and #teams.Team3 == #teams.Team4 or #teams.Team2 > #teams.Team1 and #teams.Team2 > #teams.Team3 and #teams.Team3 > #teams.Team1 and #teams.Team2 > #teams.Team4 and #teams.Team1 == #teams.Team4 then table.insert(teams.Team1,plr) elseif #teams.Team2 < #teams.Team1 and #teams.Team2 < #teams.Team3 and #teams.Team2 < #teams.Team4 or #teams.Team3 > #teams.Team1 and #teams.Team3 > #teams.Team2 and #teams.Team4 > #teams.Team1 and #teams.Team4 > #teams.Team2 and #teams.Team1 == #teams.Team2 or #teams.Team1 > #teams.Team2 and #teams.Team1 > #teams.Team4 and #teams.Team3 > #teams.Team2 and #teams.Team3 > #teams.Team4 and #teams.Team2 == #teams.Team4 or #teams.Team1 > #teams.Team2 and #teams.Team1 > #teams.Team3 and #teams.Team1 > #teams.Team4 and #teams.Team2 == #teams.Team3 and #teams.Team2 == #teams.Team4 and #teams.Team3 == #teams.Team4 then table.insert(teams.Team2,plr) elseif #teams.Team3 < #teams.Team1 and #teams.Team3 < #teams.Team2 and #teams.Team3 < #teams.Team4 or #teams.Team4 > #teams.Team1 and #teams.Team4 > #teams.Team2 and #teams.Team4 > #teams.Team3 and #teams.Team1 == #teams.Team2 and #teams.Team1 == #teams.Team3 and #teams.Team2 == #teams.Team3 or #teams.Team1 > #teams.Team2 and #teams.Team1 > #teams.Team3 and #teams.Team4 > #teams.Team2 and #teams.Team4 > #teams.Team3 and #teams.Team2 == #teams.Team3 or #teams.Team2 > #teams.Team1 and #teams.Team2 > #teams.Team3 and #teams.Team4 > #teams.Team1 and #teams.Team4 > #teams.Team3 and #teams.Team1 == #teams.Team3 then table.insert(teams.Team3,plr) elseif #teams.Team4 < #teams.Team1 and #teams.Team4 < #teams.Team2 and #teams.Team4 < #teams.Team3 or #teams.Team1 == #teams.Team2 and #teams.Team1 == #teams.Team3 and #teams.Team1 == #teams.Team4 and #teams.Team2 == #teams.Team3 and #teams.Team2 == #teams.Team4 and #teams.Team3 == #teams.Team4 or #teams.Team3 > #teams.Team1 and #teams.Team3 > #teams.Team2 and #teams.Team3 > #teams.Team4 and #teams.Team1 == #teams.Team2 and #teams.Team1 == #teams.Team4 and #teams.Team2 == #teams.Team4 or #teams.Team1 > #teams.Team3 and #teams.Team1 > #teams.Team4 and #teams.Team2 > #teams.Team3 and #teams.Team2 > #teams.Team4 and #teams.Team3 == #teams.Team4 then table.insert(teams.Team4,plr) else table.insert(teams.Team4,plr) end else if #teams.Team1 == #teams.Team2 then table.insert(teams.Team1,plr) elseif #teams.Team1 > #teams.Team2 then table.insert(teams.Team2,plr) end end end else tfm.exec.respawnPlayer(plr) end for _,k in pairs(ban) do ui.addTextArea(666, "

\nBAN", k, 0, 0, 800, 400, 0x000001, 0x000001, 1, true) end end function eventPlayerDied(plr) if gameStarted then local plrCount = 0 for n,p in pairs(tfm.get.room.playerList) do if not p.isDead then plrCount = plrCount + 1 end end if plrCount <= 0 then newMap() end end end function eventPlayerWon(plr, TT, wonTime) local tiemend = 18 if gameStarted then if PlayerInTeam(plr) then if not first then if table.contain(teams.Team1,plr) then first = true p.T1 = p.T1 + 1 tfm.exec.setPlayerScore(plr, 1,true) tfm.exec.setGameTime(5) SetMapName() if tonumber(p.T1) >= tonumber(win) then tfm.exec.newGame(7773973) for i,n in pairs(teams.Team2) do tfm.exec.killPlayer(n) end for i,b in pairs(teams.Team3) do tfm.exec.killPlayer(b) end for i,m in pairs(teams.Team4) do tfm.exec.killPlayer(m) end ui.addTextArea(16, "

"..t1N.." won the game!", nil, 0, 140, 800, 60, 0x000000, 0x5eff6e, 0, true) ui.addTextArea(17, "

"..plr.." made the last point!", nil, 0, 190, 800, 60, 0xffffff, 0x5eff6e, 0, true) mod = "end" end end if table.contain(teams.Team2,plr) then first = true p.T2 = p.T2 + 1 tfm.exec.setPlayerScore(plr, 1,true) tfm.exec.setGameTime(5) SetMapName() if tonumber(p.T2) >= tonumber(win) then tfm.exec.newGame(7774030) for i,v in pairs(teams.Team1) do tfm.exec.killPlayer(v) end for i,b in pairs(teams.Team3) do tfm.exec.killPlayer(b) end for i,m in pairs(teams.Team4) do tfm.exec.killPlayer(m) end ui.addTextArea(16, "

"..t2N.." won the game!", nil, 0, 140, 800, 60, 0x000000, 0x5eff6e, 0, true) ui.addTextArea(17, "

"..plr.." made the last point!", nil, 0, 190, 800, 60, 0xffffff, 0x5eff6e, 0, true) mod = "end" end end if table.contain(teams.Team3,plr) then first = true p.T3 = p.T3 + 1 tfm.exec.setPlayerScore(plr, 1,true) tfm.exec.setGameTime(5) SetMapName() if tonumber(p.T3) >= tonumber(win) then tfm.exec.newGame(7774987) for i,v in pairs(teams.Team1) do tfm.exec.killPlayer(v) end for i,n in pairs(teams.Team2) do tfm.exec.killPlayer(n) end for i,m in pairs(teams.Team4) do tfm.exec.killPlayer(m) end ui.addTextArea(16, "

"..t3N.." won the game!", nil, 0, 140, 800, 60, 0x000000, 0x5eff6e, 0, true) ui.addTextArea(17, "

"..plr.." made the last point!", nil, 0, 190, 800, 60, 0xffffff, 0x5eff6e, 0, true) mod = "end" end end if table.contain(teams.Team4,plr) then first = true p.T4 = p.T4 + 1 tfm.exec.setPlayerScore(plr, 1,true) tfm.exec.setGameTime(5) SetMapName() if tonumber(p.T4) >= tonumber(win) then tfm.exec.newGame(7774988) for i,v in pairs(teams.Team1) do tfm.exec.killPlayer(v) end for i,n in pairs(teams.Team2) do tfm.exec.killPlayer(n) end for i,b in pairs(teams.Team3) do tfm.exec.killPlayer(b) end ui.addTextArea(16, "

"..t4N.." won the game!", nil, 0, 140, 800, 60, 0x000000, 0x5eff6e, 0, true) ui.addTextArea(17, "

"..plr.." made the last point!", nil, 0, 190, 800, 60, 0xffffff, 0x5eff6e, 0, true) mod = "end" end end end end end end if_admin = function (name) for p = 1, #admin do if name == admin[p] then return true end end return false end function eventTextAreaCallback(id, player, callback) if if_admin(player) then if id == 8 then if callback == "vn" then mod = "RR" ShowStartBoard() end elseif id == 9 then if callback == "rc" then mod = "Racing" ShowStartBoard() end elseif id == 18 then if callback == "bc" then mod = "Bootcamp" ShowStartBoard() end elseif id == 20 then if callback == "brc" then mod = "Burlas" ShowStartBoard() end elseif id == 21 then if callback == "mix" then mod = "MIX" ShowStartBoard() end elseif id == 10 then if callback == "start" then if #teams.Team1 > 0 or #teams.Team2 > 0 or #teams.Team3 > 0 or #teams.Team3 > 0 then math.randomseed(os.time()) for i=0, 33,1 do ui.removeTextArea(i) end gameStarted = true p.T1 = 0 p.T2 = 0 p.T3 = 0 p.T4 = 0 resetScore() newMap() else print("[ERROR]: You can't start the game, all the teams are empty!") end end elseif id == 11 then if callback == "dec" then if tonumber(win) > 1 then win = win - 1 ShowStartBoard() end elseif callback == "inc" then if tonumber(win) < 999 then win = win + 1 ShowStartBoard() end end elseif id == 12 then if callback == "OnAndOff" then autoJoin = not autoJoin ShowStartBoard() end elseif id == 15 then if callback == "Fill" then toTeams() ShowStartBoard() end elseif id == 19 then if callback == "nteams" then fourteams = not fourteams ShowStartBoard() end elseif id == 1002 then ui.removeTextArea(1001, player) ui.removeTextArea(1002, player) elseif id == 675 then for i=667,675 do ui.removeTextArea(i, player) end elseif id == 99999 then ui.addTextArea(1001, "

Commands:

\n\n!team1/2/3/4 [name] [name] or !t1/2/3/4 [name] [name] - assign players to team.\n!add team1/2/3/4 [name] [name] or !a t1/2/3/4 [name] [name] - add players to team.\n!remove [name] [name] or !r [name] [name] - remove players from a team.\n!sp team1/2/3/4 [p] or !sp t1/2/3/4 [p] - change points from a team.\n!name t1/2/3/4 or !n t1/2/3/4 - set a name to team selected.\n!aj on or !aj off - status of autojoin.\n!minimalist on or !minamlist off - status of minimalist mode\n!skip or !s - change map.\n!antirc or !antivn - the next map will be antileve rc = racing or vn = vanilla.\n!repeat or !rt - repeat the current map.\n!np [map] - only put the number of map, no @. Example: !np 0\n!macro on/off - active/deactivate AntiMacro\n!ban [name] [reason] - ban player selected (show black box to player).\n!unban [name] - unban player selected.\n!banlist - show a list of players banned.\n!admin [name] - add player to admins list.\n!noadmin [name] - remove admin.\n!vote on/result/end - start vote, show result and end.\n!finish script\n\n", player, 125, 50, 550, 300, 0x324650, 0x212F36, 1, true) ui.addTextArea(1002, "

CLOSE

", player, 350, 345, 95, 18, 0x324650, 0x212F36, 1, true) end end if id == 35 then if callback == "mrc" then vote.racing = vote.racing + 1 ui.removeTextArea(35, player) elseif callback == "mbr" then vote.burlas = vote.burlas + 1 ui.removeTextArea(35, player) elseif callback == "mbc" then vote.bootcamp = vote.bootcamp + 1 ui.removeTextArea(35, player) elseif callback == "mvn" then vote.vanilla = vote.vanilla + 1 ui.removeTextArea(35, player) elseif callback == "mmix" then vote.mix = vote.mix + 1 ui.removeTextArea(35, player) end end end function eventChatCommand(name, command) if if_admin(name) then local arg={} for argument in command:gmatch("[^%s]+") do table.insert(arg,argument) end if arg[1] == "team1" and arg[2] ~= nil or arg[1] == "t1" and arg[2] ~= nil then teams.Team1 = {} for i,v in pairs(arg) do if i > 1 then if PlayerCheck(v) then if TeamFix(v) == "team2" or TeamFix(v) == "team3" or TeamFix(v) == "team4" then table.clear(teams.Team2,v) table.clear(teams.Team3,v) table.clear(teams.Team4,v) table.insert(teams.Team1,v) if not gameStarted then ShowStartBoard() end else table.insert(teams.Team1,v) if not gameStarted then ShowStartBoard() end end end end end elseif arg[1] == "team2" and arg[2] ~= nil or arg[1] == "t2" and arg[2] ~= nil then teams.Team2 = {} for i,v in pairs(arg) do if i > 1 then if PlayerCheck(v) then if TeamFix(v) == "team1" or TeamFix(v) == "team3" or TeamFix(v) == "team4" then table.clear(teams.Team1,v) table.clear(teams.Team3,v) table.clear(teams.Team4,v) table.insert(teams.Team2,v) if not gameStarted then ShowStartBoard() end else table.insert(teams.Team2,v) if not gameStarted then ShowStartBoard() end end end end end elseif arg[1] == "team3" and arg[2] ~= nil and fourteams or arg[1] == "t3" and arg[2] ~= nil and fourteams then teams.Team3 = {} for i,v in pairs(arg) do if i > 1 then if PlayerCheck(v) then if TeamFix(v) == "team1" or TeamFix(v) == "team2" or TeamFix(v) == "team3" then table.clear(teams.Team1,v) table.clear(teams.Team2,v) table.clear(teams.Team4,v) table.insert(teams.Team3,v) if not gameStarted then ShowStartBoard() end else table.insert(teams.Team3,v) if not gameStarted then ShowStartBoard() end end end end end elseif arg[1] == "team4" and arg[2] ~= nil and fourteams or arg[1] == "t4" and arg[2] ~= nil and fourteams then teams.Team4 = {} for i,v in pairs(arg) do if i > 1 then if PlayerCheck(v) then if TeamFix(v) == "team1" or TeamFix(v) == "team2" or TeamFix(v) == "team3" then table.clear(teams.Team1,v) table.clear(teams.Team2,v) table.clear(teams.Team3,v) table.insert(teams.Team4,v) if not gameStarted then ShowStartBoard() end else table.insert(teams.Team4,v) if not gameStarted then ShowStartBoard() end end end end end elseif arg[1] == "add" and arg[2] == "team1" and arg[3] ~= nil or arg[1] == "a" and arg[2] == "t1" and arg[3] ~= nil then for i,v in pairs(arg) do if i > 1 then if PlayerCheck(v) then if TeamFix(v) == "team2" or TeamFix(v) == "team3" or TeamFix(v) == "team4" then table.clear(teams.Team2,v) table.clear(teams.Team3,v) table.clear(teams.Team4,v) table.insert(teams.Team1,v) if not gameStarted then ShowStartBoard() end else table.insert(teams.Team1,v) if not gameStarted then ShowStartBoard() end end end end end elseif arg[1] == "add" and arg[2] == "team2" and arg[3] ~= nil or arg[1] == "a" and arg[2] == "t2" and arg[3] ~= nil then for i,v in pairs(arg) do if i > 1 then if PlayerCheck(v) then if TeamFix(v) == "team1" or TeamFix(v) == "team3" or TeamFix(v) == "team4" then table.clear(teams.Team1,v) table.clear(teams.Team3,v) table.clear(teams.Team4,v) table.insert(teams.Team2,v) if not gameStarted then ShowStartBoard() end else table.insert(teams.Team2,v) if not gameStarted then ShowStartBoard() end end end end end elseif arg[1] == "add" and arg[2] == "team3" and arg[3] ~= nil and fourteams or arg[1] == "a" and arg[2] == "t3" and arg[3] ~= nil and fourteams then for i,v in pairs(arg) do if i > 1 then if PlayerCheck(v) then if TeamFix(v) == "team1" or TeamFix(v) == "team2" or TeamFix(v) == "team4" then table.clear(teams.Team1,v) table.clear(teams.Team2,v) table.clear(teams.Team4,v) table.insert(teams.Team3,v) if not gameStarted then ShowStartBoard() end else table.insert(teams.Team3,v) if not gameStarted then ShowStartBoard() end end end end end elseif arg[1] == "add" and arg[2] == "team4" and arg[3] ~= nil and fourteams or arg[1] == "a" and arg[2] == "t4" and arg[3] ~= nil and fourteams then for i,v in pairs(arg) do if i > 1 then if PlayerCheck(v) then if TeamFix(v) == "team1" or TeamFix(v) == "team2" or TeamFix(v) == "team3" then table.clear(teams.Team1,v) table.clear(teams.Team2,v) table.clear(teams.Team3,v) table.insert(teams.Team4,v) if not gameStarted then ShowStartBoard() end else table.insert(teams.Team4,v) if not gameStarted then ShowStartBoard() end end end end end elseif arg[1] == "remove" and arg[2] ~= nil or arg[1] == "r" and arg[2] ~= nil then if TeamFix(arg[2]) == "team1" or TeamFix(arg[2]) == "team2" or TeamFix(arg[2]) == "team3" or TeamFix(arg[2]) == "team4"then if not gameStarted then table.clear(teams.Team1,arg[2]) table.clear(teams.Team2,arg[2]) table.clear(teams.Team3,arg[2]) table.clear(teams.Team4,arg[2]) ShowStartBoard() else table.clear(teams.Team1,arg[2]) table.clear(teams.Team2,arg[2]) table.clear(teams.Team3,arg[2]) table.clear(teams.Team4,arg[2]) end end elseif arg[1] == "aj" and arg[2] == "on" and arg[3] == nil then autoJoin = true if not gameStarted then ShowStartBoard() end elseif arg[1] == "aj" and arg[2] == "off" and arg[3] == nil then autoJoin = false if not gameStarted then ShowStartBoard() end elseif arg[1] == "finish" and arg[2] == "script" then system.exit() elseif arg[1] == "reset" and arg[2] == nil then if gameStarted then gameStarted = false tfm.exec.newGame(7774050) ShowStartBoard() SetMapName() end elseif arg[1] == "d" and tonumber(arg[2]) ~= nil then if tonumber(arg[2]) > 0 and tonumber(arg[2]) <= 999 then win = arg[2] if gameStarted == false then ShowStartBoard() else SetMapName() end end elseif arg[1] == "name" or arg[1] == "n" then local t = command:find('%s') local nteam = command:sub(t+3) if arg[2] == "t1" and arg[3] ~= nil then t1N = ""..nteam.."" elseif arg[2] == "t2" and arg[3] ~= nil then t2N = ""..nteam.."" elseif arg[2] == "t3" and arg[3] ~= nil then t3N = ""..nteam.."" elseif arg[2] == "t4" and arg[3] ~= nil then t4N = ""..nteam.."" end if gameStarted == false then ShowStartBoard() else SetMapName() end elseif arg[1] == "skip" or arg[1] == "s" then newMap() elseif arg[1] == "repeat" or arg[1] == "rt" then tfm.exec.newGame(tfm.get.room.xmlMapInfo.mapCode) elseif arg[1] == "antivn" then print("• Next map: antileve vanilla.") antiLevevn = true elseif arg[1] == "antirc" then print("• Next map: antileve racing.") antiLeverc = true elseif arg[1] == "np" and arg[2] ~= nil then if tonumber(arg[2]) then np = true map = arg[2] end elseif arg[1] == "minimalist" then if arg[2] == "on" then print("Minimalist mode activated.") minimalist = false elseif arg[2] == "off" then print("Minimalist mode disabled.") minimalist = true end elseif arg[1] == "sp" then if arg[2] == "team1" or arg[2] == "t1" then if tonumber(arg[3]) ~= nil then if tonumber(arg[3]) < tonumber(win) and tonumber(arg[3]) > 0 then p.T1 = tonumber(arg[3]) SetMapName() end end elseif arg[2] == "team2" or arg[2] == "t2" then if tonumber(arg[3]) ~= nil then if tonumber(arg[3]) < tonumber(win) and tonumber(arg[3]) > 0 then p.T2 = tonumber(arg[3]) SetMapName() end end end elseif arg[1] == "vote" then if arg[2] == "on" then ShowVot() ui.removeTextArea(36) elseif arg[2] == "result" then ui.removeTextArea(35) ui.addTextArea(36, "

Vote

\nNext mode\n\nRacing: "..vote.racing.."\nBurlas: "..vote.burlas.."\nBootcamp: "..vote.bootcamp.."\nRR: "..vote.vanilla.."\nMix: "..vote.mix.."", nil, 300, 100, 200, 200, 0x000001, 0xffffff, 1, true) elseif arg[2] == "end" then ui.removeTextArea(36) end elseif arg[1] == "admin" and arg[2] ~= nil then table.insert(admin,arg[2]) print(" • "..name.." is now admin thanks to "..arg[2]) ui.addTextArea(99999, "
Commands", arg[2], 5, -25, 0, 10, 0x1e3d42, 0x1e3d42) elseif arg[1] == "noadmin" and arg[2] ~= nil then if arg[2]==roomloader then print(""..name.." tried remove you from admins.") else table.clear(admin,arg[2]) print(" • "..name.." remove admin to "..arg[2]) ui.removeTextArea(99999, arg[2]) end elseif arg[1] == "ban" and arg[2] ~= nil then if table.contain(ban,arg[2]) then print("• The player "..arg[2].." is already banned.") elseif table.contain(admin,arg[2]) then print("• You can't ban an admin.", name) else if #ban1 < 24 then table.insert(ban1,arg[2]) elseif #ban1 > 23 and #ban2 < 48 then table.insert(ban2,arg[2]) elseif #ban2 > 47 then table.insert(ban3,arg[2]) end local t = command:find('%s') local reason = command:sub(t+1) tfm.exec.killPlayer(arg[2]) table.insert(ban,arg[2]) table.clear(teams.Team1,arg[2]) table.clear(teams.Team2,arg[2]) table.clear(teams.Team3,arg[2]) table.clear(teams.Team4,arg[2]) ui.addTextArea(666, "

\nBAN\n"..reason, arg[2], 0, 0, 800, 400, 0x000001, 0x000001, 1, true) print(" • "..name.." has banned -"..reason) end elseif arg[1] == "unban" and arg[2] ~= nil then ui.removeTextArea(666,arg[2]) table.clear(ban1,arg[2]) table.clear(ban2,arg[2]) table.clear(ban3,arg[2]) table.clear(ban,arg[2]) print(" • "..name.." has unban "..arg[2]) if gameStarted and autoJoin then if fourteams then if #teams.Team1 < #teams.Team2 and #teams.Team1 < #teams.Team3 and #teams.Team1 < #teams.Team4 or #teams.Team1 == #teams.Team2 and #teams.Team1 == #teams.Team3 and #teams.Team1 == #teams.Team4 or #teams.Team2 > #teams.Team1 and #teams.Team2 > #teams.Team3 and #teams.Team2 > #teams.Team4 and #teams.Team1 == #teams.Team3 and #teams.Team1 == #teams.Team4 and #teams.Team3 == #teams.Team4 or #teams.Team2 > #teams.Team1 and #teams.Team2 > #teams.Team3 and #teams.Team3 > #teams.Team1 and #teams.Team2 > #teams.Team4 and #teams.Team1 == #teams.Team4 then table.insert(teams.Team1,arg[2]) elseif #teams.Team2 < #teams.Team1 and #teams.Team2 < #teams.Team3 and #teams.Team2 < #teams.Team4 or #teams.Team3 > #teams.Team1 and #teams.Team3 > #teams.Team2 and #teams.Team4 > #teams.Team1 and #teams.Team4 > #teams.Team2 and #teams.Team1 == #teams.Team2 or #teams.Team1 > #teams.Team2 and #teams.Team1 > #teams.Team4 and #teams.Team3 > #teams.Team2 and #teams.Team3 > #teams.Team4 and #teams.Team2 == #teams.Team4 or #teams.Team1 > #teams.Team2 and #teams.Team1 > #teams.Team3 and #teams.Team1 > #teams.Team4 and #teams.Team2 == #teams.Team3 and #teams.Team2 == #teams.Team4 and #teams.Team3 == #teams.Team4 then table.insert(teams.Team2,arg[2]) elseif #teams.Team3 < #teams.Team1 and #teams.Team3 < #teams.Team2 and #teams.Team3 < #teams.Team4 or #teams.Team4 > #teams.Team1 and #teams.Team4 > #teams.Team2 and #teams.Team4 > #teams.Team3 and #teams.Team1 == #teams.Team2 and #teams.Team1 == #teams.Team3 and #teams.Team2 == #teams.Team3 or #teams.Team1 > #teams.Team2 and #teams.Team1 > #teams.Team3 and #teams.Team4 > #teams.Team2 and #teams.Team4 > #teams.Team3 and #teams.Team2 == #teams.Team3 or #teams.Team2 > #teams.Team1 and #teams.Team2 > #teams.Team3 and #teams.Team4 > #teams.Team1 and #teams.Team4 > #teams.Team3 and #teams.Team1 == #teams.Team3 then table.insert(teams.Team3,arg[2]) elseif #teams.Team4 < #teams.Team1 and #teams.Team4 < #teams.Team2 and #teams.Team4 < #teams.Team3 or #teams.Team1 == #teams.Team2 and #teams.Team1 == #teams.Team3 and #teams.Team1 == #teams.Team4 and #teams.Team2 == #teams.Team3 and #teams.Team2 == #teams.Team4 and #teams.Team3 == #teams.Team4 or #teams.Team3 > #teams.Team1 and #teams.Team3 > #teams.Team2 and #teams.Team3 > #teams.Team4 and #teams.Team1 == #teams.Team2 and #teams.Team1 == #teams.Team4 and #teams.Team2 == #teams.Team4 or #teams.Team1 > #teams.Team3 and #teams.Team1 > #teams.Team4 and #teams.Team2 > #teams.Team3 and #teams.Team2 > #teams.Team4 and #teams.Team3 == #teams.Team4 then table.insert(teams.Team4,arg[2]) else table.insert(teams.Team4,arg[2]) end else if #teams.Team1 == #teams.Team2 then table.insert(teams.Team1,arg[2]) elseif #teams.Team1 > #teams.Team2 then table.insert(teams.Team2,arg[2]) end end end elseif arg[1] == "banlist" then ui.addTextArea(667, "

Banned players", name, 100, 35, 600, 350, 0x1e3d42, 0x8d5b3e, 1, true) ui.addTextArea(668, (table.concat(ban1,"\n") or ""), name, 100, 65, 190, 320, 0x000000, 0x000000, 0, true) ui.addTextArea(669, (table.concat(ban2,"\n") or ""), name, 300, 65, 190, 320, 0x000000, 0x000000, 0, true) ui.addTextArea(670, (table.concat(ban3,"\n") or ""), name, 500, 65, 190, 320, 0x000000, 0x000000, 0, true) ui.addTextArea(675, "X", name, 708, 35, 20, 30, 0x1e3d42, 0x8d5b3e, 1, true) elseif arg[1] == "help" or arg[1] == "commands" or arg[1] == "cmds" or arg[1] == "cmd" then ui.addTextArea(1001, "

Commands:

\n\n!team1/2/3/4 [name] [name] or !t1/2/3/4 [name] [name] - assign players to team.\n!add team1/2/3/4 [name] [name] or !a t1/2/3/4 [name] [name] - add players to team.\n!remove [name] [name] or !r [name] [name] - remove players from a team.\n!sp team1/2/3/4 [p] or !sp t1/2/3/4 [p] - change points from a team.\n!name t1/2/3/4 or !n t1/2/3/4 - set a name to team selected.\n!aj on or !aj off - status of autojoin.\n!minimalist on or !minamlist off - status of minimalist mode\n!skip or !s - change map.\n!antirc or !antivn - the next map will be antileve rc = racing or vn = vanilla.\n!repeat or !rt - repeat the current map.\n!np [map] - only put the number of map, no @. Example: !np 0\n!macro on/off - active/deactivate AntiMacro\n!ban [name] [reason] - ban player selected (show black box to player).\n!unban [name] - unban player selected.\n!banlist - show a list of players banned.\n!admin [name] - add player to admins list.\n!noadmin [name] - remove admin.\n!vote on/result/end - start vote, show result and end.\n!finish script\n\n", name, 125, 50, 550, 300, 0x324650, 0x212F36, 1, true) ui.addTextArea(1002, "

CLOSE

", name, 350, 345, 95, 18, 0x324650, 0x212F36, 1, true) elseif arg[1] == "macro" then if arg[2] == "on" then macroON = true print("[AntiMacro] activated.") elseif arg[2] == "off" then macroON = false print("[AntiMacro] desactivated.") end end end end eventKeyboard = function(player, key) if macroON then if not macro_keys[key] then return end -- By tocutoeltocu local info = macro_info[player][key] local now = os_time() info[1] = info[1] + 1 if now >= info[2] then if info[4] and mice_info[player].adv==0 then local count = 3 concatenation[1] = "[AntiMacro] " concatenation[2] = player concatenation[3] = " frozen." local data for _key, name in next, macro_keys do data = macro_info[player][_key] count = count + 4 concatenation[count - 3] = " " concatenation[count - 2] = name concatenation[count - 1] = ": " if now >= data[2] and info ~= data then concatenation[count] = "0" else concatenation[count] = data[1] end end local msg = table.concat(concatenation, "", 1, count) print(msg) tfm.exec.freezePlayer(player) end info[1] = 1 info[2] = now + macro_time info[3] = false info[4] = false return elseif not info[3] and info[1] >= macro_warn and mice_info[player].adv==0 then info[3] = true local count = 3 concatenation[1] = "[AntiMacro] " concatenation[2] = player concatenation[3] = " may be using macros." local data for _key, name in next, macro_keys do data = macro_info[player][_key] count = count + 4 concatenation[count - 3] = " " concatenation[count - 2] = name concatenation[count - 1] = ": " if now >= data[2] then concatenation[count] = "0" else concatenation[count] = data[1] end end local msg = table.concat(concatenation, "", 1, count) print(msg) elseif not info[4] and info[1] >= macro_freeze then info[4] = true end end end function eventLoop(elapsedTime, remainingTime) if remainingTime <= 500 and gameStarted then newMap() end end function newMap() local vanilla = vnMaps[math.random(#vnMaps)] local bootcamp = bcMaps[math.random(#bcMaps)] local antivn = mapsAntivn[math.random(#mapsAntivn)] local antirc = mapsAntirc[math.random(#mapsAntirc)] local burlas = burlaMaps[math.random(#burlaMaps)] if antiLevevn then tfm.exec.newGame(antivn) elseif antiLeverc then tfm.exec.newGame(antirc) elseif np then tfm.exec.newGame(map) elseif mod == "RR" then tfm.exec.disableMinimalistMode(minimalist) tfm.exec.newGame(vanilla) elseif mod == "Racing" then tfm.exec.disableMinimalistMode(minimalist) tfm.exec.newGame'#17' elseif mod == "Bootcamp" then tfm.exec.disableMinimalistMode(minimalist) tfm.exec.newGame(bootcamp) elseif mod == "Burlas" then tfm.exec.disableMinimalistMode(minimalist) tfm.exec.newGame(burlas) elseif mod == "MIX" then tfm.exec.disableMinimalistMode(minimalist) if mix_v then tfm.exec.newGame(vanilla) mix_v = false mix_bc = true elseif mix_bc then tfm.exec.newGame(bootcamp) mix_bc = false mix_rc = true elseif mix_rc then tfm.exec.newGame'#17' mix_rc = false mix_v = true end elseif mod == "end" then tfm.exec.newGame(7774050) tfm.exec.setGameTime(99999) ui.removeTextArea(16) ui.removeTextArea(17) tfm.exec.setUIMapName("vs") gameStarted = false mod = "Racing" ShowStartBoard() end end function SetPlayerNameColor() checkColor() for i,v in pairs(teams.Team1) do tfm.exec.setNameColor(v, "0x"..t1C) end for i,n in pairs(teams.Team2) do tfm.exec.setNameColor(n, "0x"..t2C) end for i,b in pairs(teams.Team3) do tfm.exec.setNameColor(b, "0x"..t3C) end for i,m in pairs(teams.Team4) do tfm.exec.setNameColor(m, "0x"..t4C) end end function setTimeMode() if mod == "RR" then tfm.exec.setGameTime(110) elseif mod == "Racing" then tfm.exec.setGameTime(63) elseif mod == "Bootcamp" then tfm.exec.setGameTime(110) elseif mod == "Burlas" then tfm.exec.setGameTime(93) elseif mod == "MIX" then tfm.exec.setGameTime(110) elseif mod == "end" then tfm.exec.setGameTime(13) elseif mod == nil then mod = "Racing" tfm.exec.setGameTime(63) end end function SetMapName() local npN4 = " "..t1N..": "..p.T1.." | "..t2N..": "..p.T2.." | "..t3N..": "..p.T3.." | "..t4N..": "..p.T4.." | D: "..win.."" local npN2 = " " ..t1N ..": ".. p.T1 .." | " ..t2N ..": "..p.T2.." | D: " ..win.."" if gameStarted then if fourteams then tfm.exec.setUIMapName(npN4) else tfm.exec.setUIMapName(npN2) end else tfm.exec.setUIMapName("vs") end end function FillTeams() local t = 1 teams.Team1 = {} teams.Team2 = {} teams.Team3 = {} teams.Team4 = {} for n,p in pairs(tfm.get.room.playerList) do if fourteams then if t == 1 then table.insert(teams.Team1,n) t = 2 elseif t == 2 then table.insert(teams.Team2,n) t = 3 elseif t == 3 then table.insert(teams.Team3,n) t = 4 elseif t == 4 then table.insert(teams.Team4,n) t = 1 end else if t == 1 then table.insert(teams.Team1,n) t = 2 elseif t == 2 then table.insert(teams.Team2,n) t = 1 end end end end function checkColor() local c = false for key,v in pairs(teamColors) do if key == t1C then t1C = v c = true elseif key == t2C then t2C = v c = true elseif key == t3C then t3C = v c = true elseif key == t4C then t4C = v c = true elseif t1C == v then c = true elseif t2C == v then c = true elseif t3C == v then c = true elseif t4C == v then c = true end end end function table.clear(t,obj) for i,v in ipairs(t) do if v==obj then table.remove(t,i) end end end function table.contain(t,obj) for i,v in pairs(t) do if v==obj then return true end end return false end function resetScore() for n,p in pairs(tfm.get.room.playerList) do tfm.exec.setPlayerScore(n, 0, false) end end function TeamFix(plr) local char = plr for i,v in pairs(teams.Team1) do if v == char then return "team1" end end for i,n in pairs(teams.Team2) do if n == char then return "team2" end end for i,b in pairs(teams.Team3) do if b == char then return "team3" end end for i,m in pairs(teams.Team4) do if m == char then return "team4" end end return false end function PlayerCheck(plr) local playerToSerch = plr for n,p in pairs(tfm.get.room.playerList) do if n == plr then return true end end return false end function PlayerInTeam(plr) local player = plr for i,v in pairs(teams.Team1) do if v == player then return true end end for i,n in pairs(teams.Team2) do if n == player then return true end end if fourteams then for i,b in pairs(teams.Team3) do if b == player then return true end end for i,m in pairs(teams.Team4) do if m == player then return true end end end return false end function ShowVot() vote = {racing = 0, burlas = 0, bootcamp = 0, vanilla = 0, mix = 0} ui.addTextArea(35, "

Vote

\nSelect a mode\n\n
Racing\nBootcamp(SC)\nBootcamp\nRR\nMix", nil, 300, 100, 200, 200, 0x000001, 0xffffff, 1, true) end function ShowStartBoard() ui.addTextArea(0, "

Admin: "..admin[1], nil, 263, 365, 265, 20, 0x000001, 0x000000, 0.8, true) ui.addTextArea(1, "", nil, 209, 33, 381, 326, 0x000001, 0x000000, 1, true) ui.addTextArea(2, "

"..(table.concat(teams.Team1,"\n") or ""), nil, 210, 66, 151, 254, 0x000001, 0x00ff55, 1, true) ui.addTextArea(3, "

"..(table.concat(teams.Team2,"\n") or ""), nil, 439, 66, 151, 254, 0x000001, 0xff8540, 1, true) if fourteams then ui.removeTextArea(2) ui.removeTextArea(3) ui.addTextArea(22, "

"..(table.concat(teams.Team1,"\n") or ""), nil, 210, 66, 151, 120, 0x000001, 0x00ff55, 1, true) ui.addTextArea(33, "

"..(table.concat(teams.Team2,"\n") or ""), nil, 439, 66, 151, 120, 0x000001, 0xff8540, 1, true) ui.addTextArea(24, "

"..(table.concat(teams.Team3,"\n") or ""), nil, 210, 215, 151, 120, 0x000001, 0xff50ee, 1, true) ui.addTextArea(25, "

"..(table.concat(teams.Team4,"\n") or ""), nil, 439, 215, 151, 120, 0x000001, 0x00f5e5, 1, true) ui.addTextArea(26, "

"..t3N.."

/font>", nil, 220, 190, 125, 15, 0x000001, 0x000000, 0, true) ui.addTextArea(27, "

"..t4N.."

/font>", nil, 450, 190, 125, 15, 0x000001, 0x000000, 0, true) end ui.addTextArea(4, "

" ..(mod or "Racing"), nil, 354, 60, 90, 19, 0x000001, 0x000000, 1, true) ui.addTextArea(5, "

\\ 4million /", nil, 209, 33, 381, 21, 0x000001, 0x000000, 1, true) ui.addTextArea(6, "

"..t1N.."

/font>", nil, 220, 40, 125, 15, 0x000001, 0x000000, 0, true) ui.addTextArea(7, "

"..t2N.."

/font>", nil, 450, 40, 125, 15, 0x000001, 0x000000, 0, true) ui.addTextArea(8, "

RR", nil, 365, 186, 69, 20, 0x000001, 0xffffff, 1, true) ui.addTextArea(9, "

Racing", nil, 365, 105, 69, 20, 0x000001, 0xffffff, 1, true) ui.addTextArea(18, "

Bootcamp", nil, 365, 159, 69, 20, 0x000001, 0xffffff, 1, true) ui.addTextArea(20, "

Bc(SC)", nil, 365, 132, 69, 20, 0x000001, 0xffffff, 1, true) ui.addTextArea(21, "

MIX", nil, 365, 213, 69, 20, 0x000001, 0xffffff, 1, true) ui.addTextArea(10, "

Start", nil, 359, 255, 82, 23, 0x000001, 0xFCFF5A, 1, true) ui.addTextArea(11, "

Score: - "..win.." +", nil, 460, 345, 95, 20, 0x000001, 0x000000, 0, true) ui.addTextArea(12, "

Auto Join: "..(autoJoin and "on" or not autoJoin and "off") .."", nil, 245, 345, 87, 20, 0x000001, 0x000000, 0, true) ui.addTextArea(15, "

Fill", nil, 375, 320, 47, 20, 0x000001, 0x000000, 0, true) ui.addTextArea(19, "

Teams: "..(not fourteams and "2 (or 4)" or fourteams and "4 (or 2)") .."", nil, 345, 345, 100, 20, 0x000001, 0x000000, 0, true) end main() function eventNewPlayer(name) tfm.exec.respawnPlayer(name) end function eventPlayerDied(name) tfm.exec.respawnPlayer(name) end for i,player in pairs(tfm.get.room.playerList) do eventNewPlayer(i) end