SHARE
TWEET

Order

a guest Apr 25th, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -------------------- System --------------------
  2.  
  3. _, nickname = pcall(nil)
  4. admin = string.match(nickname, "(.-)%.")
  5.  
  6. for _, v in next, {'AutoShaman', 'AutoNewGame', 'AutoTimeLeft', 'PhysicalConsumables','AfkDeath','AutoScore','MortCommand','MinimalistMode'} do
  7.     tfm.exec['disable' .. v]()
  8. end
  9.  
  10. system.disableChatCommandDisplay()
  11.  
  12. -------------------- Editable --------------------
  13.  
  14. -- Escolha o mapa dentro das aspas simples. Ex: '@0'
  15.  
  16. local map = '@7575838'
  17.  
  18. -- Organiza os cargos. Não esqueça de colocar vírgula e aspas simples/duplas. Ex: ['director'] = {'Nickname#2333','Outro#8390','Mod#2412'}
  19.  
  20. local order = {['leader']   = {'Iho#5679'},
  21.                ['director'] = {'Anji#7570','Avanicaa#0000','Deadmaze16#0000','Floquinho#5645','Konzozo#0000','Larry#7619','Merryzs#0000','Phi#1265','Rap#9678','Shikamaru#1961','Silver#1268','Stardays#3226','Zfalash#3334'},
  22.                ['diamond']  = {'Mara120#9370'},
  23.                ['emerald']  = {},
  24.                ['gold']     = {'Akame#8949','Fox_fire#8405','Mitoflap#1844','Mostrodos#0000','Nikiha09#5353'},
  25.                }
  26.  
  27. -- Coordenada x e y de spawn.              
  28.                
  29. local coordinate = {['leader'] =   {767,343},
  30.                     ['director'] = {714,214},
  31.                     ['diamond'] =  {555,94},
  32.                     ['emerald'] =  {326,94},
  33.                     ['gold'] =     {96,92},
  34.                     }
  35.                    
  36. -- Cor representante dos cargos.                   
  37.                    
  38. local color = {['leader'] = 'CB546B',['director'] = 'ED67EA',['diamond'] = '00fffb',['emerald'] = '00ff03',['gold'] = 'feff00'}
  39.  
  40. -- Partículas do fireworks.
  41.  
  42. local particle = {0,1,2,9,11,13}
  43.  
  44. -------------------- Not editable --------------------
  45.  
  46. local active
  47.  
  48. form = function() for k,v in next, order do for i,j in next, order[k] do order[k][j] = true end end end
  49. form()
  50.  
  51. function formatText(txt,form)
  52.     p = {}  for k in txt:gmatch(form) do p[#p + 1] = k  end return p
  53. end
  54.  
  55.  
  56. eventNewPlayer = function(name)
  57.     tfm.exec.respawnPlayer(name)
  58.     tfm.exec.movePlayer(name,324,341,false,0,0,false) tfm.exec.setNameColor (name,'0xC2C2DA')
  59.     for k,v in next, {'leader','director','diamond','emerald','gold'} do for i,j in next, order[v] do if name == j then tfm.exec.movePlayer(name,coordinate[v][1],coordinate[v][2],false,0,0,false) tfm.exec.setNameColor (name,'0x'..color[v]) end end end
  60.     collision()
  61. end
  62.  
  63. eventNewGame = function()
  64.     table.foreach(tfm.get.room.playerList, eventNewPlayer)
  65. end
  66.  
  67. collision = function()
  68.     local id,x,y = 0,400,200
  69.     tfm.exec.addPhysicObject (id + 1,x - 340,y + 65,{type = 14, width = 10, height = 270, friction = 0, restitution = 0.2, angle = 0,color = '0x101010', miceCollision = true, groundCollision = false, foreground = false, dynamic = false,fixedRotation = false, mass = 0, linearDamping = 0, angularDamping  = 0})
  70.     tfm.exec.addPhysicObject (id + 2,x + 200,y + 65,{type = 14, width = 10, height = 270, friction = 0, restitution = 0.2, angle = 0,color = '0x101010', miceCollision = true, groundCollision = false, foreground = false, dynamic = false,fixedRotation = false, mass = 0, linearDamping = 0, angularDamping  = 0})
  71.     tfm.exec.addPhysicObject (id + 3,x + 405,y,{type = 14, width = 10, height = 400, friction = 0, restitution = 0.2, angle = 0,color = '0x101010', miceCollision = true, groundCollision = false, foreground = false, dynamic = false,fixedRotation = false, mass = 0, linearDamping = 0, angularDamping  = 0})
  72.     tfm.exec.addPhysicObject (id + 4,x + 245,y - 130,{type = 14, width = 10, height = 130, friction = 0, restitution = 0.2, angle = 0,color = '0x101010', miceCollision = true, groundCollision = false, foreground = false, dynamic = false,fixedRotation = false, mass = 0, linearDamping = 0, angularDamping  = 0})
  73.     tfm.exec.addPhysicObject (id + 5,x,y - 200,{type = 14, width = 800, height = 10, friction = 0, restitution = 0.2, angle = 0,color = '0x101010', miceCollision = true, groundCollision = false, foreground = false, dynamic = false,fixedRotation = false, mass = 0, linearDamping = 0, angularDamping  = 0})
  74.     tfm.exec.addPhysicObject (id + 6,x - 190,y - 120,{type = 14, width = 60, height = 170, friction = 0, restitution = 0.2, angle = 0,color = '0x101010', miceCollision = true, groundCollision = false, foreground = false, dynamic = false,fixedRotation = false, mass = 0, linearDamping = 0, angularDamping  = 0})
  75.     tfm.exec.addPhysicObject (id + 7,x + 40,y - 120,{type = 14, width = 60, height = 170, friction = 0, restitution = 0.2, angle = 0,color = '0x101010', miceCollision = true, groundCollision = false, foreground = false, dynamic = false,fixedRotation = false, mass = 0, linearDamping = 0, angularDamping  = 0})
  76.     tfm.exec.addPhysicObject (id + 8,x + 155,y - 70,{type = 14, width = 170, height = 10, friction = 0, restitution = 0.2, angle = 0,color = '0x101010', miceCollision = true, groundCollision = false, foreground = false, dynamic = false,fixedRotation = false, mass = 0, linearDamping = 0, angularDamping  = 0})
  77.     tfm.exec.addPhysicObject (id + 9,x - 75,y - 70,{type = 14, width = 166, height = 10, friction = 0, restitution = 0.2, angle = 0,color = '0x101010', miceCollision = true, groundCollision = false, foreground = false, dynamic = false,fixedRotation = false, mass = 0, linearDamping = 0, angularDamping  = 0})
  78.     tfm.exec.addPhysicObject (id + 10,x - 310,y - 70,{type = 14, width = 170, height = 10, friction = 0, restitution = 0.2, angle = 0,color = '0x101010', miceCollision = true, groundCollision = false, foreground = false, dynamic = false,fixedRotation = false, mass = 0, linearDamping = 0, angularDamping  = 0})
  79.     tfm.exec.addPhysicObject (id + 11,x - 395,y - 140,{type = 14, width = 10, height = 130, friction = 0, restitution = 0.2, angle = 0,color = '0x101010', miceCollision = true, groundCollision = false, foreground = false, dynamic = false,fixedRotation = false, mass = 0, linearDamping = 0, angularDamping  = 0})
  80.     tfm.exec.addPhysicObject (id + 12,x + 301,y + 30,{type = 14, width = 200, height = 10, friction = 0.3, restitution = 0.2, angle = 0,color = '0x101010', miceCollision = true, groundCollision = false, foreground = false, dynamic = false,fixedRotation = false, mass = 0, linearDamping = 0, angularDamping  = 0})
  81. end
  82.  
  83. fireworks = function(x,y)
  84.     local current = particle[math.random(1,#particle)]
  85.     for i = 1,math.random(3,12) do
  86.         tfm.exec.displayParticle (current,(x - (5 * i)),(y),0,-(0.4 * i))
  87.         tfm.exec.displayParticle (current,(x + (5 * i)),(y),0,(0.4 * i))
  88.         tfm.exec.displayParticle (current,(x),(y - (5 * i)),(0.4 * i),0)
  89.         tfm.exec.displayParticle (current,(x),(y + (5 * i)),-(0.4 * i),0)
  90.        
  91.         tfm.exec.displayParticle (current,(x + (5 * i)),(y),0,-(0.4 * i))
  92.         tfm.exec.displayParticle (current,(x - (5 * i)),(y),0,(0.4 * i))
  93.         tfm.exec.displayParticle (current,(x),(y + (5 * i)),(0.4 * i),0)
  94.         tfm.exec.displayParticle (current,(x),(y - (5 * i)),-(0.4 * i),0)
  95.        
  96.         tfm.exec.displayParticle (current,(x),(y),0,-(0.5 * i))
  97.         tfm.exec.displayParticle (current,(x),(y),0,(0.5 * i))
  98.         tfm.exec.displayParticle (current,(x),(y),(0.5 * i),0)
  99.         tfm.exec.displayParticle (current,(x),(y),-(0.5 * i),0)
  100.     end
  101. end
  102.  
  103. --[[
  104.    
  105.     Somente líder e sub-líder / 'leader' and 'director'
  106.    
  107.     Comando por chat.
  108.     Ex: !comando valor
  109.    
  110.     !size 4
  111.         Utilize size para alterar o tamanho do seu rato. Valores entre 0.1 a 5.
  112.        
  113.     !tp 400 400
  114.         Utilize tp para teletransportar seu rato para uma determinada coordenada, x e y.
  115.  
  116.     !soulmate #soul#1234 activate   /   !soulmate #soul#1234 disable
  117.         Utilize para criar/desfazer um vínculo com outro jogador.
  118.    
  119.     !transform activate     / !transform disable
  120.         Utilize para ativar/desativar o modo de transformação
  121.    
  122.     !consumable disable     / !consumable activate
  123.         Utilize para liberar/encerrar o uso de consumíveis no cafofo.
  124.    
  125.     !emote 10 br
  126.         Utilize para quê todos realizem uma emoção. id da emoção e o parâmetro[br fr us].
  127.             lista [ID     Emoção
  128.                     0       Dançar
  129.                     1       Rir
  130.                     2       Chorar
  131.                     3       Beijar
  132.                     4       Irritado
  133.                     5       Bater palmas
  134.                     6       Dormir
  135.                     7       Facepalm
  136.                     8       Sentar
  137.                     9       Confete
  138.                     10      Bandeira
  139.                     11      Marshmallow
  140.                     12      Self
  141.                     13      Mão pra cima
  142.                     14      Hive Five
  143.                     15      Hive Five
  144.                     16      Lingua de sogra
  145.                    ]
  146.    
  147.     !message Olá, como vocês estão?
  148.         Utilize para criar uma Pop-up com alguma mensagem para todos jogadores.
  149.        
  150.     !fireworks
  151.         Utilize para ativar/desativar a queima de fogos de artifício.
  152.        
  153.     !collision
  154.         Utilize para ativar/desativar a colisão da barreira.
  155.        
  156.     !order
  157.         Utilize para colocar tudo bem ordem.
  158.    
  159. ]]--
  160.  
  161. eventChatCommand = function(name,c)
  162.     if order['leader'][name] or order['director'][name] then
  163.         local c = formatText(c:lower(),'[^%s]+')
  164.         if c[1] == 'size' then tfm.exec.changePlayerSize(name,c[2])
  165.         elseif c[1] == 'tp' then tfm.exec.movePlayer(name,c[2],c[3],false,0,0,false)
  166.         elseif c[1] == 'soulmate' then tfm.exec.linkMice (name,c[2],(c[3] == 'activate'))
  167.         elseif c[1] == 'transform' then tfm.exec.giveTransformations (name, c[2] == 'activate')
  168.         elseif c[1] == 'consumable' then tfm.exec.disablePhysicalConsumables(c[2] == 'disable' and true or c[2] == 'activate' and false)
  169.         elseif c[1] == 'emote' then for k,v in next, tfm.get.room.playerList do tfm.exec.playEmote (k,c[2],c[3]) end
  170.         elseif c[1] == 'message' then c[1] = '' ui.addPopup(1,0,'[<font color="#'..(order['leader'][name] and color['leader'] or order['director'][name] and color['director'])..'">'..name..'</font>]'..table.concat(c,' '),nil,275,175,250,true)
  171.         elseif c[1] == 'fireworks' then active = (active and false or not active and true)
  172.         elseif c[1] == 'collision' then if c[2] == 'disable' then for i = 1,15 do tfm.exec.removePhysicObject(i) end elseif c[2] == 'activate' then collision() end
  173.         elseif c[1] == 'order' then table.foreach(tfm.get.room.playerList, eventNewPlayer) end
  174.     end
  175. end
  176.  
  177. eventLoop = function()
  178.     if active then for i = 1,math.random(1,4) do fireworks(math.random(100,700),math.random(40,360)) end end
  179. end
  180.  
  181. eventPlayerDied = function(name)
  182.     tfm.exec.respawnPlayer(name)
  183. end
  184.  
  185. eventPlayerWon = function(name)
  186.     tfm.exec.respawnPlayer(name)
  187. end
  188.  
  189. --tfm.exec.newGame(map)
  190. table.foreach(tfm.get.room.playerList, eventNewPlayer)
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