Advertisement
alditojeje

Untitled

Dec 5th, 2019
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.04 KB | None | 0 0
  1. local adm = {["Blood#3565"]= true,["Anto#6095"] = true,["His#0439"] = true}
  2.  
  3. local fly = {}
  4. local speed = {}
  5. historial = {}
  6. respawn = true
  7. args = {}
  8. local categorias = {p1 = {'#1', p1, hola}, p2 = {}}
  9. function colorReyes()
  10. tfm.exec.setNameColor("Anto#6095", 0xFFA8D3)
  11. tfm.exec.setNameColor("Blood#3565", 0xCA2411)
  12. end
  13.  
  14. function main( )
  15. tfm.exec.disableAfkDeath(true)
  16. tfm.exec.disableAutoScore(true)
  17. tfm.exec.disableAutoShaman(true)
  18. tfm.exec.disableAutoTimeLeft(true)
  19. tfm.exec.disableAutoNewGame(true)
  20. tfm.exec.newGame('#7', false)
  21. system.disableChatCommandDisplay(nil)
  22. colorReyes()
  23. end
  24.  
  25. function eventChatCommand(name, command)
  26. if adm[name] then
  27. args = string.split(command, " ")
  28. if command=="queso" or command == "cheese" or command == "q" then
  29. tfm.exec.giveCheese (name)
  30. elseif command =="noc" or command == "noq" then
  31. tfm.exec.removeCheese (name)
  32. elseif command=="win" then
  33. tfm.exec.giveCheese (name)
  34. tfm.exec.playerVictory (name)
  35. elseif command=="sfacil" then
  36. tfm.exec.setShaman (name)
  37. tfm.exec.setShamanMode (name, 0)
  38. elseif command=="shard" then
  39. tfm.exec.setShaman (name)
  40. tfm.exec.setShamanMode (name, 1)
  41. elseif command=="sdivine" then
  42. tfm.exec.setShaman (name)
  43. tfm.exec.setShamanMode (name, 2)
  44. elseif command=="s" or command=="shaman" then
  45. tfm.exec.setShaman (name)
  46. elseif command=="nos" or command == "noshaman" then
  47. tfm.exec.setShaman (name, false)
  48. elseif command == "tp" then
  49. system.bindMouse(name, true)
  50. elseif command=="notp" then
  51. system.bindMouse(name, false)
  52. elseif command=="fly" then
  53. tfm.exec.bindKeyboard(name,32,false,true)
  54. if fly[name] then
  55. fly[name] = false
  56. else
  57. fly[name] = true
  58. end
  59. elseif command == "nofly" then
  60. fly[name] = false
  61. elseif command == "ar" or command == "activerespawn" or command == "activer" then
  62. if respawn then
  63. respawn = false
  64. else
  65. respawn = true
  66. end
  67. elseif command == "sp" or command == "speed" then
  68. tfm.exec.bindKeyboard(name,90,false,true)
  69. tfm.exec.bindKeyboard(name,88,false,true)
  70. if speed[name] then
  71. speed[name] = false
  72. else
  73. speed[name] = true
  74. end
  75. elseif command == "all" or command == "powers" or command == "poderes" then
  76. fly[name] = true
  77. tfm.exec.bindKeyboard(name,32,false,true)
  78. system.bindMouse(name, true)
  79. speed[name] = true
  80. tfm.exec.bindKeyboard(name,90,false,true)
  81. tfm.exec.bindKeyboard(name,88,false,true)
  82. elseif args[1] == "np" then
  83. if args[2] == nil then
  84. tfm.exec.newGame('#7', false)
  85. else
  86. args[2] = args[2]:gsub("p","#")
  87. tfm.exec.newGame(args[2], false)
  88. end
  89. elseif args[1] == "respawn" or args[1] == "r" then
  90. if args[2] == nil then
  91. tfm.exec.respawnPlayer(name)
  92. else
  93. tfm.exec.respawnPlayer(args[2])
  94. end
  95. end
  96. end
  97. end
  98.  
  99. function eventMouse(name, x, y)
  100. if system.bindMouse then
  101. tfm.exec.movePlayer(name, x, y, false, 0, 0, false)
  102. end
  103. end
  104.  
  105. function eventKeyboard(name,key,down,x,y)
  106. if key==32 and fly[name]==true then
  107. tfm.exec.movePlayer(name,0,0,true,0,-50,false)
  108. end
  109. if key==90 and speed[name]==true then
  110. tfm.exec.movePlayer(name,0,0,true,-100,0,false)
  111. end
  112. if key==88 and speed[name]==true then
  113. tfm.exec.movePlayer(name,0,0,true,100,0,false)
  114. end
  115. end
  116.  
  117. function eventPlayerDied (playerName)
  118. if respawn then
  119. tfm.exec.respawnPlayer(playerName)
  120. colorReyes()
  121. end
  122. end
  123. function eventPlayerWon(playerName)
  124. if respawn then
  125. tfm.exec.respawnPlayer(playerName)
  126. colorReyes()
  127. end
  128. tfm.exec.setPlayerScore(playerName, 1,true)
  129. end
  130.  
  131. function string.split(s, pattern, n)
  132. local st = {}
  133. for sb in string.gmatch(s, "[^"..pattern.."]+") do
  134. if not n or n > -1 then
  135. table.insert(st,sb)
  136. else
  137. st[#st] = st[#st]..pattern..sb
  138. end
  139. n = n and n-1 or false
  140. end
  141. return st
  142. end
  143.  
  144. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement