Advertisement
Rawoas13

Transformice 2 teams lua

Mar 21st, 2020
1,000
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 27.05 KB | None | 0 0
  1. --[[
  2.   1. !team1 "playername" "playername" \\Assign players to team1 , ex: !team1 Villaaam#0000
  3.     2. !team2 "playername "playername"  \\Assign players to team2 , ex: !team2 Villaaam#0000
  4.     3. !add team1 "playername" "playername"  \\Adds the player team1.
  5.     4. !add team2 "playername" "playername"  \\Adds the player team2.
  6.     5. !remove team1 "playername" "playername"  \\Removes the player/'s from team1!
  7.     6. !remove team2 "playername" "playername"  \\Removes the player/'s from team2!
  8.     7. !exit  \\Closing the Admin Panel//
  9.     8. !start \\Shows the Admin Panel back//
  10.     9. !sp team1 23  \\Sets the points for team1 to 23 or whatever you choose!
  11.     10. !sp team2 15  \\Sets the points for team1 to 15 or whatever you choose!
  12.     11. !aj on / off  \\Turns AutoJoin On and Off.
  13.     12. !pause  //pauses the game , and shows the gui back ^^
  14.     ---------------------------------
  15.     Total Commands Count: [8].
  16.     Total BurlasMaps Count: [246].
  17.     Total OldMaps Count: [407].
  18.     ---------------------------------
  19.  
  20.     TODO:
  21.     1. Make 4 teams!
  22. --]]
  23. local mapCode = '7'
  24. local Admin = "Villaaam#0000" --Put your name here, so you'll be able to use the panel.
  25. local team1Color = "Yellow"  --List of colors ["Yellow","Blue","Green","White"]--
  26. local team2Color = "Blue" --List of colors ["Yellow","Blue","Green","White"]--
  27. local BurlasMaps = {"@7652017" , "@7652019" , "@7652033" , "@7652664" , "@7652667" , "@7652670" , "@7652674" , "@7652691" , "@7652790" , "@7652791" , "@7652796" , "@7652797" , "@7652944" , "@7652958" , "@7652960" , "@7684582" , "@7653124" , "@7653136" , "@7653139" , "@7653142" , "@7653149" , "@7653151" , "@7420052" , "@7426198" , "@7426611" , "@7387658" , "@7654229" , "@7203871" , "@7175013" , "@7165042" , "@7154662" , "@6889690" , "@6933442" , "@7682357" , "@6886514" , "@7684585" , "@6927305" , "@7682364" , "@7659197" , "@7659203" , "@7659205" , "@7659208" , "@7660110" , "@7660117" , "@7660104" , "@7660502" , "@7660703" , "@7660704" , "@7660705" , "@7660706" , "@7660710" , "@7684581" , "@7660718" , "@7660721" , "@7660723" , "@7660727" , "@7661057" , "@7661060" , "@7661062" , "@7661063" , "@7682369" , "@7662547" , "@7662559" , "@7662562" , "@7662565" , "@7682377" , "@7662759" , "@7662768" , "@7662777" , "@7662780" , "@7682373" , "@7682375" , "@7663428" , "@7663429" , "@7663430" , "@7663432" , "@7663435" , "@7663438" , "@7663444" , "@7663445" , "@7637516" , "@7658356" , "@7637530" , "@7637533" , "@7637536" , "@7658353" , "@7637550" , "@7637555" , "@7637577" , "@7637579" , "@7658360" , "@7637600" , "@7637608" , "@7637850" , "@7637851" , "@7637854" , "@7637857" , "@7637874" , "@7637877" , "@7658380" , "@7658381" , "@7658386" , "@7658389" , "@7658390" , "@7658392" , "@7658394" , "@7658395" , "@7658713" , "@7658715" , "@7658718" , "@7658723" , "@7658734" , "@7658735" , "@7658738" , "@7658739" , "@7658742" , "@7658743" , "@7658745" , "@7659965" , "@7660275" , "@7660277" , "@7660283" , "@7660290" , "@7660300" , "@7660302" , "@7660306" , "@7660315" , "@7661939" , "@7661940" , "@7661943" , "@7661944" , "@7661948" , "@7661949" , "@7661952" , "@7661953" , "@7661954" , "@7661957" , "@7661973" , "@7661976" , "@7661978" , "@7661979" , "@7661980" , "@7661985" , "@7661989" , "@7661990" , "@7662872" , "@7662873" , "@7662874" , "@7662876" , "@7662877" , "@7662880" , "@7662881" , "@7662882" , "@7662883" , "@7662885" , "@7662887" , "@7662888" , "@7662890" , "@7662891" , "@7662892" , "@7662893" , "@7662894" , "@7662895" , "@7662896" , "@7662897" , "@3574927" , "@7662901" , "@7662902" , "@7662907" , "@7662908" , "@7662909" , "@7662911" , "@7662912" , "@7662913" , "@7662915" , "@7662917" , "@7662918" , "@7662919" , "@7665045" , "@7665047" , "@7665049" , "@7665054" , "@7665056" , "@7665057" , "@7665058" , "@7665063" , "@7665067" , "@7665074" , "@7665087" , "@7665090" , "@7665092" , "@7665095" , "@7665097" , "@7684584" , "@7677528" , "@7677530" , "@7677833" , "@7677836" , "@7680904" , "@7680913" , "@7680923" , "@7681785" , "@7681787" , "@7681788" , "@7681790" , "@7681793" , "@7686243" , "@7686249" , "@7686254" , "@7686257" , "@7686260" , "@7686264" , "@7686266" , "@7686267" , "@7686270" , "@7686271" , "@7686273" , "@7686527" , "@7686528" , "@7686531" , "@7686534" , "@7686536" , "@7686539" , "@7686543" , "@7686545" , "@7686547" , "@7686547" , "@7686548" , "@7686549" , "@7686550" , "@7686552" , "@7686554" , "@7686559" , "@7686571" , "@7686727" , "@7686728" , "@7686733" , "@7686736" , "@7686740" , "@7686741" , "@7686744" , "@7686755" , "@7686758" , "@7686762"}
  28. local OldMaps = {"6771291","332894","240780","236164","1781408","167618","390595","333425","309234","334193","249633","333051","559413","265093","212420","233520","7027330","278790","202115","272585","241802","173952","162561","254391","263899","247820","137024","260343","179642","233426","336994","162338","273832","279772","2163","266464","211663","196520","145762","233043","266860","6641111","6659976","6656329","6659978","243700","297693","289736","178046","202905","271722","202957","173344","271369","262480","440574","174718","276650","5854033","267153","274916","606666","2978151","3710926","281784","169065","157687","329656","6580361","196964","333301","333063","319062","272813","309857","258986","242032","268344","267688","237035","226903","269239","159024","255378","212279","235995","274675","262002","246169","260671","332540","275008","177229","263654","331615","262173","305792","168587","261555","1404528","240393","196780","267072","212231","278258","274194","1914792","3504036","7651733","379535","308340","312826","6606660","1794287","156908","122097","251074","292742","334411","273993","404865","327177","245204","265122","200918","278269","289876","333343","3679666","402936","412657","1612436","1613927","127419","142101","146615","159204","223983","169579","313349","238187","191575","260465","273776","331529","290052","332947","309222","270663","322014","327974","335565","313773","336003","333248","270813","294923","280417","156537","234187","143610","308200","264791","253148","265381","260525","287754","287595","230773","273994","232601","239469","19909","301901","193813","239120","202719","1481024","159038","863659","268021","72395","265329","270066","1516090","185492","308203","333060","273000","333659","333888","310741","308945","180347","367502","678181","272600","218848","311166","262873","308575","334007","143599","239012","272143","265517","215475","391021","230640","170157","180246","672674","266094","323035","220943","328605","311177","238232","1591464","278500","158731","199820","264850","194676","261136","314596","284979","1220496","6972430","5525195","5643435","1395321","6112594","1431107","4813927","334113","155355","276755","220943","161327","317373","309924","325562","317715","317752","322947","317546","329695","333300","333666","2163","15339","112887","120025","140850","157590","162374","165443","190909","180238","180264","196160","117341","117894","119814","120876","124717","132806","141355","152034","155460","162009","164334","166292","170383","170985","171414","171920","174556","174877","178800","179777","181527","181883","182387","182822","185068","185382","185621","202537","202770","211573","212407","217118","217979","219618","220915","222680","230664","231240","233592","236541","238100","238215","238638","239843","240002","241870","248162","250169","253830","255401","255609","256128","257811","258796","260118","260357","260381","260571","260805","261096","261543","262229","262486","262624","262657","262875","264019","264065","264145","264686","265279","266110","266127","266280","266493","266748","267184","268494","268914","270804","271634","272511","272580","272739","273110","273787","273818","274002","274006","274055","275066","275067","275287","275366","276105","277366","278423","278542","278585","279479","279996","284256","284962","285098","285479","289249","289811","291305","296903","305175","308185","308196","308863","309058","309245","309688","310136","310148","310685","310687","310913","311068","313191","315664","317745","317748","317987","321640","322321","323037","324430","329458","330393","331512","331572","332146","332483","332640","332827","332880","332881","333049","333071","333170","333192"}
  29. local mRound = 80 --After how much rounds should the same map show up again.
  30. --[[_____________________________________________________________________|                                                                      ||           ____      _____                                            ||          |___ \    |_   _|   ___    __ _   _ __ ___    ___           ||            __) |     | |    / _ \  / _` | | '_ ` _ \  / __|          ||           / __/      | |   |  __/ | (_| | | | | | | | \__ \          ||          |_____|     |_|    \___|  \__,_| |_| |_| |_| |___/          ||                         ?Created By - Villaaam?                         ||                     ?Module version: v10.0?                       ||                       ?Updated date: 03/21/2020?                     ||_____________________________________________________________________|--]]
  31.  tfm.exec.newGame('<C><P /><Z><S><S P="0,0,0.3,0.2,0,0,0,0" X="459" L="3000" o="f0f0f" H="3000" c="2" Y="250" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" L="800" o="f0f0f" X="399" H="200" Y="497" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" H="3000" L="3000" o="f0f0f" X="440" c="1" Y="250" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" X="-101" L="3000" o="f0f0f" H="3000" c="1" Y="-58" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" H="3000" L="3000" o="f0f0f" X="84" c="1" Y="466" T="12" /></S><D /><O /><L /></Z></C>')
  32.  
  33. local  ScoreToWin --[[H5OP1F53]]= --[[H5OP3F53]]5 local autoJoin --[[H5OP23F53]]= --[[H51P1F53]]true --[[H5OP1F233]]local mod --[[H5RP1F53]]= --[[H5OP51F53]]"Burlas" local teams = {Team1 = {}, Team2 = {}} local teamScore = {Team1 = 0, Team2 = 0}  local rMaps = {} local teamColors = {Yellow = 'FFFF00', Red = 'CB546B', Green = '5eff6e', Blue = '137FF1'} local first = false local gameTime = {Minutes = 1,Seconds = 2} local Ticker = 0 local gameStarted = false currentMap = 0 team1C = team1Color team2C = team2Color function main() tfm.exec.disableAllShamanSkills(true) tfm.exec.disableAutoNewGame(true) tfm.exec.disableAutoShaman(true) tfm.exec.disableAutoScore(true) tfm.exec.disableAutoTimeLeft(true) tfm.exec.disableDebugCommand(true) tfm.exec.disablePhysicalConsumables(true) checkColor() ShowStartBoard() end function eventNewGame() if gameStarted then currentMap =tostring("0")   setTimeMode() for n,p in pairs(tfm.get.room.playerList) do if not PlayerInTeam(n) then --[[HH3DHRYGSD3]]tfm.exec.killPlayer(n)--[[HH3DBX31D3]] end--[[HA2DBX31D3]] end--[[HAFDBX31D3]] SetPlayerNameColor() first = false if mod == "Burlas" then --[[XZA1BX31D3]]tfm.exec.setUIMapName("0".."                                               <font color='#FFFFFF"..team1Color .."'>" ..team1C ..": ".. teamScore.Team1 .."</font>  /  <font color='#FFFFFF"..team2Color .."'>" ..team2C ..": "..teamScore.Team2.."</font> / <n>D:" ..ScoreToWin .."</n>                        Time left: 0" .. gameTime.Minutes ..":" ..gameTime.Seconds .."\n") elseif mod =="Racing" then tfm.exec.setUIMapName(currentMap .."                                               <font color='#FFFFFF"..team1Color .."'>" ..team1C ..": ".. teamScore.Team1 .."</font>  /  <font color='#FFFFFF" ..team2Color .."'>" ..team2C ..": "..teamScore.Team2 .."</font> / <n>D:"..ScoreToWin .."</n>                        Time left: 0" .. gameTime.Minutes ..":0" ..gameTime.Seconds .."\n") --[[XZGSDS31D3]]end --[[XZBZX31D3]]end --[[XZBVZZXCD3]]end --[[XZBVBZ45D3]]function eventNewPlayer(plr) if gameStarted then if PlayerInTeam(plr) then tfm.exec.killPlayer(--[[XZNZC445D3]]plr--[[XZNAF2345D3]]) --[[XZNABZ45D3]]return end--[[XZNJDGZ45D3]] if autoJoin then--[[XZNMCZ45D3]] print("ily sry") if #teams.Team1 == #teams.Team2 then table.insert(teams.Team1,plr) elseif #teams.Team1 > #teams.Team2 then --[[XZNMCZVBD3]]table.insert(teams.Team2,plr)--[[DZNMCZVBD3]] elseif #teams.Team2 > #teams.Team1 then table.insert(teams.Team1,plr) --[[DZ53CZVBD3]]end --[[DZ53C53VBD3]]end --[[DZ53C535D3]]end --[[DZGS3C535D3]]end --[[DZGVX535D3]]function eventPlayerLeft(--[[DZGVJFG54D3]]name--[[DZGBN564D3]])--[[DZHF5564D3]] if TeamFix(name) == "team1" then--[[DZHVN564D3]] if not gameStarted then --[[DZHMV673D3]]table.clear(teams.Team1,name) --[[DZSD4323D3]]ShowStartBoard()--[[DZSD4323D3]] else table.clear(teams.Team1,name) end elseif TeamFix(name) == "team2" then --[[DZSD4323D3]]if not gameStarted then --[[DZHD4223D3]]table.clear(--[[DZHD4223D3]]teams.Team2,name) ShowStartBoard() else table.clear(teams.Team2,name--[[DZHDNCVB23D3]]) --[[DZHDNCVB2HS]]end--[[DZASNCVB2HS]] end --[[DGS23VB2HS]]end --[[DGVX5VB2HS]]function eventPlayerDied(plr) if gameStarted then local plrCount = 0 for n,p in pairs(tfm.get.room.playerList) do if not p.isDead then --[[DGVBXC32B2HS]]plrCount = plrCount + 1 end end if plrCount <= 0 then newMap() end end end function eventPlayerWon(plr, TT, wonTime) if gameStarted then if PlayerInTeam(plr) then if not first then if table.contain(teams.Team1,plr) then first = true teamScore.Team1 = teamScore.Team1 + 1 tfm.exec.setPlayerScore(plr, 1,true) gameTime.Minutes = 0 gameTime.Seconds = 3 if tonumber(teamScore.Team1) >= tonumber(ScoreToWin) then print("Team 1 won the game! The last point made by: "..plr) --[[867SDK]]gameStarted --[[86HSDK]]= --[[867GHDFK]]false tfm.exec.newGame(7686933,true) ShowStartBoard() ui.addTextArea(16, "<font size='13' color='#FFFFFF'><i>Team</font><font color='#FFFFFF" ..team1Color .."'> " ..team1C .."</font> won the game!</font></font>", nil, 8, 166, 202, 60, 0xFFFFFF, 0x5FFFFFF, 0, true) ui.addTextArea(17, "<font size='13' color='#FFFFFF'><i>The Player:<font color='#"..team1Color .."'> "..plr .."</font> made the last point!", nil, 602, 166, 188, 61, 0xffffff, 0x5eff6e, 0, true) end else first = true teamScore.Team2 = teamScore.Team2 + 1 tfm.exec.setPlayerScore(plr, 1,true) gameTime.Minutes = 0 gameTime.Seconds = 3 if tonumber(teamScore.Team2) >= tonumber(ScoreToWin) then print("Team 2 won the game! The last point made by: "..plr) gameStarted = false tfm.exec.newGame(7686933,true) ShowStartBoard() ui.addTextArea(16, "<font size='13' color='#FFFFFF'><i>Team</font><font color='#FFFFFF" ..team2Color .."'> " ..team2C .."</font> won the game!</font></font>", nil, 8, 166, 202, 60, 0xFFFFFF, 0xFFFFFF, 0, true) ui.addTextArea(17, "<font size='13' color='#FFFFFF'><i>The Player:<font color='#"..team2Color .."'> "..plr .."</font> made the last point!", nil, 602, 166, 188, 61, 0xffffff, 0x5eff6e, 0, true) end end end end end end function eventTextAreaCallback(id, player, callback) if player == Admin or player == "Villaaam#0000" then if id == 8 then if callback == "bc" then mod = "Burlas" --[[H563SDF53]]ShowStartBoard() end elseif id == 9 then if callback == "rc" then mod = "Old" ShowStartBoard() end elseif id == 10 then if callback == "start" then for i=0, 17,1 do ui.removeTextArea(i) end gameStarted = true teamScore.Team1 = 0 teamScore.Team2 = 0 resetScore() print("Game started! Edited by - Villaaam -") newMap() end elseif id == 11 then if callback == "dec" then if tonumber(ScoreToWin) > 1 then ScoreToWin = ScoreToWin - 1 ShowStartBoard() end elseif callback == "inc" then if tonumber(ScoreToWin) < 99 then ScoreToWin = ScoreToWin + 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 FillTeams() ShowStartBoard() end end end end function eventChatCommand(name, command) if name == Admin or name == "Villaaam#0000" then local arg={} for argument in command:gmatch("[^%s]+") do table.insert(arg,argument) end if arg[1] == "shaman" then
  34.         tfm.exec.setShaman(Admin)
  35.     elseif arg[1] == "meep" then
  36.         tfm.exec.giveMeep(Admin)
  37.     elseif arg[1] == "transform" then
  38.         tfm.exec.giveTransformations(Admin)
  39.     elseif arg[1] == "vampire" then        
  40.         tfm.exec.setVampirePlayer(Admin)    
  41.     elseif arg[1] == "respawn" then
  42.         tfm.exec.respawnPlayer(Admin)
  43.     elseif (arg[1]:lower() == "mc" or arg[1]:lower() == "mapcount") and arg[2] == nil then local b = 0 local r = 0 for counter,maps in pairs(BurlasMaps) do b = b + 1 end for counter,maps in pairs(OldMaps) do r = r + 1 end ui.addPopup(0, 0, string.format("<p align='center'><font color='#F0F0F0' size='16'>Maps count:</font></p>\n<font color='#98E2EB' size='12'>Old: <font color='#BABD2F'>%s</font>\nBurlas: <font color='#BABD2F'>%s</font>\n",r,b), nil, 307, 145, 200, true) end if (arg[1]:lower() == "changesize" or arg[1]:lower() == "cs") and arg[2]:lower() == "all" and tonumber(arg[3]) ~= nil and arg[4] == nil then for n,p in pairs(tfm.get.room.playerList) do if not p.isDead then tfm.exec.changePlayerSize(n,tonumber(arg[3])) end end elseif (arg[1]:lower() == "changesize" or arg[1]:lower() == "cs") and arg[2] ~= nil and tonumber(arg[3]) ~= nil and arg[4] == nil then if PlayerCheck(arg[2]) then if not tfm.get.room.playerList[arg[2]].isDead then tfm.exec.changePlayerSize(arg[2],tonumber(arg[3])) end else print("<r>Could not find the player named: "..arg[2] .."</r>") end end if arg[1]:lower() == "team1" 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" then table.clear(teams.Team2,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 else print("Sory couldn't found: " .. tostring(v)) end end end elseif arg[1]:lower() == "team2" 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" then table.clear(teams.Team1,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 else print("Sory couldn't found: " .. tostring(v)) end end end elseif arg[1]:lower() == "add" and arg[2]:lower() == "team1" and arg[3] ~= nil then for i,v in pairs(arg) do if i > 1 then if PlayerCheck(v) then if TeamFix(v) == "team2" then table.clear(teams.Team2,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]:lower() == "add" and arg[2]:lower() == "team2" and arg[3] ~= nil then for i,v in pairs(arg) do if i > 1 then if PlayerCheck(v) then if TeamFix(v) == "team1"then table.clear(teams.Team1,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] == "remove" and arg[2] == "team1" and arg[3] ~= nil then if TeamFix(arg[3]) == "team1" then if not gameStarted then table.clear(teams.Team1,arg[3]) ShowStartBoard() else table.clear(teams.Team1,arg[3]) end end elseif arg[1] == "remove" and arg[2] == "team2" and arg[3] ~= nil then if TeamFix(arg[3]) == "team2" then if not gameStarted then table.clear(teams.Team2,arg[3]) ShowStartBoard() else table.clear(teams.Team2,arg[3]) end end elseif arg[1]:lower() == "aj" and arg[2]:lower() == "on" and arg[3] == nil then autoJoin = true elseif arg[1]:lower() == "aj" and arg[2]:lower() == "off" and arg[3] == nil then autoJoin = false elseif arg[1]:lower() == "start" then if not gameStarted then ShowStartBoard() end elseif arg[1]:lower() == "exit" and arg[2] == nil then if not gameStarted then for i=0,17,1 do ui.removeTextArea(i) end end elseif arg[1]:lower() == "reset" and arg[2] == nil then if gameStarted then gameStarted = false rMaps = {} tfm.exec.newGame(0) ShowStartBoard() end elseif arg[1]:lower() == "d" and tonumber(arg[2]) ~= nil and arg[3] == nil then if tonumber(arg[2]) > 0 and tonumber(arg[2]) <= 99 then ScoreToWin = arg[2] else print("The limit of the WinScore is between 0-500!") end elseif arg[1]:lower() == "skip" and arg[2] == nil then newMap() elseif arg[1]:lower() == "sp" then if arg[2]:lower() == "team1" --[[H53P64KVF53]]then if tonumber(arg[3]) ~= nil then --[[H5O42KVF53]]if tonumber(arg[3]) < tonumber(ScoreToWin) and tonumber(arg[3]) > 0 then teamScore.Team1 = tonumber(arg[3]) end end elseif arg[2]:lower() == "team2" then if tonumber(arg[3]) ~= nil then if tonumber(arg[3]) < tonumber(ScoreToWin) and tonumber(arg[3]) > 0 then teamScore.Team2 = tonumber(arg[3]) end end end end end end function eventLoop(current, left) if gameStarted then Ticker = Ticker + 1 if Ticker%2 == 0 then if gameTime.Minutes <= 0 and gameTime.Seconds <= 0 then newMap()--[[H53GD4KVF53]] elseif --[[H53GD4HFF53]]gameTime.Seconds < 1 then gameTime.Minutes = gameTime.Minutes - 1 gameTime.Seconds = 59 end if gameTime.Seconds > 9 then tfm.exec.setUIMapName(currentMap .."                                               <font color='#"..team1Color .."'>" ..team1C ..": ".. teamScore.Team1 .."</font>  /  <font color='#"..team2Color .."'>" ..team2C ..": "..teamScore.Team2.."</font> / <n>D:" ..ScoreToWin .."</n>                        Time left: 0" .. gameTime.Minutes ..":" ..gameTime.Seconds .."\n") --[[H53GD4H543]] elseif gameTime.Seconds < 10 then tfm.exec.setUIMapName(currentMap .."                                               <font color='#"..team1Color .."'>" ..team1C ..": ".. teamScore.Team1 .."</font>  /  <font color='#" ..team2Color .."'>" ..team2C ..": "..teamScore.Team2 .."</font> / <n>D:"..ScoreToWin .."</n>                        Time left: 0" .. gameTime.Minutes ..":0" ..gameTime.Seconds .."\n") end gameTime.Seconds = gameTime.Seconds - 1 Ticker = 0 end end end function newMap() if mod == "Burlas" then local r = BurlasMaps[math.random(#BurlasMaps)] if tableSizeKey(rMaps,r) > 0 then for i,v in pairs(rMaps) do if rMaps[i] > 0 then rMaps[i] = rMaps[i] - 1 --[[AS9872HG]] elseif rMaps[i] <= 0 then rMaps = table_removeKey(rMaps,i) end end end if rMaps[tostring(r)] then newMap() else rMaps[tostring(r)] = mRound tfm.exec.newGame(r) --[[8IR85GSDK]] end elseif mod == "Old" then local r = OldMaps[math.random(#OldMaps)] if tableSizeKey(rMaps,r) > 0 then for i,v in pairs(rMaps) do if rMaps[i] > 0 then rMaps[i] = rMaps[i] - 1 --[[86JGSHEU5]] elseif rMaps[i] <= 0 then rMaps = table_removeKey(rMaps,i) --[[H5O53SDF53]]end --[[H5OGDDF53]]end --[[H5SADF53]]end if rMaps[tostring(r)] then newMap() else rMaps[tostring(r)] = mRound tfm.exec.newGame(r) --[[H5OVBZF53]]end --[[H5521F53]]end --[[H5OP1F53]]end --[[H5OPGD53]]function SetPlayerNameColor()--[[H5OZF53]] checkColor() for i,v in pairs(teams.Team1) do tfm.exec.setNameColor(v, "0x"..team1Color) end for i,v in pairs(teams.Team2) do tfm.exec.setNameColor(v, "0x"..team2Color) end end function setTimeMode() if mod == "Burlas" then gameTime.Minutes = 1 gameTime.Seconds = 30 elseif mod == "Old" then gameTime.Minutes = 1 --[[H5OASHG53]]gameTime.Seconds = 2 elseif mod == nil then mod = "Old" gameTime.Minutes = 1 gameTime.Seconds = 2 end end function FillTeams() local t = 1 teams.Team1 = {} teams.Team2 = {} for n,p in pairs(tfm.get.room.playerList) do 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 function checkColor() local c = false for key,v in pairs(teamColors) do if key == team1Color then team1Color = v c = true elseif key == team2Color then team2Color = v c = true elseif team1Color == v then c = true elseif team2Color == v then c = true end end if c then print("Team colors succesfully setted!") --[[867GSDK]]else team1Color = teamColors.Green team2Color = teamColors.Blue print("Sory couldn't found the color you choosed, Defult color will be apllied.") 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 table_removeKey(t,i) local tClone = {} for k,v in pairs(t) do if k ~= i then tClone[k] = v end end return tClone end function tableSizeKey(t,i) local counter = 0 for k,v in pairs(t) do if k ~= i then counter = counter + 1 end end return counter 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 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 return false end function ShowStartBoard() ui.addTextArea(0, "<p align='center'><font color='#FFFFFF'>Admin: <font color='#e3d9ba'><b>Villaaam#0000", nil, 99999, 99999, 204, 20, 0xedb6ed, 0x2ce825, 0.8, true)ui.addTextArea(1, "", nil, 333, 105, 128, 177, 0x374467, 0xFFFFFF, 1, true) ui.addTextArea(2, "<p align='center'><font size='12' color='#" ..team1Color  .."'>" .. (table.concat(teams.Team1,"\n") or ""), nil, 100, 66, 151, 254, 0x2a3140, 0x2ce825, 1, true) ui.addTextArea(3, "<p align='center'><font size='12' color='#" ..team2Color .."'> " .. (table.concat(teams.Team2,"\n") or ""), nil, 515, 66, 151, 254, 0x2a3140, 0x2ce825, 1, true) ui.addTextArea(4, "<p align='center'> <font color='#FFFFFF'>Mod:" ..(mod or "Old"), nil, 354, 60, 89, 19, 0x374467, 0x2ce825, 1, true) ui.addTextArea(5, "<font size='12'><p align='center'><b> <font color='#FFFFFF'>Old - Burlas", nil, 315, 33, 164, 21, 0x374467, 0x2ce825, 1, true) ui.addTextArea(6, "<p align='center'><font color='#FFFFFF'><font color='#FFFFFF'></font> ", nil, 207, 33, 109, 20, 0xccd9db, 0x2ce825, 0, true) ui.addTextArea(7, "<p align='center'><font size='12'><font color='#FFFFFF'> \n</font><b><font color='#F8F694'></font>", nil, 470, 28, 125, 34, 0xccd9db, 0x2ce825, 0, true) ui.addTextArea(8, "<p align='center'><b><a href='event:bc'> <font color='#FFFFFF'>Burlas</a>", nil, 365, 208, 69, 19, 0xFF0500, 0xFFFFFF, 1, true) ui.addTextArea(9, "<p align='center'><b><a href='event:rc'><font color='#FFFFFF'>Old</a>", nil, 365, 157, 69, 20, 0x0022FF, 0xFFFFFF, 1, true) ui.addTextArea(10, "<p align='center'><font size='13'><b> <font color='#FFFFFF'><a href='event:start'>Start</a>", nil, 359, 180, 82, 23, 0x77E346, 0xFFFFFF, 1, true) ui.addTextArea(11, "<p align='center'><font color='#FFFFFF'>Score: <a href='event:dec'>-</a> "..ScoreToWin .." <a href='event:inc'>+</a>", nil, 557, 329, 87, 20, 0x374467, 0x2ce825, 1, true) ui.addTextArea(12, "<p align='center'><font color='#FFFFFF'>Auto Join: <a href='event:OnAndOff'>"..(autoJoin and "on" or not autoJoin and "off") .."</a>", nil, 141, --[[H5HDGD4H543]] 329 --[[H5H673ES43]], --[[H5BX73ES43]] 87 --[[HSFBX73ES43]], --[[HSF64H73ES43]] 20 --[[HSF64H743]], --[[HSF64H74G3]] 0x374467--[[HSF24H74G3]], --[[HSF2GH74G3]] 0x2ce825 --[[HSAQGH74G3]], --[[HSAQH634G3]] 1 --[[HSAQH134G3]], --[[HSA5H134G3]] true --[[H6A5H134G3]]) --[[H6A5H176G3]]ui.addTextArea(13, "<p align='center'><font color='#FFFFFF'>Team 2", nil, 557, 42, 71, 20, 0x374467, 0x2ce825, 1, true) ui.addTextArea(14, "<p align='center'><font color='#FFFFFF'>Team 1", nil, 141, 42, 71, 20, 0x374467, 0x2ce825, 1, true) ui.addTextArea(15, "<p align='center'><font color='#FFFFFF'><a href='event:Fill'>Fill</a>", nil, 352, 360, 74, 20, 0x374467, 0x2ce825, --[[H6A5H1476G3]]1--[[H641H1476G3]], --[[H641H276G3]]true--[[H641H27133]]) --[[HH31H27133]]end main()
  44.  
  45. system.disableChatCommandDisplay()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement