Boeing747-8

Untitled

Jun 13th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.42 KB | None | 0 0
  1. lag=0
  2.  
  3. local toDespawn = {}
  4.  
  5. do
  6. local addShamanObject = tfm.exec.addShamanObject
  7. tfm.exec.addShamanObject = function(...)
  8. toDespawn[#toDespawn + 1] = {
  9. addShamanObject(...),
  10. os.time() + 3000
  11. }
  12.  
  13. return toDespawn[#toDespawn][1]
  14. end
  15. end
  16.  
  17. tfm.exec.disableAllShamanSkills(true)
  18. tfm.exec.disableMortCommand(true)
  19. wonCountDown=1
  20.  
  21. scores={0,0,0,0,0,0,0,0}
  22. maps={7455943}
  23. powery=320
  24. powerx=math.random(1600)
  25.  
  26. mice=0
  27.  
  28.  
  29. ui.addTextArea(10, "", nil, -432, -822, 3625, 953, 0xff0000, 0x00a2ff, 0.6, true)
  30.  
  31. Down=string.byte("S")
  32.  
  33. tfm.exec.disableAutoShaman(true)
  34. tfm.exec.disableAutoNewGame(true)
  35. tfm.exec.disableAfkDeath(true)
  36.  
  37. tfm.exec.disableAutoShaman(true)
  38. tfm.exec.disableAutoTimeLeft(true)
  39. tfm.exec.disableAutoScore(true)
  40. data={}
  41. text={}
  42. lang={}
  43.  
  44. lang.en={profile2="Profile",rules="Rules</font></font></u><font size='12'>\n\n• Using tricks to glitch the game is not allowed\n\n• You are not allowed to hack just like in any other game.",rules2="Rules",commands="Powerups\n\n<font size='11'>Click - Spawns a random shaman object when you have the role of being a <J>Death</J>.\n\nSpacebar - Makes a large jump followed with an invisible cannon when you have the role of being a <J>Runner</J>. \n\nDown Arrow / S key - Gives you a boost of speed. (Works for both Deaths and Runners)",commands2="Powerups",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\nFinding Ways To Remove Hacks - Mariluiss#0000 \n\n<VP>Thank you ^^",credits2="Credits",youCanAttack="<R>Death: <N>You can attack",youCanNotAttack="<R>Death: <N>You can not attack",youCanUsePowerups="<VP>Runner: <N>You can use powerups",youCanNotUsePowerups="<VP>Runner: <N>You can not use powerups",attacked="ATTACKED",youAreARunner="You are a runner",youAreADeath="You are a death",help="In #deathrun there are <J>Deaths</J> and <J>Runners</J>. Deaths should try to kill the mice by clicking to spawn objects, if no runners get into the hole then deaths win! Runners are supposed to use the powerups they are given to get into the hole and escape Deaths. If one runner gets into the hole, runners win.",close="Close",help2="Help",superJump="SUPER JUMP",speed="SPEED",deathsWin="Deaths win!",runnersWin="Runners win!"}
  45. roles={"Death","Runner"}
  46.  
  47. death=0
  48. runner=0
  49. miceInHole=0
  50.  
  51. function setLang(n)
  52. for n,player in pairs(tfm.get.room.playerList) do
  53. text[n]=lang[tfm.get.room.playerList[n].community] or lang.en
  54. end
  55. end
  56.  
  57.  
  58.  
  59. function bindMouse()
  60. for n,player in pairs(tfm.get.room.playerList) do
  61. tfm.exec.bindKeyboard(n, 39, true, true)
  62. tfm.exec.bindKeyboard(n, 37, true, true)
  63. tfm.exec.bindKeyboard(n, 65, true, true)
  64. tfm.exec.bindKeyboard(n, 68, true, true)
  65. tfm.exec.bindKeyboard(n, 32, true, true)
  66. system.bindMouse(n, true)
  67. tfm.exec.bindKeyboard(n, 40, true, true)
  68. tfm.exec.bindKeyboard(n, Down, true, true)
  69. end
  70. end
  71. bindMouse()
  72.  
  73. tfm.exec.newGame(maps[math.random(#maps)])
  74. names={}
  75.  
  76. theRole=1
  77. currentRole=roles[math.floor(theRole)]
  78.  
  79. function changeCurrentRole()
  80.  
  81. end
  82. numbs={1,2}
  83.  
  84. function showTabs(n)
  85. ui.addTextArea(15, "<VP><a href='event:help'><font size='12'>"..text[n].help2.."</a> | <a href='event:credits'>"..text[n].credits2.." </a>|<a href='event:commands'> "..text[n].commands2.." </a>|<a href='event:rules'> "..text[n].rules2, n, 10, 30, 264, 26, 0x00aaff, 0x00eeff, 0, true)
  86. ui.addTextArea(155, "<VP><a href='event:profile'><font size='12'>"..text[n].profile2, n, 740, 30, 264, 26, 0x00aaff, 0x00eeff, 0, true)
  87. end
  88. for n,player in pairs(tfm.get.room.playerList) do
  89.  
  90. changeCurrentRole()
  91. mice=mice+1
  92. table.insert(names,n)
  93. setLang(n)
  94.  
  95. data[n]={facingx=85,name=n,role="Runner",points=0,spawnLimit=-1,ableToShoot=0,ableToShoot2=0,pointsAndScore=""}
  96. data[n].pointsAndScore=data[n].name.." "..data[n].points
  97. table.insert(scores,data[n].points)
  98. showTabs(n)
  99. tfm.exec.lowerSyncDelay(n)
  100. end
  101.  
  102.  
  103.  
  104.  
  105.  
  106. n1=scores[math.floor(1)]
  107. n2=scores[math.floor(2)]
  108. n3=scores[math.floor(3)]
  109. print(n1)
  110. print(n2)
  111. print(n3)
  112.  
  113. function findRoles(n)
  114. for n,player in pairs(tfm.get.room.playerList) do
  115. if data[n].role=="Death" then
  116.  
  117. tfm.exec.movePlayer(n,150,30,false,0,0,false)
  118.  
  119. elseif data[n].role=="Runner" then
  120.  
  121. tfm.exec.movePlayer(n,70,300,false,0,0,false)
  122.  
  123. end
  124. end
  125. end
  126.  
  127. function findRolesNewPlayer(n)
  128. if data[n].role=="Death" then
  129. tfm.exec.movePlayer(n,150,30,false,0,0,false)
  130.  
  131. elseif data[n].role=="Runner" then
  132.  
  133. tfm.exec.movePlayer(n,70,300,false,0,0,false)
  134.  
  135.  
  136.  
  137. end
  138. end
  139.  
  140.  
  141.  
  142. a={}
  143.  
  144. function eventNewPlayer(n)
  145.  
  146. bindMouse()
  147. ui.addTextArea(10, "", n, -432, -822, 3625, 953, 0xff0000, 0x00a2ff, 0.6, true)
  148.  
  149. mice=mice+1
  150. if not data[n] then
  151. data[n]={name=n,role="Runner",points=0,spawnLimit=-1,ableToShoot=0,ableToShoot2=0}
  152. end
  153. setLang(n)
  154. showTabs(n)
  155. table.insert(names,n)
  156. findRolesNewPlayer(n)
  157. tfm.exec.respawnPlayer(n)
  158. end
  159.  
  160.  
  161.  
  162.  
  163.  
  164. function addToRoleNumber()
  165. for n,player in pairs(tfm.get.room.playerList) do
  166. if data[n].role=="Death" then
  167. death=death+1
  168. end
  169. if data[n].role=="Runner" then
  170. runner=runner+1
  171.  
  172.  
  173. end
  174. findRoles(n)
  175.  
  176.  
  177. end
  178. end
  179.  
  180.  
  181.  
  182. tfm.exec.newGame(maps[math.random(#maps)])
  183. amountInA=0
  184.  
  185. function punishGlitchers()
  186. if a then
  187. for i=1,amountInA do
  188. data[a[math.floor(amountInA)]].role="Runner"
  189. end
  190. end
  191. end
  192.  
  193. randomDeath=names[math.floor(math.random(mice))]
  194. data[randomDeath].role="Death"
  195. lastDeath=""
  196. function eventNewGame()
  197. lag=0
  198.  
  199.  
  200. local toDespawn = {}
  201.  
  202. do
  203. local addShamanObject = tfm.exec.addShamanObject
  204. tfm.exec.addShamanObject = function(...)
  205. toDespawn[#toDespawn + 1] = {
  206. addShamanObject(...),
  207. os.time() + 3000
  208. }
  209.  
  210. return toDespawn[#toDespawn][1]
  211. end
  212. end
  213. time=0
  214. theRole=1
  215. powerx=math.random(1600)
  216. runner=0
  217. death=0
  218. mice=0
  219. for n,player in pairs(tfm.get.room.playerList) do
  220. mice=mice+1
  221. changeCurrentRole()
  222. data[n].role="Runner"
  223. data[n].ableToShoot=0
  224. data[n].ableToShoot2=0
  225. data[n].spawnLimit=-1
  226.  
  227. end
  228. mice=mice
  229.  
  230. data[randomDeath].role="Death"
  231.  
  232.  
  233. addToRoleNumber()
  234. findRoles(n)
  235. print("Last death: "..lastDeath)
  236. end
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244. locationx=0
  245. locationy=0
  246.  
  247.  
  248. objects={54}
  249.  
  250. function eventMouse(n,x,y)
  251.  
  252. system.bindMouse(n,false)
  253.  
  254. if data[n].role=="Death" then
  255. lag=lag+1
  256. if lag>3 then
  257. randomDeath=names[math.floor(math.random(mice))]
  258. data[randomDeath].role="Death"
  259. local toDespawn = {}
  260. table.insert(a,n)
  261. amountInA=amountInA+1
  262. do
  263. local addShamanObject = tfm.exec.addShamanObject
  264. tfm.exec.addShamanObject = function(...)
  265. toDespawn[#toDespawn + 1] = {
  266. addShamanObject(...),
  267. os.time() + 0000
  268. }
  269.  
  270. return toDespawn[#toDespawn][1]
  271. end
  272. end
  273. ui.addTextArea(133, "<R><font size='17'><b>USING LAG TRICKS OR HACKS ARE NOT ALLOWED IN THIS ROOM", n, 143, 150, 534, 91, 0x324650, 0x000000, 1, true)
  274. time=-0.5
  275.  
  276. tfm.exec.newGame(maps[math.random(#maps)])
  277. eventNewGame()
  278. end
  279.  
  280. data[n].spawnLimit=2
  281. ui.addTextArea(2, "<font color='#FF9000'><font size='30'><b>"..n.." "..text[n].attacked, nil, x, y, 425, 100, 0x324650, 0x000000, 0, false)
  282.  
  283. locationx=x
  284. locationy=y
  285.  
  286.  
  287.  
  288. tfm.exec.addShamanObject(objects[math.random(#objects)],locationx,locationy,0,0,20,false)
  289. tfm.exec.displayParticle(0,locationx,locationy,0.5,0.5,0.5,0.5,nil)
  290. tfm.exec.displayParticle(0,locationx,locationy,-0.5,-0.5,-0.5,-0.5,nil)
  291. tfm.exec.displayParticle(2,locationx,locationy,3,-3,3,-3,nil)
  292. tfm.exec.displayParticle(2,locationx,locationy,-3,3,-3,3,nil)
  293.  
  294. tfm.exec.displayParticle(0,locationx,locationy,-0.5,0.5,-0.5,0.5,nil)
  295.  
  296. tfm.exec.displayParticle(0,locationx,locationy,0.5,-0.5,0.5,-0.5,nil)
  297. tfm.exec.displayParticle(2,locationx,locationy,1,-3,1,-3,nil)
  298. tfm.exec.displayParticle(2,locationx,locationy,1,1,3,1,nil)
  299. tfm.exec.displayParticle(2,locationx,locationy,-1,3,-1,3,nil)
  300. tfm.exec.displayParticle(2,locationx,locationy,-1,-1,-3,-1,nil)
  301. tfm.exec.displayParticle(5,locationx,locationy,0.5,0.5,0.5,0.5,nil)
  302. tfm.exec.displayParticle(5,locationx,locationy,-0.5,-0.5,-0.5,-0.5,nil)
  303.  
  304. tfm.exec.displayParticle(5,locationx,locationy,-0.5,0.5,-0.5,0.5,nil)
  305. tfm.exec.displayParticle(5,locationx,locationy,0.5,-0.5,0.5,-0.5,nil)
  306.  
  307.  
  308. end
  309.  
  310. end
  311.  
  312.  
  313. time=0
  314.  
  315. number1=0
  316. number2=0
  317. number3=0
  318.  
  319.  
  320. function eventPlayerGetCheese(n)
  321. randomDeath=n
  322. print(n)
  323. if data[n].role=="Runner" then
  324.  
  325. tfm.exec.chatMessage(text[n].runnersWin,n)
  326. time=118
  327. data[n].points=data[n].points+3
  328.  
  329. for n,player in pairs(tfm.get.room.playerList) do
  330. table.insert(scores,data[n].points)
  331. ui.addTextArea(133, "<b><font size='40'><font color='#0ff164'>"..text[n].runnersWin, n, 296, 282, 351, 189, 0xd41717, 0x000000, 0, true)
  332.  
  333.  
  334. if data[n].role=="Runner" then
  335. data[n].points=data[n].points+2
  336. wonCountDown=-5
  337. end
  338. end
  339. end
  340.  
  341.  
  342. function eventPlayerWon(n)
  343. print("yo")
  344. randomDeath=n
  345. if data[n].role=="Death" then
  346. time=117
  347. end
  348.  
  349. for n,player in pairs(tfm.get.room.playerList) do
  350. ui.addTextArea(133, "<b><font size='40'><font color='#d40000'>"..text[n].deathsWin, n, 296, 282, 351, 189, 0xd41717, 0x000000, 0, true)
  351. tfm.exec.chatMessage(text[n].deathsWin,n)
  352. randomDeath=names[math.floor(math.random(mice))]
  353. end
  354.  
  355.  
  356.  
  357.  
  358. tfm.exec.newGame(maps[math.random(#maps)])
  359. print("Runners win!")
  360. end
  361. end
  362.  
  363.  
  364.  
  365. function explosions()
  366. tfm.exec.displayParticle(0,locationx,locationy,0.5,0.5,0.5,0.5,nil)
  367. tfm.exec.displayParticle(0,locationx,locationy,-0.5,-0.5,-0.5,-0.5,nil)
  368. tfm.exec.displayParticle(2,locationx,locationy,3,-3,3,-3,nil)
  369. tfm.exec.displayParticle(2,locationx,locationy,-3,3,-3,3,nil)
  370.  
  371. tfm.exec.displayParticle(0,locationx,locationy,-0.5,0.5,-0.5,0.5,nil)
  372. tfm.exec.displayParticle(0,locationx,locationy,0.5,-0.5,0.5,-0.5,nil)
  373. tfm.exec.displayParticle(2,locationx,locationy,1,-3,1,-3,nil)
  374. tfm.exec.displayParticle(2,locationx,locationy,1,1,3,1,nil)
  375. tfm.exec.displayParticle(2,locationx,locationy,-1,3,-1,3,nil)
  376. tfm.exec.displayParticle(2,locationx,locationy,-1,-1,-3,-1,nil)
  377. tfm.exec.displayParticle(5,locationx,locationy,0.5,0.5,0.5,0.5,nil)
  378. tfm.exec.displayParticle(5,locationx,locationy,-0.5,-0.5,-0.5,-0.5,nil)
  379.  
  380. tfm.exec.displayParticle(5,locationx,locationy,-0.5,0.5,-0.5,0.5,nil)
  381. tfm.exec.displayParticle(5,locationx,locationy,0.5,-0.5,0.5,-0.5,nil)
  382. tfm.exec.explosion(locationx, locationy, 40, 40, false)
  383. end
  384.  
  385.  
  386. function canShoot()
  387. for n,player in pairs(tfm.get.room.playerList) do
  388. if data[n].spawnLimit<1 and data[n].role=="Death" then
  389. ui.addTextArea(12, "\n<p align='center'>"..text[n].youCanAttack, n, 270, 23, 240, 36, 0x00a611, 0x338500, 0.6, true)
  390.  
  391. end
  392. if not (data[n].spawnLimit<1) and data[n].role=="Death" then
  393. ui.addTextArea(12, "\n<p align='center'>"..text[n].youCanNotAttack, n, 270, 23, 240, 36, 0x802c2c, 0x6e0000, 0.6, true)
  394.  
  395. end
  396. if data[n].spawnLimit<1 and data[n].role=="Runner" then
  397. ui.addTextArea(12, "\n<p align='center'>"..text[n].youCanUsePowerups, n, 270, 23, 240, 36, 0x00a611, 0x338500, 0.6, true)
  398.  
  399. end
  400. if not (data[n].spawnLimit<1) and data[n].role=="Runner" then
  401. ui.addTextArea(12, "\n<p align='center'>"..text[n].youCanNotUsePowerups, n, 270, 23, 240, 36, 0x802c2c, 0x6e0000, 0.6, true)
  402.  
  403. end
  404. end
  405. end
  406.  
  407. function removeObjectAfterTime()
  408. for k, v in ipairs(toDespawn) do
  409. if os.time() > v[2] then
  410. tfm.exec.removeObject(v[1])
  411. table.remove(toDespawn, k)
  412. end
  413. end
  414. end
  415.  
  416. function eventLoop()
  417.  
  418. lag=0
  419. removeObjectAfterTime()
  420. if mice<2 then
  421. ui.addTextArea(202, "<p align='center'><R><b><font size='20'>You need at least 2 people to play. ", nil, 137, 166, 471, 122, 0x404040, 0x000000, 1, true)
  422.  
  423. elseif mice>1 then
  424. ui.removeTextArea(202,nil)
  425.  
  426. wonCoundown=wonCountDown+0.5
  427. ui.addTextArea(13, "<font size='20'>"..math.floor(time).." / 120s", nil, 316, 73, 251, 32, 0x324650, 0x000000, 0, true)
  428.  
  429.  
  430. canShoot()
  431. for n,player in pairs(tfm.get.room.playerList) do
  432.  
  433. data[n].spawnLimit=data[n].spawnLimit-0.5
  434.  
  435. if tfm.get.room.playerList[n].y>100 and data[n].role=="Death" then
  436.  
  437. tfm.exec.movePlayer(n,150,30,false,0,0,false)
  438.  
  439. elseif tfm.get.room.playerList[n].y<100 and data[n].role=="Runner" then
  440. tfm.exec.movePlayer(n,70,300,false,0,0,false)
  441. elseif tfm.get.room.playerList[n].x>600 and time<5 then
  442. tfm.exec.killPlayer(n)
  443. tfm.exec.movePlayer(n,150,tfm.get.room.playerList[n].y,false,0,0,false)
  444. tfm.exec.respawnPlayer(n)
  445. end
  446.  
  447.  
  448.  
  449.  
  450. if data[n].spawnLimit==0 then
  451. ui.removeTextArea(2,nil)
  452. system.bindMouse(n, true)
  453. ui.removeTextArea(11,n)
  454. end
  455. end
  456. time=time+.5
  457. if time==120 then
  458. tfm.exec.newGame(maps[math.random(#maps)])
  459. print("Deaths win!")
  460. time=-0.5
  461. elseif time==0 then
  462. for n,player in pairs(tfm.get.room.playerList) do
  463. findRoles(n)
  464. end
  465. elseif time==5 or time==10 then
  466. for n,player in pairs(tfm.get.room.playerList) do
  467. ui.removeTextArea(0,nil)
  468. ui.removeTextArea(2,nil)
  469. system.bindMouse(n, true)
  470. ui.removeTextArea(133,n)
  471.  
  472. end
  473. end
  474. end
  475. end
  476.  
  477.  
  478.  
  479.  
  480. function eventKeyboard(n, key, down, x,y)
  481. if key==65 or key==37 then
  482. data[n].facing=-85
  483. elseif key==39 or key==68 then
  484. data[n].facing=85
  485. end
  486. if time>3 then
  487. if key==32 and data[n].role=="Runner" and data[n].spawnLimit<0 then
  488. ui.addTextArea(11, "<b><font size='30'><font color='#F0F000'>"..text[n].superJump, n, x-50, y-50, 379, 67, 0x324650, 0x000000, 0, false)
  489.  
  490. tfm.exec.displayParticle(0,x,y,0.5,0.5,0.5,0.5,nil)
  491. tfm.exec.displayParticle(0,locationx,locationy,-0.5,-0.5,-0.5,-0.5,nil)
  492. tfm.exec.displayParticle(2,locationx,locationy,3,-3,3,-3,nil)
  493. tfm.exec.displayParticle(2,locationx,locationy,-3,3,-3,3,nil)
  494.  
  495. tfm.exec.displayParticle(0,x,y,-0.5,0.5,-0.5,0.5,nil)
  496. tfm.exec.displayParticle(0,x,y,0.5,-0.5,0.5,-0.5,nil)
  497. tfm.exec.displayParticle(2,x,y,1,-3,1,-3,nil)
  498. tfm.exec.displayParticle(2,x,y,1,1,3,1,nil)
  499. tfm.exec.displayParticle(2,x,y,-1,3,-1,3,nil)
  500. tfm.exec.displayParticle(2,x,y,-1,-1,-3,-1,nil)
  501. tfm.exec.displayParticle(5,x,y,0.5,0.5,0.5,0.5,nil)
  502. tfm.exec.displayParticle(5,x,y,-0.5,-0.5,-0.5,-0.5,nil)
  503.  
  504. tfm.exec.displayParticle(5,x,y,-0.5,0.5,-0.5,0.5,nil)
  505. tfm.exec.displayParticle(5,x,y,0.5,-0.5,0.5,-0.5,nil)
  506. tfm.exec.movePlayer(n,x,y,false,0,-80,false)
  507.  
  508.  
  509.  
  510.  
  511. tfm.exec.displayParticle(0,x,y,0.5,0.5,0.5,0.5,nil)
  512. tfm.exec.displayParticle(0,locationx,locationy,-0.5,-0.5,-0.5,-0.5,nil)
  513. tfm.exec.displayParticle(10,locationx,locationy,3,-3,3,-3,nil)
  514. tfm.exec.displayParticle(10,locationx,locationy,-3,3,-3,3,nil)
  515.  
  516. tfm.exec.displayParticle(10,x,y,-0.5,0.5,-0.5,0.5,nil)
  517. tfm.exec.displayParticle(10,x,y,0.5,-0.5,0.5,-0.5,nil)
  518. tfm.exec.displayParticle(2,x,y,1,-3,1,-3,nil)
  519. tfm.exec.displayParticle(10,x,y,1,1,3,1,nil)
  520. tfm.exec.displayParticle(12,x,y,-1,3,-1,3,nil)
  521. tfm.exec.displayParticle(12,x,y,-1,-1,-3,-1,nil)
  522. tfm.exec.displayParticle(5,x,y,0.5,0.5,0.5,0.5,nil)
  523. tfm.exec.displayParticle(5,x,y,-0.5,-0.5,-0.5,-0.5,nil)
  524.  
  525. tfm.exec.displayParticle(5,x,y,-0.5,0.5,-0.5,0.5,nil)
  526. tfm.exec.displayParticle(5,x,y,0.5,-0.5,0.5,-0.5,nil)
  527.  
  528. tfm.exec.bindKeyboard(n, 32, false, false)
  529. tfm.exec.addShamanObject(17,x,y,60,50,-10,true)
  530. data[n].spawnLimit=3.5
  531. data[n].ableToShoot=0
  532. elseif (key==40 or key==Down) and data[n].spawnLimit<0 then
  533. ui.addTextArea(11, "<b><font size='30'><font color='#F0F000'>"..text[n].speed, n, x-50, y-50, 379, 67, 0x324650, 0x000000, 0, false)
  534.  
  535. tfm.exec.displayParticle(0,x,y,0.5,0.5,0.5,0.5,nil)
  536. tfm.exec.displayParticle(0,locationx,locationy,-0.5,-0.5,-0.5,-0.5,nil)
  537. tfm.exec.displayParticle(2,locationx,locationy,3,-3,3,-3,nil)
  538. tfm.exec.displayParticle(2,locationx,locationy,-3,3,-3,3,nil)
  539.  
  540. tfm.exec.displayParticle(0,x,y,-0.5,0.5,-0.5,0.5,nil)
  541. tfm.exec.displayParticle(0,x,y,0.5,-0.5,0.5,-0.5,nil)
  542. tfm.exec.displayParticle(2,x,y,1,-3,1,-3,nil)
  543. tfm.exec.displayParticle(2,x,y,1,1,3,1,nil)
  544. tfm.exec.displayParticle(2,x,y,-1,3,-1,3,nil)
  545. tfm.exec.displayParticle(2,x,y,-1,-1,-3,-1,nil)
  546. tfm.exec.displayParticle(5,x,y,0.5,0.5,0.5,0.5,nil)
  547. tfm.exec.displayParticle(5,x,y,-0.5,-0.5,-0.5,-0.5,nil)
  548.  
  549. tfm.exec.displayParticle(5,x,y,-0.5,0.5,-0.5,0.5,nil)
  550. tfm.exec.displayParticle(5,x,y,0.5,-0.5,0.5,-0.5,nil)
  551. tfm.exec.movePlayer(n,x,y,false,data[n].facing,0,true)
  552.  
  553.  
  554.  
  555.  
  556. tfm.exec.displayParticle(0,x,y,0.5,0.5,0.5,0.5,nil)
  557. tfm.exec.displayParticle(0,locationx,locationy,-0.5,-0.5,-0.5,-0.5,nil)
  558. tfm.exec.displayParticle(10,locationx,locationy,3,-3,3,-3,nil)
  559. tfm.exec.displayParticle(10,locationx,locationy,-3,3,-3,3,nil)
  560.  
  561. tfm.exec.displayParticle(10,x,y,-0.5,0.5,-0.5,0.5,nil)
  562. tfm.exec.displayParticle(10,x,y,0.5,-0.5,0.5,-0.5,nil)
  563. tfm.exec.displayParticle(2,x,y,1,-3,1,-3,nil)
  564. tfm.exec.displayParticle(10,x,y,1,1,3,1,nil)
  565. tfm.exec.displayParticle(12,x,y,-1,3,-1,3,nil)
  566. tfm.exec.displayParticle(12,x,y,-1,-1,-3,-1,nil)
  567. tfm.exec.displayParticle(5,x,y,0.5,0.5,0.5,0.5,nil)
  568. tfm.exec.displayParticle(5,x,y,-0.5,-0.5,-0.5,-0.5,nil)
  569.  
  570. tfm.exec.displayParticle(5,x,y,-0.5,0.5,-0.5,0.5,nil)
  571. tfm.exec.displayParticle(5,x,y,0.5,-0.5,0.5,-0.5,nil)
  572.  
  573.  
  574.  
  575. data[n].spawnLimit=3.5
  576. data[n].ableToShoot=0
  577. end
  578. end
  579. end
  580.  
  581.  
  582. function eventTextAreaCallback(id,n,a)
  583. if a=="close" then
  584. ui.removeTextArea(18,n)
  585. ui.removeTextArea(19,n)
  586. ui.removeTextArea(110,n)
  587. ui.removeTextArea(25,n)
  588. elseif a=="help" then
  589. ui.addTextArea(110, "", n, 498, 165, 266, 217, 0x324650, 0x000000, 1, true)
  590. ui.addTextArea(18, "<font size='15'><font face='calibri'>"..text[n].help, n, 504, 172, 254, 179, 0x000000, 0x000000, 1, true)
  591. 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)
  592. elseif a=="credits" then
  593. ui.addTextArea(18, "<p align='center'><font size='16'><font face='verdana'><J>"..text[n].credits, n, 504, 142, 254, 194, 0x4f4132, 0x695743, 1, true)
  594. 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)
  595. elseif a=="commands" then
  596. ui.addTextArea(18, "<p align='center'><font size='14'><font face='verdana'>"..text[n].commands, n, 545, 111, 220, 238, 0x50498c, 0x05014f, 1, true)
  597. ui.addTextArea(19, "<p align='center'><font size='13'><a href='event:close'>Close", n, 545, 346, 220, 36, 0x284391, 0x0f0759, 1, true)
  598. elseif a=="rules" then
  599. ui.addTextArea(18, "<p align='center'><u><font size='17'><font face='calibri'>"..text[n].rules, n, 562, 132, 201, 230, 0xab0000, 0xff4545, 1, true)
  600. ui.addTextArea(19, "<p align='center'><font size='13'><a href='event:close'>"..text[n].close, n, 562, 329, 201, 36, 0xa60000, 0xff0000, 1, true)
  601. elseif a=="profile" then
  602. ui.addTextArea(110, "<p align='center'><font size='12'><font color='#000000'><font face='calibri'>"..n, n, 551, 89, 233, 278, 0xffd900, 0x075214, 1, true)
  603. ui.addTextArea(18, "<p align='left'><font size='13'><font face='calibri'><font color='#FFFFFF'> Points: "..data[n].points.." <br><br>Wins as death: <br><br>Wins as runner:", n, 557, 136, 105, 226, 0x966a03, 0x294d12, 1, true)
  604. ui.addTextArea(19, "<p align='left'><font size='13'><font face='calibri'><font color='#FFFFFF'> Description\n\n", n, 675, 136, 104, 226, 0x966a03, 0x294d12, 1, true)
  605. ui.addTextArea(25, "<p align='center'><font size='13'><a href='event:close'><font color='#505050'>"..text[n].close, n, 551, 368, 233, 36, 0xffd900, 0x075214, 1, true)
  606. end
  607. end
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614. function eventPlayerDied(n)
  615. if data[n].role=="Runner" then
  616. runner=runner-1
  617. print(runner)
  618.  
  619. end
  620. if runner<1 then
  621. tfm.exec.newGame(maps[math.random(#maps)])
  622. for n,player in pairs(tfm.get.room.playerList) do
  623. ui.addTextArea(133, "<b><font size='40'><font color='#d40000'>"..text[n].deathsWin, n, 296, 282, 351, 189, 0xd41717, 0x000000, 0, true)
  624. tfm.exec.chatMessage(text[n].deathsWin,n)
  625. if data[n].role=="Death" then
  626. data[n].points=data[n].points+3
  627. end
  628. end
  629. wonCountDown=-5
  630. print("hi")
  631. end
  632. if death<1 then
  633. tfm.exec.newGame(maps[math.random(#maps)])
  634. tfm.exec.disableAutoShaman(true)
  635.  
  636. time=0
  637.  
  638.  
  639. for n,player in pairs(tfm.get.room.playerList) do
  640.  
  641.  
  642. wonCountdown=-5
  643. changeCurrentRole()
  644. data[n].role="Runner"
  645. end
  646. data[names[math.floor(math.random(mice))]].role="Death"
  647. end
  648. end
  649.  
  650.  
  651.  
  652. print(death)
  653. print(runner)
  654.  
  655. print(mice)
  656. function eventPlayerLeft(n)
  657. mice=mice-1
  658. if data[n].role=="Runner" then
  659. runner=runner-1
  660. elseif data[n].role=="Death" then
  661. death=death-1
  662. end
  663. end
  664.  
  665.  
  666.  
  667.  
  668. for n,player in pairs(tfm.get.room.playerList) do
  669. data[n].pointsAndScore=data[n].points.." "..data[n].name
  670. end
  671. function eventSummoningEnd(n,id,x,y,angle,t)
  672. tfm.exec.removeObject(t.id)
  673. end
Advertisement
Add Comment
Please, Sign In to add comment