Boeing747-8

Untitled

Jun 12th, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.56 KB | None | 0 0
  1. tfm.exec.disableMortCommand(true)
  2. wonCountDown=1
  3.  
  4. scores={0,0,0,0,0,0,0,0}
  5. maps={7455338}
  6. powery=320
  7. powerx=math.random(1600)
  8.  
  9. mice=0
  10.  
  11.  
  12. ui.addTextArea(10, "", nil, -432, -822, 3625, 953, 0xff0000, 0x00a2ff, 0.6, true)
  13.  
  14. Down=string.byte("S")
  15.  
  16. tfm.exec.disableAutoShaman(true)
  17. tfm.exec.disableAutoNewGame(true)
  18. tfm.exec.disableAfkDeath(true)
  19.  
  20. tfm.exec.disableAutoShaman(true)
  21. tfm.exec.disableAutoTimeLeft(true)
  22. tfm.exec.disableAutoScore(true)
  23. data={}
  24. text={}
  25. lang={}
  26. lang.en={credits="Credits</font></font><font face='verdana'><font size='11'>\n\n<N>Programming - Fuzzyfirsdog#0000\n\nModule Idea - Reddeathnick#3204\n\nPowerup Suggestions - Reddeathnick#3204, Seaqueen2003#000, Mugiwaraloffy#9866\n\n<VP>Thank you ^^",credits2="Credits",youCanAttack="You can attack",youCanNotAttack="You can not attack",youCanUsePowerups="You can use powerups",youCanNotUsePowerups="You can not use powerups",attacked="ATTACKED",youAreARunner="You are a runner",youAreADeath="You are a death",help="In #deathrun your goal is to complete a task that is given randomly to you. Runners have to escape from the shamans spawning objects to kill the mice. Killers are to kill the mice without letting any get into to hole. Good luck!",close="Close",help2="Help",superJump="SUPER JUMP",speed="SPEED",deathsWin="Deaths win!",runnersWin="Runners win!"}
  27. roles={"Death","Runner"}
  28.  
  29. death=0
  30. runner=0
  31. miceInHole=0
  32.  
  33. function setLang(n)
  34. for n,player in pairs(tfm.get.room.playerList) do
  35. text[n]=lang[tfm.get.room.playerList[n].community] or lang.en
  36. end
  37. end
  38.  
  39.  
  40.  
  41. function bindMouse()
  42. for n,player in pairs(tfm.get.room.playerList) do
  43. tfm.exec.bindKeyboard(n, 32, true, true)
  44. system.bindMouse(n, true)
  45. tfm.exec.bindKeyboard(n, 40, true, true)
  46. tfm.exec.bindKeyboard(n, Down, true, true)
  47. end
  48. end
  49. bindMouse()
  50.  
  51. tfm.exec.newGame(maps[math.random(#maps)])
  52. names={}
  53.  
  54. theRole=1
  55. currentRole=roles[math.floor(theRole)]
  56.  
  57. function changeCurrentRole()
  58.  
  59. end
  60. numbs={1,2}
  61. for n,player in pairs(tfm.get.room.playerList) do
  62.  
  63. changeCurrentRole()
  64. mice=mice+1
  65. table.insert(names,n)
  66. setLang(n)
  67. data[n]={name=n,role=roles[math.floor(numbs[math.random(#numbs)])],points=0,spawnLimit=-1,ableToShoot=0,ableToShoot2=0}
  68.  
  69. ui.addTextArea(0, "<font size='30'><BV>You are a<VP> "..data[n].role, n, 234, 131, 348, 123, 0x636363, 0xa6a6a6, 1, true)
  70. ui.addTextArea(15, "<VP><a href='event:help'><font size='12'>"..text[n].help2.."</a> | <a href='event:credits'>"..text[n].credits2, n, 10, 30, 264, 26, 0x00aaff, 0x00eeff, 0, true)
  71. end
  72. function findRoles(n)
  73. for n,player in pairs(tfm.get.room.playerList) do
  74. if data[n].role=="Death" then
  75.  
  76. tfm.exec.movePlayer(n,30,30,false,0,0,false)
  77. tfm.exec.setShaman(n)
  78. ui.addTextArea(0, "<font size='30'><R>"..text[n].youAreADeath, n, 234, 131, 348, 123, 0x636363, 0xa6a6a6, 1, true)
  79.  
  80. elseif data[n].role=="Runner" then
  81.  
  82. tfm.exec.movePlayer(n,30,300,false,0,0,false)
  83. ui.addTextArea(0, "<font size='30'><VP>"..text[n].youAreARunner, n, 234, 131, 348, 123, 0x636363, 0xa6a6a6, 1, true)
  84.  
  85. end
  86. end
  87. end
  88.  
  89.  
  90.  
  91.  
  92.  
  93. n1=scores[math.floor(1)]
  94. n2=scores[math.floor(2)]
  95. n3=scores[math.floor(3)]
  96. print(n1)
  97. print(n2)
  98. print(n3)
  99.  
  100.  
  101.  
  102. function eventNewPlayer(n)
  103. mice=mice+1
  104. data[n]={name=n,role=roles[math.floor(numbs[math.random(#numbs)])],points=0,spawnLimit=-1,ableToShoot=0,ableToShoot2=0}
  105. setLang(n)
  106. findRoles(n)
  107. tfm.exec.respawnPlayer(n)
  108. ui.addTextArea(15, "<VP><a href='event:help'>"..text[n].help2, n, 10, 30, 264, 26, 0x00aaff, 0x00eeff, 0, true)
  109. end
  110.  
  111.  
  112.  
  113.  
  114.  
  115. function addToRoleNumber()
  116. for n,player in pairs(tfm.get.room.playerList) do
  117. if data[n].role=="Death" then
  118. death=death+1
  119. elseif data[n].role=="Runner" then
  120. runner=runner+1
  121.  
  122.  
  123. end
  124. findRoles(n)
  125.  
  126.  
  127. end
  128. end
  129.  
  130.  
  131.  
  132. tfm.exec.newGame(maps[math.random(#maps)])
  133.  
  134. function eventNewGame()
  135. time=0
  136. theRole=1
  137. powerx=math.random(1600)
  138. runner=0
  139. death=0
  140. for n,player in pairs(tfm.get.room.playerList) do
  141. changeCurrentRole()
  142. data[n].role=roles[math.floor(numbs[math.random(#numbs)])]
  143. data[n].ableToShoot=0
  144. data[n].ableToShoot2=0
  145. data[n].spawnLimit=-1
  146.  
  147. end
  148. findRoles(n)
  149.  
  150. for n,player in pairs(tfm.get.room.playerList) do
  151. if data[n].role=="Death" then
  152. death=death+1
  153. end
  154.  
  155. if data[n].role=="Runner" then
  156. runner=runner+1
  157. end
  158.  
  159.  
  160. end
  161. findRoles(n)
  162.  
  163.  
  164. end
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172. locationx=0
  173. locationy=0
  174.  
  175.  
  176. objects={54,23,202,90,40}
  177. function eventMouse(n,x,y)
  178. system.bindMouse(n,false)
  179.  
  180. if data[n].role=="Death" then
  181. data[n].spawnLimit=2
  182. ui.addTextArea(2, "<font color='#FF9000'><font size='30'><b>"..n.." "..text[n].attacked, nil, x, y, 425, 100, 0x324650, 0x000000, 0, false)
  183.  
  184. locationx=x
  185. locationy=y
  186.  
  187.  
  188.  
  189. tfm.exec.addShamanObject(objects[math.random(#objects)],locationx,locationy,0,0,20,false)
  190. tfm.exec.displayParticle(0,locationx,locationy,0.5,0.5,0.5,0.5,nil)
  191. tfm.exec.displayParticle(0,locationx,locationy,-0.5,-0.5,-0.5,-0.5,nil)
  192. tfm.exec.displayParticle(2,locationx,locationy,3,-3,3,-3,nil)
  193. tfm.exec.displayParticle(2,locationx,locationy,-3,3,-3,3,nil)
  194.  
  195. tfm.exec.displayParticle(0,locationx,locationy,-0.5,0.5,-0.5,0.5,nil)
  196. tfm.exec.displayParticle(0,locationx,locationy,0.5,-0.5,0.5,-0.5,nil)
  197. tfm.exec.displayParticle(2,locationx,locationy,1,-3,1,-3,nil)
  198. tfm.exec.displayParticle(2,locationx,locationy,1,1,3,1,nil)
  199. tfm.exec.displayParticle(2,locationx,locationy,-1,3,-1,3,nil)
  200. tfm.exec.displayParticle(2,locationx,locationy,-1,-1,-3,-1,nil)
  201. tfm.exec.displayParticle(5,locationx,locationy,0.5,0.5,0.5,0.5,nil)
  202. tfm.exec.displayParticle(5,locationx,locationy,-0.5,-0.5,-0.5,-0.5,nil)
  203.  
  204. tfm.exec.displayParticle(5,locationx,locationy,-0.5,0.5,-0.5,0.5,nil)
  205. tfm.exec.displayParticle(5,locationx,locationy,0.5,-0.5,0.5,-0.5,nil)
  206.  
  207.  
  208. end
  209.  
  210. end
  211.  
  212.  
  213. time=0
  214.  
  215. number1=0
  216. number2=0
  217. number3=0
  218.  
  219.  
  220. function eventPlayerGetCheese(n)
  221. if data[n].role=="Runner" then
  222.  
  223. data[n].points=data[n].points+3
  224. for n,player in pairs(tfm.get.room.playerList) do
  225. ui.addTextArea(133, "<font size='20'><font color='#0ff164'>"..text[n].runnersWin, n, 296, 282, 251, 89, 0xd41717, 0x000000, 0, true)
  226. time=115
  227.  
  228. if data[n].role=="Runner" then
  229. data[n].points=data[n].points+2
  230. wonCountDown=-5
  231. end
  232. end
  233. end
  234.  
  235. function eventPlayerWon(n,time)
  236. ui.addTextArea(133, "<font size='20'><font color='#d40000'>"..text[n].deathsWin, n, 296, 282, 251, 89, 0xd41717, 0x000000, 0, true)
  237. if data[n].role=="Death" then
  238. for n,player in pairs(tfm.get.room.playerList) do
  239.  
  240. wonCountDown=-5
  241. end
  242. end
  243.  
  244.  
  245.  
  246. tfm.exec.newGame(maps[math.random(#maps)])
  247. print("Runners win!")
  248. end
  249. end
  250.  
  251.  
  252. function explosions()
  253. tfm.exec.displayParticle(0,locationx,locationy,0.5,0.5,0.5,0.5,nil)
  254. tfm.exec.displayParticle(0,locationx,locationy,-0.5,-0.5,-0.5,-0.5,nil)
  255. tfm.exec.displayParticle(2,locationx,locationy,3,-3,3,-3,nil)
  256. tfm.exec.displayParticle(2,locationx,locationy,-3,3,-3,3,nil)
  257.  
  258. tfm.exec.displayParticle(0,locationx,locationy,-0.5,0.5,-0.5,0.5,nil)
  259. tfm.exec.displayParticle(0,locationx,locationy,0.5,-0.5,0.5,-0.5,nil)
  260. tfm.exec.displayParticle(2,locationx,locationy,1,-3,1,-3,nil)
  261. tfm.exec.displayParticle(2,locationx,locationy,1,1,3,1,nil)
  262. tfm.exec.displayParticle(2,locationx,locationy,-1,3,-1,3,nil)
  263. tfm.exec.displayParticle(2,locationx,locationy,-1,-1,-3,-1,nil)
  264. tfm.exec.displayParticle(5,locationx,locationy,0.5,0.5,0.5,0.5,nil)
  265. tfm.exec.displayParticle(5,locationx,locationy,-0.5,-0.5,-0.5,-0.5,nil)
  266.  
  267. tfm.exec.displayParticle(5,locationx,locationy,-0.5,0.5,-0.5,0.5,nil)
  268. tfm.exec.displayParticle(5,locationx,locationy,0.5,-0.5,0.5,-0.5,nil)
  269. tfm.exec.explosion(locationx, locationy, 40, 40, false)
  270. end
  271.  
  272.  
  273. function canShoot()
  274. for n,player in pairs(tfm.get.room.playerList) do
  275. if data[n].spawnLimit<1 and data[n].role=="Death" then
  276. ui.addTextArea(12, "\n<p align='center'>"..text[n].youCanAttack, n, 270, 23, 240, 36, 0x00a611, 0x338500, 0.6, true)
  277.  
  278. end
  279. if not (data[n].spawnLimit<1) and data[n].role=="Death" then
  280. ui.addTextArea(12, "\n<p align='center'>"..text[n].youCanNotAttack, n, 270, 23, 240, 36, 0x802c2c, 0x6e0000, 0.6, true)
  281.  
  282. end
  283. if data[n].spawnLimit<1 and data[n].role=="Runner" then
  284. ui.addTextArea(12, "\n<p align='center'>"..text[n].youCanUsePowerups, n, 270, 23, 240, 36, 0x00a611, 0x338500, 0.6, true)
  285.  
  286. end
  287. if not (data[n].spawnLimit<1) and data[n].role=="Runner" then
  288. ui.addTextArea(12, "\n<p align='center'>"..text[n].youCanNotUsePowerups, n, 270, 23, 240, 36, 0x802c2c, 0x6e0000, 0.6, true)
  289.  
  290. end
  291. end
  292. end
  293.  
  294. function eventLoop()
  295. wonCoundown=wonCountDown+0.5
  296. ui.addTextArea(13, "<font size='20'>"..math.floor(time).." / 120s", nil, 316, 73, 251, 122, 0x324650, 0x000000, 0, true)
  297.  
  298. changeCurrentRole()
  299. canShoot()
  300. for n,player in pairs(tfm.get.room.playerList) do
  301. data[n].spawnLimit=data[n].spawnLimit-0.5
  302. if data[n].spawnLimit==0 then
  303. ui.removeTextArea(2,n)
  304. system.bindMouse(n, true)
  305. ui.removeTextArea(11,n)
  306. end
  307. end
  308. time=time+.5
  309. if time==120 then
  310. tfm.exec.newGame(maps[math.random(#maps)])
  311. print("Deaths win!")
  312. time=-0.5
  313. elseif time==0 then
  314. for n,player in pairs(tfm.get.room.playerList) do
  315. ui.addTextArea(0, "<font size='30'><BV>You are a<VP> "..data[n].role, n, 234, 131, 348, 123, 0x636363, 0xa6a6a6, 1, true)
  316. findRoles(n)
  317. end
  318. elseif time==5 then
  319. for n,player in pairs(tfm.get.room.playerList) do
  320. ui.removeTextArea(0,n)
  321. ui.removeTextArea(2,n)
  322. system.bindMouse(n, true)
  323. ui.removeTextArea(133,n)
  324.  
  325. end
  326. if runner==0 then
  327. tfm.exec.newGame(maps[math.random(#maps)])
  328. end
  329. if death==0 then
  330. tfm.exec.disableAutoShaman(true)
  331. tfm.exec.newGame(maps[math.random(#maps)])
  332. time=0
  333. for n,player in pairs(tfm.get.room.playerList) do
  334. changeCurrentRole()
  335. data[n].role=roles[math.floor(numbs[math.random(#numbs)])]
  336. end
  337. findRoles(n)
  338. end
  339. if runner<1 and not (death<1) then
  340. tfm.exec.disableAutoShaman(true)
  341.  
  342. --deaths win
  343. wonCountDown=-5
  344. tfm.exec.newGame(maps[math.random(#maps)])
  345.  
  346. for n,player in pairs(tfm.get.room.playerList) do
  347. ui.addTextArea(133, "<font size='20'><font color='#d40000'>"..text[n].deathsWin, n, 296, 282, 251, 89, 0xd41717, 0x000000, 0, true)
  348.  
  349. changeCurrentRole()
  350. data[n].role=roles[math.floor(numbs[math.random(#numbs)])]
  351. if data[n].role=="Death" then
  352. data[n].points=data[n].points+3
  353. table.insert(scores,data[n].points)
  354. print(n1)
  355. print(n2)
  356. print(n3)
  357. end
  358. end
  359. findRoles(n)
  360.  
  361. end
  362. end
  363. if (runner<1) and death==mice then
  364. tfm.exec.disableAutoShaman(true)
  365. wonCountdown=-5
  366. tfm.exec.newGame(maps[math.random(#maps)])
  367.  
  368. for n,player in pairs(tfm.get.room.playerList) do
  369. changeCurrentRole()
  370. data[n].role=roles[math.floor(numbs[math.random(#numbs)])]
  371. time=-1
  372.  
  373. end
  374. end
  375. end
  376.  
  377.  
  378.  
  379.  
  380.  
  381. function eventKeyboard(n, key, down, x,y)
  382. if key==32 and data[n].role=="Runner" and data[n].spawnLimit<0 then
  383. ui.addTextArea(11, "<b><font size='30'><font color='#F0F000'>"..text[n].superJump, n, x-50, y-50, 379, 67, 0x324650, 0x000000, 0, false)
  384.  
  385. tfm.exec.displayParticle(0,x,y,0.5,0.5,0.5,0.5,nil)
  386. tfm.exec.displayParticle(0,locationx,locationy,-0.5,-0.5,-0.5,-0.5,nil)
  387. tfm.exec.displayParticle(2,locationx,locationy,3,-3,3,-3,nil)
  388. tfm.exec.displayParticle(2,locationx,locationy,-3,3,-3,3,nil)
  389.  
  390. tfm.exec.displayParticle(0,x,y,-0.5,0.5,-0.5,0.5,nil)
  391. tfm.exec.displayParticle(0,x,y,0.5,-0.5,0.5,-0.5,nil)
  392. tfm.exec.displayParticle(2,x,y,1,-3,1,-3,nil)
  393. tfm.exec.displayParticle(2,x,y,1,1,3,1,nil)
  394. tfm.exec.displayParticle(2,x,y,-1,3,-1,3,nil)
  395. tfm.exec.displayParticle(2,x,y,-1,-1,-3,-1,nil)
  396. tfm.exec.displayParticle(5,x,y,0.5,0.5,0.5,0.5,nil)
  397. tfm.exec.displayParticle(5,x,y,-0.5,-0.5,-0.5,-0.5,nil)
  398.  
  399. tfm.exec.displayParticle(5,x,y,-0.5,0.5,-0.5,0.5,nil)
  400. tfm.exec.displayParticle(5,x,y,0.5,-0.5,0.5,-0.5,nil)
  401. tfm.exec.movePlayer(n,x,y,false,0,-90,false)
  402.  
  403. data[n].spawnLimit=2
  404.  
  405.  
  406. tfm.exec.displayParticle(0,x,y,0.5,0.5,0.5,0.5,nil)
  407. tfm.exec.displayParticle(0,locationx,locationy,-0.5,-0.5,-0.5,-0.5,nil)
  408. tfm.exec.displayParticle(10,locationx,locationy,3,-3,3,-3,nil)
  409. tfm.exec.displayParticle(10,locationx,locationy,-3,3,-3,3,nil)
  410.  
  411. tfm.exec.displayParticle(10,x,y,-0.5,0.5,-0.5,0.5,nil)
  412. tfm.exec.displayParticle(10,x,y,0.5,-0.5,0.5,-0.5,nil)
  413. tfm.exec.displayParticle(2,x,y,1,-3,1,-3,nil)
  414. tfm.exec.displayParticle(10,x,y,1,1,3,1,nil)
  415. tfm.exec.displayParticle(12,x,y,-1,3,-1,3,nil)
  416. tfm.exec.displayParticle(12,x,y,-1,-1,-3,-1,nil)
  417. tfm.exec.displayParticle(5,x,y,0.5,0.5,0.5,0.5,nil)
  418. tfm.exec.displayParticle(5,x,y,-0.5,-0.5,-0.5,-0.5,nil)
  419.  
  420. tfm.exec.displayParticle(5,x,y,-0.5,0.5,-0.5,0.5,nil)
  421. tfm.exec.displayParticle(5,x,y,0.5,-0.5,0.5,-0.5,nil)
  422.  
  423. tfm.exec.bindKeyboard(n, 32, false, false)
  424. tfm.exec.addShamanObject(17,x,y,60,50,-10,true)
  425. data[n].spawnLimit=2
  426. data[n].ableToShoot=0
  427. elseif (key==40 or key==Down) and data[n].role=="Runner" and data[n].spawnLimit<0 then
  428. ui.addTextArea(11, "<b><font size='30'><font color='#F0F000'>"..text[n].speed, n, x-50, y-50, 379, 67, 0x324650, 0x000000, 0, false)
  429.  
  430. tfm.exec.displayParticle(0,x,y,0.5,0.5,0.5,0.5,nil)
  431. tfm.exec.displayParticle(0,locationx,locationy,-0.5,-0.5,-0.5,-0.5,nil)
  432. tfm.exec.displayParticle(2,locationx,locationy,3,-3,3,-3,nil)
  433. tfm.exec.displayParticle(2,locationx,locationy,-3,3,-3,3,nil)
  434.  
  435. tfm.exec.displayParticle(0,x,y,-0.5,0.5,-0.5,0.5,nil)
  436. tfm.exec.displayParticle(0,x,y,0.5,-0.5,0.5,-0.5,nil)
  437. tfm.exec.displayParticle(2,x,y,1,-3,1,-3,nil)
  438. tfm.exec.displayParticle(2,x,y,1,1,3,1,nil)
  439. tfm.exec.displayParticle(2,x,y,-1,3,-1,3,nil)
  440. tfm.exec.displayParticle(2,x,y,-1,-1,-3,-1,nil)
  441. tfm.exec.displayParticle(5,x,y,0.5,0.5,0.5,0.5,nil)
  442. tfm.exec.displayParticle(5,x,y,-0.5,-0.5,-0.5,-0.5,nil)
  443.  
  444. tfm.exec.displayParticle(5,x,y,-0.5,0.5,-0.5,0.5,nil)
  445. tfm.exec.displayParticle(5,x,y,0.5,-0.5,0.5,-0.5,nil)
  446. tfm.exec.movePlayer(n,x,y,false,90,0,false)
  447.  
  448. data[n].spawnLimit=2
  449.  
  450.  
  451. tfm.exec.displayParticle(0,x,y,0.5,0.5,0.5,0.5,nil)
  452. tfm.exec.displayParticle(0,locationx,locationy,-0.5,-0.5,-0.5,-0.5,nil)
  453. tfm.exec.displayParticle(10,locationx,locationy,3,-3,3,-3,nil)
  454. tfm.exec.displayParticle(10,locationx,locationy,-3,3,-3,3,nil)
  455.  
  456. tfm.exec.displayParticle(10,x,y,-0.5,0.5,-0.5,0.5,nil)
  457. tfm.exec.displayParticle(10,x,y,0.5,-0.5,0.5,-0.5,nil)
  458. tfm.exec.displayParticle(2,x,y,1,-3,1,-3,nil)
  459. tfm.exec.displayParticle(10,x,y,1,1,3,1,nil)
  460. tfm.exec.displayParticle(12,x,y,-1,3,-1,3,nil)
  461. tfm.exec.displayParticle(12,x,y,-1,-1,-3,-1,nil)
  462. tfm.exec.displayParticle(5,x,y,0.5,0.5,0.5,0.5,nil)
  463. tfm.exec.displayParticle(5,x,y,-0.5,-0.5,-0.5,-0.5,nil)
  464.  
  465. tfm.exec.displayParticle(5,x,y,-0.5,0.5,-0.5,0.5,nil)
  466. tfm.exec.displayParticle(5,x,y,0.5,-0.5,0.5,-0.5,nil)
  467.  
  468.  
  469.  
  470. data[n].spawnLimit=2
  471. data[n].ableToShoot=0
  472. end
  473. end
  474.  
  475.  
  476. function eventTextAreaCallback(id,n,a)
  477. if a=="close" then
  478. ui.removeTextArea(18,n)
  479. ui.removeTextArea(19,n)
  480. ui.removeTextArea(110,n)
  481. ui.removeTextArea(25,n)
  482. elseif a=="help" then
  483. ui.addTextArea(110, "", n, 498, 165, 266, 217, 0x324650, 0x000000, 1, true)
  484. ui.addTextArea(18, "<font size='15'>"..text[n].help, n, 504, 172, 254, 179, 0x000000, 0x000000, 1, true)
  485. ui.addTextArea(19, "<p align='center'><font size='13'><a href='event:close'>"..text[n].close, n, 504, 338, 254, 36, 0x000000, 0xffffff, 1, true)
  486. elseif a=="credits" then
  487. ui.addTextArea(25, "<p align='center'><font size='16'><font face='verdana'><J>"..text[n].credits, n, 504, 142, 254, 194, 0x4f4132, 0x695743, 1, true)
  488. ui.addTextArea(19, "<p align='center'><font size='13'><a href='event:close'>"..text[n].close, n, 504, 338, 254, 36, 0x4f4132, 0x30291a, 1, true)
  489.  
  490. end
  491. end
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498. function eventPlayerDied(n)
  499. if data[n].role=="Runner" then
  500. runner=runner-1
  501. print(runner)
  502.  
  503. end
  504. if runner<1 then
  505. tfm.exec.newGame(maps[math.random(#maps)])
  506. for n,player in pairs(tfm.get.room.playerList) do
  507. ui.addTextArea(133, "<font size='20'><font color='#d40000'>"..text[n].deathsWin, n, 296, 282, 251, 89, 0xd41717, 0x000000, 0, true)
  508. end
  509. wonCountDown=-5
  510. print("hi")
  511. end
  512. if death<1 then
  513. tfm.exec.disableAutoShaman(true)
  514. tfm.exec.newGame(maps[math.random(#maps)])
  515. time=0
  516.  
  517.  
  518. for n,player in pairs(tfm.get.room.playerList) do
  519.  
  520.  
  521. wonCountdown=-5
  522. changeCurrentRole()
  523. data[n].role=roles[math.floor(numbs[math.random(#numbs)])]
  524. end
  525. end
  526. end
  527.  
  528.  
  529.  
  530. print(death)
  531. print(runner)
  532.  
  533. print(mice)
  534. function eventPlayerLeft(n)
  535. mice=mice-1
  536. if data[n].role=="Runner" then
  537. runner=runner-1
  538. elseif data[n].role=="Death" then
  539. death=death-1
  540. end
  541. end
  542.  
  543.  
  544.  
  545.  
  546. function eventSummoningEnd(playerName, objectType, xPosition, yPosition, angle, xSpeed, ySpeed, other)
  547. print("hi")
  548. tfm.exec.removeObject(other)
  549. end
Add Comment
Please, Sign In to add comment