daily pastebin goal
36%
SHARE
TWEET

Untitled

a guest Sep 14th, 2018 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local maps = {"@7513251","@7513366","@7513377"}
  2. local adm = {["Pro#1435"] = true,["Uhzinhooo#0000"] = true}
  3. local helper =  {["Grencia#0000"] = true}
  4.  
  5. ----------------------------------------------
  6. for _, v in next, {'AutoShaman', 'AutoNewGame', 'AutoTimeLeft','PhysicalConsumables','AutoScore'} do
  7.     tfm.exec['disable' .. v]()
  8. end
  9.  
  10. for _, v in next, {'np'} do
  11.        system.disableChatCommandDisplay(v)
  12. end
  13.  
  14. function split(t,s)
  15. local a={}
  16.  
  17.         for i,v in string.gmatch(t,string.format("[^%s]+",s or "%s")) do
  18.         table.insert(a,i)
  19.     end
  20.     return a
  21. end
  22.  
  23. eventNewPlayer = function(n)
  24.     for k, v in next, adm do tfm.exec.setNameColor(k, 0xFFD61E) end -- Cor do nick
  25.     for k, v in next, helper do tfm.exec.setNameColor(k, 0xF700FF) end
  26.  
  27.     tfm.exec.setGameTime(63)
  28.         system.bindKeyboard(n,32,true,true)
  29.         tfm.exec.chatMessage("Bem vindo(ao)",n)
  30.         print("<Rose>Bem vindo(ao)<J>#Runn<Rose>.<BR>Script feito por: <VP>Uhzinhooo#0000 e Pro#1435<Rose>.<BR>")
  31. end
  32.  
  33.  
  34. function eventLoop(tempo, restante)
  35.     if (restante <= 0) then -- Começa um novo mapa quando acabar o tempo
  36.         tfm.exec.newGame(maps[math.random(#maps)])
  37.     end
  38. end
  39.  
  40. function eventPlayerDied(name)
  41.     local a = {}
  42.     for k, v in next, tfm.get.room.playerList do
  43.         if not v.isDead then
  44.             a[#a + 1] = k
  45.         end
  46.     end
  47.  
  48.     if #a == 1 then -- Faz o tempo diminuir pra 10s quando tiver 1 vivo
  49.         tfm.exec.setGameTime(10)
  50.     elseif #a == 0 then -- Faz começar um novo mapa quando todos morrerem
  51.         tfm.exec.newGame(maps[math.random(#maps)])
  52.     end
  53. end
  54.  
  55. function eventChatCommand(name, cmd)
  56.   local arg = split(cmd, " ")
  57.  
  58.   if arg[1] == "np" then
  59.     if adm[name] or helper[name] then
  60.       if arg[2] then
  61.         tfm.exec.newGame(arg[2])
  62.       else
  63.         tfm.exec.newGame(maps[math.random(#maps)]) -- Roda um mapa aleatório quando o tempo acabar
  64.       end
  65.     end
  66.   end
  67. end
  68.  
  69. function eventKeyboard(name,key,down,x,y)
  70.     if key == 32 and tfm.get.room.playerList[name].movingLeft then
  71.         tfm.exec.movePlayer(name,0,0,false,-30,0,true)
  72.     else
  73.         tfm.exec.movePlayer(name,0,0,false,30,0,true)
  74.     end
  75. end
  76.  
  77. table.foreach(tfm.get.room.playerList, eventNewPlayer)
  78. tfm.exec.newGame(maps[math.random(#maps)])
  79. tfm.exec.setRoomMaxPlayers(25)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top