Boeing747-8

Untitled

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