Boeing747-8

Untitled

Jun 18th, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 39.31 KB | None | 0 0
  1. dp={}
  2.  
  3. lag=0
  4. Lives2=600
  5. icedMouseCost=400
  6. cakeCost=200
  7. companionCost=800
  8. shamanCannonCost=1000
  9. watermelonCost=500
  10. mechAnvilCost=800
  11. rockCost=400
  12. ultraCannonCost=900
  13. nyanCost=400
  14. local toDespawn = {}
  15.  
  16. do
  17. local addShamanObject = tfm.exec.addShamanObject
  18. tfm.exec.addShamanObject = function(...)
  19. toDespawn[#toDespawn + 1] = {
  20. addShamanObject(...),
  21. os.time() + 3000
  22. }
  23.  
  24. return toDespawn[#toDespawn][1]
  25. end
  26. end
  27.  
  28. tfm.exec.disableAllShamanSkills(true)
  29. tfm.exec.disableMortCommand(true)
  30. wonCountDown=1
  31.  
  32. scores={0,0,0,0,0,0,0,0}
  33. maps={7455943,7458404,7459068}
  34. powery=320
  35. powerx=math.random(1600)
  36.  
  37. mice=0
  38.  
  39.  
  40.  
  41. Down=string.byte("S")
  42.  
  43. tfm.exec.disableAutoShaman(true)
  44. tfm.exec.disableAutoNewGame(true)
  45. tfm.exec.disableAfkDeath(true)
  46.  
  47. tfm.exec.disableAutoShaman(true)
  48. tfm.exec.disableAutoTimeLeft(true)
  49. tfm.exec.disableAutoScore(true)
  50. data={}
  51. text={}
  52. lang={}
  53. lang.en={boughtNyan="<J>You bought nyan cat!",nyanInv="<p align='left'>Nyan Cat <J><a href='event:equipNyan'></a></J>",nyan="Nyan Cat<N> - Nyan cat will appear as your attack object when you are the Death. <VP>Worth %s points.<J><a href='event:buyNyan'> ",boughtUltraCannon="<J>You bought the ultra cannon!",ultraCannonInv="<p align='left'>Ultra Cannon <J><a href='event:equipUltraCannon'></a></J>",ultraCannon="Ultra Cannon<N> - 2 glowing ultra cannons will appear as your attack object when you are the Death. <VP>Worth %s points.<J><a href='event:buyUltraCannon'> ",boughtRock="<J>You bought the rock anvil!",rock="Rock Anvil<N> - A rock anvil appear as your attack object when you are the Death. <VP>Worth %s points.<J><a href='event:buyRock'> ",rockInv="<p align='left'>Rock Anvil <J><a href='event:equipRock'></a></J>",mechAnvilInv="<p align='left'>Mechanical Anvil <J><a href='event:equipMechAnvil'></a></J>",boughtMechAnvil="<J>You bought the mechanical anvil!",watermelonInv="<p align='left'>Watermelon Cannon <J><a href='event:equipWatermelon'></a></J>",boughtWatermelon="<J>You bought the watermelon cannon!",mechAnvil="Mechanical Anvil<N> - 2 mechanical anvils will appear as your attack object when you are the Death. <VP>Worth %s points.<J><a href='event:buyMechAnvil'> ",watermelon="Watermelon Cannon<N> - A watermelon cannon will appear as your attack object when you are the Death. <VP>Worth %s points.<J><a href='event:buyWatermelon'> ",boughtShamanCannon="<J>You bought the shaman cannon!",shamanCannonInv="<p align='left'>Shaman Cannon <J><a href='event:equipShamanCannon'></a></J>",shamanCannon="Shaman Cannon<N> - 3 shaman cannons will appear as your attack object when you are the Death. <VP>Worth %s points.<J><a href='event:buyShamanCannon'> ",equip="Equip",need2People="You need 2 people to play",nowHave2Lives="<J>You now have 2 lives on each round!",boughtIcedMouse="<J>You just bought the cake object!",boughtCake="<J>You just bought the cake object!",boughtCompanion="<J>You just bought the companion crate!",companionInv="<p align='left'>Companion Crate <J><a href='event:equipCompanion'></a></J>",companion="Companion Crate<N> - A companion crate will appear as your attack object when you are the Death. <VP>Worth %s points.<J><a href='event:buyCompanion'> ",inventory2="Inventory",inventory="<p align='center'><font size='20'>INVENTORY</font><br><br><font size='12'><p align='left'>Default Box <a href='event:equipDefault'><J></J></a>",icedMouseInv="<p align='left'>Iced mouse <J><a href='event:equipIcedMouse'></a></J>",cakeInv="<p align='left'>Cake <J><a href='event:equipCake'></a></J>",shop2="Shop",cake="Cake Object<N> - A cake will appear as your attack object when you are the Death. <VP>Worth %s points.<J><a href='event:buyCake'> ",icedMouse="Iced Mouse Object<N> - An iced mouse will appear as your attack object when you are the Death. <VP>Worth %s points.<J><a href='event:buyIcedMouse'> ",lives2="2 Lives<N> - After you die your first time on a round, you'll be given another live once. <VP>Worth %s points. <J><a href='event:buy2Lives'>",description="Description",points="Points",winsAsRunner="Wins as runner",winsAsDeath="Wins as death",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\nArabic Translations - Bodykudo#0000\n\nPowerup Suggestions - Reddeathnick#3204, Seaqueen2003#0000, 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!"}
  54. lang.ar={
  55. equip="ارتداء",
  56. need2People="أنت تحتاج لاعبيّن لكي تلعب",
  57. nowHave2Lives="<J>أنت الآن لديك حيواتان كل جولة",
  58. boughtIcedMouse="<J>لقد اشتريت الفأر المجمَد!",
  59. boughtCake="<J>لقد اشتريت صندوق الكعك!",
  60. boughtCompanion="<J>لقد اشتريت القفص!",
  61. companionInv="<p align='left'>القفص <J><a href='event:equipCompanion'>[ارتداء]</a></J>",
  62. companion="القفص<N> - القفص سوف يظهر كهجومك عندما تكون القاتل.<VP>يستحق %s نقطة.<J><a href='event:buyCompanion'> [شراء]",
  63. inventory2="المخزن",
  64. inventory="<p align='center'><font size='20'>المخزن</font><br><br><font size='12'><p align='left'>الصندوق العادي <a href='event:equipDefault'><J>[ارتداء]</J></a>",
  65. icedMouseInv="<p align='left'>الفأر المجمَد <J><a href='event:equipIcedMouse'>[ارتداء]</a></J>",
  66. cakeInv="<p align='left'>الكعكة <J><a href='event:equipCake'>[ارتداء]</a></J>",
  67. shop2="المتجر",
  68. cake="الكعكة<N> - الكعكة سوف تظهر كهجومك عندما تكون القاتل.<VP>تستحق %s نقطة.<J><a href='event:buyCake'> [شراء]",
  69. icedMouse="الفأر المجمَد<N> - الفأر المجمَد سوف يظهر كهجومك عندما تكون القاتل. <VP>يستحق %s نقطة.<J><a href='event:buyIcedMouse'> [شراء]",
  70. lives2="حياتان<N> - بعدما تموت لأول مرة في الجولة, سوف يتم إعطائك حياة أخرى فورًا. <VP>تستحق %s نقطة. <J><a href='event:buy2Lives'>[شراء]",
  71. description="الوصف",
  72. points="نقاط",
  73. winsAsRunner="مرات الفوز كراكض",
  74. winsAsDeath="مرات الفوز كقاتل",
  75. profile2="الملف الشخصي",
  76. rules="القواعد</font></font></u><font size='12'>\n\n• استخدام طرق لتخريب اللعبة ليس مسموحًا\n\n• ليس مسموحًا لك استخدام الهكر كباقي الألعاب.",
  77. rules2="القواعد",
  78. commands="المقويات\n\n<font size='11'>اضغط - Sلكي تطلق صندوقًا للهجوم عندما تكون <J>القاتل</J>.\n\nالمسافة - تجعلك تقفز طويلًا بالإضافة إلى قذيفة مخفية عندما تكون <J>راكضًا</J>. \n\nزر أسفل / زر S - تعطيك سرعة إضافية. (تعمل لدى القاتل والراكضين)",
  79. commands2="المقويِات",
  80. credits="ائتمان</font></font><font face='verdana'><font size='11'>\n\n<N>البرمجة - Fuzzyfirsdog#0000\n\n الترجمة العربية - Bodykudo#0000\n\nفكرة النمط - Reddeathnick#3204\n\nاقتراح المقويِّات - Reddeathnick#3204, Seaqueen2003#0000, Mugiwaraloffy#9866\n\nإيجاد طريق لمنع الهكرز - Mariluiss#0000 \n\n<VP>شكرًا لكم ^^",
  81. credits2="الائتمان",
  82. youCanAttack="<R>القاتل: <N>يمكنك الهجوم",
  83. youCanNotAttack="<R>القاتل: <N>لا يمكنك الهجوم",
  84. youCanUsePowerups="<VP>الراكض: <N>يمكنك استعمال المقويِّات",
  85. youCanNotUsePowerups="<VP>الراكض: <N>لا يمكنك استعمال المقويِّات",
  86. attacked="هجم",
  87. youAreARunner="أنت راكض",
  88. youAreADeath="أنت قاتل",
  89. help="في #deathrun يوجد <J>قاتلين</J> و <J>الراكضين</J>. القاتلين يجب أن يحاولوا قتل الراكضين عبر إطلاق أدوات عبر الضغط على الشاشة, إذا لم يفز أي راكض سيفوز القاتل! الراكضين يمكنهم استعمال المقويِّات. إذا وصل راكض واحد للجحر, يفوز الراكضين.",
  90. close="إغلاق",
  91. help2="المساعدة",
  92. superJump="القفزة الخارقة",
  93. speed="السرعة",
  94. deathsWin="فاز القاتل!",
  95. runnersWin="فاز الراكضين!"
  96. }
  97.  
  98. roles={"Death","Runner"}
  99.  
  100.  
  101. death=0
  102. runner=0
  103. miceInHole=0
  104.  
  105. function setLang(n)
  106.  
  107. text[n]=lang[tfm.get.room.playerList[n].community] or lang.en
  108.  
  109. end
  110.  
  111.  
  112. function bindMouse()
  113. for n,player in pairs(tfm.get.room.playerList) do
  114.  
  115. tfm.exec.bindKeyboard(n, 0, true, true)
  116.  
  117. tfm.exec.bindKeyboard(n, 1, true, true)
  118.  
  119. tfm.exec.bindKeyboard(n, 2, true, true)
  120.  
  121. tfm.exec.bindKeyboard(n, 3, true, true)
  122.  
  123. tfm.exec.bindKeyboard(n, 32, true, true)
  124.  
  125. system.bindMouse(n,true)
  126. end
  127. end
  128. bindMouse()
  129.  
  130. tfm.exec.newGame(maps[math.random(#maps)])
  131. names={}
  132.  
  133. theRole=1
  134. currentRole=roles[math.floor(theRole)]
  135.  
  136. function changeCurrentRole()
  137.  
  138. end
  139. numbs={1,2}
  140.  
  141. function showTabs(n)
  142. ui.addTextArea(130, "", n, -432, -835, 3625, 953, 0xff0000, 0x00a2ff, 0.6, true)
  143.  
  144. 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)
  145. ui.addTextArea(155, "<font size='12'><VP><a href='event:inventory'>"..text[n].inventory2.."</a> | <a href='event:shop'>"..text[n].shop2.." | <a href='event:profile'>"..text[n].profile2, n, 630, 30, 264, 26, 0x00aaff, 0x00eeff, 0, true)
  146.  
  147. end
  148. function setData(n)
  149. data[n]=
  150. {
  151. nyan=false,
  152. ultraCannon=false,
  153. rock=false,
  154. mechAnvil=false,
  155. watermelon=false,
  156. shamanCannon=false,
  157. companion=false,
  158. isInRoom=true,
  159. cake=false,
  160. objects=2,
  161. lives2=false,
  162. normalLives=1,
  163. lives=1,
  164. icedMouse=false,
  165. winsAsRunner=0,
  166. winsAsDeath=0,
  167. facingx=85,
  168. name=n,
  169. role="Runner",
  170. points=9000,
  171. spawnLimit=-1,
  172. ableToShoot=0,
  173. ableToShoot2=0,
  174. pointsAndScore="",
  175. inventory=text[n].inventory
  176. }
  177. end
  178. function inventory(n)
  179.  
  180. ui.addTextArea(152, "", n, 510, 96, 286, 290, 0x00ff6a, 0x047529, 1, true)
  181. ui.addTextArea(92, "<p align='center'><font size='20'>"..text[n].inventory.."</font>\n", n, 515, 101, 276, 279, 0x034511, 0x005219, 1, true)
  182. ui.addTextArea(222, "<p align='center'><font size='13'><a href='event:close'><font color='#808080'>"..text[n].close, n, 515, 343, 276, 36, 0x034511, 0x005219, 1, true)
  183.  
  184. end
  185. for n,player in pairs(tfm.get.room.playerList) do
  186. setLang(n)
  187. changeCurrentRole()
  188. mice=mice+1
  189. table.insert(names,n)
  190.  
  191. showTabs(n)
  192. setData(n)
  193.  
  194.  
  195.  
  196.  
  197. data[n].pointsAndScore=data[n].name.." "..data[n].points
  198. table.insert(scores,data[n].points)
  199. showTabs(n)
  200. tfm.exec.lowerSyncDelay(n)
  201. table.insert(dp,n)
  202. end
  203.  
  204. function Dp(name)
  205. name = name:sub(1,1):upper()..name:sub(2):lower()
  206. for i,dp in ipairs(dp) do
  207. if name==dp then
  208. return true
  209. end
  210. end
  211. return false
  212. end
  213.  
  214. function shopPage1(n)
  215. ui.addTextArea(18, "", n, 494, 117, 282, 178, 0x59442c, 0x59442c, 1, true)
  216. ui.addTextArea(25, "<CE>"..string.format(text[n].lives2,Lives2), n, 500, 123, 270, 46, 0x302315, 0x59442c, 1, true)
  217. ui.addTextArea(19, "<CE>"..string.format(text[n].icedMouse,icedMouseCost), n, 500, 182, 270, 46, 0x302315, 0x59442c, 1, true)
  218. ui.addTextArea(110, "<CE>"..string.format(text[n].cake,cakeCost), n, 500, 241, 270, 47, 0x302315, 0x59442c, 1, true)
  219. ui.addTextArea(222, "<p align='center'><font size='13'><a href='event:close'><font color='#808080'>"..text[n].close, n, 494, 296, 282, 36, 0x59442c, 0x59442c, 1, true)
  220. ui.addTextArea(92, "<G>«", n, 498, 310, 19, 18, 0x324650, 0x000000, 1, true)
  221. ui.addTextArea(152, "<a href='event:nextTo2'>»", n, 752, 310, 19, 18, 0x324650, 0x000000, 1, true)
  222.  
  223.  
  224. end
  225.  
  226. function shopPage2(n)
  227. ui.addTextArea(18, "", n, 494, 117, 282, 178, 0x59442c, 0x59442c, 1, true)
  228. ui.addTextArea(25, "<CE>"..string.format(text[n].companion,companionCost), n, 500, 123, 270, 46, 0x302315, 0x59442c, 1, true)
  229. ui.addTextArea(19, "<CE>"..string.format(text[n].shamanCannon,shamanCannonCost), n, 500, 182, 270, 46, 0x302315, 0x59442c, 1, true)
  230. ui.addTextArea(110, "<CE>"..string.format(text[n].watermelon,watermelonCost), n, 500, 241, 270, 47, 0x302315, 0x59442c, 1, true)
  231. ui.addTextArea(222, "<p align='center'><font size='13'><a href='event:close'><font color='#808080'>"..text[n].close, n, 494, 296, 282, 36, 0x59442c, 0x59442c, 1, true)
  232. ui.addTextArea(92, "<a href='event:backTo1'>«", n, 498, 310, 19, 18, 0x324650, 0x000000, 1, true)
  233. ui.addTextArea(152, "<a href='event:nextTo3'>»", n, 752, 310, 19, 18, 0x324650, 0x000000, 1, true)
  234.  
  235.  
  236. end
  237.  
  238.  
  239. function shopPage3(n)
  240. ui.addTextArea(18, "", n, 494, 117, 282, 178, 0x59442c, 0x59442c, 1, true)
  241. ui.addTextArea(25, "<CE>"..string.format(text[n].mechAnvil,mechAnvilCost), n, 500, 123, 270, 46, 0x302315, 0x59442c, 1, true)
  242. ui.addTextArea(19, "<CE>"..string.format(text[n].rock,rockCost), n, 500, 182, 270, 46, 0x302315, 0x59442c, 1, true)
  243. ui.addTextArea(110, "<CE>"..string.format(text[n].ultraCannon,ultraCannonCost), n, 500, 241, 270, 47, 0x302315, 0x59442c, 1, true)
  244. ui.addTextArea(222, "<p align='center'><font size='13'><a href='event:close'><font color='#808080'>"..text[n].close, n, 494, 296, 282, 36, 0x59442c, 0x59442c, 1, true)
  245. ui.addTextArea(92, "<a href='event:backTo2'>«", n, 498, 310, 19, 18, 0x324650, 0x000000, 1, true)
  246. ui.addTextArea(152, "<a href='event:nextTo4'>»", n, 752, 310, 19, 18, 0x324650, 0x000000, 1, true)
  247.  
  248.  
  249. end
  250.  
  251. function shopPage4(n)
  252. ui.addTextArea(18, "", n, 494, 117, 282, 178, 0x59442c, 0x59442c, 1, true)
  253. ui.addTextArea(25, "<CE>"..string.format(text[n].nyan,nyanCost), n, 500, 123, 270, 46, 0x302315, 0x59442c, 1, true)
  254. ui.addTextArea(19, "<CE>", n, 500, 182, 270, 46, 0x302315, 0x59442c, 1, true)
  255. ui.addTextArea(110, "<CE>", n, 500, 241, 270, 47, 0x302315, 0x59442c, 1, true)
  256. ui.addTextArea(222, "<p align='center'><font size='13'><a href='event:close'><font color='#808080'>"..text[n].close, n, 494, 296, 282, 36, 0x59442c, 0x59442c, 1, true)
  257. ui.addTextArea(92, "<a href='event:backTo3'>«", n, 498, 310, 19, 18, 0x324650, 0x000000, 1, true)
  258. ui.addTextArea(152, "<G>»", n, 752, 310, 19, 18, 0x324650, 0x000000, 1, true)
  259.  
  260.  
  261. end
  262.  
  263.  
  264. n1=scores[math.floor(1)]
  265. n2=scores[math.floor(2)]
  266. n3=scores[math.floor(3)]
  267. print(n1)
  268. print(n2)
  269. print(n3)
  270.  
  271. function findRoles(n)
  272. for n,player in pairs(tfm.get.room.playerList) do
  273. if data[n].role=="Death" then
  274.  
  275. tfm.exec.movePlayer(n,150,30,false,0,0,false)
  276.  
  277. elseif data[n].role=="Runner" then
  278.  
  279. tfm.exec.movePlayer(n,70,300,false,0,0,false)
  280.  
  281. end
  282. end
  283. end
  284.  
  285. function findRolesNewPlayer(n)
  286. if data[n].role=="Death" then
  287. tfm.exec.movePlayer(n,150,30,false,0,0,false)
  288.  
  289. elseif data[n].role=="Runner" then
  290.  
  291. tfm.exec.movePlayer(n,70,300,false,0,0,false)
  292.  
  293.  
  294.  
  295. end
  296. end
  297.  
  298.  
  299.  
  300. a={}
  301.  
  302. function eventNewPlayer(n)
  303. setLang(n)
  304. print("yooy")
  305. bindMouse()
  306.  
  307. mice=mice+1
  308. if not data[n] then
  309. table.insert(dp,n)
  310. setData(n)
  311. end
  312. data[n].isInRoom=true
  313.  
  314. showTabs(n)
  315. table.insert(names,n)
  316. findRolesNewPlayer(n)
  317. tfm.exec.respawnPlayer(n)
  318. end
  319.  
  320.  
  321.  
  322.  
  323.  
  324. function addToRoleNumber()
  325. for n,player in pairs(tfm.get.room.playerList) do
  326. if data[n].role=="Death" then
  327. death=death+1
  328. end
  329. if data[n].role=="Runner" then
  330. runner=runner+1
  331.  
  332.  
  333. end
  334. findRoles(n)
  335.  
  336.  
  337. end
  338. end
  339.  
  340.  
  341.  
  342. tfm.exec.newGame(maps[math.random(#maps)])
  343. amountInA=0
  344.  
  345. function punishGlitchers()
  346. if a then
  347. for i=1,amountInA do
  348. data[a[math.floor(amountInA)]].role="Runner"
  349. end
  350. end
  351. end
  352.  
  353. randomDeath=names[math.floor(math.random(mice))]
  354. data[randomDeath].role="Death"
  355. lastDeath=""
  356. function eventNewGame()
  357. lag=0
  358.  
  359.  
  360. local toDespawn = {}
  361.  
  362. do
  363. local addShamanObject = tfm.exec.addShamanObject
  364. tfm.exec.addShamanObject = function(...)
  365. toDespawn[#toDespawn + 1] = {
  366. addShamanObject(...),
  367. os.time() + 3000
  368. }
  369.  
  370. return toDespawn[#toDespawn][1]
  371. end
  372. end
  373. time=0
  374. theRole=1
  375. powerx=math.random(1600)
  376. runner=0
  377. death=0
  378. mice=0
  379. for n,player in pairs(tfm.get.room.playerList) do
  380. data[n].lives=data[n].normalLives
  381. mice=mice+1
  382. changeCurrentRole()
  383. data[n].role="Runner"
  384. data[n].ableToShoot=0
  385. data[n].ableToShoot2=0
  386. data[n].spawnLimit=-1
  387.  
  388. end
  389. mice=mice
  390. if lastDeath==randomDeath then
  391. randomDeath=names[math.random(math.floor(mice))]
  392. end
  393.  
  394. if data[randomDeath].isInRoom==true then
  395. data[randomDeath].role="Death"
  396. elseif data[randomDeath].isInRoom==false then
  397. randomDeath=names[math.random(math.floor(mice))]
  398. end
  399.  
  400. lastDeath=randomDeath
  401.  
  402. addToRoleNumber()
  403. findRoles(n)
  404. print("Last death: "..lastDeath)
  405. end
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413. locationx=0
  414. locationy=0
  415.  
  416.  
  417. objects={54}
  418.  
  419. function eventMouse(n,x,y)
  420.  
  421.  
  422.  
  423. if data[n].role=="Death" and (math.floor(time)>3) and lag<2 and data[n].spawnLimit<1 and mice>1 then
  424. lag=lag+1
  425. if lag>3 then
  426. randomDeath=names[math.floor(math.random(mice))]
  427. data[randomDeath].role="Death"
  428. local toDespawn = {}
  429. table.insert(a,n)
  430. amountInA=amountInA+1
  431. do
  432. local addShamanObject = tfm.exec.addShamanObject
  433. tfm.exec.addShamanObject = function(...)
  434. toDespawn[#toDespawn + 1] = {
  435. addShamanObject(...),
  436. os.time() + 0000
  437. }
  438.  
  439. return toDespawn[#toDespawn][1]
  440. end
  441. end
  442.  
  443.  
  444. 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)
  445. time=-0.5
  446.  
  447. tfm.exec.newGame(maps[math.random(#maps)])
  448. eventNewGame()
  449. end
  450.  
  451.  
  452. data[n].spawnLimit=3
  453. attacked=0
  454. attacked=n
  455. for n,player in pairs(tfm.get.room.playerList) do
  456. ui.addTextArea(2, "<font color='#FF9000'><font size='30'><b>"..attacked.." "..text[n].attacked, n, x, y, 425, 100, 0x324650, 0x000000, 0, false)
  457. end
  458. locationx=x
  459. locationy=y
  460.  
  461.  
  462. if not (data[n].objects==1704) and not (data[n].objects==1002) and not (data[n].objects==1706) and not (data[n].objects==1709) then
  463. tfm.exec.addShamanObject(data[n].objects,locationx,locationy,0,0,20,false)
  464. end
  465. if data[n].objects==1704 then
  466. tfm.exec.addShamanObject(data[n].objects,locationx,locationy,180,0,20,false)
  467.  
  468. tfm.exec.addShamanObject(data[n].objects,locationx-20,locationy,180,0,20,false)
  469. tfm.exec.addShamanObject(data[n].objects,locationx+20,locationy,180,0,20,false)
  470. elseif data[n].objects==1706 then
  471. tfm.exec.addShamanObject(data[n].objects,locationx,locationy,180,0,20,false)
  472. elseif data[n].objects==1709 then
  473. tfm.exec.addShamanObject(data[n].objects,locationx+5,locationy,170,10,120,false)
  474. tfm.exec.addShamanObject(data[n].objects,locationx-5,locationy,-170,10,20,false)
  475. elseif data[n].objects==1002 then
  476. tfm.exec.addShamanObject(data[n].objects,locationx-5,locationy,0,0,20,false)
  477. tfm.exec.addShamanObject(data[n].objects,locationx+5,locationy,0,0,20,false)
  478. end
  479. tfm.exec.displayParticle(0,locationx,locationy,0.5,0.5,0.5,0.5,nil)
  480. tfm.exec.displayParticle(0,locationx,locationy,-0.5,-0.5,-0.5,-0.5,nil)
  481. tfm.exec.displayParticle(2,locationx,locationy,3,-3,3,-3,nil)
  482. tfm.exec.displayParticle(2,locationx,locationy,-3,3,-3,3,nil)
  483.  
  484. tfm.exec.displayParticle(0,locationx,locationy,-0.5,0.5,-0.5,0.5,nil)
  485.  
  486. tfm.exec.displayParticle(0,locationx,locationy,0.5,-0.5,0.5,-0.5,nil)
  487. tfm.exec.displayParticle(2,locationx,locationy,1,-3,1,-3,nil)
  488. tfm.exec.displayParticle(2,locationx,locationy,1,1,3,1,nil)
  489. tfm.exec.displayParticle(2,locationx,locationy,-1,3,-1,3,nil)
  490. tfm.exec.displayParticle(2,locationx,locationy,-1,-1,-3,-1,nil)
  491. tfm.exec.displayParticle(5,locationx,locationy,0.5,0.5,0.5,0.5,nil)
  492. tfm.exec.displayParticle(5,locationx,locationy,-0.5,-0.5,-0.5,-0.5,nil)
  493.  
  494. tfm.exec.displayParticle(5,locationx,locationy,-0.5,0.5,-0.5,0.5,nil)
  495. tfm.exec.displayParticle(5,locationx,locationy,0.5,-0.5,0.5,-0.5,nil)
  496.  
  497. canShoot()
  498. end
  499.  
  500. end
  501.  
  502.  
  503. time=0
  504.  
  505. number1=0
  506. number2=0
  507. number3=0
  508.  
  509.  
  510. function eventPlayerGetCheese(n)
  511. randomDeath=n
  512. print(n)
  513. if data[n].role=="Runner" and mice>1 then
  514.  
  515. tfm.exec.chatMessage(text[n].runnersWin,n)
  516. time=119.5
  517. data[n].points=data[n].points+15
  518.  
  519. for n,player in pairs(tfm.get.room.playerList) do
  520. if data[n].role=="Runner" then
  521. data[n].points=data[n].points+5
  522. data[n].winsAsRunner=data[n].winsAsRunner+1
  523. wonCountDown=-5
  524. end
  525. table.insert(scores,data[n].points)
  526. ui.addTextArea(133, "<b><font size='40'><font color='#0ff164'>"..text[n].runnersWin, n, 296, 282, 351, 189, 0xd41717, 0x000000, 0, true)
  527.  
  528.  
  529.  
  530. end
  531. end
  532.  
  533.  
  534. function eventPlayerWon(n)
  535. print("yo")
  536. randomDeath=n
  537. if data[n].role=="Death" then
  538. time=117
  539. end
  540.  
  541. for n,player in pairs(tfm.get.room.playerList) do
  542. ui.addTextArea(133, "<b><font size='40'><font color='#d40000'>"..text[n].deathsWin, n, 296, 282, 351, 189, 0xd41717, 0x000000, 0, true)
  543. tfm.exec.chatMessage(text[n].deathsWin,n)
  544. if data[n].role=="Death" then
  545. data[n].winsAsDeath=data[n].winsAsDeath+1
  546. data[n].points=data[n].points+10
  547. end
  548. randomDeath=names[math.floor(math.random(mice))]
  549. end
  550.  
  551.  
  552.  
  553.  
  554. tfm.exec.newGame(maps[math.random(#maps)])
  555. print("Runners win!")
  556. end
  557. end
  558.  
  559.  
  560.  
  561. function explosions()
  562. tfm.exec.displayParticle(0,locationx,locationy,0.5,0.5,0.5,0.5,nil)
  563. tfm.exec.displayParticle(0,locationx,locationy,-0.5,-0.5,-0.5,-0.5,nil)
  564. tfm.exec.displayParticle(2,locationx,locationy,3,-3,3,-3,nil)
  565. tfm.exec.displayParticle(2,locationx,locationy,-3,3,-3,3,nil)
  566.  
  567. tfm.exec.displayParticle(0,locationx,locationy,-0.5,0.5,-0.5,0.5,nil)
  568. tfm.exec.displayParticle(0,locationx,locationy,0.5,-0.5,0.5,-0.5,nil)
  569. tfm.exec.displayParticle(2,locationx,locationy,1,-3,1,-3,nil)
  570. tfm.exec.displayParticle(2,locationx,locationy,1,1,3,1,nil)
  571. tfm.exec.displayParticle(2,locationx,locationy,-1,3,-1,3,nil)
  572. tfm.exec.displayParticle(2,locationx,locationy,-1,-1,-3,-1,nil)
  573. tfm.exec.displayParticle(5,locationx,locationy,0.5,0.5,0.5,0.5,nil)
  574. tfm.exec.displayParticle(5,locationx,locationy,-0.5,-0.5,-0.5,-0.5,nil)
  575.  
  576. tfm.exec.displayParticle(5,locationx,locationy,-0.5,0.5,-0.5,0.5,nil)
  577. tfm.exec.displayParticle(5,locationx,locationy,0.5,-0.5,0.5,-0.5,nil)
  578. tfm.exec.explosion(locationx, locationy, 40, 40, false)
  579. end
  580.  
  581.  
  582. function canShoot()
  583. for n,player in pairs(tfm.get.room.playerList) do
  584. if data[n].spawnLimit<1 and data[n].role=="Death" then
  585. ui.addTextArea(12, "\n<p align='center'>"..text[n].youCanAttack, n, 270, 23, 240, 36, 0x00a611, 0x338500, 0.6, true)
  586.  
  587. end
  588. if not (data[n].spawnLimit<1) and data[n].role=="Death" then
  589. ui.addTextArea(12, "\n<p align='center'>"..text[n].youCanNotAttack, n, 270, 23, 240, 36, 0x802c2c, 0x6e0000, 0.6, true)
  590.  
  591. end
  592. if data[n].spawnLimit<1 and data[n].role=="Runner" then
  593. ui.addTextArea(12, "\n<p align='center'>"..text[n].youCanUsePowerups, n, 270, 23, 240, 36, 0x00a611, 0x338500, 0.6, true)
  594.  
  595. end
  596. if not (data[n].spawnLimit<1) and data[n].role=="Runner" then
  597. ui.addTextArea(12, "\n<p align='center'>"..text[n].youCanNotUsePowerups, n, 270, 23, 240, 36, 0x802c2c, 0x6e0000, 0.6, true)
  598.  
  599. end
  600. end
  601. end
  602.  
  603. function removeObjectAfterTime()
  604. for k, v in ipairs(toDespawn) do
  605. if os.time() > v[2] then
  606. tfm.exec.removeObject(v[1])
  607. table.remove(toDespawn, k)
  608. end
  609. end
  610. end
  611.  
  612. function eventLoop()
  613.  
  614. lag=0
  615. removeObjectAfterTime()
  616. if mice<2 then
  617. for n,player in pairs(tfm.get.room.playerList) do
  618. ui.addTextArea(202, "<p align='center'><R><b><font size='20'>"..text[n].need2People, n, 137, 166, 471, 122, 0x404040, 0x000000, 1, true)
  619. end
  620. elseif mice>1 then
  621. ui.removeTextArea(202,nil)
  622.  
  623. wonCoundown=wonCountDown+0.5
  624. ui.addTextArea(13, "<font size='20'>"..math.floor(time).." / 120s", nil, 316, 73, 251, 32, 0x324650, 0x000000, 0, true)
  625.  
  626.  
  627. canShoot()
  628. for n,player in pairs(tfm.get.room.playerList) do
  629.  
  630. data[n].spawnLimit=data[n].spawnLimit-0.5
  631.  
  632. if tfm.get.room.playerList[n].y>100 and data[n].role=="Death" then
  633.  
  634. tfm.exec.movePlayer(n,150,30,false,0,0,false)
  635.  
  636. elseif tfm.get.room.playerList[n].y<100 and data[n].role=="Runner" then
  637. tfm.exec.movePlayer(n,70,300,false,0,0,false)
  638. elseif tfm.get.room.playerList[n].x>600 and time<5 then
  639. tfm.exec.killPlayer(n)
  640. tfm.exec.movePlayer(n,150,tfm.get.room.playerList[n].y,false,0,0,false)
  641. tfm.exec.respawnPlayer(n)
  642. end
  643.  
  644.  
  645.  
  646.  
  647. if data[n].spawnLimit==0 then
  648. ui.removeTextArea(2,nil)
  649. system.bindMouse(n, true)
  650. ui.removeTextArea(11,n)
  651. end
  652. end
  653. time=time+.5
  654. if time==120 then
  655. tfm.exec.newGame(maps[math.random(#maps)])
  656. print("Deaths win!")
  657. time=-0.5
  658. elseif time==0 then
  659. for n,player in pairs(tfm.get.room.playerList) do
  660. findRoles(n)
  661. end
  662. elseif time==5 then
  663. for n,player in pairs(tfm.get.room.playerList) do
  664. ui.removeTextArea(0,nil)
  665. ui.removeTextArea(2,nil)
  666. system.bindMouse(n, true)
  667. ui.removeTextArea(133,n)
  668.  
  669. end
  670. end
  671. end
  672. end
  673.  
  674.  
  675.  
  676.  
  677. function eventKeyboard(n, key, down, x,y)
  678.  
  679. --FACING
  680.  
  681. if key==0 then
  682. data[n].facing=-85
  683. end
  684. if key==2 then
  685. data[n].facing=85
  686. print(-data[n].facing)
  687. end
  688. if time>3 and mice>1 then
  689.  
  690. --AUTOMATIC POWERUPS
  691.  
  692. if key==32 and data[n].role=="Runner" and data[n].spawnLimit<0 then
  693. ui.addTextArea(11, "<b><font size='30'><font color='#F0F000'>"..text[n].superJump, n, x-50, y-50, 379, 67, 0x324650, 0x000000, 0, false)
  694.  
  695. tfm.exec.displayParticle(0,x,y,0.5,0.5,0.5,0.5,nil)
  696. tfm.exec.displayParticle(0,locationx,locationy,-0.5,-0.5,-0.5,-0.5,nil)
  697. tfm.exec.displayParticle(2,locationx,locationy,3,-3,3,-3,nil)
  698. tfm.exec.displayParticle(2,locationx,locationy,-3,3,-3,3,nil)
  699.  
  700. tfm.exec.displayParticle(0,x,y,-0.5,0.5,-0.5,0.5,nil)
  701. tfm.exec.displayParticle(0,x,y,0.5,-0.5,0.5,-0.5,nil)
  702. tfm.exec.displayParticle(2,x,y,1,-3,1,-3,nil)
  703. tfm.exec.displayParticle(2,x,y,1,1,3,1,nil)
  704. tfm.exec.displayParticle(2,x,y,-1,3,-1,3,nil)
  705. tfm.exec.displayParticle(2,x,y,-1,-1,-3,-1,nil)
  706. tfm.exec.displayParticle(5,x,y,0.5,0.5,0.5,0.5,nil)
  707. tfm.exec.displayParticle(5,x,y,-0.5,-0.5,-0.5,-0.5,nil)
  708.  
  709. tfm.exec.displayParticle(5,x,y,-0.5,0.5,-0.5,0.5,nil)
  710. tfm.exec.displayParticle(5,x,y,0.5,-0.5,0.5,-0.5,nil)
  711. tfm.exec.movePlayer(n,x,y,false,0,-80,false)
  712.  
  713.  
  714.  
  715.  
  716. tfm.exec.displayParticle(0,x,y,0.5,0.5,0.5,0.5,nil)
  717. tfm.exec.displayParticle(0,x,locationy,-0.5,-0.5,-0.5,-0.5,nil)
  718. tfm.exec.displayParticle(10,x,y,3,-3,3,-3,nil)
  719. tfm.exec.displayParticle(10,x,y,-3,3,-3,3,nil)
  720.  
  721. tfm.exec.displayParticle(10,x,y,-0.5,0.5,-0.5,0.5,nil)
  722. tfm.exec.displayParticle(10,x,y,0.5,-0.5,0.5,-0.5,nil)
  723. tfm.exec.displayParticle(2,x,y,1,-3,1,-3,nil)
  724. tfm.exec.displayParticle(10,x,y,1,1,3,1,nil)
  725. tfm.exec.displayParticle(12,x,y,-1,3,-1,3,nil)
  726. tfm.exec.displayParticle(12,x,y,-1,-1,-3,-1,nil)
  727. tfm.exec.displayParticle(5,x,y,0.5,0.5,0.5,0.5,nil)
  728. tfm.exec.displayParticle(5,x,y,-0.5,-0.5,-0.5,-0.5,nil)
  729.  
  730. tfm.exec.displayParticle(5,x,y,-0.5,0.5,-0.5,0.5,nil)
  731. tfm.exec.displayParticle(5,x,y,0.5,-0.5,0.5,-0.5,nil)
  732.  
  733. tfm.exec.bindKeyboard(n, 32, false, false)
  734. tfm.exec.addShamanObject(17,x,y,60,50,-10,true)
  735. data[n].spawnLimit=3.5
  736. data[n].ableToShoot=0
  737. canShoot()
  738. elseif (key==3) and data[n].spawnLimit<0 then
  739.  
  740. ui.addTextArea(11, "<b><font size='30'><font color='#F0F000'>"..text[n].speed, n, x-50, y-50, 379, 67, 0x324650, 0x000000, 0, false)
  741.  
  742. tfm.exec.displayParticle(0,x,y,0.5,0.5,0.5,0.5,nil)
  743. tfm.exec.displayParticle(0,x,y,-0.5,-0.5,-0.5,-0.5,nil)
  744. tfm.exec.displayParticle(2,x,y,3,-3,3,-3,nil)
  745. tfm.exec.displayParticle(2,x,y,-3,3,-3,3,nil)
  746.  
  747. tfm.exec.displayParticle(0,x,y,-0.5,0.5,-0.5,0.5,nil)
  748. tfm.exec.displayParticle(0,x,y,0.5,-0.5,0.5,-0.5,nil)
  749. tfm.exec.displayParticle(2,x,y,1,-3,1,-3,nil)
  750. tfm.exec.displayParticle(2,x,y,1,1,3,1,nil)
  751. tfm.exec.displayParticle(2,x,y,-1,3,-1,3,nil)
  752. tfm.exec.displayParticle(2,x,y,-1,-1,-3,-1,nil)
  753. tfm.exec.displayParticle(5,x,y,0.5,0.5,0.5,0.5,nil)
  754. tfm.exec.displayParticle(5,x,y,-0.5,-0.5,-0.5,-0.5,nil)
  755.  
  756. tfm.exec.displayParticle(5,x,y,-0.5,0.5,-0.5,0.5,nil)
  757. tfm.exec.displayParticle(5,x,y,0.5,-0.5,0.5,-0.5,nil)
  758. tfm.exec.movePlayer(n,x,y,false,data[n].facing,0,true)
  759.  
  760.  
  761.  
  762.  
  763. tfm.exec.displayParticle(0,x,y,0.5,0.5,0.5,0.5,nil)
  764. tfm.exec.displayParticle(0,locationx,locationy,-0.5,-0.5,-0.5,-0.5,nil)
  765. tfm.exec.displayParticle(10,locationx,locationy,3,-3,3,-3,nil)
  766. tfm.exec.displayParticle(10,locationx,locationy,-3,3,-3,3,nil)
  767.  
  768. tfm.exec.displayParticle(10,x,y,-0.5,0.5,-0.5,0.5,nil)
  769. tfm.exec.displayParticle(10,x,y,0.5,-0.5,0.5,-0.5,nil)
  770. tfm.exec.displayParticle(2,x,y,1,-3,1,-3,nil)
  771. tfm.exec.displayParticle(10,x,y,1,1,3,1,nil)
  772. tfm.exec.displayParticle(12,x,y,-1,3,-1,3,nil)
  773. tfm.exec.displayParticle(12,x,y,-1,-1,-3,-1,nil)
  774. tfm.exec.displayParticle(5,x,y,0.5,0.5,0.5,0.5,nil)
  775. tfm.exec.displayParticle(5,x,y,-0.5,-0.5,-0.5,-0.5,nil)
  776.  
  777. tfm.exec.displayParticle(5,x,y,-0.5,0.5,-0.5,0.5,nil)
  778. tfm.exec.displayParticle(5,x,y,0.5,-0.5,0.5,-0.5,nil)
  779.  
  780.  
  781.  
  782. data[n].spawnLimit=3.5
  783. data[n].ableToShoot=0
  784. canShoot()
  785.  
  786. end
  787. end
  788. end
  789.  
  790. function removeTextAreas(n)
  791. ui.removeTextArea(18,n)
  792. ui.removeTextArea(19,n)
  793. ui.removeTextArea(110,n)
  794. ui.removeTextArea(222,n)
  795. ui.removeTextArea(25,n)
  796. ui.removeTextArea(152,n)
  797. ui.removeTextArea(92,n)
  798. end
  799. n=0
  800. system.disableChatCommandDisplay("profile",true)
  801. function eventTextAreaCallback(id,p,a)
  802. n=p
  803. if a=="close" then
  804. removeTextAreas(n)
  805. elseif a=="help" then
  806. removeTextAreas(n)
  807. --TABS
  808.  
  809. ui.addTextArea(110, "", n, 498, 165, 266, 217, 0x324650, 0x000000, 1, true)
  810. ui.addTextArea(18, "<font size='14'><font face='calibri'>"..text[n].help, n, 504, 172, 254, 179, 0x000000, 0x000000, 1, true)
  811. 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)
  812. elseif a=="credits" then
  813. removeTextAreas(n)
  814. 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)
  815. ui.addTextArea(19, "<p align='center'><font size='13'><a href='event:close'>"..text[n].close, n, 504, 343, 254, 36, 0x4f4132, 0x30291a, 1, true)
  816. elseif a=="commands" then
  817. removeTextAreas(n)
  818. ui.addTextArea(18, "<p align='center'><font size='14'><font face='verdana'>"..text[n].commands, n, 545, 111, 220, 238, 0x50498c, 0x05014f, 1, true)
  819. ui.addTextArea(19, "<p align='center'><font size='13'><a href='event:close'>"..text[n].close, n, 545, 346, 220, 36, 0x284391, 0x0f0759, 1, true)
  820. elseif a=="rules" then
  821. removeTextAreas(n)
  822. 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)
  823. 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)
  824. elseif a=="profile" then
  825. removeTextAreas(n)
  826. 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)
  827. ui.addTextArea(18, "<p align='left'><font size='13'><font face='calibri'><font color='#FFFFFF'>"..text[n].points..": <br>"..data[n].points.." <br><br>"..text[n].winsAsDeath..": <br>"..data[n].winsAsDeath.."<br><br>"..text[n].winsAsRunner..": <br>"..data[n].winsAsRunner, n, 557, 136, 105, 226, 0x966a03, 0x294d12, 1, true)
  828. ui.addTextArea(19, "<p align='left'><font size='13'><font face='calibri'><font color='#FFFFFF'>"..text[n].description, n, 675, 136, 104, 226, 0x966a03, 0x294d12, 1, true)
  829. 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)
  830. end
  831. if a=="inventory" then
  832. removeTextAreas(n)
  833. ui.addTextArea(152, "", n, 510, 96, 286, 290, 0x00ff6a, 0x047529, 1, true)
  834. ui.addTextArea(92, "<p align='center'><font size='20'>"..data[n].inventory, n, 515, 101, 276, 279, 0x034511, 0x005219, 1, true)
  835. ui.addTextArea(222, "<p align='center'><font size='13'><a href='event:close'><font color='#808080'>"..text[n].close, n, 515, 343, 276, 36, 0x034511, 0x005219, 1, true)
  836. end
  837.  
  838. if a=="equipDefault" then
  839. data[n].objects=2
  840. elseif a=="equipNyan" then
  841. data[n].objects=212
  842. elseif a=="equipUltraCannon" then
  843. data[n].objects=1709
  844. elseif a=="equipCompanion" then
  845. data[n].objects=61
  846. elseif a=="equipShamanCannon" then
  847. data[n].objects=1704
  848. elseif a=="equipWatermelon" then
  849. data[n].objects=1706
  850. elseif a=="equipIcedMouse" then
  851. data[n].objects=54
  852. elseif a=="equipCake" then
  853. data[n].objects=207
  854. elseif a=="equipMechAnvil" then
  855. data[n].objects=1002
  856. elseif a=="equipRock" then
  857. data[n].objects=1003
  858.  
  859. elseif a=="shop" then
  860. shopPage1(n)
  861. elseif a=="backTo1" then
  862. shopPage1(n)
  863. elseif a=="nextTo2" then
  864.  
  865. shopPage2(n)
  866. elseif a=="backTo2" then
  867. shopPage2(n)
  868. elseif a=="nextTo3" then
  869. shopPage3(n)
  870. elseif a=="backTo3" then
  871. shopPage3(n)
  872. elseif a=="nextTo4" then
  873. shopPage4(n)
  874. end
  875. --SHOP ITEMS
  876.  
  877. if a=="buyIcedMouse" and (data[n].points>icedMouseCost or data[n].points==icedMouseCost) and data[n].icedMouse==false then
  878. data[n].inventory = data[n].inventory.."\n"..text[n].icedMouseInv
  879. data[n].objects=54
  880. tfm.exec.chatMessage(text[n].boughtIcedMouse,n)
  881.  
  882. data[n].icedMouse=true
  883. data[n].points=data[n].points-icedMouseCost
  884. elseif a=="buyNyan" and (data[n].points>nyanCost or data[n].points==nyanCost) and data[n].nyan==false then
  885. data[n].inventory = data[n].inventory.."\n"..text[n].nyanInv
  886. data[n].objects=212
  887. tfm.exec.chatMessage(text[n].boughtNyan,n)
  888.  
  889. data[n].nyan=true
  890. data[n].points=data[n].points-nyanCost
  891.  
  892. elseif a=="buyUltraCannon" and (data[n].points>ultraCannonCost or data[n].points==ultraCannonCost) and data[n].ultraCannon==false then
  893. data[n].inventory = data[n].inventory.."\n"..text[n].ultraCannonInv
  894. data[n].objects=1709
  895. tfm.exec.chatMessage(text[n].boughtUltraCannon,n)
  896.  
  897. data[n].ultraCannon=true
  898. data[n].points=data[n].points-ultraCannonCost
  899. elseif a=="buyCake" and (data[n].points>cakeCost or data[n].points==cakeCost) and data[n].cake==false then
  900. data[n].inventory=data[n].inventory.."\n"..text[n].cakeInv
  901.  
  902. data[n].objects=207
  903. tfm.exec.chatMessage(text[n].boughtCake,n)
  904. data[n].cake=true
  905. data[n].points=data[n].points-cakeCost
  906. elseif a=="buyMechAnvil" and (data[n].points>mechAnvilCost or data[n].points==mechAnvilCost) and data[n].mechAnvil==false then
  907. data[n].inventory=data[n].inventory.."\n"..text[n].mechAnvilInv
  908.  
  909. data[n].objects=1002
  910. tfm.exec.chatMessage(text[n].boughtMechAnvil,n)
  911. data[n].mechAnvil=true
  912. data[n].points=data[n].points-mechAnvilCost
  913. elseif a=="buyRock" and (data[n].points>rockCost or data[n].points==rockCost) and data[n].rock==false then
  914. data[n].inventory=data[n].inventory.."\n"..text[n].rockInv
  915.  
  916. data[n].objects=1003
  917. tfm.exec.chatMessage(text[n].boughtRock,n)
  918. data[n].rock=true
  919. data[n].points=data[n].points-rockCost
  920.  
  921. elseif a=="buy2Lives" and (data[n].points>Lives2 or data[n].points==Lives2) and data[n].lives2==false then
  922. data[n].normalLives=2
  923. tfm.exec.chatMessage(text[n].nowHave2Lives,n)
  924. print(data[n].lives)
  925. data[n].points=data[n].points-Lives2
  926. data[n].lives2=true
  927. elseif a=="buyCompanion" and (data[n].points>companionCost or data[n].points==companionCost) and data[n].companion==false then
  928. data[n].objects=61
  929. data[n].inventory = data[n].inventory.."\n"..text[n].companionInv
  930. data[n].companion=true
  931.  
  932. data[n].points=data[n].points-companionCost
  933. tfm.exec.chatMessage(text[n].boughtCompanion,n)
  934. elseif a=="buyShamanCannon" and (data[n].points>shamanCannonCost or data[n].points==shamanCannonCost) and data[n].shamanCannon==false then
  935. data[n].objects=1704
  936. data[n].inventory = data[n].inventory.."\n"..text[n].shamanCannonInv
  937. data[n].shamanCannon=true
  938.  
  939. data[n].points=data[n].points-shamanCannonCost
  940. tfm.exec.chatMessage(text[n].boughtshamanCannon,n)
  941. elseif a=="buyWatermelon" and (data[n].points>watermelonCost or data[n].points==watermelonCost) and data[n].watermelon==false then
  942. data[n].objects=1706
  943. data[n].inventory = data[n].inventory.."\n"..text[n].watermelonInv
  944. data[n].watermelon=true
  945.  
  946. data[n].points=data[n].points-watermelonCost
  947. tfm.exec.chatMessage(text[n].boughtWatermelon,n)
  948.  
  949. end
  950. end
  951.  
  952. function eventPlayerDied(n)
  953. data[n].lives=data[n].lives-1
  954. if data[n].role=="Runner" and data[n].lives==1 then
  955. tfm.exec.respawnPlayer(n)
  956. end
  957. if data[n].role=="Runner" and data[n].lives==0 then
  958. runner=runner-1
  959. print(runner)
  960.  
  961. end
  962. if runner<1 and mice>1 then
  963. tfm.exec.newGame(maps[math.random(#maps)])
  964. for n,player in pairs(tfm.get.room.playerList) do
  965. ui.addTextArea(133, "<b><font size='40'><font color='#d40000'>"..text[n].deathsWin, n, 296, 282, 351, 189, 0xd41717, 0x000000, 0, true)
  966. tfm.exec.chatMessage(text[n].deathsWin,n)
  967. if data[n].role=="Death" then
  968. data[n].points=data[n].points+10
  969. data[n].winsAsDeath=data[n].winsAsDeath+1
  970. end
  971. end
  972. wonCountDown=-5
  973. print("hi")
  974. end
  975. if death<1 then
  976. tfm.exec.newGame(maps[math.random(#maps)])
  977. tfm.exec.disableAutoShaman(true)
  978.  
  979. time=0
  980.  
  981.  
  982. for n,player in pairs(tfm.get.room.playerList) do
  983.  
  984.  
  985. wonCountdown=-5
  986. changeCurrentRole()
  987. data[n].role="Runner"
  988. end
  989. data[names[math.floor(math.random(mice))]].role="Death"
  990. end
  991. end
  992.  
  993.  
  994.  
  995.  
  996. print(death)
  997. print(runner)
  998.  
  999. print(mice)
  1000.  
  1001. function eventPlayerLeft(n)
  1002. names={}
  1003. for n in pairs(tfm.get.room.playerList) do
  1004. table.insert(names,n)
  1005. end
  1006.  
  1007. data[n].isInRoom=false
  1008. mice=mice-1
  1009. if n==randomDeath then
  1010. randomDeath=names[math.random(math.floor(mice))]
  1011. end
  1012. if data[n].role=="Runner" then
  1013. runner=runner-1
  1014. elseif data[n].role=="Death" then
  1015. death=death-1
  1016. end
  1017. end
  1018.  
  1019.  
  1020.  
  1021.  
  1022. for n,player in pairs(tfm.get.room.playerList) do
  1023. data[n].pointsAndScore=data[n].points.." "..data[n].name
  1024. end
  1025.  
  1026. function eventSummoningEnd(n,id,x,y,angle,t)
  1027. print(id)
  1028. tfm.exec.removeObject(t.id)
  1029. end
  1030.  
  1031. system.disableChatCommandDisplay("profil",true)
  1032. function eventChatCommand(n, c)
  1033. if c:sub(0,7)=="profile" and Dp(c:sub(9)) then
  1034. l = c:sub(9,9):upper()..c:sub(10):lower()
  1035.  
  1036. removeTextAreas(n)
  1037. ui.addTextArea(110, "<p align='center'><font size='12'><font color='#000000'><font face='calibri'>"..l, n, 551, 89, 233, 278, 0xffd900, 0x075214, 1, true)
  1038. ui.addTextArea(18, "<p align='left'><font size='13'><font face='calibri'><font color='#FFFFFF'>"..text[n].points..": <br>"..data[l].points.." <br><br>"..text[n].winsAsDeath..": <br>"..data[l].winsAsDeath.."<br><br>"..text[n].winsAsRunner..": <br>"..data[l].winsAsRunner, n, 557, 136, 105, 226, 0x966a03, 0x294d12, 1, true)
  1039. ui.addTextArea(19, "<p align='left'><font size='13'><font face='calibri'><font color='#FFFFFF'>"..text[n].description, n, 675, 136, 104, 226, 0x966a03, 0x294d12, 1, true)
  1040. 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)
  1041.  
  1042. end
  1043. end
Advertisement
Add Comment
Please, Sign In to add comment