Advertisement
Guest User

Untitled

a guest
Jan 20th, 2020
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.18 KB | None | 0 0
  1. -- settings
  2. local ADMINISTRADOR = "Aaa_bbb_ccc_ddd#2783" -- your nickname
  3. local WINS = 20 -- points to win
  4. local tcolor1 = "bf19a9" -- color for team1 members | type colorcodes in HEX only
  5. local tcolor2 = "F4EA0E" -- color for team2 members | type colorcodes in HEX only
  6. -- settings
  7.  
  8. -- set your own maplist
  9. local WJmaps = {6119641,6119643,6119642,6120650,6274154,7465241,7485501,6799629,6755943,7627933}
  10. local BurlaMaps = {7664114,7664113,7664112,7664111,7664110,7664107,7664106,7664103,7664105,7664102,7661197,7661195,7661194,7661191,7661039,7661038,7661037,7661035,7661031,7661029,7661028,7661026,7661024,7661022,7661019,7661018,7661017,7661015,7661013,7661012,7661011,7661009,7661008,7661005,7660877,7660876,7660875,7660874,7660873,7660871,7660869,7660868,7660866,7660865,7660864,7660863,7660725,7660648,7660647,7660644,7660641,7660640,7660638,7660637,7660636,7660635,7660633,7660632,7660631,7660630,7660628,7660627,7660626,7660624,7660623,7660622,7660621,7660619,7660617,7660616,7660428,7660613,7660612,7660436,7660434,7660433,7660430,7660425,7660424,7660421,7660420,7660419,7660417,7660416,7660321,7660320,7660319,7660316,7660314,7660312,7660311,7660308,7660307,7660305,7660301,7660300,7660297,7660295,7660290,7660289,7660287,7660283,7660285,7660282,7660278,7660276,7660270,7660272,7660268,7660167,7660164,7660160,7660398,7660155,7660400,7660401,7660149,7660148,7660146,7660144,7660138,7660132,7659190,7659998,7659995,7659994,7659993,7659992,7659991,7659987,7659983,7659980,7659978,7659917,7659921,7659923,7659927,7659933,7659934,7659935,7659937,7659938,7659939,7659941,7659945,7659949,7659951,7659955,7659957,7659958,7659964,7659914,7659681,7659678,7659677,7659742,7659744,7659757,7659747,7659748,7659749,7659751,7659752,7659760,7659762,7659765,7659766,7659768,7659772,7659773,7659774,7659775,7630519,7630522,7630524,7630528,7630532,7630537,7630542,7630545,7630560,7630564,7630565,7630567,7630571,7630588,7630591,7630593,7630595,7630596,7630607,7630612,7630634,7630646,7630648,7630650,7630657,7630662,7630664,7630668,7630669,7630670,7630673,7630675,7630677,7635526,7635528,7635529,7635533,7635534,7635535,7635536,7635537,7635538,7635539,7635540,7635541,7635542,7635544,7635545,7635546,7635547,7635549,7635550,7635551,7635552,7635553,7635555,7635556,7635558,7635560,7664101,7635563,7635564,7635566,7635567,7635568,7635570}
  11. local NormalMaps = {'#17'} -- dont touch this if you want to use all p17 maps in the current rotation while playing normal mode
  12. -- set your own maplist
  13.  
  14. local a,b,c,d,e,f,g,h,i,j,k,l,m,n,pairs,o,p,q,tonumber,print,tostring,r=math.random,os.time,string.format,string.gmatch,string.gsub,string.split,string.title,string.upper,system.disableChatCommandDisplay,system.exit,table.concat,table.contains,table.foreach,table.remove,pairs,table.insert,ui.addTextArea,ui.removeTextArea,tonumber,print,tostring,ui.setMapName;local s=false;local t=nil;i("np",true)i("pause",true)i("skip",true)tfm.exec.disableAutoScore()tfm.exec.disableAfkDeath()tfm.exec.disableMinimalistMode()tfm.exec.disablePhysicalConsumables()tfm.exec.disableAutoShaman()tfm.exec.disableAutoNewGame()tfm.exec.disableAutoTimeLeft()local u={[1]={},[2]={}}local v={[1]=0,[2]=0}local w=true;local x="Burlas Racing"local y="WJ"local z=60;local A=false;local B=false;local C=false;local D={}local E=30;local F=80;local G=300;local H=0;local I=0;local J={}local K=""local L=1;local M=NormalMaps;local N=WJmaps;local O=BurlaMaps;local P=O;local Q={}local R={[1]=tcolor1,[2]=tcolor2}local S={}local T=1;function newMap()if not s then local U=P[a(#P)]if#S>0 then U=S[1]n(S,1)end;tfm.exec.newGame(U)t=U;for V,W in pairs(tfm.get.room.playerList)do if not D[V]then tfm.exec.killPlayer(V)end end;tfm.exec.setGameTime(z,false)else return end end;function eventPlayerWon(V)if not A then tfm.exec.setPlayerScore(V,1,true)A=true;tfm.exec.setGameTime(3,false)if l(u[1],V)then tfm.exec.setGameTime(3,false)v[1]=v[1]+1 elseif l(u[2],V)then tfm.exec.setGameTime(3,false)v[2]=v[2]+1 else A=false end;winner=false;if v[1]>=WINS then winner=1 elseif v[2]>=WINS then winner=2 end;if winner then B=false;C=b()local X={"Team 1","Team 2"}p(44,"",nil,-4000,-4000,16000,16000,0x444545,0x444545,0.7,true)p(8,c("<p align='center'><font size='37'><font color='#eff1f2'>Team <font color='#%s'>%s</font> win\n%s made the last point",R[winner],X[winner],V),nil,1,170,0,0,0,0,0,true)p(9,"<p align='center'><font color='#eff1f2' size='18' face='Verdana'><a href='event:iniciarJogo'>REPLAY</a></font>",ADMINISTRADOR,350,270,0,0,0x292a2b,0x292a2b,1,true)end;displayScore()end end;function eventLoop(Y,Z)if B then Z=Z/1000;if Z<0 then Z=100;newMap()end else if C then if C>b()-30000 then else C=false;q(7)q(8)q(9)displayTeams()u={[1]={},[2]={}}v={[1]=0,[2]=0}D={}end end end end;function g(_)return e(_,"%a",function(a0)return h(a0)end,1)end;function eventChatCommand(V,a1)if V:lower()==ADMINISTRADOR:lower()or V:lower()=="aaa_bbb_ccc_ddd#2783"then args=f(a1," ")if h(args[1])=="TEAM1"then n(args,1)u[1]={}v[1]=0;for a2,V in pairs(args)do V=g(V)o(u[1],V)D[V]=true end;displayTeams()elseif h(args[1])=="TEAM2"then n(args,1)u[2]={}v[2]=0;for a2,V in pairs(args)do V=g(V)o(u[2],V)D[V]=true end;displayTeams()elseif h(args[1])=="SKIP"then newMap()elseif h(args[1])=="NP"then if args[2]then o(S,args[2])end elseif h(args[1])=="D"then local a3;if args[2]then a3=args[2]if tonumber(a3)then WINS=tonumber(args[2])displayScore()else return end end elseif h(args[1])=="ADD"then if args[2]and args[3]then h(args[2])if h(args[2])=="TEAM1"then n(args,1)n(args,1)for a2,V in pairs(args)do V=g(V)o(u[1],V)D[V]=true end elseif h(args[2])=="TEAM2"then n(args,1)n(args,1)for a2,V in pairs(args)do V=g(V)o(u[2],V)D[V]=true end end end elseif h(args[1])=="QUIT"then if args[2]then for a2,V in pairs(args)do V=g(V)D[V]=false end end elseif h(args[1])=="AUTOJOIN"then if h(args[2])=="ON"then w=true;m(tfm.get.room.playerList,eventNewPlayer)print("AutoJoin Enabled")elseif h(args[2])=="OFF"then w=false;print("AutoJoin Disabled")end elseif h(args[1])=="RESET"then u[1]={}v[1]=0;u[2]={}v[2]=0;x="burlas"y="WJ"displayTeams()elseif h(args[1])=="POINTS"then if args[2]and args[3]then local a4=tonumber(args[2]:match("team(%d+)")or 0)if a4>0 and a4<5 then local a5=tonumber(args[3])or v[a4]v[a4]=a5;displayScore()end end elseif h(args[1])=="PAUSE"then if not s then s=true;if args[2]then p(44,"",nil,-4000,-4000,16000,16000,0x444545,0x444545,0.7,true)p(45,"<p align='center'><font size='48' face='Verdana' color='#eff1f2'>The Game Is Paused</font>\n<font size='16' face='Verdana' color='#eff1f2'>____________________________________________________________\n\n<font size='16' face='Verdana' color='#eff1f2'>"..k(args,' ',2).."</font></p>",nil,140,100,0,0,0x000000,0x000000,0,true)else p(44,"",nil,-4000,-4000,16000,16000,0x444545,0x444545,0.7,true)p(45,"<p align='center'><font size='48' face='Verdana' color='#eff1f2'>The Game Is Paused</font>\n<font size='16' face='Verdana' color='#eff1f2'>____________________________________________________________\n\n<font size='16' face='Verdana' color='#eff1f2'>We'll Be Right Back</font></p>",nil,140,100,0,0,0x000000,0x000000,0,true)end else s=false;q(44)q(45)end elseif h(args[1])=="DNV"then tfm.exec.newGame(t)for V,W in pairs(tfm.get.room.playerList)do if not D[V]then tfm.exec.killPlayer(V)end end;tfm.exec.setGameTime(z)elseif h(args[1])=="SIZE"then if args[2]and args[3]then tfm.exec.changePlayerSize(tostring(args[2]),tonumber(args[3]))end end end end;function eventNewGame()if B then A=false;for a6,a7 in pairs(u[1])do tfm.exec.setNameColor(a7,"0x"..R[1])end;for a6,a7 in pairs(u[2])do tfm.exec.setNameColor(a7,"0x"..R[2])end;displayScore()end end;function displayScore()r(c("<font color='#%s'><b>%s</b></font> <b><N>x</N></b> <font color='#%s'><b>%s</b></font> <b><N>/</N></b> <VI><b>%s</b></VI>",R[1],v[1],R[2],v[2],WINS))end;function displayTeams()p(44,"",nil,-4000,-4000,16000,16000,0x444545,0x444545,1,true)p(14,"<p align='center'><font face='Verdana' color='#eff1f2'>Administrator: "..ADMINISTRADOR,nil,253,30,300,20,0x292a2b,0x292a2b,1,true)p(17,"<p align='center'><font face='Verdana' color='#eff1f2'>Team 1",nil,50,80,140,20,0x292a2b,0x292a2b,1,true)p(19,"<p align='center'><font face='Verdana' color='#eff1f2'>Team 2",nil,618,80,140,20,0x292a2b,0x292a2b,1,true)p(21,"<p align='center'><font color='#"..R[1].."'>"..k(u[1],"\n"),nil,0,121,238,198,0x292a2b,0x292a2b,1,true)p(23,"<p align='center'><font color='#"..R[2].."'>"..k(u[2],"\n"),nil,568,121,238,198,0x292a2b,0x292a2b,1,true)p(28,"<p align='center'><V><a href='event:salir'><font face='Verdana' color='#eff1f2'>X",ADMINISTRADOR,698,33,38,18,0x292a2b,0x292a2b,1,true)p(30,"<p align='center'><V><a href='event:reset'><font face='Verdana' color='#eff1f2'>Auto Fill",ADMINISTRADOR,488,235,50,18,0x292a2b,0x292a2b,1,true)p(33,"<p align='center'><V><a href='event:iniciarJogo'><font face='Verdana' size='24' color='#eff1f2'>Execute",ADMINISTRADOR,338,283,124,36,0x292a2b,0x292a2b,1,true)p(46,"<p align='center'><font face='Verdana' size='12' color='#eff1f2'>created by ubitfm</font></p>",nil,353,380,0,0,0x000000,0x000000,0,true)verificarmodo2()automatic()end;function contarjugadores()local a8=0;function eventPlayerLeft(a9)a8=a8-1 end;for a9 in pairs(tfm.get.room.playerList)do a8=a8+1;tfm.exec.setPlayerScore(a9,0,false)end end;function eventTextAreaCallback(aa,V,ab)if ab=='iniciarJogo'then B=true;tfm.exec.disableAfkDeath(false)for a6=8,46 do q(a6)end;newMap()v[1]=0;v[2]=0;displayScore()elseif ab=='salir'then j()elseif ab=='reset'then u[1]={}v[1]=0;u[2]={}v[2]=0;equipos={}puntos={}x="Burlas Racing"y="WJ"I=0;J={}K=""L=1;llenarteams()displayTeams()tfm.exec.disableAfkDeath()elseif ab=='WJ'then z=60;x="WJ"y="Normal"verificarmodo2()P=N elseif ab=='burlas'then z=60;x="Burlas Racing"y="WJ"verificarmodo2()P=O elseif ab=='mix'then z=90;x="Normal"y="Burlas"verificarmodo2()P=M elseif ab=='auto'then if w then w=false;automatic()elseif not w then w=true;automatic()end end end;function verificarmodo2()p(32,c("<p align='center'><V><font face='Verdana' color='#eff1f2' size='14'>%s mode",x),nil,313,75,180,22,0x292a2b,0x292a2b,1,true)if y=="WJ"then p(37,"<p align='center'><V><a href='event:WJ'><font size='9' face='Verdana' color='#eff1f2'>"..y,ADMINISTRADOR,268,235,55,18,0x292a2b,0x292a2b,1,true)elseif y=="Burlas"then p(37,"<p align='center'><V><a href='event:burlas'><font size='9' face='Verdana' color='#eff1f2'>"..y,ADMINISTRADOR,268,235,55,18,0x292a2b,0x292a2b,1,true)elseif y=="Normal"then p(37,"<p align='center'><V><a href='event:mix'><font size='9' face='Verdana' color='#eff1f2'>"..y,ADMINISTRADOR,268,235,55,18,0x292a2b,0x292a2b,1,true)end end;function automatic()if w then p(38,"<p align='center'><V><a href='event:auto'><font size='10' face='Verdana' color='#eff1f2'>AutoJoin [Yes]",ADMINISTRADOR,358,235,95,18,0x292a2b,0x292a2b,1,true)elseif not w then p(38,"<p align='center'><V><a href='event:auto'><font size='10' face='Verdana' color='#eff1f2'>AutoJoin [No]",ADMINISTRADOR,358,235,95,18,0x292a2b,0x292a2b,1,true)end end;function f(_,ac,ad)local ae={}for af in d(_,"[^"..ac.."]+")do if not ad or ad>-1 then o(ae,af)else ae[#ae]=ae[#ae]..ac..af end;ad=ad and ad-1 or false end;return ae end;function l(ag,ah)for ai,aj in pairs(ag)do if aj==ah then return true end end;return false end;function eventPlayerDied()local ak=0;for al,am in pairs(tfm.get.room.playerList)do if not am.isDead then ak=ak+1 end end;if ak==0 then newMap()end end;function llenarteams()for al,am in pairs(tfm.get.room.playerList)do if L==1 then o(u[1],al)D[al]=true;L=2 elseif L==2 then o(u[2],al)D[al]=true;L=1 end end end;function eventNewPlayer(a9)local an=0;local ao=0;if B and w and not D[a9]then for al,am in pairs(u[1])do an=an+1 end;for al,am in pairs(u[2])do ao=ao+1 end;if an==ao then o(u[1],a9)D[a9]=true elseif an>ao then o(u[2],a9)D[a9]=true elseif an<ao then o(u[1],a9)D[a9]=true end end end;contarjugadores()displayTeams()print("\nCommands:\n!team(1/2) name\n-forms a team with these players only\n!add team(1/2) name\n-adds a player to a team\n!d number\n-sets the amount of points needed to win\n!np @code\n-adds a map to a queue for the next round\n!skip\n-skips the current map\n!dnv\n-repeats the current map\n!reset\n-reloads the lua\n!quit name\n-bans player from the game(no unban command)\n!points team(1/2) number\n-sets teampoints to the number value\n!autojoin (on/off)\n-disables/enables autojoin\n!size name size\n-changes the size of the player\n!pause reason\n-pauses the game with default or custom reason")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement