Advertisement
Boeing747-8

Untitled

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