Advertisement
Guest User

Untitled

a guest
Dec 5th, 2019
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.88 KB | None | 0 0
  1. -- #SIZERACE
  2. tfm.exec.chatMessage("<ROSE>Type it <A:ACTIVE>!help<ROSE> for more information.", userName)
  3.  
  4. local banidos = {}
  5. w = 262
  6. w1 = 262
  7. x = 809
  8. x1 = -267
  9. data = {}
  10. local time = os.time();
  11. local run = os.time();
  12. local contagem = 1000;
  13. local tempo = os.time();
  14. local s=1
  15. local players = {}
  16. winners = {}
  17. jugadores = 0
  18. local adm = {["Boxofkrain#0000"] = true,["Brsowl#0000"] = true,["Blood#3565"]= true,["Rafapkzz#8588"] = true}
  19.  
  20.  
  21. maps = {"7662190","7662196","7519027","7520354","7520442","7519258","7521273","7661885","7662378","7662379","7662386","7662954"}
  22. keys = {66, 67, 86, 88}
  23.  
  24. miceInfo = {}
  25. for _,f in next,{"AutoShaman","AutoScore","AutoNewGame","AutoTimeLeft","MinimalistMode","PhysicalConsumables","AfkDeath"} do tfm.exec["disable"..f]() end
  26. --tfm.exec.setGameTime(90)
  27. tfm.exec.newGame(maps[math.random(#maps)])
  28.  
  29. function eventNewGame()
  30. tfm.exec.setGameTime(183)
  31. adminsColores()
  32. winners = {}
  33. jugadores = 0
  34. players()
  35. end
  36.  
  37. function eventPlayerDied(nick)
  38. tfm.exec.changePlayerSize(nick, 1)
  39. tfm.exec.respawnPlayer(nick)
  40. adminsColores()
  41. end
  42.  
  43.  
  44. function adminsColores()
  45. for k, v in next, adm
  46. do tfm.exec.setNameColor(k, 0xFF0000)
  47. end
  48. end
  49. adminsColores()
  50.  
  51. for _, v in next, {'np','ban','unban','help'} do
  52. system.disableChatCommandDisplay(v)
  53. end
  54.  
  55. function split(t,s)
  56. local a={}
  57. for i,v in string.gmatch(t,string.format("[^%s]+",s or "%s")) do
  58. table.insert(a,i)
  59. end
  60. return a
  61. end
  62.  
  63. function eventPlayerLeft (playerName)
  64. jugadores = jugadores - 1
  65. for i=1, #winners do
  66. if playerName == winners[i] then
  67. table.remove(winners,i)
  68. end
  69. end
  70. end
  71.  
  72. function players()
  73. for k in pairs(tfm.get.room.playerList) do
  74. jugadores = jugadores + 1
  75. end
  76. end
  77.  
  78. function eventPlayerWon(nick)
  79. table.insert(winners,nick)
  80. if #winners >= jugadores then
  81. tfm.exec.setGameTime(5)
  82. end
  83. tfm.exec.changePlayerSize(nick, 1)
  84. tfm.exec.setPlayerScore(nick, 1,true)
  85. --[[ if tfm.get.room.playerList[nick].community=="pl" then
  86. tfm.exec.chatMessage("<font color='#fff000'>Gracz " .. nick .. " wlasnie wygral runde!")
  87. else
  88. tfm.exec.chatMessage("<font color='#fff000'>Player " .. nick .. " has just won the round!")
  89. end --]]
  90. end
  91.  
  92. function eventKeyboard(nick, key)
  93. if key==88 and miceInfo[nick].lastTransform < os.time() - 2000 then
  94. tfm.exec.changePlayerSize(nick, 0.3)
  95. miceInfo[nick].lastTransform = os.time()
  96. end
  97. if key==67 and miceInfo[nick].lastTransform < os.time() - 2000 then
  98. tfm.exec.changePlayerSize(nick, 1)
  99. miceInfo[nick].lastTransform = os.time()
  100. end
  101. if key==86 and miceInfo[nick].lastTransform < os.time() - 2000 then
  102. tfm.exec.changePlayerSize(nick, 2.1)
  103. miceInfo[nick].lastTransform = os.time()
  104. end
  105. if key==66 and miceInfo[nick].lastTransform < os.time() - 2000 then
  106. tfm.exec.changePlayerSize(nick, 3.5)
  107. miceInfo[nick].lastTransform = os.time()
  108. end
  109. end
  110.  
  111. function eventTextAreaCallback(id, nick, call)
  112. if call=="cerrar" then
  113. for i = 0, 17, 1 do
  114. ui.removeTextArea(i, nick)
  115. end
  116. end
  117. end
  118.  
  119. function eventNewPlayer(nick)
  120. for i = 1,#keys do
  121. system.bindKeyboard(nick, keys[i], false, true)
  122. end
  123. miceInfo[nick] = {lastTransform = 0}
  124. end
  125.  
  126. function eventLoop(currentTime, remainingTime)
  127. if remainingTime <= 500 then
  128. tfm.exec.newGame(maps[math.random(#maps)])
  129. end
  130. end
  131.  
  132. for nick in next, tfm.get.room.playerList do
  133. eventNewPlayer(nick)
  134. end
  135.  
  136. function eventChatCommand(name, cmd)
  137. local arg = split(cmd, " ")
  138. if arg[1] == "help" then
  139. help(name)
  140. end
  141. --[[ if arg[1] == 'lang' or arg[1] == 'langue' or arg[1] == 'lingua' then
  142. if (arg[2]) then
  143. arg[2] = arg[2]:lower()
  144. -- data[name].lang = (translations[arg[2]] -- and arg[2] or data[name].lang)
  145. -- end
  146. --[[ if arg[1] == "p" then
  147. local p
  148. if arg[2] then
  149. p = ''
  150. p = arg[2]:lower():gsub('%a', string.upper, 1)
  151. else
  152. p = name
  153. end--
  154. end
  155. if tfm.get.room.playerList[p] then
  156. sendMenu(4, ""..translate(name, 'tribe')..""..tfm.get.room.playerList[p].tribeName.." "..translate(name, 'rounds')..""..data[p].rounds..""..translate(name, 'wons')..""..data[p].wins.."", name, 205, 50, 372, 200, 1)
  157. ui.addTextArea(90, "<p align='center'><font size='20'><B><J>"..p, name, 238, 80, 316, 47, 0x082330, 0x082330, 0, true)
  158. end --]]
  159. if adm[name] then
  160. if arg[1] == "ban" then
  161. local p
  162.  
  163. if arg[2] then
  164. p = ''
  165. p = arg[2]:lower():gsub('%a', string.upper, 1)
  166. banidos[arg[2]] = true
  167. ui.addTextArea(666, "", arg[2], -1500, -1500, 3000, 3000, 1, 1, 1, true)
  168. tfm.exec.killPlayer(arg[2])
  169. end
  170. end
  171.  
  172. if arg[1] == "unban" then
  173. local p
  174.  
  175. if arg[2] then
  176. p = ''
  177. p = arg[2]:lower():gsub('%a', string.upper, 1)
  178. banidos[arg[2]] = nil
  179. ui.removeTextArea(666, arg[2])
  180.  
  181. end
  182. end
  183. if arg[1] == "np" then
  184. if arg[2] then
  185. tfm.exec.newGame(arg[2])
  186. else
  187. tfm.exec.newGame(maps[math.random(#maps)]) -- Roda um mapa aleatório quando o tempo acabar
  188. end
  189. end
  190. end
  191. end
  192.  
  193. function help(name)
  194. if tfm.get.room.playerList[name].community == "br" then
  195. ui.addTextArea(0, "", name, 235, 60, 320, 260, 0x073247, 0x121212, 1, true)
  196. ui.addTextArea(1, "<p align='center'><font size ='18' color='#00C17C'>Ajuda<b>", name, 360, 60, 90, 25, 0x073247, 0x121212, 1, true)
  197. ui.addTextArea(2, "<p align='center'><font size ='15' color='#316CCC'><b>#Sizerace", name, 235, 60, 88, 20, 0x073247, 0x121212, 1, true)
  198. ui.addTextArea(3, "<p align='center'><V><a href='event:cerrar'><font color='#F93018'><b>X", name, 495, 60, 60, 20, 0x073247, 0x121212, 1, true)
  199. ui.addTextArea(4, "<p align='center'><VP>Bem Vindo ao <BV>#Sizerace<VP>! Aqui você terá de alternar os tamanhos do seu rato para superar as dificuldades que se encontram em cada mapa. Você pode trocar o seu tamanho em um intervalo de <BV>2<VP> segundos, Seja o mais rapido e divirta-se!<CS> <br><br><b>Letra X</b> = Tamanho 0.3<br><b>Letra C</b> = Tamanho 1.0<br><b>Letra V</b> = Tamanho 2.1<br><b>Letra B</b> = Tamanho 3.5<br><br><ROSE>Versão feita por:<ROSE> <CE>Rafapkzz#8588<CE><ROSE>,<ROSE> <CE>Brsowl#0000 <ROSE>e<CE> Blood#3565<ROSE>.<br><br>Créditos: <CE>Boxofkrain#0000<ROSE>.", name, 248, 100, 300, 265, 0, 0, 0, true)
  200. elseif tfm.get.room.playerList[name].community == "es" then
  201. ui.addTextArea(0, "", name, 235, 60, 320, 260, 0x073247, 0x121212, 1, true)
  202. ui.addTextArea(1, "<p align='center'><font size ='18' color='#00C17C'>Ayuda<b>", name, 360, 60, 90, 25, 0x073247, 0x121212, 1, true)
  203. ui.addTextArea(2, "<p align='center'><font size ='15' color='#316CCC'><b>#Sizerace", name, 235, 60, 88, 20, 0x073247, 0x121212, 1, true)
  204. ui.addTextArea(3, "<p align='center'><V><a href='event:cerrar'><font color='#F93018'><b>X", name, 495, 60, 60, 20, 0x073247, 0x121212, 1, true)
  205. ui.addTextArea(4, "<p align='center'><VP>¡Bienvenido a <BV>#Sizerace<VP>! Aquí tendrá que cambiar el tamaño de su ratón para superar las dificultades de cada mapa. Puedes cambiar tu tamaño cada <BV>2<VP> segundos, ¡sé el más rápido y diviértete!<CS> <br><br><b>Letra X</b> = Tamaño 0.3<br><b>Letra C</b> = Tamaño 1.0<br><b>Letra V</b> = Tamaño 2.1<br><b>Letra B</b> = Tamaño 3.5<br><br><ROSE>Versión hecha por:<ROSE> <CE>Rafapkzz#8588<CE><ROSE>,<ROSE> <CE>Brsowl#0000 <ROSE>y<CE> Blood#3565<ROSE>.<br><br>Créditos: <CE>Boxofkrain#0000.<CE>", name, 248, 100, 300, 265, 0, 0, 0, true)
  206. elseif tfm.get.room.playerList[name].community == "pl" then
  207. ui.addTextArea(0, "", name, 235, 60, 320, 260, 0x073247, 0x121212, 1, true)
  208. ui.addTextArea(1, "<p align='center'><font size ='18' color='#00C17C'>Pomoc<b>", name, 360, 60, 90, 25, 0x073247, 0x121212, 1, true)
  209. ui.addTextArea(2, "<p align='center'><font size ='15' color='#316CCC'><b>#Sizerace", name, 235, 60, 88, 20, 0x073247, 0x121212, 1, true)
  210. ui.addTextArea(3, "<p align='center'><V><a href='event:cerrar'><font color='#F93018'><b>X", name, 495, 60, 60, 20, 0x073247, 0x121212, 1, true)
  211. ui.addTextArea(4, "<p align='center'><VP>Witaj w <BV>#Sizerace<VP>! W tym pokoju, musisz zmienic rozmiar swojej myszki by przezwyciezyc trudnosci kazdej mapy. Mozesz zmienic swój rozmiar co <BV>dwie sekundy<VP>, badz najszybszy i baw sie dobrze!<CS> <br><br><b>Klawisz X</b> = Rozmiar 0.3<br><b>Klawisz C</b> = Rozmiar 1.0<br><b>Klawisz V</b> = Rozmiar 2.1<br><b>Klawisz B</b> = Rozmiar 3.5<br><br><ROSE>Modul zrobiony przez:<ROSE> <CE>Rafapkzz#8588<CE><ROSE>,<ROSE> <CE>Brsowl#0000 <ROSE>i<CE> Blood#3565<ROSE>.<br><br>Napisy: <CE>Boxofkrain#0000.<CE>", name, 248, 100, 300, 265, 0, 0, 0, true)
  212. else
  213. ui.addTextArea(0, "", name, 235, 60, 320, 260, 0x073247, 0x121212, 1, true)
  214. ui.addTextArea(1, "<p align='center'><font size ='18' color='#00C17C'>Help<b>", name, 360, 60, 90, 25, 0x073247, 0x121212, 1, true)
  215. ui.addTextArea(2, "<p align='center'><font size ='15' color='#316CCC'><b>#Sizerace", name, 235, 60, 88, 20, 0x073247, 0x121212, 1, true)
  216. ui.addTextArea(3, "<p align='center'><V><a href='event:cerrar'><font color='#F93018'><b>X", name, 495, 60, 60, 20, 0x073247, 0x121212, 1, true)
  217. ui.addTextArea(4, "<p align='center'><VP>Welcome to <BV>#Sizerace<VP>! In this room, you have to change the size of your mice to overcome the difficulties of each map. You can change your size each <BV>2<VP> seconds, be the fastest and have fun!<CS> <br><br><b>Letter X</b> = Size 0.3<br><b>Letter C</b> = Size 1.0<br><b>Lettter V</b> = Size 2.1<br><b>Letter B</b> = Size 3.5<br><br><ROSE>Version made by:<ROSE> <CE>Rafapkzz#8588<CE><ROSE>,<ROSE> <CE>Brsowl#0000 <ROSE>and<CE> Blood#3565<ROSE>.<br><br>Credits: <CE>Boxofkrain#0000.<CE>", name, 248, 100, 300, 265, 0, 0, 0, true)
  218. end
  219. end
  220.  
  221. tfm.exec.setRoomMaxPlayers(25)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement