Advertisement
Dudugz-Contistente

Untitled

Sep 9th, 2017
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.19 KB | None | 0 0
  1. tfm.exec.disableAutoShaman(true)
  2. tfm.exec.disableAutoNewGame(true)
  3. tfm.exec.disableAutoTimeLeft(true)
  4. tfm.exec.disableAutoScore(true)
  5.  
  6. Admin = "Hugotitas"
  7. vivos=0;
  8. data = {}
  9. mapas =
  10. {'<C><P F="0" L="1600" G="0,6" /><Z><S><S L="40" o="97018b" H="40" X="31" Y="369" T="12" P="0,0,0.3,1.5,60,0,0,0" /><S P="0,0,0.3,0.2,0,0,0,0" L="19" o="d411" H="400" Y="201" T="12" X="28" /><S P="0,0,0.3,0.2,0,0,0,0" L="546" o="1e1100" H="36" Y="184" T="12" X="274" /><S P="0,0,0.3,0.2,0,0,0,0" L="547" o="d411" H="17" Y="169" T="12" X="274" /><S L="350" o="1e1100" H="36" X="715" Y="154" T="12" P="0,0,0.3,0.2,-10,0,0,0" /><S P="0,0,0.3,1.5,30,0,0,0" L="40" o="97018b" H="40" Y="284" T="12" X="967" /><S P="0,0,0.3,0.2,-10,0,0,0" L="352" o="d411" H="17" Y="139" T="12" X="712" /><S P="0,0,0.3,0.2,0,0,0,0" L="823" o="1e1100" X="576" Y="310" T="12" H="36" /><S P="0,0,0.3,0.2,0,0,0,0" L="825" o="d411" X="576" Y="296" T="12" H="19" /><S P="0,0,0.3,0.2,0,0,0,0" L="27" o="d411" X="975" Y="152" T="12" H="304" /><S L="1600" o="1e1100" H="27" X="803" Y="388" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S P="0,0,0.3,0.2,0,0,0,0" L="28" o="1e1100" H="93" Y="87" T="12" X="1163" /><S L="1600" o="d411" H="20" X="801" Y="381" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S P="0,0,0.3,0.2,0,0,0,0" L="584" o="1e1100" H="35" Y="19" T="12" X="1308" /><S P="0,0,0.3,0.2,0,0,0,0" L="29" o="d411" H="363" Y="220" T="12" X="1573" /><S P="0,0,0.3,0.2,0,0,0,0" L="586" o="d411" H="22" Y="31" T="12" X="1307" /><S L="39" o="1e1100" X="997" H="328" Y="164" T="12" P="0,0,3,0.2,0,0,0,0" /><S P="0,0,0.3,0.2,0,0,0,0" L="32" o="1e1100" H="402" Y="201" T="12" X="1585" /><S P="0,0,0.3,0.2,0,0,0,0" L="39" o="1e1100" H="230" Y="255" T="12" X="1285" /><S P="0,0,0,0.2,0,0,0,0" L="30" o="d411" H="234" Y="257" T="12" X="1266" /><S P="0,0,0.3,0.2,0,0,0,0" L="18" o="d411" H="94" Y="87" T="12" X="1157" /><S P="0,0,0.3,0.2,0,0,0,0" L="81" o="262626" X="1470" c="2" Y="325" T="12" H="45" /><S P="0,0,0.3,0.2,0,0,0,0" L="16" o="1a1a1a" H="27" Y="358" T="12" X="1471" /><S P="0,0,0.3,0.2,0,0,0,0" L="22" o="1d1100" H="400" Y="201" T="12" X="10" /><S L="945" o="1d1100" X="492" H="28" Y="15" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S L="945" o="d411" X="493" H="20" Y="25" T="12" P="0,0,0.3,0.2,0,0,0,0" /></S><D><P X="1108" Y="369" T="6" P="0,1" /><F Y="334" X="1469" /><T Y="341" X="1470" /><DS Y="147" X="37" /></D><O /></Z></C>',5119521,7108733,7263304,'<C><P F="3" L="1600" G="0,7" /><Z><S><S L="20" H="18" X="367" Y="359" T="10" P="0,0,0.3,0,0,0,0,0" /><S H="50" L="20" X="73" c="2" N="" Y="343" T="5" P="0,0,0.3,0.2,0,0,0,0" /><S H="232" L="55" X="40" c="2" N="" Y="253" T="5" P="0,0,0.3,0.2,0,0,0,0" /><S X="60" L="33" H="368" c="2" N="" Y="192" T="5" P="0,0,0,0.2,-10,0,0,0" /><S L="382" o="1f1200" X="191" H="31" N="" Y="386" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S L="381" o="2cff00" X="191" H="19" N="" Y="377" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S H="368" L="33" X="16" c="1" N="" Y="184" T="5" P="0,0,0.3,0.2,0,0,0,0" /><S H="34" L="421" X="590" c="2" N="" Y="383" T="5" P="0,0,0.3,0.2,0,0,0,0" /><S L="38" X="473" H="63" Y="332" T="1" m="" P="0,0,0,0.2,0,0,0,0" /><S P="0,0,0,0.2,0,0,0,0" L="38" X="583" Y="335" T="1" m="" H="63" /><S P="0,0,0.3,9999,0,0,0,0" L="15" o="2f2f2f" H="32" Y="186" T="12" X="1027" /><S P="0,0,0,0.2,0,0,0,0" L="38" H="63" Y="334" T="1" m="" X="692" /><S L="15" o="2f2f2f" X="992" H="32" Y="183" T="12" P="0,0,0.3,9999,0,0,0,0" /><S L="14" o="2f2f2f" X="1011" H="51" Y="173" T="12" P="0,0,0.3,9999,0,0,0,0" /><S L="425" H="10" X="592" Y="404" T="5" P="0,0,0.3,0.2,0,0,0,0" /><S L="10" H="41" X="805" Y="387" T="5" P="0,0,0.3,0.2,0,0,0,0" /><S L="31" H="76" X="852" Y="368" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="350" H="29" X="1345" Y="131" T="5" P="0,0,0.3,0.2,0,0,0,0" /><S L="32" H="154" X="927" Y="337" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="69" H="222" X="1006" Y="289" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="80" H="268" X="839" Y="135" T="10" P="0,0,,0,0,0,0,0" /><S L="32" H="307" X="1086" Y="246" T="5" P="0,0,0.3,0.2,0,0,0,0" /><S L="33" H="321" X="1172" Y="161" T="5" P="0,0,0.3,0.2,0,0,0,0" /><S L="350" H="29" X="1331" Y="307" T="5" P="0,0,0.3,0.2,0,0,0,0" /><S L="530" H="28" X="1336" Y="386" T="5" P="0,0,0.3,0.2,0,0,0,0" /><S L="33" H="204" X="1582" Y="297" T="5" P="0,0,0.3,0.2,0,0,0,0" /><S L="350" X="1426" H="29" Y="208" T="5" P="0,0,0.3,0.2,0,0,0,0" /><S L="33" H="196" X="1583" Y="97" T="5" P="0,0,0.3,0.2,0,0,0,0" /><S L="320" H="32" X="1409" Y="61" T="5" P="0,0,0.3,0.2,0,0,0,0" /><S L="447" H="42" X="1376" Y="-20" T="5" P="0,0,0.3,0.2,0,0,0,0" /><S H="281" L="58" o="3b2000" X="1130" c="2" Y="232" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S H="54" L="408" o="3b2000" X="1363" c="2" Y="348" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S H="99" L="60" o="3b2000" X="1536" c="2" Y="272" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S H="72" L="323" o="3b2000" X="1349" c="2" Y="258" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S H="79" L="64" o="3b2000" X="1220" c="2" Y="183" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S H="48" L="316" o="3b2000" X="1409" c="2" Y="170" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S H="70" L="53" o="3b2000" X="1543" c="2" Y="111" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S H="45" L="346" o="3b2000" X="1361" c="2" Y="98" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S H="79" L="64" o="3b2000" X="1219" c="2" Y="38" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S H="44" L="320" o="3b2000" X="1408" c="2" Y="23" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S L="23" o="5f5f5f" X="1534" H="18" Y="36" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S H="29" L="61" o="636363" X="1535" c="2" Y="16" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S L="782" X="403" H="57" Y="-30" T="1" m="" P="0,0,0,0.2,0,0,0,0" /><S L="50" X="1178" H="1000" Y="-538" T="1" m="" P="0,0,0,0.2,180,0,0,0" /></S><D><DS Y="354" X="43" /><P P="0,0" Y="367" T="47" X="319" /><P P="1,0" Y="367" T="46" X="369" /><P P="0,0" Y="205" T="43" X="536" /><P P="1,0" Y="373" T="42" X="419" /><P P="1,0" Y="366" T="118" X="473" /><P P="1,0" Y="366" T="118" X="588" /><P P="1,0" Y="365" T="118" X="699" /><T Y="30" X="1487" /><F Y="28" X="1350" /></D><O /></Z></C>',7263379,7263304}
  11. p = {}
  12. local sonic = {}
  13. local knucles = {}
  14. local tails = {}
  15. local voando = {}
  16. local planar = {}
  17. time = os.time();
  18.  
  19. system.bindMouse(Admin, true)
  20.  
  21. function eventMouse(Admin, x, y)
  22. print(""..x.." e "..y.."")
  23. end
  24.  
  25. function eventNewPlayer(name)
  26. table.insert(p,name)
  27. data[name] = {
  28. life = 3,
  29. wins = 0,
  30. dead = 0,
  31. rodada = 0,
  32. xp = 0,
  33. level = 0,
  34. time = 0,
  35. anel = 0,
  36. first = 0,
  37. pos = 0,
  38. }
  39. aneu(name)
  40. status(name)
  41. tfm.exec.setPlayerScore(name,data[name].life)
  42. for keys, k in pairs({32,17,83,87,38,40}) do
  43. tfm.exec.bindKeyboard(name,k,true,true)
  44. tfm.exec.bindKeyboard(name,k,false,true)
  45. end
  46. ui.addTextArea(0,"",name,4,28,134,20,0x986742, 0x986742,1,true)
  47. ui.addTextArea(1,"<font size='12'><font face='Arial'>Espaço Para Mover-se",name,5,29,132,18,0x171311, 0x171311,1,true)
  48. ui.addTextArea(4,"eae",name,660,380,135,20,0x986742, 0x986742,1,true)
  49. ui.addTextArea(5,"<font size='12'><font face='Arial'>Personagem : - -",name,661,381,133,18,0x171311, 0x171311,1,true)
  50. ui.addTextArea(6,"ae",name,284,28,188,20,0x986742, 0x986742,1,true)
  51. ui.addTextArea(7,"<font size='15'><font face='Arial'><a href='event:escolha'> Escolha seu Personagem :",name,285,29,186,18,0x171311,0x171311,1,true)
  52. ui.addTextArea(15,"ae",name,741,28,55,20,0x986742, 0x986742,1,true)
  53. ui.addTextArea(16,"<font size='15'><font face='Arial'><a href='event:Perfil'> Perfil",name,742,29,53,18,0x171311, 0x171311,1,true)
  54. end
  55.  
  56. function aneu(name)
  57. ui.addTextArea(28,"<font size='45'><font face='Arial'><font color='#FFE300'>O",name,-7,327,0,0,0,0,1,true)
  58. ui.addTextArea(29,"<font color='#FFFFFF' size='20'>X"..data[name].anel.."",name,25,338,0,0,0,0,1,true)
  59. end
  60.  
  61. function start(name)
  62. end
  63.  
  64. function status(name)
  65. ui.addTextArea(3,"<font size='35'><font face='Arial'><font color='#FF0000'>♥",name,-7,366,0,0,0,0,1,true)
  66. ui.addTextArea(2,"<font color='#FFFFFF' size='20'>X"..data[name].life.."",name,25,375,0,0,0,0,1,true)
  67. if data[name].life == 3 then
  68. tfm.exec.respawnPlayer(name)
  69. end
  70. if data[name].life == 2 then
  71. tfm.exec.respawnPlayer(name)
  72. end
  73. if data[name].life == 1 then
  74. tfm.exec.respawnPlayer(name)
  75. end
  76. end
  77.  
  78. function start(name)
  79. end
  80.  
  81. function subAnel(name,anel)
  82. data[name].anel = data[name].anel + anel
  83. if data[name].anel <= 0 then
  84. data[name].anel = 0
  85. end
  86. if data[name].anel >= 100 then
  87. data[name].life = data[name].life + 1
  88. tfm.exec.setPlayerScore(name,data[name].life)
  89. data[name].anel = 0
  90. end
  91. aneu(name)
  92. end
  93.  
  94.  
  95. function subLife(name,life)
  96. if data[name].anel <= 0 then
  97. data[name].life = data[name].life - life
  98. tfm.exec.setPlayerScore(name,data[name].life)
  99. if data[name].life <= 0 then
  100. data[name].life = 0
  101. tfm.exec.setPlayerScore(name,data[name].life)
  102. tfm.exec.killPlayer(name)
  103. end
  104. end
  105. status(name)
  106. end
  107.  
  108. function eventPlayerLeft(name)
  109. local i = -1
  110. for _,nome in pairs(p) do
  111. if nome == name then
  112. i=_
  113. end
  114. end
  115. table.remove(tails,i)
  116. table.remove(sonic,i)
  117. table.remove(knucles,i)
  118. end
  119.  
  120. function subAneu(name,anel)
  121. data[name].anel = data[name].anel - anel
  122. if data[name].anel <= 0 then
  123. data[name].anel = 0
  124. end
  125. aneu(name)
  126. end
  127.  
  128. function eventPlayerDied(name)
  129. subAneu(name,math.random(1,5))
  130. subLife(name,1)
  131. data[name].dead = data[name].dead + 1
  132. local p = 0
  133. for player,name in pairs(tfm.get.room.playerList) do
  134. if not name.isDead then
  135. p = p + 1
  136. end
  137. end
  138. if p < 2 then
  139. tfm.exec.setGameTime(20)
  140. end
  141. if vivos == 0 then
  142. tfm.exec.newGame(mapas[math.random(#mapas)])
  143. ui.setMapName("<font color='#FFE300'>Mice<font color='#0070FF'> Mania")
  144. end
  145. end
  146.  
  147. function eventPlayerWon(name)
  148. data[name].pos = data[name].pos + 1
  149. SubLevel(name,math.random(5,20))
  150. data[name].wins = data[name].wins + 1
  151. vivos=vivos-1;
  152.  
  153. if vivos < 2 then
  154. tfm.exec.setGameTime(5)
  155. end
  156. if data[name].pos == 1 then
  157. data[name].first = data[name].first + 1
  158. subAnel(name,math.random(15,20))
  159. end
  160. if data[name].pos == 2 then
  161. subAnel(name,math.random(10,15))
  162. end
  163. if data[name].pos == 3 then
  164. subAnel(name,math.random(5,10))
  165. end
  166. if data[name].pos >= 4 then
  167. subAnel(name,math.random(1,5))
  168. end
  169. end
  170.  
  171. function eventNewGame()
  172. for i,v in pairs(tfm.get.room.playerList) do
  173. data[i].rodada = data[i].rodada + 1
  174. vivos=vivos+1;
  175. status(i)
  176. end
  177. end
  178.  
  179. function eventTextAreaCallback(id,name,call)
  180. if call == "escolha" then
  181. ui.addTextArea(8,"",name,4,26,792,400,1,1,80,true)
  182. ui.addTextArea(9,"",name,234,144,130,30,0x986742, 0x986742,1,true)
  183. ui.addTextArea(10,"<font size='20'><font face='Arial'><a href='event:Sonic'> Sonic",name,235,145,128,28,0x171311, 0x171311,1,true)
  184. ui.addTextArea(11,"",name,425,144,130,30,0x986742, 0x986742,1,true)
  185. ui.addTextArea(12,"<font size='20'><font face='Arial'><a href='event:Tails'> Tails",name,426,145,128,28,0x171311, 0x171311,1,true)
  186. ui.addTextArea(13,"",name,330,224,130,30,0x986742, 0x986742,1,true)
  187. ui.addTextArea(14,"<font size='20'><font face='Arial'><a href='event:Knucles'> Knuckles",name,331,225,128,28,0x171311, 0x171311,1,true)
  188. for id=6,7 do
  189. ui.removeTextArea(id,name)
  190. end
  191. end
  192. if call == "Sonic" then
  193. table.insert(sonic,name)
  194. tfm.exec.setNameColor(name,0x005EFF)
  195. ui.addTextArea(5,"<font size='12'><font face='Arial'>Personagem :<font size='12' color='#005EFF'> Sonic",name,661,381,133,18,0x171311, 0x171311,1,true)
  196. for id=8,14 do
  197. ui.removeTextArea(id,name)
  198. end
  199. end
  200. if call == "Tails" then
  201. table.insert(tails,name)
  202. tfm.exec.setNameColor(name,0xFFD100)
  203. ui.addTextArea(5,"<font size='12'><font face='Arial'>Personagem :<font size='12' color='#FFD100'> Tails",name,661,381,133,18,0x171311, 0x171311,1,true)
  204. for id=8,14 do
  205. ui.removeTextArea(id,name)
  206. end
  207. end
  208. if call == "Perfil" then
  209. nome = name
  210. if tfm.get.room.playerList[nome] then
  211. this = tfm.get.room.playerList[nome]
  212. ui.addTextArea(19,"",name,240,92,350,180,0x183942,0x29434A,1,true)
  213. ui.addTextArea(20,"<font size='20' face='Impact'><p align='center'><V>"..nome,name,308,102,215,30,0x1D434D,0x1D434D,0.5,true)
  214. ui.addTextArea(21,"<font size='12'><p align='center'>Comunidade : <V>"..this.community:lower():gsub('%a',string.upper,1).."</font>",name,308,145,215,20,0x1D434D,0x1D434D,0,true)
  215. ui.addTextArea(22,"<font size='15'><p align='center'>Vitórias: "..data[nome].wins.."\nMortes: "..data[nome].dead.."\nFirst: "..data[nome].first.."",name,250,190,330,62,0x1D434D,0x1D434D,1,true)
  216. ui.addTextArea(23,"<p align='center'><a href='event:close'>Fechar",name,250,285,330,20,0x153139,0x132C33,1,true)
  217. ui.addTextArea(24,"",name,253,161,100,20,0x00889A,0x00889A,1,true)
  218. levelp(nome,name)
  219. else
  220. ui.addPopup(0,3,"<font size ='14' color='#FF00DE'>[•]</font><font color='#FED000' size='14'> O Jogador <font color='#00F9FE'>"..nome.."</font> Ele não se Encontra na Sala.",name,300,200,300,true)
  221. end
  222. end
  223. if call == "close" then
  224. for id=19,27 do
  225. ui.removeTextArea(id,name)
  226. end
  227. end
  228. if call == "Knucles" then
  229. table.insert(knucles,name)
  230. tfm.exec.setNameColor(name,0xFF0000)
  231. ui.addTextArea(5,"<font size='12'><font face='Arial'>Personagem :<font size='11' color='#FF0000'> Knuckles",name,661,381,133,18,0x171311, 0x171311,1,true)
  232. for id=8,14 do
  233. ui.removeTextArea(id,name)
  234. end
  235. end
  236. end
  237.  
  238. function split(t,s)
  239. local a={}
  240. for i,v in string.gmatch(t,string.format("[^%s]+",s or "%s")) do
  241. table.insert(a,i)
  242. end
  243. return a
  244. end
  245.  
  246. function eventChatCommand(name,cmd)
  247. local arg = split(cmd, " ")
  248. if arg[1] == "p" then
  249. if arg[2] then
  250. nome = arg[2]:lower():gsub('%a', string.upper, 1)
  251. else
  252. nome = name
  253. end
  254. if tfm.get.room.playerList[nome] then
  255. this = tfm.get.room.playerList[nome]
  256. ui.addTextArea(19,"",name,240,92,350,180,0x183942,0x29434A,1,true)
  257. ui.addTextArea(20,"<font size='20' face='Impact'><p align='center'><V>"..nome,name,308,102,215,30,0x1D434D,0x1D434D,0.5,true)
  258. ui.addTextArea(21,"<font size='12'><p align='center'>Comunidade : <V>"..this.community:lower():gsub('%a',string.upper,1).."</font>",name,308,145,215,20,0x1D434D,0x1D434D,0,true)
  259. ui.addTextArea(22,"<font size='15'><p align='center'>Vitórias: "..data[nome].wins.."\nMortes: "..data[nome].dead.."\nFirst: "..data[nome].first.."",name,250,190,330,62,0x1D434D,0x1D434D,1,true)
  260. ui.addTextArea(23,"<p align='center'><a href='event:close'>Fechar",name,250,285,330,20,0x153139,0x132C33,1,true)
  261. ui.addTextArea(24,"",name,253,161,100,20,0x00889A,0x00889A,1,true)
  262. levelp(nome,name)
  263. else
  264. ui.addPopup(0,3,"<font size ='14' color='#FF00DE'>[•]</font><font color='#FED000' size='14'> O Jogador <font color='#00F9FE'>"..nome.."</font> Ele não se Encontra na Sala.",name,300,200,300,true)
  265. end
  266. end
  267. end
  268.  
  269. function levelp(nome,name)
  270. ui.addTextArea(25,"<font color='#FFEF00'>Level: "..data[nome].level.."",name,253,141,0,0,0x00000,0x00000,1,true)
  271. ui.addTextArea(26,"",name,253,161,data[nome].xp,20,0x01CAE6,0x01CAE6,1,true)
  272. ui.addTextArea(27,"<font color='#FFEF00'>Xp: "..data[nome].xp.."/100",name,273,161,0,0,0x00000,0x00000,1,true)
  273. end
  274.  
  275. function SubLevel(name,xp)
  276. data[name].xp = data[name].xp + xp
  277. if data[name].xp >= 100 then
  278. data[name].xp = 100
  279. data[name].level = data[name].level + 1
  280. data[name].xp = data[name].xp - 100
  281. end
  282. end
  283.  
  284. function eventKeyboard(name, key, down, x, y)
  285. if key == 32 and not tfm.get.room.playerList[name].isDead then
  286. for _,nome in pairs(sonic) do
  287. if nome == name then
  288. if tfm.get.room.playerList[name].isFacingRight then
  289. tfm.exec.movePlayer(name,0,0,true,40,0,true)
  290. tfm.exec.displayParticle(9,x,y,math.random(-1.1),vx,math.random(1.-1),ay,nil)
  291. else
  292. tfm.exec.movePlayer(name,0,0,true,-40,0,true)
  293. tfm.exec.displayParticle(9,x,y,math.random(-1.1),vx,math.random(1.-1),ay,name)
  294. end
  295. end
  296. end
  297. end
  298.  
  299. if key == 32 and not tfm.get.room.playerList[name].isDead then
  300. for _,nome in pairs(tails) do
  301. if nome == name then
  302. table.insert(voando,name)
  303. tfm.exec.displayParticle(2,x,y,math.random(0.15),math.random(-0.5),0,-5,nil)
  304. end
  305. end
  306. end
  307.  
  308. if (key == 83 or key == 40) then
  309. local i = -1
  310. for _,nome in pairs(voando) do
  311. if nome == name then
  312. i=_
  313. end
  314. end
  315. table.remove(voando,i)
  316. end
  317.  
  318. if key == 32 and not tfm.get.room.playerList[name].isDead then
  319. if data[name].time < os.time()-200 then
  320. for _,nome in pairs(knucles) do
  321. if nome == name then
  322. if y > 20 then
  323. if tfm.get.room.playerList[name].isFacingRight then
  324. tfm.exec.displayParticle(13,x,y,0,0,0,0,nil)
  325. tfm.exec.movePlayer(name,0,0,false,0,-math.random(8,10),true)
  326. else
  327. tfm.exec.displayParticle(13,x,y,0,0,0,0,nil)
  328. tfm.exec.movePlayer(name,0,0,false,0,-math.random(8,10),true)
  329. end
  330.  
  331. data[name].time = os.time();
  332. end
  333. end
  334. end
  335. end
  336. end
  337. end
  338.  
  339. function eventLoop(t,r)
  340. for _,nome in pairs(voando) do
  341. tfm.exec.movePlayer(nome,0,0,true,0,-70,true)
  342. end
  343. for i,v in pairs(tfm.get.room.playerList) do
  344. if v.y < 48 then
  345. tfm.exec.movePlayer(i, 0, 0, false, 0, 150, true)
  346. tfm.exec.movePlayer(i, 0, 0, false, math.random(-100,100), 0, true)
  347. end
  348. end
  349. if r <= 0 then
  350. tfm.exec.newGame(mapas[math.random(#mapas)])
  351. ui.setMapName("<font color='#FFE300'>Mice<font color='#0070FF'> Mania")
  352. end
  353. end
  354.  
  355. for i,v in pairs(tfm.get.room.playerList) do
  356. eventNewPlayer(i)
  357. end
  358.  
  359. tfm.exec.newGame(mapas[math.random(#mapas)])
  360. ui.setMapName("<font color='#FFE300'>Mice<font color='#0070FF'> Mania")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement