Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.44 KB | None | 0 0
  1. -------------------- System --------------------
  2.  
  3. _, nickname = pcall(nil)
  4. local 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. ------------------------------------------------
  13.  
  14. -- Editáveis!
  15.  
  16. local map = '@7554227'
  17.  
  18. -- Definir as coordenadas dos lugares.
  19. local convenient = {
  20. ['iniciar'] = {500,100},
  21. ['assistir'] = {300,370},
  22. ['desfilou'] = {1120,380},
  23. ['palco'] = {580,325},
  24. }
  25.  
  26. -- Não editável.
  27.  
  28. local staff = {admin:lower()}
  29.  
  30. table.contains = function(rawTable, existentValue)
  31. for index, value in pairs(rawTable) do
  32. if value == existentValue then
  33. return true
  34. end
  35. end
  36. return false
  37. end
  38.  
  39. formatText = function(txt,form)
  40. p = {} for k in txt:gmatch(form) do p[#p + 1] = k end return p
  41. end
  42.  
  43. eventNewPlayer = function(name)
  44. tfm.exec.respawnPlayer(name)
  45. if table.contains(staff,name:lower()) then tfm.exec.setNameColor(name,'0x'..(name == admin and 'FF0000' or '3b3b3b')..'') else tfm.exec.setNameColor(name,'0xC2C2DA') end
  46. end
  47.  
  48. eventNewGame = function()
  49. ui.setMapName('Halloween party!')
  50. end
  51.  
  52. eventLoop = function()
  53. table.foreach(tfm.get.room.playerList, eventNewPlayer)
  54. end
  55.  
  56. eventChatCommand = function(name,c)
  57. local value = ''
  58. local c = formatText(c:lower(),'[^%s]+')
  59. if table.contains(staff,name:lower()) then
  60. if c[1] == 'chat' then c[1] = '' ui.addPopup(1,0,'<b><font size="10" color="#000000'..(name == admin and 'FF0000' or '')..'">['..(name == admin and 'Apresentadora' or 'Jurada')..' '..name..']</font> '..table.concat(c,' ')..'</b>',nil,260,175,280,true) end
  61. if c[1] == 'iniciar' then tfm.exec.movePlayer (c[2],convenient[c[1]][1],convenient[c[1]][2]) end
  62. if c[1] == 'assistir' then tfm.exec.movePlayer (c[2],convenient[c[1]][1],convenient[c[1]][2]) end
  63. if c[1] == 'desfilou' then tfm.exec.movePlayer (c[2],convenient[c[1]][1],convenient[c[1]][2]) end
  64. if c[1] == 'palco' then tfm.exec.movePlayer (c[2],convenient[c[1]][1],convenient[c[1]][2]) end
  65. end
  66. if c[1] == 'staff' and name == admin and not table.contains(staff,c[2]) then staff[#staff + 1] = c[2] end
  67. if c[1] == 'unstaff' and name == admin and admin:lower() ~= c[2] and table.contains(staff,c[2]) then for k,v in next, staff do if v == c[2] then value = k end end table.remove(staff,value) end
  68. end
  69.  
  70. tfm.exec.newGame(map)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement