Boeing747-8

Untitled

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