Boeing747-8

Untitled

Aug 9th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function deathrun()
  2. tfm.exec.disableAfkDeath(false)
  3. v=0
  4. tfm.exec.setRoomMaxPlayers(15)
  5. dp={}
  6. function count()
  7. if runner<1 then
  8. tfm.exec.newGame(maps[math.random(#maps)])
  9. end
  10. end
  11. function vip(n)
  12. if n=="Fuzzyfirsdog#0000" or n=="Bodykudo#0000" or n=="Tortuegreen#0000" or n=="Bolodefchoco#0000" then
  13. data[n].def=212
  14. data[n].objects=data[n].def
  15. data[n].nyan=true
  16. end
  17. if n=="Reddeathnick#3204" or n=="Mariluiss#0000" or n=="Mugiwaraloffy#9866" or n=="Pratton#0000" or n=="Seaqueen2003#0000" then
  18. data[n].def=212
  19. data[n].objects=data[n].def
  20. data[n].nyan=true
  21. end
  22. end
  23. function add(n)
  24. if data[n].role=="Runner" then
  25. runner=runner+1
  26. elseif data[n].role=="Death" then
  27. death=death+1
  28. end
  29. end
  30. lag=0
  31. Lives2=1000
  32. icedMouseCost=400
  33. cakeCost=200
  34. companionCost=900
  35. shamanCannonCost=1000
  36. watermelonCost=500
  37. mechAnvilCost=800
  38. rockCost=400
  39. ultraCannonCost=900
  40. nyanCost=400
  41. local toDespawn = {}
  42. do
  43. local addShamanObject = tfm.exec.addShamanObject
  44. tfm.exec.addShamanObject = function(...)
  45. toDespawn[#toDespawn + 1] = {
  46. addShamanObject(...),
  47. os.time() + 3000
  48. }
  49.  
  50. return toDespawn[#toDespawn][1]
  51. end
  52. end
  53.  
  54. tfm.exec.disableAllShamanSkills(true)
  55. tfm.exec.disableMortCommand(true)
  56. wonCountDown=1
  57.  
  58.  
  59. maps={7455943,7458404,7459068,6238915,6321696,6321733,6335123}
  60. powery=320
  61. powerx=math.random(1600)
  62.  
  63. mice=0
  64.  
  65. function countMice()
  66. for n,player in pairs(tfm.get.room.playerList) do
  67. mice=mice+1
  68. end
  69. end
  70.  
  71. Down=string.byte("S")
  72.  
  73. tfm.exec.disableAutoShaman(true)
  74. tfm.exec.disableAutoNewGame(true)
  75.  
  76.  
  77. tfm.exec.disableAutoShaman(true)
  78. tfm.exec.disableAutoTimeLeft(true)
  79. tfm.exec.disableAutoScore(true)
  80. data={}
  81. text={}
  82. lang={}
  83. lang.he={boughtNyan="<J>!קנית את קופסת ניאן החתול",
  84. nyanInv="<p align='left'>השתמש <J><a href='event:equipNyan'>[השתמש]</a></J>",
  85. nyan="קופסת ניאן החתול<N> - .קופסת ניאן החתול תופיע כחפץ ההתקפה שלך <VP>מחיר %s נקודות.<J><a href='event:buyNyan'> [קנה]",
  86. boughtUltraCannon="<J>!קנית את הכדור תותח המיוחד",
  87. ultraCannonInv="<p align='left'>כדור תותח מיוחד <J><a href='event:equipUltraCannon'>[השתמש]</a></J>",
  88. ultraCannon="כדור תותח מיוחד<N> - .שני כדורי תותח זוהרים יופיעו כחפץ ההתקפה שלך <VP>מחיר %s נקודות.<J><a href='event:buyUltraCannon'> [קנה]",
  89. boughtRock="<J>!קנית את סדן הסלע",
  90. rock="סדן סלע<N> - .סדן סלע יופיע כחפץ ההתקפה שלך <VP>מחיר %s נקודות.<J><a href='event:buyRock'> [קנה]",
  91. rockInv="<p align='left'>Rock Anvil <J><a href='event:equipRock'>[Equip]</a></J>",
  92. mechAnvilInv="<p align='left'>סדן מכני <J><a href='event:equipMechAnvil'>[השתמש]</a></J>",
  93. boughtMechAnvil="<J>!קנית את הסדן המכני",
  94. watermelonInv="<p align='left'>כדור תותח אבטיח <J><a href='event:equipWatermelon'>[השתמש]</a></J>",
  95. boughtWatermelon="<J>!קנית את הכדור תותח האבטיח",
  96. mechAnvil="סדן מכני<N> - .שני סדנים מכניים יופיעו כחפץ ההתקפה שלך <VP>מחיר %s נקודות.<J><a href='event:buyMechAnvil'> [קנה]",
  97. watermelon="כדור תותח האבטיח<N> - .כדור התותח האבטיח יופיע כחפץ ההתקפה שלך <VP>Worth %s points.<J><a href='event:buyWatermelon'> [Buy]",
  98. boughtShamanCannon="<J>!קנית את כדור תותח של השאמאן",
  99. shamanCannonInv="<p align='left'>כדור תותח של השאמאן <J><a href='event:equipShamanCannon'>[השתמש]</a></J>",
  100. shamanCannon="כדור תותח של השאמאן<N> - .שלושה כדורי תותח יופיעו כחפץ ההתקפה שלך <VP>מחיר %s נקודות.<J><a href='event:buyShamanCannon'> [קנה]",
  101. equip="השתמש",
  102. need2People="דרושים שני אנשים בשביל לשחק",
  103. nowHave2Lives="<J>!עכשיו יהיו לך שני חיים בכל סיבוב",
  104. boughtIcedMouse="<J>!קנית את קוביית העכבר הקפוא",
  105. boughtCake="<J>!קנית את קופסת העוגה",
  106. boughtCompanion="<J>!קנית את קופסת החברות",
  107. companionInv="<p align='left'>קופסת חברות <J><a href='event:equipCompanion'>[השתמש]</a></J>",
  108. companion="קופסת החברות<N> - .קופסת חברות תופיע כחפץ ההתקפה שלך <VP>מחיר %s נקודות.<J><a href='event:buyCompanion'> [קנה]",
  109. inventory2="מלאי חפצים",
  110. inventory="<p align='center'><font size='20'>מלאי חפצים</font><br><br><font size='12'><p align='left'>קופסה רגילה <a href='event:equipDefault'><J>[השתמש]</J></a>",
  111. icedMouseInv="<p align='left'>קוביית עכבר הקפוא <J><a href='event:equipIcedMouse'>[השתמש]</a></J>",
  112. cakeInv="<p align='left'>קופסת עוגה <J><a href='event:equipCake'>[השתמש]</a></J>",
  113. shop2="חנות",
  114. cake="קופסת עוגה<N> - .קופסת עוגה תופיע כחפץ ההתקפה שלך <VP>מחיר %s נקודות.<J><a href='event:buyCake'> [קנה]",
  115. icedMouse="קוביית עכבר קפוא<N> - .קוביית עכבר קפוא תופיע כחפץ ההתקפה שלך <VP>מחיר %s נקודות.<J><a href='event:buyIcedMouse'> [קנה]",
  116. lives2="שני חיים<N> - .לאחר שתמות בפעם הראשונה שלך בסיבוב, תקבל פעם נוספת לחיות <VP>מחיר %s נקודות. <J><a href='event:buy2Lives'>[קנה]",
  117. description="תיאור",
  118. points="נקודות",
  119. winsAsRunner="ניצחונות כאצן",
  120. winsAsDeath="ניצחונות כהורג",
  121. profile2="פרופיל",
  122. rules="חוקים</font></font></u><font size='12'>\n\n .שימוש בשיטות ליצור לאג אינן מורשות • \n\n .השימוש ברמאויות אסור, כמו בכל משחק אחר• ",
  123. rules2="חוקים",
  124. commands="יכולות\n\n<font size='11'><b>לחיצה</b> - משגר חפץ שאמאן אקראי כאשר תקפידך הוא <J>הורג</J>.\n\n<b>רווח</b> - עושה קפיצה גבוהה כשלאחריה יש כדור תותח שקוף כאשר אתה <J>אצן</J>. \n\n<b>חץ תחתון / S key</b> - .נותן לך תנופת מהירות",
  125. commands2="יכולות",
  126. credits="זכויות</font></font><font face='verdana'><font size='10'>\n\n<N>תכנות - Fuzzyfirsdog#0000\n\nרעיון המשחק - Reddeathnick#3204\n\nתרגום לערבית - Bodykudo#0000\n\nתרגום לעברית - Ori_the_king#6575\n\nתרגום לצרפתית - Tortuegreen#0000\n\nתרגום לפורטוגזית - Pratton#0000\n\nהצעות יכולות - Reddeathnick#3204, Seaqueen2003#0000, Mugiwaraloffy#9866\n\nמציאת דרכים להסיר רמאויות - Mariluiss#0000 \n\n<VP>^^ תודה רבה",
  127. credits2="זכויות",
  128. youCanAttack="<R>הורג: <N>אתה יכול לתקוף",
  129. youCanNotAttack="<R>הורג: <N>אתה לא יכול לתקוף",
  130. youCanUsePowerups="<VP>אצן: <N>אתה יכול להשתמש ביכולות",
  131. youCanNotUsePowerups="<VP>אצן: <N>אתה לא יכול להשתמש ביכולות",
  132. attacked="!תקף",
  133. youAreARunner="אתה אצן",
  134. youAreADeath="אתה הורג",
  135. help='במשחק זה ישנם <J>הורג</J> ו <J>אצנים</J>. !הורג חייב לנסות להרוג את האצנים ע"י לחיצה על מקום בכדי לשגר חפ. אם שום אצן אינו נכנס למחילה אז ההורג ניצח האצנים אמורים להשתמש ביכולות שלהם בכדי להגיע למחילה ע"י בריחה מההורג. אם אצן אחד נכנס למחילה אז האצנים ניצחו!',
  136. close="סגור",
  137. help2="עזרה",
  138. superJump="קפיצה גבוהה",
  139. speed="מהירות",
  140. deathsWin="!ההורג ניצח",
  141. runnersWin="!האצנים ניצחו",
  142. killer="[הורג] ",
  143. runner="[הורג]"}
  144. lang.br={
  145. boughtNyan="<J>Você comprou Nyan Cat!",
  146. nyanInv="<p align='left'>Nyan Cat <J><a href='event:equipNyan'>[Equipar]</a></J>",
  147. nyan="Nyan Cat<N> - Nyan Cat aparecerá como seu objeto de ataque quando você é o assassino. <VP>%s pts.<J><a href='event:buyNyan'> [Compra]",
  148. boughtUltraCannon="<J>Você comprou o ultra canhão!",
  149. ultraCannonInv="<p align='left'>Ultra Cannon <J><a href='event:equipUltraCannon'>[Equipar]</a></J>",
  150. ultraCannon="Ultra Cannon<N> - Dois ultra canhões brilhantes aparecerão com oseu objeto de ataque quando você é o assassino. <VP>%s pts.<J><a href='event:buyUltraCannon'> [Compra]",
  151. boughtRock="<J>Você comprou a bigorna de pedra!",
  152. rock="Rock Anvil<N> - A bigorna de pedra aparece como seu objeto de ataque quando você é o assassino. <VP>%s pts.<J><a href='event:buyRock'> [Compra]",
  153. rockInv="<p align='left'>Rock Anvil <J><a href='event:equipRock'>[Equipar]</a></J>",
  154. mechAnvilInv="<p align='left'>Mechanical Anvil <J><a href='event:equipMechAnvil'>[Equipar]</a></J>",
  155. boughtMechAnvil="<J>Você comprou a bigorna mecânica!",
  156. watermelonInv="<p align='left'>Watermelon Cannon <J><a href='event:equipWatermelon'>[Equipar]</a></J>",
  157. boughtWatermelon="<J>Você comprou o canhão de melancia!",
  158. mechAnvil="Mechanical Anvil<N> - Duas bigornas mecânicas aparecerãocomo seu objeto de ataque quando você é o assassino. <VP>%s points.<J><a href='event:buyMechAnvil'> [Compra]",
  159. watermelon="Watermelon Cannon<N> - Um canhão de melancia aparecerá como seu objeto de ataque quando você é o assassino. <VP>%s pts.<J><a href='event:buyWatermelon'> [Compra]",
  160. boughtShamanCannon="<J>Você comprou o canhão de shaman!",
  161. shamanCannonInv="<p align='left'>Shaman Cannon <J><a href='event:equipShamanCannon'>[Equipar]</a></J>",
  162. shamanCannon="Shaman Cannon<N> - Três canhões de shaman aparecerão como seu objeto de ataque quando você é o assassino. <VP>%s pts.<J><a href='event:buyShamanCannon'> [Compra]",
  163. equip="Equip",
  164. need2People="São necessários dois jogadores para jogar",
  165. nowHave2Lives="<J>Você agora tem duas vidas em cada rodada!",
  166. boughtIcedMouse="<J>Você comprou o objeto rato congelado!",
  167. boughtCake="<J>Você comprou o objeto bolo!",
  168. boughtCompanion="<J>Você comprou a caixa de companheiro!",
  169. companionInv="<p align='left'>Companion Crate <J><a href='event:equipCompanion'>[Equipar]</a></J>",
  170. companion="Companion Crate<N> - A caixa de companheiro aparecerá como seu objeto de ataquequando você é o assassino. <font size='9'><VP>%s<J><a href='event:buyCompanion'> [Compra]",
  171. inventory2="Inventário",
  172. inventory="<p align='center'><font size='20'>INVENTORY</font><br><br><font size='12'><p align='left'>Default Box <a href='event:equipDefault'><J>[Equipar]</J></a>",
  173. icedMouseInv="<p align='left'>Iced mouse <J><a href='event:equipIcedMouse'>[Equipar]</a></J>",
  174. cakeInv="<p align='left'>Cake <J><a href='event:equipCake'>[Equipar]</a></J>",
  175. shop2="Loja",
  176. cake="Cake Object<N> - Um bolo aparecerá como seu objeto de ataque quando você é o assassino. <VP>%s pts.<J><a href='event:buyCake'> [Compra]",
  177. icedMouse="Iced Mouse Object<N> - Um rato congelado aparecerá como seu objeto de ataque quando você é o assassino. <VP>%s pts.<J><a href='event:buyIcedMouse'> [Compra]",
  178. lives2="2 Lives<N> - Após você morrer pela primeira vez em uma rodada, receberá outra vida apenas uma vez. <VP>%s pts. <J><a href='event:buy2Lives'>[Compra]",
  179. description="Descrição",
  180. points="Pontos",
  181. winsAsRunner="Vitórias como fugitivo",
  182. winsAsDeath="Vitória como assassino",
  183. profile2="Perfil",
  184. rules="Regras</font></font></u><font size='12'>\n\n• Não é permitido o uso de truques para bugar o jogo \n\n• O uso de hack não é permitido, assim como qualquer outro jogo.",
  185. rules2="Regras",
  186. commands="Poderes\n\n<font size='11'>Click - Spawna um objeto de shaman aleatório quando vocçe é um <J>Assassino</J>.\n\nBarra de espaço - Faz um pulo grande seguido de um canhão invisível quando você é um<J>Fugitivo</J>. \n\nSeta para baixo/ Tecla S - Te dá um boost de velocidade (Tanto para fugitivos quanto para assassinos)",
  187. commands2="Poderes",
  188. credits="Créditos</font></font><font face='verdana'><font size='10'>\n\n<N>Programação - Fuzzyfirsdog#0000\n\nIdeia do Module - Reddeathnick#3204\n\nTradução para árabe - Bodykudo#0000\n\nTradução para FR - Tortuegreen#0000\n\nTradução para BR - Pratton#0000\n\nTradução para HE - Ori_the_king#6575\n\nPowerup Sugestões - Reddeathnick#3204, Seaqueen2003#0000, Mugiwaraloffy#9866\n\nAchando maneiras de remover hacks - Mariluiss#0000 \n\n<VP>Obrigado ^^",
  189. credits2="Créditos",
  190. killer="[Assassino] ",
  191. runner="[Fugitivo]",
  192. youCanAttack="<R>Assassino: <N>Você pode atacou",
  193. youCanNotAttack="<R>Assassino: <N>Voce não pode atacar",
  194. youCanUsePowerups="<VP>Fugitivo: <N>Você pode usar poderes",
  195. youCanNotUsePowerups="<VP>Fugitivo: <N>Você não pode usar poderes",
  196. attacked="ATACADO",
  197. youAreARunner="Você é um fugitivo",
  198. youAreADeath="Você é um assasino",
  199. help="No #deathrun existem <J>Assassinos</J> e <J>Fugitivos</J>. Assassinos devem tentar matar os ratos spawnando objetos. Se nenhum fugitivo entra na toca, os assassinos ganham! Os fugitivos devem usar os poderes dados a eles para escapar dos assassinos e chegar a toca. Se um fugitivo entra na toca, a vitória é dos fugitivos.",
  200. close="Fechar",
  201. help2="Ajuda",
  202. superJump="SUPER PULO",
  203. speed="VELOCIDADE",
  204. deathsWin="Vitória dos assassinos!",
  205. runnersWin="Vitória dos fugitivos!"
  206. }
  207. lang.fr={
  208. boughtNyan="<J>Vous avez acheté nyan cat !",
  209. nyanInv="<p align='left'>Nyan Cat <J><a href='event:equipNyan'>[Équiper]</a></J>",
  210. 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]",
  211. boughtUltraCannon="<J>Vous avez acheté le super boulet !",
  212. ultraCannonInv="<p align='left'>Super Boulet <J><a href='event:equipUltraCannon'>[Équiper]</a></J>",
  213. 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]",
  214. boughtRock="<J>Vous avez acheté l'enclume rocher !",
  215. 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]",
  216. rockInv="<p align='left'>Enclume Rocher <J><a href='event:equipRock'>[Équiper]</a></J>",
  217. mechAnvilInv="<p align='left'>Enclume Mécanique <J><a href='event:equipMechAnvil'>[Équiper]</a></J>",
  218. boughtMechAnvil="<J>Vous avez acheté l'enclume mécanique !",
  219. watermelonInv="<p align='left'>Boulet Pastèque <J><a href='event:equipWatermelon'>[Équiper]</a></J>",
  220. boughtWatermelon="<J>Vous avez acheté le boulet pastèque !",
  221. 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]",
  222. 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]",
  223. boughtShamanCannon="<J>Vous avez acheté le boulet chamane !",
  224. shamanCannonInv="<p align='left'>Boulet Chamane <J><a href='event:equipShamanCannon'>[Équiper]</a></J>",
  225. 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]",
  226. equip="Équiper",
  227. need2People="Vous devez être 2 pour jouer",
  228. nowHave2Lives="<J>Vous avez maintenant 2 vies à chaque tour !",
  229. boughtIcedMouse="<J>Vous venez d'acheter l'objet Souris gelée !",
  230. boughtCake="<J>Vous venez d'acheter l'objet Gâteau !",
  231. boughtCompanion="<J>Vous venez d'acheter la Caisse compagnon !",
  232. companionInv="<p align='left'>Caisse Compagnon <J><a href='event:equipCompanion'>[Équiper]</a></J>",
  233. 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]",
  234. inventory2="Inventaire",
  235. 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>",
  236. icedMouseInv="<p align='left'>Souris glacée <J><a href='event:equipIcedMouse'>[Équiper]</a></J>",
  237. cakeInv="<p align='left'>Gâteau <J><a href='event:equipCake'>[Équiper]</a></J>",
  238. shop2="Magasin",
  239. 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]",
  240. 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]",
  241. 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]",
  242. description="Description",
  243. points="Points",
  244. winsAsRunner="Gaggne en étant un Coureur",
  245. winsAsDeath="Gagne en étant le tueur",
  246. profile2="Profil",
  247. 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.",
  248. rules2="Règles",
  249. commands="Boosters\n\n<font size='11'><b>Cliquer</b> - Fait apparaître un objet chamane aléatoire lorsque vous le rôle de <J>le tueur<J>.\n\n<b>Barre d'espace</b> - Fait un grand saut suivi d'un boulet invisible lorsque vous êtes un <J>Coureur</J>. \n\n<b>Flèche du basw / touche S</b> - Vous donne un bonus de vitesse. (Fonctione pour tueurs et les Coureurs)",
  250. commands2="Boosters",
  251. credits="Crédits</font></font><font face='verdana'><font size='10'>\n\n<N>Code - Fuzzyfirsdog#0000\n\Idée du module - Reddeathnick#3204\n\nTraductions AR - Bodykudo#0000\n\nTraductions FR - Tortuegreen#0000\n\nTraductions PT - Pratton#0000\n\nTraductions HE - Ori_the_king#6576\n\nSuggestions des boosters - Reddeathnick#3204, Seaqueen2003#0000, Mugiwaraloffy#9866\n\nAnti-triche - Mariluiss#0000 \n\n<VP>Merci ^^",
  252. credits2="Crédits",
  253. killer="[Tueur] ",
  254. runner="[Coureur]",
  255. youCanAttack="<R>Tueur: <N>Vous pouvez attaquer",
  256. youCanNotAttack="<R>Tueur: <N>Vous ne pouvez pas attaquer",
  257. youCanUsePowerups="<VP>Coureur: <N>Vous pouvez utiliser des boosters",
  258. youCanNotUsePowerups="<VP>Coureur: <N>Vous ne pouvez pas utiliser de boosters",
  259. attacked="ATTAQUÉ",
  260. youAreARunner="Vous êtes un Coureur",
  261. youAreADeath="Vous êtes le tueur",
  262. 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.",
  263. close="Fermer",
  264. help2="Aide",
  265. superJump="SUPER SAUT",
  266. speed="VITESSE",
  267. deathsWin="Tueurs ont gagné !",
  268. runnersWin="Les Coureurs ont gagné !"
  269. }
  270. 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. <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. <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. <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. <VP>Worth %s points.<J><a href='event:buyMechAnvil'> [Buy]",watermelon="Watermelon Cannon<N> - A watermelon cannon will appear as your attack object. <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. <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. <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. <VP>Worth %s points.<J><a href='event:buyCake'> [Buy]",icedMouse="Iced Mouse Object<N> - An iced mouse will appear as your attack object. <VP>Worth %s points.<J><a href='event:buyIcedMouse'> [Buy]",lives2="2 Lives<N> - After you die your first time on a round, you'll be given another live once. <VP>Worth %s points. <J><a href='event:buy2Lives'>[Buy]",description="Description",points="Points",winsAsRunner="Wins as runner",winsAsDeath="Wins as Killer",profile2="Profile",rules="Rules</font></font></u><font size='12'>\n\n• Using tricks to glitch the game is not allowed\n\n• You are not allowed to hack just like in any other game.",rules2="Rules",commands="Powerups\n\n<font size='11'><b>Click</b> - Spawns a random shaman object when you have the role of being a <J>Killer</J>.\n\n<b>Spacebar</b> - Makes a large jump followed with an invisible cannon when you have the role of being a <J>Runner</J>. \n\n<b>Down Arrow / S key</b> - Gives you a boost of speed. (Works for both Killers and Runners)",commands2="Powerups",credits="Credits</font></font><font face='verdana'><font size='10'>\n\n<N>Programming - Fuzzyfirsdog#0000\n\nModule Idea - Reddeathnick#3204\n\nArabic Translations - Bodykudo#0000\n\nFrench Translations - Tortuegreen#0000\n\nPortuguese Translations - Pratton#0000\n\nHebrew Translations - Ori_the_king#6575\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!",killer="[Killer] ",runner="[Runner]"}
  271. lang.ar={
  272. boughtNyan="<J>لقد اشتريت القطة نيان!",
  273. nyanInv="<p align='left'>القطة نيان <J><a href='event:equipNyan'>[ارتداء]</a></J>",
  274. nyan="القطة نيان<N> - القطة نيان سوف تظهر كأداة هجومك عندما تكون القاتل. <VP>تستحق %s نقطة.<J><a href='event:buyNyan'> [شراء]",
  275. boughtUltraCannon="<J>لقد اشتريت القذيفة الفائقة!",
  276. ultraCannonInv="<p align='left'>القذيفة الفائقة <J><a href='event:equipUltraCannon'>[ارتداء]</a></J>",
  277. ultraCannon="القذيفة الفائقة<N> - كُرتان فائقتان متوهجتان سوف يظهران كهجومك عندما تكون القاتل <VP>تستحق %s نقطة.<J><a href='event:buyUltraCannon'> [شراء]",
  278. boughtRock="<J>لقد اشتريت السندان الصخري!",
  279. rock="السندان الصخري<N> - السندان الصخري سوف يظهر كهجومك عندما تكون القاتل. <VP>يستحق %s نقطة.<J><a href='event:buyRock'> [شراء]",
  280. rockInv="<p align='left'>السندان الصخري <J><a href='event:equipRock'>[ارتداء]</a></J>",
  281. mechAnvilInv="<p align='left'>السندان الميكانيكي <J><a href='event:equipMechAnvil'>[ارتداء]</a></J>",
  282. boughtMechAnvil="<J>لقد اشتريت السندان الميكانيكي!",
  283. watermelonInv="<p align='left'>كرة البطيخ <J><a href='event:equipWatermelon'>[ارتداء]</a></J>",
  284. boughtWatermelon="<J>لقد اشتريت كرة البطيخ!",
  285. mechAnvil="السندان الميكانيكي<N> - سندانان ميكانيكيان سوف يظهران كهجوم عندما تكون القاتل. <VP>يستحق %s نقطة.<J><a href='event:buyMechAnvil'> [شراء]",
  286. watermelon="كرة البطيخ<N> - كرة البطيخ سوف تظهر كهجومك عندما تكون القاتل. <VP>تستحق %s نقطة.<J><a href='event:buyWatermelon'> [شراء]",
  287. boughtShamanCannon="<J>لقد اشتريت كرة الشامان!",
  288. shamanCannonInv="<p align='left'>كرة الشامان <J><a href='event:equipShamanCannon'>[ارتداء]</a></J>",
  289. shamanCannon="كرة الشامان<N> - 3 كرات شامان سوف تظهر كهجومك عندما تكون القاتل. <VP>تستحق %s نقاط.<J><a href='event:buyShamanCannon'> [شراء]",
  290. equip="ارتداء",
  291. need2People="أنت تحتاج لاعبيّن لكي تلعب",
  292. nowHave2Lives="<J>أنت الآن لديك حيواتان كل جولة",
  293. boughtIcedMouse="<J>لقد اشتريت الفأر المجمَد!",
  294. boughtCake="<J>لقد اشتريت صندوق الكعك!",
  295. boughtCompanion="<J>لقد اشتريت القفص!",
  296. companionInv="<p align='left'>القفص <J><a href='event:equipCompanion'>[ارتداء]</a></J>",
  297. companion="القفص<N> - القفص سوف يظهر كهجومك عندما تكون القاتل.<VP>يستحق %s نقطة.<J><a href='event:buyCompanion'> [شراء]",
  298. inventory2="المخزن",
  299. inventory="<p align='center'><font size='20'>المخزن</font><br><br><font size='12'><p align='left'>الصندوق العادي <a href='event:equipDefault'><J>[ارتداء]</J></a>",
  300. icedMouseInv="<p align='left'>الفأر المجمَد <J><a href='event:equipIcedMouse'>[ارتداء]</a></J>",
  301. cakeInv="<p align='left'>الكعكة <J><a href='event:equipCake'>[ارتداء]</a></J>",
  302. shop2="المتجر",
  303. cake="الكعكة<N> - الكعكة سوف تظهر كهجومك عندما تكون القاتل.<VP>تستحق %s نقطة.<J><a href='event:buyCake'> [شراء]",
  304. icedMouse="الفأر المجمَد<N> - الفأر المجمَد سوف يظهر كهجومك عندما تكون القاتل. <VP>يستحق %s نقطة.<J><a href='event:buyIcedMouse'> [شراء]",
  305. lives2="حياتان<N> - بعدما تموت لأول مرة في الجولة, سوف يتم إعطائك حياة أخرى فورًا. <VP>تستحق %s نقطة. <J><a href='event:buy2Lives'>[شراء]",
  306. description="الوصف",
  307. points="نقاط",
  308. winsAsRunner="مرات الفوز كراكض",
  309. winsAsDeath="مرات الفوز كقاتل",
  310. profile2="الملف الشخصي",
  311. rules="القواعد</font></font></u><font size='12'>\n\n• استخدام طرق لتخريب اللعبة ليس مسموحًا\n\n• ليس مسموحًا لك استخدام الهكر كباقي الألعاب.",
  312. rules2="القواعد",
  313. commands="المقويات\n\n<font size='11'>اضغط - Sلكي تطلق صندوقًا للهجوم عندما تكون <J>القاتل</J>.\n\nالمسافة - تجعلك تقفز طويلًا بالإضافة إلى قذيفة مخفية عندما تكون <J>راكضًا</J>. \n\nزر أسفل / زر S - تعطيك سرعة إضافية. (تعمل لدى القاتل والراكضين)",
  314. commands2="المقويِات",
  315. credits="ائتمان</font></font><font face='verdana'><font size='10'>\n\n<N>البرمجة - Fuzzyfirsdog#0000\n\n الترجمة العربية - Bodykudo#0000\n\nترجمة فرنسية - Tortuegreen#0000\n\nاللغة العبريةترجمات البرتغالية - Ori_the_king#6575\n\nفكرة النمط - Reddeathnick#3204\n\nاقتراح المقويِّات - Reddeathnick#3204, Seaqueen2003#0000, Mugiwaraloffy#9866\n\nإيجاد طريق لمنع الهكرز - Mariluiss#0000 \n\n<VP>شكرًا لكم ^^",
  316. credits2="الائتمان",
  317. killer="[القاتل] ",
  318. runner="[الراكضين]",
  319. youCanAttack="<R>القاتل: <N>يمكنك الهجوم",
  320. youCanNotAttack="<R>القاتل: <N>لا يمكنك الهجوم",
  321. youCanUsePowerups="<VP>الراكض: <N>يمكنك استعمال المقويِّات",
  322. youCanNotUsePowerups="<VP>الراكض: <N>لا يمكنك استعمال المقويِّات",
  323. attacked="هجم",
  324. youAreARunner="أنت راكض",
  325. youAreADeath="أنت قاتل",
  326. help="في #deathrun يوجد <J>قاتلين</J> و <J>الراكضين</J>. القاتلين يجب أن يحاولوا قتل الراكضين عبر إطلاق أدوات عبر الضغط على الشاشة, إذا لم يفز أي راكض سيفوز القاتل! الراكضين يمكنهم استعمال المقويِّات. إذا وصل راكض واحد للجحر, يفوز الراكضين.",
  327. close="إغلاق",
  328. help2="المساعدة",
  329. superJump="القفزة الخارقة",
  330. speed="السرعة",
  331. deathsWin="فاز القاتل!",
  332. runnersWin="فاز الراكضين!"
  333. }
  334. roles={"Death","Runner"}
  335. death=0
  336. runner=0
  337. miceInHole=0
  338. function setLang(n)
  339. text[n]=lang[tfm.get.room.playerList[n].community] or lang.en
  340. end
  341. P=string.byte("P")
  342. H=string.byte("H")
  343. O=string.byte("O")
  344. function bindMouse()
  345. for n,player in pairs(tfm.get.room.playerList) do
  346. tfm.exec.bindKeyboard(n, 0, true, true)
  347. tfm.exec.bindKeyboard(n, 1, true, true)
  348. tfm.exec.bindKeyboard(n, 2, true, true)
  349. tfm.exec.bindKeyboard(n, 3, true, true)
  350. tfm.exec.bindKeyboard(n, 32, true, true)
  351. tfm.exec.bindKeyboard(n, P, true, true)
  352. tfm.exec.bindKeyboard(n, O, true, true)
  353. tfm.exec.bindKeyboard(n, H, true, true)
  354. system.bindMouse(n,true)
  355. end
  356. end
  357. bindMouse()
  358. names={}
  359. theRole=1
  360. currentRole=roles[math.floor(theRole)]
  361. function showTabs(n)
  362. ui.addTextArea(130, "", n, -432, -865, 3625, 953, 0xffffff, 0xffffff, 0.008, true)
  363. 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)
  364. 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)
  365. end
  366. function setData(n)
  367. data[n] = {
  368. def=2,
  369. idTime=6,
  370. afk=true,
  371. description="",
  372. p=0,
  373. nyan=false,
  374. ultraCannon=false,
  375. rock=false,
  376. mechAnvil=false,
  377. watermelon=false,
  378. shamanCannon=false,
  379. ompanion=false,
  380. isInRoom=true,
  381. cake=false,
  382. objects=2,
  383. lives2=false,
  384. normalLives=1,
  385. lives=1,
  386. icedMouse=false,
  387. winsAsRunner=0,
  388. winsAsDeath=0,
  389. facingx=85,
  390. name=n,
  391. role="Runner",
  392. points=0,
  393. spawnLimit=-1,
  394. ableToShoot=0,
  395. ableToShoot2=0,
  396. pointsAndScore="",
  397. inventory=text[n].inventory
  398. }
  399. data[n].objects=data[n].def
  400. end
  401. function inventory(n)
  402. ui.addTextArea(152, "", n, 510, 96, 286, 290, 0x00ff6a, 0x047529, 1, true)
  403. ui.addTextArea(92, "<p align='center'><font size='20'>"..text[n].inventory.."</font>\n", n, 515, 101, 276, 279, 0x034511, 0x005219, 1, true)
  404. ui.addTextArea(222, "<p align='center'><font size='13'><a href='event:close'><font color='#808080'>\n"..text[n].close, n, 515, 343, 276, 36, 0x034511, 0x005219, 1, true)
  405. end
  406. for n,player in pairs(tfm.get.room.playerList) do
  407. setLang(n)
  408. table.insert(names,n)
  409. showTabs(n)
  410. setData(n)
  411. add(n)
  412. vip(n)
  413. data[n].pointsAndScore=data[n].name.." "..data[n].points
  414. showTabs(n)
  415. tfm.exec.lowerSyncDelay(n)
  416. table.insert(dp,n)
  417. end
  418.  
  419. function Dp(name)
  420. name = name:sub(1,1):upper()..name:sub(2):lower()
  421. for i,dp in ipairs(dp) do
  422. if name==dp then
  423. return true
  424. end
  425. end
  426. return false
  427. end
  428.  
  429. function shopPage1(n)
  430. ui.addTextArea(18, "", n, 494, 117, 282, 178, 0x59442c, 0x59442c, 1, true)
  431. ui.addTextArea(25, "<font size='10'><CE>"..text[n].runner.." "..string.format(text[n].lives2,Lives2), n, 500, 123, 270, 46, 0x302315, 0x59442c, 1, true)
  432. ui.addTextArea(19, "<font size='10'><CE>"..text[n].killer..string.format(text[n].icedMouse,icedMouseCost), n, 500, 182, 270, 46, 0x302315, 0x59442c, 1, true)
  433. ui.addTextArea(110, "<font size='10'><CE>"..text[n].killer..string.format(text[n].cake,cakeCost), n, 500, 241, 270, 47, 0x302315, 0x59442c, 1, true)
  434. ui.addTextArea(222, "<p align='center'><font size='13'><a href='event:close'><font color='#909090'><VP>"..text[n].close, n, 494, 300, 282, 26, 0x59442c, 0x302315, 1, true)
  435. ui.addTextArea(92, "<G><p align='center'>«", n, 498, 305, 19, 18, 0x324650, 0x000000, 1, true)
  436. ui.addTextArea(152, "<a href='event:nextTo2'><p align='center'>»", n, 752, 305, 19, 18, 0x324650, 0x000000, 1, true)
  437. end
  438.  
  439. function shopPage2(n)
  440. ui.addTextArea(18, "", n, 494, 117, 282, 178, 0x59442c, 0x59442c, 1, true)
  441. ui.addTextArea(25, "<font size='10'><CE>"..text[n].killer..string.format(text[n].companion,companionCost), n, 500, 123, 270, 46, 0x302315, 0x59442c, 1, true)
  442. ui.addTextArea(19, "<font size='10'><CE>"..text[n].killer..string.format(text[n].shamanCannon,shamanCannonCost), n, 500, 182, 270, 46, 0x302315, 0x59442c, 1, true)
  443. ui.addTextArea(110, "<font size='10'><CE>"..text[n].killer..string.format(text[n].watermelon,watermelonCost), n, 500, 241, 270, 47, 0x302315, 0x59442c, 1, true)
  444. ui.addTextArea(222, "<p align='center'><font size='13'><a href='event:close'><font color='#909090'><VP>"..text[n].close, n, 494, 300, 282, 26, 0x59442c, 0x302315, 1, true)
  445. ui.addTextArea(92, "<a href='event:backTo1'><p align='center'>«", n, 498, 305, 19, 18, 0x324650, 0x000000, 1, true)
  446. ui.addTextArea(152, "<a href='event:nextTo3'><p align='center'>»", n, 752, 305, 19, 18, 0x324650, 0x000000, 1, true)
  447. end
  448.  
  449.  
  450. function shopPage3(n)
  451. ui.addTextArea(18, "", n, 494, 117, 282, 178, 0x59442c, 0x59442c, 1, true)
  452. ui.addTextArea(25, "<font size='10'><CE>"..text[n].killer..string.format(text[n].mechAnvil,mechAnvilCost), n, 500, 123, 270, 46, 0x302315, 0x59442c, 1, true)
  453. ui.addTextArea(19, "<font size='10'><CE>"..text[n].killer..string.format(text[n].rock,rockCost), n, 500, 182, 270, 46, 0x302315, 0x59442c, 1, true)
  454. ui.addTextArea(110, "<font size='10'><CE>"..text[n].killer..string.format(text[n].ultraCannon,ultraCannonCost), n, 500, 241, 270, 47, 0x302315, 0x59442c, 1, true)
  455. ui.addTextArea(222, "<p align='center'><font size='13'><a href='event:close'><font color='#909090'><VP>"..text[n].close, n, 494, 300, 282, 26, 0x59442c, 0x302315, 1, true)
  456. ui.addTextArea(92, "<a href='event:backTo2'><p align='center'>«", n, 498, 305, 19, 18, 0x324650, 0x000000, 1, true)
  457. ui.addTextArea(152, "<a href='event:nextTo4'><p align='center'>»", n, 752, 305, 19, 18, 0x324650, 0x000000, 1, true)
  458. end
  459.  
  460. function shopPage4(n)
  461. ui.addTextArea(18, "", n, 494, 117, 282, 178, 0x59442c, 0x59442c, 1, true)
  462. ui.addTextArea(25, "<font size='10'><CE>"..text[n].killer..string.format(text[n].nyan,nyanCost), n, 500, 123, 270, 46, 0x302315, 0x59442c, 1, true)
  463. ui.addTextArea(19, "<font size='10'><CE>", n, 500, 182, 270, 46, 0x302315, 0x59442c, 1, true)
  464. ui.addTextArea(110, "<font size='10'><CE>", n, 500, 241, 270, 47, 0x302315, 0x59442c, 1, true)
  465. ui.addTextArea(222, "<p align='center'><font size='13'><a href='event:close'><font color='#909090'><VP>"..text[n].close, n, 494, 300, 282, 26, 0x59442c, 0x302315, 1, true)
  466. ui.addTextArea(92, "<a href='event:backTo3'><p align='center'>«", n, 498, 305, 19, 18, 0x324650, 0x000000, 1, true)
  467. ui.addTextArea(152, "<G><p align='center'>»", n, 752, 305, 19, 18, 0x324650, 0x000000, 1, true)
  468. end
  469.  
  470.  
  471.  
  472.  
  473.  
  474. function findRoles(n)
  475. for n,player in pairs(tfm.get.room.playerList) do
  476. if data[n].role=="Death" then
  477. tfm.exec.movePlayer(n,150,30,false,0,0,false)
  478. elseif data[n].role=="Runner" then
  479. tfm.exec.movePlayer(n,150,300,false,0,0,false)
  480. end
  481. end
  482. end
  483.  
  484. function findRolesNewPlayer(n)
  485. if data[n].role=="Death" then
  486. tfm.exec.movePlayer(n,150,30,false,0,0,false)
  487. elseif data[n].role=="Runner" then
  488. tfm.exec.movePlayer(n,150,300,false,0,0,false)
  489. end
  490. end
  491. a={}
  492. function eventNewPlayer(n)
  493. mice=0
  494. countMice()
  495. id=tfm.exec.addImage("1642e105967.png","&0",190,146,n)
  496. setLang(n)
  497. if not data[n] then
  498. tfm.exec.respawnPlayer(n)
  499. setData(n)
  500. end
  501. showTabs(n)
  502. bindMouse()
  503. countMice()
  504. table.insert(dp,n)
  505. vip(n)
  506. add(n)
  507. data[n].idTime=0
  508. data[n].isInRoom=true
  509. if mice==1 then
  510. randomDeath=names[math.floor(math.random(mice))]
  511. data[randomDeath].role="Death"
  512. lastDeath=""
  513. end
  514. findRolesNewPlayer(n)
  515. if mice<2 then
  516. tfm.exec.newGame(7489132)
  517. tfm.exec.chatMessage("<R>"..text[n].need2People,n)
  518. end
  519. if mice>1 and curMap=="@7489132" then
  520. tfm.exec.newGame(maps[math.random(#maps)])
  521. end
  522. end
  523.  
  524.  
  525.  
  526.  
  527.  
  528. function addToRoleNumber()
  529. for n,player in pairs(tfm.get.room.playerList) do
  530. if data[n].role=="Death" then
  531. death=death+1
  532. end
  533. if data[n].role=="Runner" then
  534. runner=runner+1
  535. end
  536. findRoles(n)
  537. end
  538. end
  539. tfm.exec.newGame(maps[math.random(#maps)])
  540. amountInA=0
  541. function punishGlitchers()
  542. if a then
  543. for i=1,amountInA do
  544. data[a[math.floor(amountInA)]].role="Runner"
  545. end
  546. end
  547. end
  548.  
  549. curMap=0
  550. function eventNewGame()
  551. curMap=tfm.get.room.currentMap
  552. lag=0
  553. v=0
  554. mice=0
  555. countMice()
  556. local toDespawn = {}
  557. do
  558. local addShamanObject = tfm.exec.addShamanObject
  559. tfm.exec.addShamanObject = function(...)
  560. toDespawn[#toDespawn + 1] = {
  561. addShamanObject(...),
  562. os.time() + 3000
  563. }
  564. return toDespawn[#toDespawn][1]
  565. end
  566. end
  567. time=0
  568. theRole=1
  569. powerx=math.random(1600)
  570. runner=0
  571. death=0
  572. for n,player in pairs(tfm.get.room.playerList) do
  573. data[n].lives=data[n].normalLives
  574. data[n].role="Runner"
  575. data[n].ableToShoot=0
  576. data[n].ableToShoot2=0
  577. data[n].spawnLimit=-1
  578. data[n].afk=true
  579. if mice<2 then
  580. tfm.exec.newGame(7489132)
  581. tfm.exec.chatMessage("<R>"..text[n].need2People,n)
  582. end
  583. end
  584. mice=mice
  585. if lastDeath==randomDeath then
  586. randomDeath=names[math.random(math.floor(mice))]
  587. end
  588.  
  589. if data[randomDeath].isInRoom==true then
  590. data[randomDeath].role="Death"
  591. elseif data[randomDeath].isInRoom==false then
  592. randomDeath=names[math.random(math.floor(mice))]
  593. end
  594.  
  595. lastDeath=randomDeath
  596. addToRoleNumber()
  597. findRoles(n)
  598. end
  599. locationx=0
  600. locationy=0
  601. function eventMouse(n,x,y)
  602. if x>200 then
  603. if data[n].role=="Death" and (math.floor(time)>3) and lag<2 and data[n].spawnLimit<1 and mice>1 then
  604. lag=lag+1
  605. if lag>3 then
  606. randomDeath=names[math.floor(math.random(mice))]
  607. data[randomDeath].role="Death"
  608. local toDespawn = {}
  609. table.insert(a,n)
  610. amountInA=amountInA+1
  611. do
  612. local addShamanObject = tfm.exec.addShamanObject
  613. tfm.exec.addShamanObject = function(...)
  614. toDespawn[#toDespawn + 1] = {
  615. addShamanObject(...),
  616. os.time() + 0000
  617. }
  618. return toDespawn[#toDespawn][1]
  619. end
  620. end
  621.  
  622.  
  623. 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)
  624. time=-0.5
  625. tfm.exec.newGame(maps[math.random(#maps)])
  626. eventNewGame()
  627. end
  628.  
  629.  
  630. data[n].spawnLimit=3
  631. attacked=0
  632. attacked=n
  633. for n,player in pairs(tfm.get.room.playerList) do
  634. ui.addTextArea(2, "<font color='#FF9000'><font size='30'><b>"..attacked.." "..text[n].attacked, n, x, y, 425, 100, 0x324650, 0x000000, 0, false)
  635. end
  636. locationx=x
  637. locationy=y
  638.  
  639.  
  640. 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
  641. tfm.exec.addShamanObject(data[n].objects,locationx,locationy,0,0,20,false)
  642. end
  643. if data[n].objects==1704 then
  644. tfm.exec.addShamanObject(data[n].objects,locationx,locationy,180,0,20,false)
  645. tfm.exec.addShamanObject(data[n].objects,locationx-20,locationy,180,0,20,false)
  646. tfm.exec.addShamanObject(data[n].objects,locationx+20,locationy,180,0,20,false)
  647. elseif data[n].objects==1706 then
  648. tfm.exec.addShamanObject(data[n].objects,locationx,locationy,180,0,20,false)
  649. elseif data[n].objects==1709 then
  650. tfm.exec.addShamanObject(data[n].objects,locationx+5,locationy,170,10,120,false)
  651. tfm.exec.addShamanObject(data[n].objects,locationx-5,locationy,-170,10,20,false)
  652. elseif data[n].objects==1002 then
  653. tfm.exec.addShamanObject(data[n].objects,locationx-5,locationy,0,0,20,false)
  654. tfm.exec.addShamanObject(data[n].objects,locationx+5,locationy,0,0,20,false)
  655. end
  656. tfm.exec.displayParticle(3,locationx,locationy,0,0,0,0,nil)
  657. canShoot()
  658. end
  659. end
  660. end
  661. time=0
  662. function eventPlayerGetCheese(n)
  663. v=v+1
  664. if data[n].role=="Runner" and mice>1 and v==1 and data[n].afk==false then
  665. randomDeath=n
  666. time=119.5
  667. data[n].points=data[n].points+50
  668. for n,player in pairs(tfm.get.room.playerList) do
  669. ui.addTextArea(133, "<b><font size='40'><font color='#0ff164'>"..text[n].runnersWin, n, 296, 282, 351, 189, 0xd41717, 0x000000, 0, true)
  670. if data[n].role=="Runner" and data[n].afk==false then
  671. data[n].points=data[n].points+15
  672. data[n].winsAsRunner=data[n].winsAsRunner+1
  673. wonCountDown=-5
  674. end
  675. end
  676. end
  677. end
  678.  
  679.  
  680.  
  681.  
  682.  
  683.  
  684. function explosions()
  685. tfm.exec.displayParticle(0,locationx,locationy,0.5,0.5,0.5,0.5,nil)
  686. tfm.exec.displayParticle(0,locationx,locationy,-0.5,-0.5,-0.5,-0.5,nil)
  687. tfm.exec.displayParticle(2,locationx,locationy,3,-3,3,-3,nil)
  688. tfm.exec.displayParticle(2,locationx,locationy,-3,3,-3,3,nil)
  689. tfm.exec.displayParticle(0,locationx,locationy,-0.5,0.5,-0.5,0.5,nil)
  690. tfm.exec.displayParticle(0,locationx,locationy,0.5,-0.5,0.5,-0.5,nil)
  691. tfm.exec.displayParticle(2,locationx,locationy,1,-3,1,-3,nil)
  692. tfm.exec.displayParticle(2,locationx,locationy,1,1,3,1,nil)
  693. tfm.exec.displayParticle(2,locationx,locationy,-1,3,-1,3,nil)
  694. tfm.exec.displayParticle(2,locationx,locationy,-1,-1,-3,-1,nil)
  695. tfm.exec.displayParticle(5,locationx,locationy,0.5,0.5,0.5,0.5,nil)
  696. tfm.exec.displayParticle(5,locationx,locationy,-0.5,-0.5,-0.5,-0.5,nil)
  697. tfm.exec.displayParticle(5,locationx,locationy,-0.5,0.5,-0.5,0.5,nil)
  698. tfm.exec.displayParticle(5,locationx,locationy,0.5,-0.5,0.5,-0.5,nil)
  699. tfm.exec.explosion(locationx, locationy, 40, 40, false)
  700. end
  701.  
  702.  
  703. function canShoot()
  704. for n,player in pairs(tfm.get.room.playerList) do
  705. if data[n].spawnLimit<1 and data[n].role=="Death" then
  706. ui.addTextArea(12, "\n<p align='center'>"..text[n].youCanAttack, n, 270, 23, 240, 46, 0x00a611, 0x338500, 1, true)
  707. end
  708. if not (data[n].spawnLimit<1) and data[n].role=="Death" then
  709. ui.addTextArea(12, "\n<p align='center'>"..text[n].youCanNotAttack, n, 270, 23, 240, 46, 0x802c2c, 0x6e0000, 1, true)
  710. end
  711. if data[n].spawnLimit<1 and data[n].role=="Runner" then
  712. ui.addTextArea(12, "\n<p align='center'>"..text[n].youCanUsePowerups, n, 270, 23, 240, 46, 0x00a611, 0x338500, 1, true)
  713. end
  714. if not (data[n].spawnLimit<1) and data[n].role=="Runner" then
  715. ui.addTextArea(12, "\n<p align='center'>"..text[n].youCanNotUsePowerups, n, 270, 23, 240, 46, 0x802c2c, 0x6e0000, 1, true)
  716. end
  717. end
  718. end
  719. function removeObjectAfterTime()
  720. for k, v in ipairs(toDespawn) do
  721. if os.time() > v[2] then
  722. tfm.exec.removeObject(v[1])
  723. table.remove(toDespawn, k)
  724. end
  725. end
  726. end
  727.  
  728. function eventLoop()
  729. names={}
  730. for n,player in pairs(tfm.get.room.playerList) do
  731. table.insert(names,n)
  732. end
  733. mice=0
  734. countMice()
  735. if mice>1 and curMap=="@7489132" then
  736. tfm.exec.newGame(maps[math.random(#maps)])
  737. end
  738. for n,player in pairs(tfm.get.room.playerList) do
  739. data[n].idTime=data[n].idTime+0.5
  740. if data[n].idTime==5 then
  741. tfm.exec.removeImage(id)
  742. end
  743. end
  744. lag=0
  745. removeObjectAfterTime()
  746. if mice>1 then
  747. ui.removeTextArea(202,nil)
  748. wonCoundown=wonCountDown+0.5
  749. canShoot()
  750. for n,player in pairs(tfm.get.room.playerList) do
  751. data[n].spawnLimit=data[n].spawnLimit-0.5
  752. if tfm.get.room.playerList[n].y>100 and data[n].role=="Death" then
  753. tfm.exec.movePlayer(n,150,30,false,0,0,false)
  754. elseif tfm.get.room.playerList[n].y<100 and data[n].role=="Runner" then
  755. tfm.exec.movePlayer(n,70,300,false,0,0,false)
  756. elseif tfm.get.room.playerList[n].x>600 and time<5 then
  757. tfm.exec.killPlayer(n)
  758. tfm.exec.movePlayer(n,150,tfm.get.room.playerList[n].y,false,0,0,false)
  759. tfm.exec.respawnPlayer(n)
  760. end
  761.  
  762. if data[n].spawnLimit==0 then
  763. ui.removeTextArea(2,nil)
  764. system.bindMouse(n, true)
  765. ui.removeTextArea(11,n)
  766. end
  767. end
  768. time=time+.5
  769. if time==120 then
  770. time=119.6
  771. end
  772. if time==120.1 then
  773. tfm.exec.newGame(maps[math.random(#maps)])
  774. for n,player in pairs(tfm.get.room.playerList) do
  775. if data[n].role=="Death" and data[n].afk==false then
  776. data[n].points=data[n].points+15
  777. ui.addTextArea(133, "<b><font size='40'><font color='#d40000'>"..text[n].deathsWin, n, 296, 282, 351, 189, 0xd41717, 0x000000, 0, true)
  778. end
  779. end
  780. time=-0.5
  781. elseif time==0 then
  782. for n,player in pairs(tfm.get.room.playerList) do
  783. findRoles(n)
  784. end
  785. elseif time==5 then
  786. for n,player in pairs(tfm.get.room.playerList) do
  787. ui.removeTextArea(0,nil)
  788. ui.removeTextArea(2,nil)
  789. system.bindMouse(n, true)
  790. ui.removeTextArea(133,n)
  791.  
  792. end
  793. end
  794. end
  795. end
  796.  
  797. function profile(n)
  798. ui.addTextArea(110, "<p align='center'><font size='12'><font color='#FFFFFF'><font face='calibri'>"..n, n, 551, 89, 233, 278, 0x4f4132, 0x695743, 1, true)
  799. 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, 0x695743, 0x695743, 1, true)
  800. ui.addTextArea(19, "<p align='left'><font size='13'><font face='calibri'><font color='#FFFFFF'><a href='event:description'>"..text[n].description.."</a> : "..data[n].description, n, 675, 136, 104, 226, 0x695743, 0x695743, 1, true)
  801. ui.addTextArea(25, "<p align='center'><font size='13'><a href='event:close'><font color='#909090'><VP>"..text[n].close, n, 551, 368, 233, 26, 0x4f4132, 0x30291a, 1, true)
  802. end
  803.  
  804. function removeTextAreas(n)
  805. ui.removeTextArea(18,n)
  806. ui.removeTextArea(19,n)
  807. ui.removeTextArea(110,n)
  808. ui.removeTextArea(222,n)
  809. ui.removeTextArea(25,n)
  810. ui.removeTextArea(152,n)
  811. ui.removeTextArea(92,n)
  812. ui.addPopup(0, 2, text[n].description, n, 8565, 290, 200, true)
  813. end
  814. function help(n)
  815. ui.addTextArea(18, "<font size='13'><font face='verdana'><font size='20'><font color='#30A9DE'>#DEATHRUN</font></font>\n\n"..text[n].help, n, 504, 122, 254, 209, 0x4f4132, 0x695743, 1, true)
  816. ui.addTextArea(19, "<p align='center'><font size='14'><a href='event:close'><VP>"..text[n].close, n, 504, 338, 254, 26, 0x4f4132, 0x30291a, 1, true)
  817. end
  818. function eventKeyboard(n, key, down, x,y)
  819. if tfm.get.room.playerList[n].isDead==false then
  820. data[n].afk=false
  821. end
  822. --FACING
  823. if tfm.get.room.playerList[n].isDead==false and data[n].role=="Runner" then
  824. end
  825. if key==0 then
  826. data[n].facing=-85
  827. elseif key==2 then
  828. data[n].facing=85
  829. elseif key==P and data[n].p==0 then
  830. removeTextAreas(n)
  831. profile(n)
  832. data[n].p=1
  833. elseif key==P and data[n].p==1 then
  834. removeTextAreas(n)
  835. data[n].p=0
  836. elseif key==H and data[n].p==0 then
  837. removeTextAreas(n)
  838. data[n].p=1
  839. elseif key==H and data[n].p==1 then
  840. removeTextAreas(n)
  841. help(n)
  842. data[n].p=0
  843. elseif key==O and data[n].p==0 then
  844. removeTextAreas(n)
  845. data[n].p=1
  846. elseif key==O and data[n].p==1 then
  847. removeTextAreas(n)
  848. shopPage1(n)
  849. data[n].p=0
  850. end
  851. if time>3 and mice>1 then
  852.  
  853. --AUTOMATIC POWERUPS
  854.  
  855. if key==32 and data[n].role=="Runner" and data[n].spawnLimit<0 then
  856. ui.addTextArea(11, "<b><font size='30'><font color='#F0F000'>"..text[n].superJump, n, x-50, y-50, 379, 67, 0x324650, 0x000000, 0, false)
  857. tfm.exec.movePlayer(n,0,0,false,0,-80,false)
  858. tfm.exec.displayParticle(10,x,y,3,-3,3,-3,nil)
  859. tfm.exec.displayParticle(10,x,y,-3,3,-3,3,nil)
  860. tfm.exec.displayParticle(10,x,y,-3,-3,-3,-3,nil)
  861. tfm.exec.displayParticle(10,x,y,3,3,3,3,nil)
  862. tfm.exec.bindKeyboard(n, 32, false, false)
  863. tfm.exec.addShamanObject(17,x,y,60,50,-10,true)
  864. data[n].spawnLimit=3.5
  865. data[n].ableToShoot=0
  866. canShoot()
  867. elseif (key==3) then
  868. if data[n].role=="Death" then
  869. if data[n].facing==-85 then
  870. tfm.exec.movePlayer(n,0,0,false,-50,0,true)
  871. elseif data[n].facing==85 then
  872. tfm.exec.movePlayer(n,0,0,false,50,0,true)
  873. end
  874. elseif data[n].spawnLimit<0 and data[n].role=="Runner" then
  875. tfm.exec.movePlayer(n,0,0,false,data[n].facing,0,true)
  876. ui.addTextArea(11, "<b><font size='30'><font color='#F0F000'>"..text[n].speed, n, x-50, y-50, 379, 67, 0x324650, 0x000000, 0, false)
  877. tfm.exec.displayParticle(10,x,y,3,-3,3,-3,nil)
  878. tfm.exec.displayParticle(10,x,y,-3,3,-3,3,nil)
  879. tfm.exec.displayParticle(10,x,y,-3,-3,-3,-3,nil)
  880. tfm.exec.displayParticle(10,x,y,3,3,3,3,nil)
  881. data[n].spawnLimit=3.5
  882. data[n].ableToShoot=0
  883. canShoot()
  884. end
  885. end
  886. end
  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. data[n].p=0
  894. removeTextAreas(n)
  895. elseif a=="help" then
  896. data[n].p=0
  897. removeTextAreas(n)
  898. --TABS
  899. ui.addTextArea(18, "<font size='13'><font face='verdana'><font size='20'><font color='#30A9DE'>#DEATHRUN</font></font>\n\n"..text[n].help, n, 504, 122, 254, 209, 0x4f4132, 0x695743, 1, true)
  900. ui.addTextArea(19, "<p align='center'><font size='14'><a href='event:close'><VP>"..text[n].close, n, 504, 338, 254, 26, 0x4f4132, 0x30291a, 1, true)
  901. elseif a=="credits" then
  902. data[n].p=0
  903. removeTextAreas(n)
  904. ui.addTextArea(18, "<p align='center'><font size='16'><font face='verdana'><J>"..text[n].credits, n, 504, 72, 254, 304, 0x4f4132, 0x695743, 1, true)
  905. ui.addTextArea(19, "<p align='center'><font size='13'><a href='event:close'><VP>"..text[n].close, n, 504, 363, 254, 26, 0x4f4132, 0x30291a, 1, true)
  906. elseif a=="commands" then
  907. data[n].p=0
  908. removeTextAreas(n)
  909. ui.addTextArea(18, "<p align='center'><font size='14'><font face='verdana'>"..text[n].commands, n, 545, 111, 220, 238, 0x4f4132, 0x695743, 1, true)
  910. ui.addTextArea(19, "<p align='center'><font size='13'><a href='event:close'><VP>"..text[n].close, n, 545, 346, 220, 26, 0x4f4132, 0x30291a, 1, true)
  911. elseif a=="rules" then
  912. data[n].p=0
  913. removeTextAreas(n)
  914. ui.addTextArea(18, "<p align='center'><u><font size='17'><font face='calibri'>"..text[n].rules, n, 562, 132, 201, 230, 0x4f4132, 0x695743, 1, true)
  915. ui.addTextArea(19, "<p align='center'><font size='13'><a href='event:close'><VP>"..text[n].close, n, 562, 349, 201, 26, 0x4f4132, 0x30291a, 1, true)
  916. elseif a=="profile" then
  917. removeTextAreas(n)
  918. profile(n)
  919. elseif a=="description" then
  920. ui.addPopup(0, 2, text[n].description, n, 565, 290, 200, true)
  921. end
  922. if a=="inventory" then
  923. data[n].p=0
  924. removeTextAreas(n)
  925. ui.addTextArea(92, "<p align='center'><font size='20'>"..data[n].inventory, n, 515, 101, 276, 279, 0x4f4132, 0x695743, 1, true)
  926. ui.addTextArea(222, "<p align='center'><font size='13'><a href='event:close'><font color='#808080'><VP>"..text[n].close, n, 515, 363, 276, 26, 0x4f4132, 0x30291a, 1, true)
  927. end
  928. if a=="equipDefault" then
  929. data[n].objects=data[n].def
  930. elseif a=="equipNyan" then
  931. data[n].objects=212
  932. elseif a=="equipUltraCannon" then
  933. data[n].objects=1709
  934. elseif a=="equipCompanion" then
  935. data[n].objects=61
  936. elseif a=="equipShamanCannon" then
  937. data[n].objects=1704
  938. elseif a=="equipWatermelon" then
  939. data[n].objects=1706
  940. elseif a=="equipIcedMouse" then
  941. data[n].objects=54
  942. elseif a=="equipCake" then
  943. data[n].objects=207
  944. elseif a=="equipMechAnvil" then
  945. data[n].objects=1002
  946. elseif a=="equipRock" then
  947. data[n].objects=1003
  948. elseif a=="shop" then
  949. shopPage1(n)
  950. data[n].p=0
  951. elseif a=="backTo1" then
  952. shopPage1(n)
  953. elseif a=="nextTo2" then
  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. if a=="buyIcedMouse" and (data[n].points>icedMouseCost or data[n].points==icedMouseCost) and data[n].icedMouse==false then
  966. data[n].inventory = data[n].inventory.."\n"..text[n].icedMouseInv
  967. data[n].objects=54
  968. tfm.exec.chatMessage(text[n].boughtIcedMouse,n)
  969.  
  970. data[n].icedMouse=true
  971. data[n].points=data[n].points-icedMouseCost
  972. elseif a=="buyNyan" and (data[n].points>nyanCost or data[n].points==nyanCost) and data[n].nyan==false then
  973. data[n].inventory = data[n].inventory.."\n"..text[n].nyanInv
  974. data[n].objects=212
  975. tfm.exec.chatMessage(text[n].boughtNyan,n)
  976. data[n].nyan=true
  977. data[n].points=data[n].points-nyanCost
  978. elseif a=="buyUltraCannon" and (data[n].points>ultraCannonCost or data[n].points==ultraCannonCost) and data[n].ultraCannon==false then
  979. data[n].inventory = data[n].inventory.."\n"..text[n].ultraCannonInv
  980. data[n].objects=1709
  981. tfm.exec.chatMessage(text[n].boughtUltraCannon,n)
  982. data[n].ultraCannon=true
  983. data[n].points=data[n].points-ultraCannonCost
  984. elseif a=="buyCake" and (data[n].points>cakeCost or data[n].points==cakeCost) and data[n].cake==false then
  985. data[n].inventory=data[n].inventory.."\n"..text[n].cakeInv
  986.  
  987. data[n].objects=207
  988. tfm.exec.chatMessage(text[n].boughtCake,n)
  989. data[n].cake=true
  990. data[n].points=data[n].points-cakeCost
  991. elseif a=="buyMechAnvil" and (data[n].points>mechAnvilCost or data[n].points==mechAnvilCost) and data[n].mechAnvil==false then
  992. data[n].inventory=data[n].inventory.."\n"..text[n].mechAnvilInv
  993.  
  994. data[n].objects=1002
  995. tfm.exec.chatMessage(text[n].boughtMechAnvil,n)
  996. data[n].mechAnvil=true
  997. data[n].points=data[n].points-mechAnvilCost
  998. elseif a=="buyRock" and (data[n].points>rockCost or data[n].points==rockCost) and data[n].rock==false then
  999. data[n].inventory=data[n].inventory.."\n"..text[n].rockInv
  1000.  
  1001. data[n].objects=1003
  1002. tfm.exec.chatMessage(text[n].boughtRock,n)
  1003. data[n].rock=true
  1004. data[n].points=data[n].points-rockCost
  1005.  
  1006. elseif a=="buy2Lives" and (data[n].points>Lives2 or data[n].points==Lives2) and data[n].lives2==false then
  1007. data[n].normalLives=2
  1008. tfm.exec.chatMessage(text[n].nowHave2Lives,n)
  1009.  
  1010. data[n].points=data[n].points-Lives2
  1011. data[n].lives2=true
  1012. elseif a=="buyCompanion" and (data[n].points>companionCost or data[n].points==companionCost) and data[n].companion==false then
  1013. data[n].objects=61
  1014. data[n].inventory = data[n].inventory.."\n"..text[n].companionInv
  1015. data[n].companion=true
  1016.  
  1017. data[n].points=data[n].points-companionCost
  1018. tfm.exec.chatMessage(text[n].boughtCompanion,n)
  1019. elseif a=="buyShamanCannon" and (data[n].points>shamanCannonCost or data[n].points==shamanCannonCost) and data[n].shamanCannon==false then
  1020. data[n].objects=1704
  1021. data[n].inventory = data[n].inventory.."\n"..text[n].shamanCannonInv
  1022. data[n].shamanCannon=true
  1023.  
  1024. data[n].points=data[n].points-shamanCannonCost
  1025. tfm.exec.chatMessage(text[n].boughtshamanCannon,n)
  1026. elseif a=="buyWatermelon" and (data[n].points>watermelonCost or data[n].points==watermelonCost) and data[n].watermelon==false then
  1027. data[n].objects=1706
  1028. data[n].inventory = data[n].inventory.."\n"..text[n].watermelonInv
  1029. data[n].watermelon=true
  1030.  
  1031. data[n].points=data[n].points-watermelonCost
  1032. tfm.exec.chatMessage(text[n].boughtWatermelon,n)
  1033.  
  1034. end
  1035. end
  1036.  
  1037. function eventPlayerDied(n)
  1038. wonCountDown=-5
  1039. if data[n].role=="Death" and data[n].afk==false then
  1040. tfm.exec.respawnPlayer(n)
  1041. tfm.exec.movePlayer(n,200,30,false,0,0,false)
  1042. end
  1043. if data[n].role=="Death" and data[n].afk==true or runner==0 then
  1044. tfm.exec.newGame(maps[math.random(#maps)])
  1045. end
  1046. data[n].lives=data[n].lives-1
  1047. if data[n].role=="Runner" and data[n].lives==1 then
  1048. tfm.exec.respawnPlayer(n)
  1049. end
  1050. if data[n].role=="Runner" and data[n].lives==0 then
  1051. runner=runner-1
  1052. count()
  1053. end
  1054. end
  1055. function eventPlayerLeft(n)
  1056. mice=0
  1057. countMice()
  1058. names={}
  1059. for n in pairs(tfm.get.room.playerList) do
  1060. table.insert(names,n)
  1061. end
  1062. data[n].isInRoom=false
  1063. mice=mice-1
  1064. if mice<2 then
  1065. tfm.exec.newGame(7489132)
  1066. for n,player in pairs(tfm.get.room.playerList) do
  1067. tfm.exec.chatMessage("<R>"..text[n].need2People,n)
  1068. end
  1069. end
  1070. if n==randomDeath then
  1071. randomDeath=names[math.random(math.floor(mice))]
  1072. end
  1073. if data[n].role=="Runner" then
  1074. runner=runner-1
  1075. elseif data[n].role=="Death" then
  1076. death=death-1
  1077. end
  1078. end
  1079. function eventSummoningEnd(n,id,x,y,angle,t)
  1080. tfm.exec.removeObject(t.id)
  1081. end
  1082.  
  1083. system.disableChatCommandDisplay("p",true)
  1084. function eventChatCommand(l,c)
  1085. if c=="profile" then
  1086. profile(n)
  1087. end
  1088. if c=="mice" then
  1089. print(runner)
  1090. end
  1091. if c:sub(0,7)=="profile" and Dp(c:sub(9)) then
  1092. n = c:sub(9,9):upper()..c:sub(10):lower()
  1093. removeTextAreas(l)
  1094. ui.addTextArea(110, "<p align='center'><font size='12'><font color='#FFFFFF'><font face='calibri'>"..n, l, 551, 89, 233, 278, 0x4f4132, 0x695743, 1, true)
  1095. ui.addTextArea(18, "<p align='left'><font size='13'><font face='calibri'><font color='#FFFFFF'>"..text[l].points..": <br>"..data[n].points.." <br><br>"..text[l].winsAsDeath..": <br>"..data[n].winsAsDeath.."<br><br>"..text[l].winsAsRunner..": <br>"..data[n].winsAsRunner, l, 557, 136, 105, 226, 0x695743, 0x695743, 1, true)
  1096. ui.addTextArea(19, "<p align='left'><font size='13'><font face='calibri'><font color='#FFFFFF'>"..text[l].description.."</a> : "..data[n].description, l, 675, 136, 104, 226, 0x695743, 0x695743, 1, true)
  1097. ui.addTextArea(25, "<p align='center'><font size='13'><a href='event:close'><font color='#909090'><VP>"..text[l].close, l, 551, 368, 233, 26, 0x4f4132, 0x30291a, 1, true)
  1098. end
  1099. end
  1100.  
  1101.  
  1102.  
  1103. function eventPopupAnswer(id, n, a)
  1104. local click=a:match("<a href='")
  1105. if not click then
  1106. data[n].description = a
  1107. profile(n)
  1108. data[n].p=1
  1109. end
  1110. end
  1111. end
  1112.  
  1113. function kidnapper()
  1114. tfm.exec.newGame(7489132)
  1115. --300,80,150,200
  1116. tfm.exec.setGameTime(3,true)
  1117. dp={}
  1118. roles={0,1}
  1119. maps={7489629}
  1120. data={}
  1121. text={}
  1122. lang={}
  1123. players={}
  1124. ids={
  1125. 0,
  1126. 0,
  1127. 0,
  1128. 0
  1129. }
  1130. alive=0
  1131. lang.en={
  1132. menu="Menu",
  1133. profile2="Profile",
  1134. help2="Help",
  1135. help="In #kidnapper the goal of the game is for protectors to catch the mouse with the bomb before the mouse gets to the hole. The mouse with the bomb can use attacks to shield off protectors.",
  1136. wins="Total Wins",
  1137. wins_Bomber="Wins As Kidnapper",
  1138. wins_Protector="Wins As Protector",
  1139. close="Close",
  1140. health=100,
  1141. bomber_Wins="Kidnapper Wins!",
  1142. protector_Wins="Protectors Win!",
  1143. powerups2="Powerups",
  1144. powerup1="[Normal Attack]</J> Is activated by pressing space. Only works for Protectors when they are near the bomber.",
  1145. powerup2="[Mega Jump]</J> Is activated by the down arrow.",
  1146. mouseStolen="kidnapped the mouse!",
  1147. buy="Buy",
  1148. bought="Equip",
  1149. unequip="Unequip",
  1150. shop="Shop",
  1151. points="Points",
  1152. notEnough="Not enough points!"
  1153. }
  1154. lastKidnapper=""
  1155. for _, s in next, {'AutoTimeLeft', 'PhysicalConsumables', 'AfkDeath', 'AutoShaman', 'AutoNewGame'} do
  1156. tfm.exec['disable' .. s]()
  1157. end
  1158. function Dp(name)
  1159. name = name:sub(1,1):upper()..name:sub(2):lower()
  1160. for i,dp in ipairs(dp) do
  1161. if name==dp then
  1162. return true
  1163. end
  1164. end
  1165. return false
  1166. end
  1167. function stolen(n)
  1168. data[n].p=player
  1169. data[n].stolen="<R>"..data[n].p.."<J> "..text[n].mouseStolen
  1170. tfm.exec.chatMessage(data[n].stolen,n)
  1171. end
  1172. function particles(x,y)
  1173. tfm.exec.displayParticle(9,x,y+10,-0.4,0.1,0.2,0.3,nil)
  1174. tfm.exec.displayParticle(9,x,y+10,-0.6,0.2,0.6,0.2,nil)
  1175. tfm.exec.displayParticle(9,x,y+10,-0.8,0.3,0.8,0.1,nil)
  1176. tfm.exec.displayParticle(9,x,y+10,0.4,0.4,-0.4,0.3,nil)
  1177. tfm.exec.displayParticle(9,x,y+10,0.6,0.5,-0.6,0.2,nil)
  1178. tfm.exec.displayParticle(9,x,y+10,0.8,0.6,-0.8,0.1,nil)
  1179. end
  1180. function bigJump(n,x,y)
  1181. tfm.exec.movePlayer(n,0,0,false,0,-80,true)
  1182. tfm.exec.displayParticle(3,x-5,y+10,-0.8,0,0,0,n)
  1183. tfm.exec.displayParticle(3,x+5,y+10,0.8,0,0,0,n)
  1184. tfm.exec.displayParticle(3,x-10,y+10,-1.7,0,0,0,n)
  1185. tfm.exec.displayParticle(3,x+10,y+10,1.7,0,0,0,n)
  1186. particles(x,y)
  1187. end
  1188. function identifyBomber(n)
  1189. if data[n].role==0 then
  1190. tfm.exec.setNameColor(n,0x00FF00)
  1191. tfm.exec.movePlayer(n,1023,432,false,0,50,false)
  1192. elseif data[n].role==1 then
  1193. tfm.exec.setNameColor(n,0xFF0000)
  1194. end
  1195. end
  1196. function countAlive()
  1197. alive=0
  1198. for n,player in pairs(tfm.get.room.playerList) do
  1199. if tfm.get.room.playerList[n].isDead==false then
  1200. alive=alive+1
  1201. end
  1202. end
  1203. end
  1204. function removeWinner()
  1205. ui.removeTextArea(20,nil)
  1206. ui.removeTextArea(30,nil)
  1207. ui.removeTextArea(40,nil)
  1208. ui.removeTextArea(50,nil)
  1209. ui.removeTextArea(60,nil)
  1210. ui.removeTextArea(19,nil)
  1211. end
  1212.  
  1213. function win(n)
  1214. if tfm.get.room.playerList[n].isDead==false and data[n].role==0 then
  1215. data[n].wins=data[n].wins+1
  1216. data[n].points=data[n].points+7
  1217. data[n].wins_Protector=data[n].wins_Protector+1
  1218. end
  1219. end
  1220. function insertName(n)
  1221. table.insert(players,n)
  1222. end
  1223. function setLang(n)
  1224. text[n]=lang[tfm.get.room.playerList[n].community] or lang.en
  1225. end
  1226. function setData(n)
  1227. data[n]=
  1228. {
  1229. wins=0,
  1230. role=0,
  1231. health=100,
  1232. spawn=1,
  1233. wins_Protector=0,
  1234. wins_Bomber=0,
  1235. p="",
  1236. stolen="",
  1237. shopItems={propellerMouse=0,greenMouse=0,lightningMouse=0,tigerMouse=0},
  1238. buy1=text[n].buy,
  1239. buy2=text[n].buy,
  1240. buy3=text[n].buy,
  1241. buy4=text[n].buy,
  1242. using="1651b5bc86d.png",
  1243. points=0
  1244. }
  1245. end
  1246. function chooseRole()
  1247. mice=0
  1248. for n,player in pairs(tfm.get.room.playerList) do
  1249. mice=mice+1
  1250. data[n].role=0
  1251. end
  1252. player=players[math.random(#players)]
  1253. if mice>1 then
  1254. while player==lastKidnapper do
  1255. player=players[math.random(#players)]
  1256. end
  1257. end
  1258. lastKidnapper=player
  1259. data[player].role=1
  1260. player=""..player
  1261. end
  1262. function bindKeyboard(n)
  1263. for i=0,150 do
  1264. tfm.exec.bindKeyboard(n,i,true,true)
  1265. end
  1266. end
  1267. function showMenu(n)
  1268. ui.addTextArea(0, "<p align='center'><font face='calibri'><a href='event:menu2'>"..text[n].menu, n, 10, 30, 42, 20, 0x000001, 0xFFFFFF, 1, true)
  1269. end
  1270. function showMenu2(n)
  1271. ui.addTextArea(0, "<p align='center'><font face='calibri'><a href='event:Menu'>"..text[n].menu.." </a>| <a href='event:Help'>"..text[n].help2.."</a> | <a href='event:Profile'>"..text[n].profile2.."</a> | <a href='event:Powerups'>"..text[n].powerups2.."</a> | <a href='event:Shop'>"..text[n].shop, n, 10, 30, 210, 20, 0x000001, 0xffffff, 1, true)
  1272. end
  1273. function removeImage(n)
  1274. tfm.exec.removeImage(id1)
  1275. tfm.exec.removeImage(id2)
  1276. tfm.exec.removeImage(id3)
  1277. tfm.exec.removeImage(id4)
  1278. end
  1279. function removeShop(n)
  1280. for i=1020,1050 do
  1281. ui.removeTextArea(i,n)
  1282. end
  1283. end
  1284. function showHealth(n)
  1285. ui.addTextArea(-3, "", n, 319, 27, 100, 18, 0xffffff, 0xffffff, 1, true)
  1286. ui.addTextArea(-1, "", n, 319, 27, data[n].health, 18, 0x1aff00, 0x1aff00, 1, true)
  1287. ui.addTextArea(-2, "<p align='center'><b><font color='#000000'>"..data[n].health.."%", n, 345, 27, 54, 18, 0x324650, 0x000000, 0, true)
  1288. end
  1289. function displayTab(n,info,subject)
  1290. ui.addTextArea(2, "", n, 262, 72, 360, 290, 0x331f15, 0x331f15, 1, true)
  1291. ui.addTextArea(3, "", n, 262, 125, 4, 180, 0x6b4231, 0x6b4231, 1, true)
  1292. ui.addTextArea(5, "", n, 295, 72, 290, 4, 0x6b4231, 0x6b4231, 1, true)
  1293. ui.addTextArea(4, "", n, 618, 125, 4, 180, 0x6b4231, 0x6b4231, 1, true)
  1294. ui.addTextArea(6, "", n, 295, 358, 295, 4, 0x6b4231, 0x6b4231, 1, true)
  1295. ui.addTextArea(1, "<p align='center'><font face='calibri'><font size='17'><b>#KIDNAPPER - "..subject.."</b></font></font><font size='14'>\n\n"..info, n, 271, 80, 342, 270, 0x1b262b, 0x131c21, 1, true)
  1296. ui.addTextArea(7, "<p align='center'><font size='13'><a href='event:close'>"..text[n].close.."</a></font>", n, 272, 330, 339, 20, 0x324650, 0x324650, 1, true)
  1297. end
  1298. function profile(n,info)
  1299. ui.addTextArea(2, "", n, 262, 72, 268, 290, 0x331f15, 0x331f15, 1, true)
  1300. ui.addTextArea(3, "", n, 262, 120, 4, 180, 0x6b4231, 0x6b4231, 1, true)
  1301. ui.addTextArea(5, "", n, 295, 72, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  1302. ui.addTextArea(4, "", n, 526, 120, 4, 180, 0x6b4231, 0x6b4231, 1, true)
  1303. ui.addTextArea(6, "", n, 295, 358, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  1304. ui.addTextArea(1, "<p align='center'><font face='calibri'><font size='17'><b>"..n.."</b></font></font></p><font size='14'>\n<font face='calibri'>\n"..info, n, 270, 82, 252, 270, 0x1b262b, 0x131c21, 1, true)
  1305. ui.addTextArea(7, "<p align='center'><font size='13'><a href='event:close'>"..text[n].close.."</a></font>", n, 272, 330, 248, 20, 0x324650, 0x324650, 1, true)
  1306. end
  1307. function profile2(n,info,l)
  1308. ui.addTextArea(2, "", l, 262, 72, 268, 290, 0x331f15, 0x331f15, 1, true)
  1309. ui.addTextArea(3, "", l, 262, 120, 4, 180, 0x6b4231, 0x6b4231, 1, true)
  1310. ui.addTextArea(5, "", l, 295, 72, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  1311. ui.addTextArea(4, "", l, 526, 120, 4, 180, 0x6b4231, 0x6b4231, 1, true)
  1312. ui.addTextArea(6, "", l, 295, 358, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  1313. ui.addTextArea(1, "<p align='center'><font face='calibri'><font size='17'><b>"..n.."</b></font></font></p><font size='14'>\n<font face='calibri'>\n"..info, l, 270, 82, 252, 270, 0x1b262b, 0x131c21, 1, true)
  1314. ui.addTextArea(7, "<p align='center'><font size='13'><a href='event:close'>"..text[l].close.."</a></font>", l, 272, 330, 248, 20, 0x324650, 0x324650, 1, true)
  1315. end
  1316. function close(n)
  1317. for i=1,7 do
  1318. ui.removeTextArea(i,n)
  1319. end
  1320. end
  1321. function nearBomber(n,x,y,p)
  1322. if ((tfm.get.room.playerList[n].x<tfm.get.room.playerList[p].x+100 and tfm.get.room.playerList[n].x<tfm.get.room.playerList[p].x) and tfm.get.room.playerList[n].y<tfm.get.room.playerList[p].y+50 and tfm.get.room.playerList[n].y>tfm.get.room.playerList[p].y-50) and not (n==p) and data[p].health>0 and tfm.get.room.playerList[n].isFacingRight==true then
  1323. tfm.exec.movePlayer(p,0,0,false,operation[math.random(#operation)],operation[math.random(#operation)],true)
  1324. data[p].health=data[p].health-12.5
  1325. tfm.exec.displayParticle(1,x,y,0.2,0,0.2,0,nil)
  1326. tfm.exec.displayParticle(1,x,y,0.4,0,0.4,0,nil)
  1327. tfm.exec.displayParticle(1,x,y,0.6,0,0.6,0,nil)
  1328. tfm.exec.displayParticle(1,x,y,0.8,0,0.8,0,nil)
  1329. tfm.exec.displayParticle(1,x,y,1,0,1,0,nil)
  1330. tfm.exec.displayParticle(1,x,y-10,0.2,0,0.2,0,nil)
  1331. tfm.exec.displayParticle(1,x,y-10,0.4,0,0.4,0,nil)
  1332. tfm.exec.displayParticle(1,x,y-10,0.6,0,0.6,0,nil)
  1333. tfm.exec.displayParticle(1,x,y-10,0.8,0,0.8,0,nil)
  1334. tfm.exec.displayParticle(1,x,y-10,1,0,1,0,nil)
  1335. tfm.exec.displayParticle(1,x,y+10,0.2,0,0.2,0,nil)
  1336. tfm.exec.displayParticle(1,x,y+10,0.4,0,0.4,0,nli)
  1337. tfm.exec.displayParticle(1,x,y+10,0.6,0,0.6,0,nil)
  1338. tfm.exec.displayParticle(1,x,y+10,0.8,0,0.8,0,nil)
  1339. tfm.exec.displayParticle(1,x,y+10,1,0,1,0,nil)
  1340. end
  1341. if ((tfm.get.room.playerList[n].x>tfm.get.room.playerList[p].x-100 and tfm.get.room.playerList[n].x>tfm.get.room.playerList[p].x) and tfm.get.room.playerList[n].y<tfm.get.room.playerList[p].y+50 and tfm.get.room.playerList[n].y>tfm.get.room.playerList[p].y-50) and not (n==p) and data[p].health>0 and tfm.get.room.playerList[n].isFacingRight==false then
  1342. tfm.exec.movePlayer(p,0,0,false,operation[math.random(#operation)],operation[math.random(#operation)],true)
  1343. data[p].health=data[p].health-12.5
  1344. tfm.exec.displayParticle(1,x,y,-0.2,0,-0.2,0,nil)
  1345. tfm.exec.displayParticle(1,x,y,-0.4,0,-0.4,0,nil)
  1346. tfm.exec.displayParticle(1,x,y,-0.6,0,-0.6,0,nil)
  1347. tfm.exec.displayParticle(1,x,y,-0.8,0,-0.8,0,nil)
  1348. tfm.exec.displayParticle(1,x,y,-1,0,-1,0,nil)
  1349. tfm.exec.displayParticle(1,x,y-10,-0.2,0,-0.2,0,nil)
  1350. tfm.exec.displayParticle(1,x,y-10,-0.4,0,-0.4,0,nil)
  1351. tfm.exec.displayParticle(1,x,y-10,-0.6,0,-0.6,0,nil)
  1352. tfm.exec.displayParticle(1,x,y-10,-0.8,0,-0.8,0,nil)
  1353. tfm.exec.displayParticle(1,x,y-10,-1,0,-1,0,nil)
  1354. tfm.exec.displayParticle(1,x,y+10,-0.2,0,-0.2,0,nil)
  1355. tfm.exec.displayParticle(1,x,y+10,-0.4,0,-0.4,0,nli)
  1356. tfm.exec.displayParticle(1,x,y+10,-0.6,0,-0.6,0,nil)
  1357. tfm.exec.displayParticle(1,x,y+10,-0.8,0,-0.8,0,nil)
  1358. tfm.exec.displayParticle(1,x,y+10,-1,0,-1,0,nil)
  1359. end
  1360. if data[p].health<1 then
  1361. tfm.exec.killPlayer(p)
  1362. end
  1363. end
  1364. operation={-110,110}
  1365. function nearProtector(n,p,x,y)
  1366. if not (n==p) and data[p].health>0 and data[n].health>0 then
  1367. tfm.exec.displayParticle(13,x,y,-0.2,0.1,-0.2,0.1,nil)
  1368. tfm.exec.displayParticle(13,x,y,-0.4,0,-0.4,0,nil)
  1369. tfm.exec.displayParticle(13,x,y,-0.6,0,-0.6,0,nil)
  1370. tfm.exec.displayParticle(3,x,y,-0.8,0,-0.8,0,nil)
  1371. tfm.exec.displayParticle(3,x,y,-8,0,-1,0,nil)
  1372. tfm.exec.displayParticle(3,x,y-10,-0.2,0.1,-0.2,0.1,nil)
  1373. tfm.exec.displayParticle(13,x,y-10,-0.4,0,-0.4,0,nil)
  1374. tfm.exec.displayParticle(13,x,y-10,-0.6,0,-0.6,0,nil)
  1375. tfm.exec.displayParticle(13,x,y-10,-0.8,0,-0.8,0,nil)
  1376. tfm.exec.displayParticle(13,x,y-10,-1,0,-1,0,nil)
  1377. tfm.exec.displayParticle(13,x,y+10,-0.2,0.1,-0.2,0.1,nil)
  1378. tfm.exec.displayParticle(13,x,y+10,-0.4,0,-0.4,0,nli)
  1379. tfm.exec.displayParticle(13,x,y+10,-0.6,0,-0.6,0,nil)
  1380. tfm.exec.displayParticle(13,x,y+10,-0.8,-0.1,-0.8,-0.1,nil)
  1381. tfm.exec.displayParticle(13,x,y+10,-1,0,-1,0,nil)
  1382. tfm.exec.displayParticle(13,x,y,0.2,0,0.2,0,nil)
  1383. tfm.exec.displayParticle(13,x,y,0.4,0,0.4,0,nil)
  1384. tfm.exec.displayParticle(13,x,y,0.6,0,0.6,0,nil)
  1385. tfm.exec.displayParticle(13,x,y,0.8,0,0.8,0,nil)
  1386. tfm.exec.displayParticle(13,x,y,1,0,1,0,nil)
  1387. tfm.exec.displayParticle(13,x,y-10,0.2,0.1,0.2,0.1,nil)
  1388. tfm.exec.displayParticle(13,x,y-10,0.4,0,0.4,0,nil)
  1389. tfm.exec.displayParticle(13,x,y-10,0.6,0,0.6,0,nil)
  1390. tfm.exec.displayParticle(13,x,y-10,0.8,0,0.8,0,nil)
  1391. tfm.exec.displayParticle(13,x,y-10,1,0,1,0,nil)
  1392. tfm.exec.displayParticle(13,x,y+10,0.2,0,0.2,0,nil)
  1393. tfm.exec.displayParticle(13,x,y+10,0.4,0,0.4,0,nli)
  1394. tfm.exec.displayParticle(13,x,y+10,0.6,0,0.6,0,nil)
  1395. tfm.exec.displayParticle(3,x,y+10,0.8,0,0.8,0,nil)
  1396. tfm.exec.displayParticle(3,x,y+10,8,0,1,0,nil)
  1397. end
  1398. if (tfm.get.room.playerList[n].x<tfm.get.room.playerList[p].x+70 and tfm.get.room.playerList[n].x>tfm.get.room.playerList[p].x-70 and tfm.get.room.playerList[n].y<tfm.get.room.playerList[p].y+30 and tfm.get.room.playerList[n].y>tfm.get.room.playerList[p].y-30) and not (n==p) and data[p].health>0 and data[n].health>0 then
  1399. data[n].health=data[n].health-12.5
  1400. tfm.exec.movePlayer(n,0,0,false,operation[math.random(#operation)],operation[math.random(#operation)],true)
  1401. end
  1402. if data[n].health<1 then
  1403. tfm.exec.killPlayer(n)
  1404. end
  1405. end
  1406.  
  1407. for n,player in pairs(tfm.get.room.playerList) do
  1408. bindKeyboard(n)
  1409. setLang(n)
  1410. insertName(n)
  1411. setData(n)
  1412. showMenu(n)
  1413. table.insert(dp,n)
  1414. end
  1415. chooseRole()
  1416. for n,player in pairs(tfm.get.room.playerList) do
  1417. identifyBomber(n)
  1418. end
  1419. function allInfo(n)
  1420. bindKeyboard(n)
  1421. setLang(n)
  1422. insertName(n)
  1423. setData(n)
  1424. showMenu(n)
  1425. identifyBomber(n)
  1426. table.insert(dp,n)
  1427. end
  1428. function eventNewGame()
  1429. if mice>1 then
  1430. players={}
  1431. for n,player in pairs(tfm.get.room.playerList) do
  1432. insertName(n)
  1433. end
  1434. chooseRole()
  1435. countAlive()
  1436. removeWinner()
  1437. for n,player in pairs(tfm.get.room.playerList) do
  1438. identifyBomber(n)
  1439. data[n].health=100
  1440. stolen(n)
  1441. end
  1442. id=tfm.exec.addImage(data[player].using,"$"..player, -40, -25)
  1443. end
  1444. end
  1445. function eventTextAreaCallback(txt, n, a)
  1446. removeImage(n)
  1447. if a=="Menu" then
  1448. showMenu(n)
  1449. elseif a=="menu2" then
  1450. showMenu2(n)
  1451. elseif a=="Help" then
  1452. displayTab(n,text[n].help,text[n].help2)
  1453. elseif a=="close" then
  1454. close(n)
  1455. removeImage(n)
  1456. removeShop(n)
  1457. elseif a=="Profile" then
  1458. profile(n,text[n].wins..": <J>"..data[n].wins.."\n\n</J>"..text[n].wins_Bomber..": <J>"..data[n].wins_Bomber.."\n\n</J>"..text[n].wins_Protector..": <J>"..data[n].wins_Protector.."</J>\n\n"..text[n].points..": <J>"..data[n].points)
  1459. elseif a=="Powerups" then
  1460. displayTab(n,"<J>"..text[n].powerup1.."\n\n<J>"..text[n].powerup2,text[n].powerups2)
  1461. elseif a=="Shop" then
  1462. shop(n)
  1463. elseif a=="buy1" and data[n].points>=80 then
  1464. data[n].buy1="</a><G><a href='event:unequip1'>"..text[n].unequip
  1465. data[n].using="1651ca2b636.png"
  1466. data[n].shopItems.propellerMouse=1
  1467. data[n].points=data[n].points-80
  1468. shop1(n)
  1469. elseif a=="buy2" and data[n].points>=150 then
  1470. data[n].buy2="</a><G><a href='event:unequip2'>"..text[n].unequip
  1471. data[n].using="1651ca29934.png"
  1472. data[n].points=data[n].points-150
  1473. shop2(n)
  1474. elseif a=="buy1" and not (data[n].points>=80) then
  1475. tfm.exec.chatMessage("<R>"..text[n].notEnough,n)
  1476. elseif a=="buy3" and data[n].points>=200 then
  1477. data[n].buy3="</a><G><a href='event:unequip3'>"..text[n].unequip
  1478. data[n].using="1651ca27c02.png"
  1479. data[n].points=data[n].points-200
  1480. shop3(n)
  1481. elseif a=="buy2" and not (data[n].points>=300) then
  1482. tfm.exec.chatMessage("<R>"..text[n].notEnough,n)
  1483. elseif a=="buy4" and data[n].points>=300 then
  1484. data[n].buy4="</a><G><a href='event:unequip4'>"..text[n].unequip
  1485. data[n].points=data[n].points-300
  1486. data[n].using="1651ca26129.png"
  1487. shop4(n)
  1488. elseif a=="buy3" and not (data[n].points>=200) then
  1489. tfm.exec.chatMessage("<R>"..text[n].notEnough,n)
  1490. elseif a=="buy4" and not (data[n].points>=150) then
  1491. tfm.exec.chatMessage("<R>"..text[n].notEnough,n)
  1492. elseif a=="unequip1" then
  1493. data[n].using="1651b5bc86d.png"
  1494. data[n].buy1="</a><VP><a href='event:equip1'>"..text[n].bought
  1495. shop(n)
  1496. elseif a=="unequip2" then
  1497. data[n].using="1651b5bc86d.png"
  1498. data[n].buy2="</a><VP><a href='event:equip2'>"..text[n].bought
  1499. shop(n)
  1500. elseif a=="unequip3" then
  1501. data[n].using="1651b5bc86d.png"
  1502. data[n].buy3="</a><VP><a href='event:equip3'>"..text[n].bought
  1503. shop(n)
  1504. elseif a=="unequip4" then
  1505. data[n].using="1651b5bc86d.png"
  1506. data[n].buy4="</a><VP><a href='event:equip4'>"..text[n].bought
  1507. shop(n)
  1508. elseif a=="equip1" then
  1509. data[n].using="1651ca2b636.png"
  1510. data[n].buy1="</a><G><a href='event:unequip1'>"..text[n].unequip
  1511. shop1(n)
  1512. elseif a=="equip2" then
  1513. data[n].using="1651ca29934.png"
  1514. data[n].buy2="</a><G><a href='event:unequip2'>"..text[n].unequip
  1515. shop2(n)
  1516. elseif a=="equip3" then
  1517. data[n].using="1651ca27c02.png"
  1518. data[n].buy3="</a><G><a href='event:unequip3'>"..text[n].unequip
  1519. shop3(n)
  1520. elseif a=="equip4" then
  1521. data[n].using="1651ca26129.png"
  1522. data[n].buy4="</a><G><a href='event:unequip4'>"..text[n].unequip
  1523. shop4(n)
  1524. end
  1525. end
  1526. chooseRole()
  1527. function eventNewPlayer(n)
  1528. if mice<2 then
  1529. tfm.exec.newGame(7489132)
  1530. end
  1531. if mice==2 then
  1532. tfm.exec.setGameTime(5,true)
  1533. end
  1534. allInfo(n)
  1535. end
  1536. function eventLoop(time,timeRemaining)
  1537. if mice>1 then
  1538. for n,player in pairs(tfm.get.room.playerList) do
  1539. data[n].spawn=data[n].spawn+0.5
  1540. showHealth(n)
  1541. end
  1542. if timeRemaining<=0 then
  1543. tfm.exec.newGame(maps[math.random(#maps)])
  1544. end
  1545. end
  1546. end
  1547.  
  1548. function eventKeyboard(n, k, d, x, y)
  1549. if mice>1 then
  1550. if k==32 and data[n].role==0 and data[n].spawn>0 and tfm.get.room.playerList[n].isDead==false then
  1551. nearBomber(n,x,y,player)
  1552. data[n].spawn=-1
  1553. elseif k==32 and data[n].role==1 and data[n].spawn>0 and tfm.get.room.playerList[n].isDead==false then
  1554. data[n].spawn=-1.5
  1555. player=player
  1556. for n in pairs(tfm.get.room.playerList) do
  1557. nearProtector(n,player,tfm.get.room.playerList[player].x,tfm.get.room.playerList[player].y)
  1558. end
  1559. elseif k==3 and data[n].spawn>0 then
  1560. data[n].spawn=-2
  1561. player=player
  1562. bigJump(n,x,y)
  1563. elseif k==112 then
  1564.  
  1565. end
  1566. end
  1567. end
  1568. function eventPlayerDied(n)
  1569. for n,player in pairs(tfm.get.room.playerList) do
  1570. win(n)
  1571. end
  1572. countAlive()
  1573. data[n].health=0
  1574. if data[n].role==1 then
  1575. for n,player in pairs(tfm.get.room.playerList) do
  1576. ui.addTextArea(20, "", n, 262, 172, 268, 66, 0x331f15, 0x331f15, 1, true)
  1577. ui.addTextArea(30, "", n, 262, 191, 4, 26, 0x6b4231, 0x6b4231, 1, true)
  1578. ui.addTextArea(50, "", n, 300, 172, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  1579. ui.addTextArea(40, "", n, 526, 192, 4, 26, 0x6b4231, 0x6b4231, 1, true)
  1580. ui.addTextArea(60, "", n, 300, 234, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  1581. ui.addTextArea(19, "<p align='center'><font size='20'><VP>"..text[n].protector_Wins, n, 270, 182, 252, 44, 0x1b262b, 0x131c21, 1, true)
  1582. tfm.exec.setGameTime(5,true)
  1583. end
  1584. end
  1585. end
  1586.  
  1587. function eventMouse(playerName,x,y)
  1588. print("<VP>X</VP><N>:</N><J> "..x.."</J><VP> Y</VP><N>:</N><J> "..y)
  1589. end
  1590. system.bindMouse("Fuzzyfirsdog#0000", true)
  1591. function eventPlayerGetCheese(n)
  1592. if data[n].role==1 then
  1593. data[n].wins=data[n].wins+1
  1594. data[n].wins_Bomber=data[n].wins_Bomber+1
  1595. data[n].points=data[n].points+10
  1596. tfm.exec.setGameTime(10,true)
  1597. for n,player in pairs(tfm.get.room.playerList) do
  1598. ui.addTextArea(20, "", n, 262, 172, 268, 66, 0x331f15, 0x331f15, 1, true)
  1599. ui.addTextArea(30, "", n, 262, 191, 4, 26, 0x6b4231, 0x6b4231, 1, true)
  1600. ui.addTextArea(50, "", n, 300, 172, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  1601. ui.addTextArea(40, "", n, 526, 192, 4, 26, 0x6b4231, 0x6b4231, 1, true)
  1602. ui.addTextArea(60, "", n, 300, 234, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  1603. ui.addTextArea(19, "<p align='center'><font size='20'><R>"..text[n].bomber_Wins, n, 270, 182, 252, 44, 0x1b262b, 0x131c21, 1, true)
  1604. if not (data[n].role==1) then
  1605. tfm.exec.killPlayer(n)
  1606. end
  1607. end
  1608. end
  1609. end
  1610. system.disableChatCommandDisplay("p",true)
  1611. function eventChatCommand(l,c)
  1612. if c=="p" then
  1613. profile(l,text[l].wins..": <J>"..data[l].wins.."\n\n</J>"..text[l].wins_Bomber..": <J>"..data[l].wins_Bomber.."\n\n</J>"..text[l].wins_Protector..": <J>"..data[l].wins_Protector)
  1614. end
  1615. if c:sub(0,1)=="p" and Dp(c:sub(3))then
  1616. n = c:sub(3,3):upper()..c:sub(4):lower()
  1617. profile2(n,text[l].wins..": <J>"..data[n].wins.."\n\n</J>"..text[l].wins_Bomber..": <J>"..data[n].wins_Bomber.."\n\n</J>"..text[l].wins_Protector..": <J>"..data[n].wins_Protector.."</J>\n\n"..text[l].points..": <J>"..data[n].points,l)
  1618. end
  1619. end
  1620. function shop(n)
  1621. ui.addTextArea(1020, "", n, 113, 58, 643, 260, 0x331f15, 0x331f15, 1, true)
  1622. ui.addTextArea(1021, "", n, 296, 314, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  1623. ui.addTextArea(1022, "", n, 113, 111, 4, 151, 0x6b4231, 0x6b4231, 1, true)
  1624. ui.addTextArea(1023, "", n, 752, 111, 4, 151, 0x6b4231, 0x6b4231, 1, true)
  1625. ui.addTextArea(1024, "", n, 296, 58, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  1626. ui.addTextArea(1025, "<p align='center'><font size='20'><VP>", n, 122, 68, 626, 240, 0x1b262b, 0x131c21, 1, true)
  1627. ui.addTextArea(1026, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/300", n, 154, 94, 100, 100, 0x324650, 0x324650, 1, true)
  1628. ui.addTextArea(1027, "<p align='center'><b><a href='event:buy1'>"..data[n].buy1, n, 153, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  1629. ui.addTextArea(1028, "<p align='center'><b><a href='event:buy2'>"..data[n].buy2, n, 309, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  1630. ui.addTextArea(1029, "<p align='center'><b><a href='event:buy3'>"..data[n].buy3, n, 468, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  1631. ui.addTextArea(1030, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/200", n, 617, 94, 100, 100, 0x324650, 0x324650, 1, true)
  1632. ui.addTextArea(1031, "<p align='center'><b><a href='event:buy4'>"..data[n].buy4, n, 617, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  1633. ui.addTextArea(1032, "<p align='center'><font size='13'><a href='event:close'>"..text[n].close.."</a></font>", n, 125, 285, 620, 20, 0x324650, 0x324650, 1, true)
  1634. ui.addTextArea(1033, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/80", n, 309, 94, 100, 100, 0x324650, 0x324650, 1, true)
  1635. ui.addTextArea(1034, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/150", n, 468, 94, 100, 100, 0x324650, 0x324650, 1, true)
  1636. id4=tfm.exec.addImage("1651ca2b636.png", "&1", 153, 115, n)
  1637. id3=tfm.exec.addImage("1651ca29934.png", "&2", 312, 110, n)
  1638. id2=tfm.exec.addImage("1651ca27c02.png", "&3", 467, 110, n)
  1639. id1=tfm.exec.addImage("1651ca26129.png", "&4", 617, 110, n)
  1640. end
  1641. function shop1(n)
  1642. ui.addTextArea(1020, "", n, 113, 58, 643, 260, 0x331f15, 0x331f15, 1, true)
  1643. ui.addTextArea(1021, "", n, 296, 314, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  1644. ui.addTextArea(1022, "", n, 113, 111, 4, 151, 0x6b4231, 0x6b4231, 1, true)
  1645. ui.addTextArea(1023, "", n, 752, 111, 4, 151, 0x6b4231, 0x6b4231, 1, true)
  1646. ui.addTextArea(1024, "", n, 296, 58, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  1647. ui.addTextArea(1025, "<p align='center'><font size='20'><VP>", n, 122, 68, 626, 240, 0x1b262b, 0x131c21, 1, true)
  1648. ui.addTextArea(1026, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/300", n, 154, 94, 100, 100, 0x324650, 0x324650, 1, true)
  1649. ui.addTextArea(1027, "<p align='center'><b><a href='event:buy1'>"..data[n].buy1, n, 153, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  1650. ui.addTextArea(1028, "", n, 309, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  1651. ui.addTextArea(1029, "", n, 468, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  1652. ui.addTextArea(1030, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/200", n, 617, 94, 100, 100, 0x324650, 0x324650, 1, true)
  1653. ui.addTextArea(1031, "", n, 617, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  1654. ui.addTextArea(1032, "<p align='center'><font size='13'><a href='event:close'>"..text[n].close.."</a></font>", n, 125, 285, 620, 20, 0x324650, 0x324650, 1, true)
  1655. ui.addTextArea(1033, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/80", n, 309, 94, 100, 100, 0x324650, 0x324650, 1, true)
  1656. ui.addTextArea(1034, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/150", n, 468, 94, 100, 100, 0x324650, 0x324650, 1, true)
  1657. id4=tfm.exec.addImage("1651ca2b636.png", "&1", 153, 115, n)
  1658. id3=tfm.exec.addImage("1651ca29934.png", "&2", 312, 110, n)
  1659. id2=tfm.exec.addImage("1651ca27c02.png", "&3", 467, 110, n)
  1660. id1=tfm.exec.addImage("1651ca26129.png", "&4", 617, 110, n)
  1661. end
  1662. function shop2(n)
  1663. ui.addTextArea(1020, "", n, 113, 58, 643, 260, 0x331f15, 0x331f15, 1, true)
  1664. ui.addTextArea(1021, "", n, 296, 314, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  1665. ui.addTextArea(1022, "", n, 113, 111, 4, 151, 0x6b4231, 0x6b4231, 1, true)
  1666. ui.addTextArea(1023, "", n, 752, 111, 4, 151, 0x6b4231, 0x6b4231, 1, true)
  1667. ui.addTextArea(1024, "", n, 296, 58, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  1668. ui.addTextArea(1025, "<p align='center'><font size='20'><VP>", n, 122, 68, 626, 240, 0x1b262b, 0x131c21, 1, true)
  1669. ui.addTextArea(1026, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/300", n, 154, 94, 100, 100, 0x324650, 0x324650, 1, true)
  1670. ui.addTextArea(1027, "", n, 153, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  1671. ui.addTextArea(1028, "<p align='center'><b><a href='event:buy2'>"..data[n].buy2, n, 309, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  1672. ui.addTextArea(1029, "", n, 468, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  1673. ui.addTextArea(1030, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/200", n, 617, 94, 100, 100, 0x324650, 0x324650, 1, true)
  1674. ui.addTextArea(1031, "", n, 617, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  1675. ui.addTextArea(1032, "<p align='center'><font size='13'><a href='event:close'>"..text[n].close.."</a></font>", n, 125, 285, 620, 20, 0x324650, 0x324650, 1, true)
  1676. ui.addTextArea(1033, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/80", n, 309, 94, 100, 100, 0x324650, 0x324650, 1, true)
  1677. ui.addTextArea(1034, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/150", n, 468, 94, 100, 100, 0x324650, 0x324650, 1, true)
  1678. id4=tfm.exec.addImage("1651ca2b636.png", "&1", 153, 115, n)
  1679. id3=tfm.exec.addImage("1651ca29934.png", "&2", 312, 110, n)
  1680. id2=tfm.exec.addImage("1651ca27c02.png", "&3", 467, 110, n)
  1681. id1=tfm.exec.addImage("1651ca26129.png", "&4", 617, 110, n)
  1682. end
  1683. function shop3(n)
  1684. ui.addTextArea(1020, "", n, 113, 58, 643, 260, 0x331f15, 0x331f15, 1, true)
  1685. ui.addTextArea(1021, "", n, 296, 314, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  1686. ui.addTextArea(1022, "", n, 113, 111, 4, 151, 0x6b4231, 0x6b4231, 1, true)
  1687. ui.addTextArea(1023, "", n, 752, 111, 4, 151, 0x6b4231, 0x6b4231, 1, true)
  1688. ui.addTextArea(1024, "", n, 296, 58, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  1689. ui.addTextArea(1025, "<p align='center'><font size='20'><VP>", n, 122, 68, 626, 240, 0x1b262b, 0x131c21, 1, true)
  1690. ui.addTextArea(1026, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/300", n, 154, 94, 100, 100, 0x324650, 0x324650, 1, true)
  1691. ui.addTextArea(1027, "", n, 153, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  1692. ui.addTextArea(1028, "", n, 309, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  1693. ui.addTextArea(1029, "<p align='center'><b><a href='event:buy3'>"..data[n].buy3, n, 468, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  1694. ui.addTextArea(1030, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/200", n, 617, 94, 100, 100, 0x324650, 0x324650, 1, true)
  1695. ui.addTextArea(1031, "", n, 617, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  1696. ui.addTextArea(1032, "<p align='center'><font size='13'><a href='event:close'>"..text[n].close.."</a></font>", n, 125, 285, 620, 20, 0x324650, 0x324650, 1, true)
  1697. ui.addTextArea(1033, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/80", n, 309, 94, 100, 100, 0x324650, 0x324650, 1, true)
  1698. ui.addTextArea(1034, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/150", n, 468, 94, 100, 100, 0x324650, 0x324650, 1, true)
  1699. id4=tfm.exec.addImage("1651ca2b636.png", "&1", 153, 115, n)
  1700. id3=tfm.exec.addImage("1651ca29934.png", "&2", 312, 110, n)
  1701. id2=tfm.exec.addImage("1651ca27c02.png", "&3", 467, 110, n)
  1702. id1=tfm.exec.addImage("1651ca26129.png", "&4", 617, 110, n)
  1703. end
  1704. function shop4(n)
  1705. ui.addTextArea(1020, "", n, 113, 58, 643, 260, 0x331f15, 0x331f15, 1, true)
  1706. ui.addTextArea(1021, "", n, 296, 314, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  1707. ui.addTextArea(1022, "", n, 113, 111, 4, 151, 0x6b4231, 0x6b4231, 1, true)
  1708. ui.addTextArea(1023, "", n, 752, 111, 4, 151, 0x6b4231, 0x6b4231, 1, true)
  1709. ui.addTextArea(1024, "", n, 296, 58, 198, 4, 0x6b4231, 0x6b4231, 1, true)
  1710. ui.addTextArea(1025, "<p align='center'><font size='20'><VP>", n, 122, 68, 626, 240, 0x1b262b, 0x131c21, 1, true)
  1711. ui.addTextArea(1026, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/300", n, 154, 94, 100, 100, 0x324650, 0x324650, 1, true)
  1712. ui.addTextArea(1027, "", n, 153, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  1713. ui.addTextArea(1028, "", n, 309, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  1714. ui.addTextArea(1029, "", n, 468, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  1715. ui.addTextArea(1030, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/200", n, 617, 94, 100, 100, 0x324650, 0x324650, 1, true)
  1716. ui.addTextArea(1031, "<p align='center'><b><a href='event:buy4'>"..data[n].buy4, n, 617, 238, 100, 23, 0x324650, 0x12191c, 1, true)
  1717. ui.addTextArea(1032, "<p align='center'><font size='13'><a href='event:close'>"..text[n].close.."</a></font>", n, 125, 285, 620, 20, 0x324650, 0x324650, 1, true)
  1718. ui.addTextArea(1033, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/80", n, 309, 94, 100, 100, 0x324650, 0x324650, 1, true)
  1719. ui.addTextArea(1034, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/150", n, 468, 94, 100, 100, 0x324650, 0x324650, 1, true)
  1720. id4=tfm.exec.addImage("1651ca2b636.png", "&1", 153, 115, n)
  1721. id3=tfm.exec.addImage("1651ca29934.png", "&2", 312, 110, n)
  1722. id2=tfm.exec.addImage("1651ca27c02.png", "&3", 467, 110, n)
  1723. id1=tfm.exec.addImage("1651ca26129.png", "&4", 617, 110, n)
  1724. end
  1725. end
  1726.  
  1727. if tfm.get.room.name:find("kidnapper") then
  1728. kidnapper()
  1729. else
  1730. deathrun()
  1731. end
Add Comment
Please, Sign In to add comment