Advertisement
Guest User

Untitled

a guest
Jan 20th, 2020
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.70 KB | None | 0 0
  1. 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!pause reason\n-pauses the game with default or custom reason")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement