Mousetat

Truth or dare furrets

Sep 16th, 2016
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 35.92 KB | None | 0 0
  1. admins={"Mousetat", "Leetinsanity", "Coralbee", "Pikashu", "Shamousey", "Killerlux", "Leafileaf", "Paperonaruto", "Wangan", "Ykr", "Secretive", "Coralpearl", "Themissinglink", "Sebaisseba", }
  2. -- remember to put "," between each name!
  3.  
  4.  
  5. tfm.exec.disableAutoNewGame(true)
  6. tfm.exec.disableAfkDeath(true)
  7. tfm.exec.disableAutoShaman(true)
  8. tfm.exec.disableAutoScore(true)
  9. tfm.exec.newGame("@6411544")
  10.  
  11. players={}--respawn place is 400,320
  12. p={}
  13. timestamp=os.time()
  14. numplayers=0
  15.  
  16. begin=false
  17. answerer="lol"
  18. questioner="lol"
  19. question="lol"
  20. ans="lol"
  21. new=false
  22. restart=false
  23. choose=false
  24. start=true
  25. choosey=false
  26. skip=false
  27. message=""
  28. others={}
  29. summonobject=false
  30. timestamplol={}
  31. answererold=""
  32. one=false
  33. dance=false
  34. mapcomplete=false
  35.  
  36. truth={}--you can follow the format 'truth[number]="question"'
  37. truth[1]="Who is your crush in this game?"
  38. truth[2]="What is your favourite food?"
  39. truth[3]="Who is you model/favourite person in game?"
  40. truth[4]="What games do you play besides Transformice?"
  41. truth[5]="What would you like to be when you grow up?"
  42. truth[6]="Have you sucked your thumb before?"
  43. truth[7]="What brand of phone do you have currently?"
  44. truth[8]="Have you ever farted in front of your friends or teachers in real life?"
  45. truth[9]="If you could hack transformice, what would you do?"
  46. truth[10]="What is your favourite fur in Transformice if you have to choose?"
  47. truth[11]="Why do you like Transformice?"
  48. truth[12]="What do you dislike/hate most about yourself, whether in personality or physically?"
  49. truth[13]="What do you love most about yourself, whether in personality or physically?"
  50. truth[14]="Tell us whether you love yourself more or hate/dislike yourself more, and tell us why."
  51. truth[15]="Why do you like your current crush in real life, in personality terms AND physical terms?"
  52. truth[16]="Tell us why you hate the person you currently hate in real life, in personality terms."
  53. truth[17]="If you had unlimited cheese and fraises, what item would you buy from the shop?"
  54. truth[18]="Which will you choose, free million of cash or living longer?"
  55. truth[19]="What is your favourite board game?"
  56. truth[20]="What is the longest that you have ever been without taking a shower?"
  57. truth[21]="Have you ever eaten an insect before?"
  58. truth[22]="If you could be any super villain, who would you be?"
  59. truth[23]="If you could be any superhero, who would you be?"
  60. truth[24]="If you could be an insect, what would you be?"
  61. truth[25]="Who is your favourite staff?(Admin/Moderator/Sentinels/Mapcrew/Funcorp)"
  62. truth[26]="What is your impression of me? Do you like me?"
  63. truth[27]="Have you ever cheated on any test?"
  64. truth[28]="How many boyfriends/girlfriends have you had?"
  65. truth[29]="If you were a billionaire, what would you spend your time doing?"
  66. truth[30]="If you could be a boss of a company one day, what would you do?"
  67. truth[31]="What celebrity are you obsessed with?"
  68. truth[32]="What is your favourite sports team/player?"
  69. truth[32]="What is your favourite song that is out right now?"
  70. truth[33]="If you were on an island with a person and yourself only, who would you want the person to be?(the person must be in this room)"
  71. truth[34]="If you could marry, kiss, hug, punch and kill someone in this room, who would they be?(if there are less than 5 mice you can repeat names)"
  72. truth[35]="Would rather be rich but dumb, or poor but clever?"
  73. truth[36]="Are you closer to your mother or your father?"
  74. truth[37]="Do you like anyone besides your soulmate? If yes, who?"
  75.  
  76. dare={}--you can follow the format 'dare[number]="Dare"'
  77. dare[1]="I dare you go into EN/EN2 room 2 and spam this message 10 times: CHARLOTTE CHARLOTTE CHARLOTTE CHARLOTTE CHARLOTTE CHARLOTTE CHARLOTTE CHARLOTTE"
  78. dare[2]="I dare you whisper a moderator a swear word."
  79. dare[3]="I dare you tell your crush, or anybody in this room that you love him/her right now"
  80. dare[4]="I dare you go into EN/EN2 room 1 and spam this message 10 times: I'M FLOODING REPORT ME!"
  81. dare[5]="I dare you report a moderator for hacking"
  82. dare[6]="I dare you create an account similar to that of an online moderator and use that account to whisper to the online moderator: Hallo buddy!"
  83. dare[7]="I dare you tell your real life name to everybody in chat"
  84. dare[8]="I dare you take a picture of your real life face and send it to everyone to see."
  85. dare[9]="I dare you go into any #utility room with at least 3 people in it and crash the room."
  86. dare[10]="I dare you give me, the questioner, every ball you have in your inventory, if you have any."
  87. dare[11]="I dare you to disconnect and reconnect right now."
  88. dare[12]="I dare you to say who would be your most likely crush among the players in this room we are in."
  89. dare[13]="I dare you to give all your selfies to me right now, if you have any balls to do it via trade"
  90. dare[14]="I dare you complete this map without cheating!"
  91. dare[15]="I dare you type 'I LOVE YOU (username)' 30 times to a username in room/tribe in room chat or in tribe chat."
  92. dare[16]="I dare you kiss me, the questioner, 20 times :)"
  93. dare[17]="I dare you marry your closest friend, if u are not already married"
  94. dare[18]="I dare you give me, the questioner, every snowball you have in your inventory, if you have any."
  95. dare[19]="I dare you whisper a moderator, 'Ban me!'"
  96. dare[20]="I dare you kiss and hug someone in the room of the same gender"
  97. dare[21]="I dare you spam 'I AM A DUMB COWARD!' 10 times in this room's chat"
  98. dare[22]="I dare you ask your crush for a date."
  99. dare[23]="I dare you spam to a moderator, 'HEY <moderator's name>, I'M DAD'"
  100. dare[24]="I dare you go to a room in EN/EN2 and type 'I WANT WAFFLES' 5 times."
  101. dare[25]="I dare you go to cafe and create a topic: 'I LOVE UNDERTALE'"
  102. dare[26]="I dare you go to /room village1 and say to a random person there, 'OMG I LOVE YOU (insert random person's name) FRIEND ME I ALWAYS WANTED TO MEET YOU OMG!!! *-*'"
  103.  
  104.  
  105. function eventNewPlayer(name)
  106. print(name)
  107. tfm.exec.addImage("1548ed5434f.jpg","?3",0,-25)
  108. tfm.exec.bindKeyboard(name,0,true,true)
  109. tfm.exec.bindKeyboard(name,2,true,true)
  110.  
  111. tat=0
  112. ui.addTextArea(1,"<b><p align = 'center'><font size='30'>Type !join to join the game.</font></p></b>",name,50,365,700,40,0x324650,0x212F36,0.8,true)
  113. tfm.exec.chatMessage("<font color='#2ECF73'>Welcome to Truth or Dare Game! Type <font color='#FFFFFF'>!help</font> for more information of the game and <font color='#FFFFFF'>!commands</font> to see the list of commands. \nForum Thread: atelier801.com//topic?f=6&t=814350&p=1 \n<font color='#00FF00'><b>Created by Mousetat</b></font></font>",name)
  114. tfm.exec.chatMessage("<b><font color='#BABD2F'>Type !join to join the game.</font></b>",name)
  115. ui.addPopup(999,0,"<p align = 'center'><font size='40' face='impact'>Truth or Dare</font></p><font size='20' color='#FF0000'><b>About the game</b></font><font size='15'>\nEvery game, everyone will have the chance to be the Asker. On the first popup as an asker, u can click 'Yes' to randomize a answerer, or 'No' to type a particular person in room. This is similar for almost all other popups, where 'Yes' is for random and 'No' is for typing out yourself. If you are the asker, you can also type '#(number)' to give the question number of the truth/dare in the random list. There are currently <b>"..#truth.."</b> random truths and <b>"..#dare.."</b> random dares, so if you have any feedback feel free to tell me.\n<font color='#00FF00'>Created by Mousetat</font> \nForum Thread: atelier801.com//topic?f=6&t=814350&p=1 \n</font><font face='impact' size='30'>Type !commands to see the list of commands</font>",name,100,50,600,true)
  116. p[name]={questioners=false, admin=false, spectator=true, ban=false, randomerino=1, out=false, new=false, id=5, cheese=false, victor=false}
  117. while tat<=#admins do
  118. if name==admins[tat] then
  119. p[name].admin=true
  120. end
  121. tat=tat+1
  122. end
  123. end
  124.  
  125. for name,player in pairs(tfm.get.room.playerList) do
  126. eventNewPlayer(name)
  127. while tat<=#admins do
  128. if name==admins[tat] then
  129. p[name].admin=true
  130. end
  131. tat=tat+1
  132. end
  133. end
  134.  
  135.  
  136.  
  137. function eventKeyboard(name,key,down,x,y)
  138. if key==0 and down==true and p[name].cheese==false and p[name].victor==false then
  139. tfm.exec.removeImage(p[name].id)
  140. p[name].id=tfm.exec.addImage("155865bc675.png","%"..name,-30,-40)
  141. end
  142. if key==2 and down==true and p[name].cheese==false and p[name].victor==false then
  143. tfm.exec.removeImage(p[name].id)
  144. p[name].id=tfm.exec.addImage("155865a7b4b.png","%"..name,-30,-40)
  145. end
  146. if key==0 and down==true and p[name].cheese==true and p[name].victor==false then
  147. tfm.exec.removeImage(p[name].id)
  148. --print(p[name].id)
  149. p[name].id=tfm.exec.addImage("155865fb4e8.png","%"..name,-25,-35)
  150. end
  151. if key==2 and down==true and p[name].cheese==true and p[name].victor==false then
  152. tfm.exec.removeImage(p[name].id)
  153. --print(p[name].id)
  154. p[name].id=tfm.exec.addImage("155865f9b10.png","%"..name,-20,-35)
  155. end
  156. if key==0 and down==true and p[name].victor==true then
  157. tfm.exec.removeImage(p[name].id)
  158. --print(p[name].id)
  159. p[name].id=tfm.exec.addImage("155865e2170.png","%"..name,-20,-25)
  160. end
  161. if key==2 and down==true and p[name].victor==true then
  162. tfm.exec.removeImage(p[name].id)
  163. --print(p[name].id)
  164. p[name].id=tfm.exec.addImage("155865e09bf.png","%"..name,-20,-25)
  165. end
  166. end
  167.  
  168. function eventPlayerGetCheese(name)
  169. p[name].cheese=true
  170. tfm.exec.removeImage(p[name].id)
  171. end
  172.  
  173.  
  174. function eventNewGame()
  175. tfm.exec.addImage("1548ed5434f.jpg","?3",0,-25)
  176. for name,player in pairs(tfm.get.room.playerList) do
  177. p[name].cheese=false
  178. tfm.exec.removeImage(p[name].id)
  179. end
  180. ui.addTextArea(1,"<b><p align = 'center'><font size='30'>Welcome to Truth or Dare Game!</font></p></b>",nil,50,365,700,40,0x324650,0x212F36,0.8,true)
  181. ui.addPopup(999,0,"<p align = 'center'><font size='40' face='impact'>Truth or Dare</font></p><font size='20' color='#FF0000'><b>About the game</b></font><font size='15'>\nEvery game, everyone will have the chance to be the Asker. On the first popup as an asker, u can click 'Yes' to randomize a answerer, or 'No' to type a particular person in room. This is similar for almost all other popups, where 'Yes' is for random and 'No' is for typing out yourself. If you are the asker, you can also type '#(number)' to give the question number of the truth/dare in the random list. There are currently <b>"..#truth.."</b> random truths and <b>"..#dare.."</b> random dares, so if you have any feedback feel free to tell me.\n<font color='#00FF00'>Created by Mousetat</font> \nForum Thread: atelier801.com//topic?f=6&t=814350&p=1 \n</font><font face='impact' size='30'>Type !commands to see the list of commands</font>",nil,100,50,600,true)
  182. answerer=""
  183. questioner=""
  184. begin=false
  185. start=true
  186. numplayers=0
  187. count=1
  188. one=false
  189. tat=0
  190. for name,player in pairs(tfm.get.room.playerList) do
  191. p[name]={questioners=false, admin=false, spectator=true, ban=false, randomerino=1, out=false, new=false, id=5, cheese=false, victor=false}
  192. players[count]=name
  193. timestamp=os.time()
  194. numplayers=numplayers+1
  195. count=count+1
  196. p[name].spectator=false
  197. p[name].questioners=false
  198. while tat<=#admins do
  199. if name==admins[tat] then
  200. p[name].admin=true
  201. end
  202. tat=tat+1
  203. end
  204. end
  205. system.disableChatCommandDisplay("t", hidden)
  206. system.disableChatCommandDisplay("admin", hidden)
  207. system.disableChatCommandDisplay("restart", hidden)
  208. system.disableChatCommandDisplay("ban", hidden)
  209. system.disableChatCommandDisplay("skip", hidden)
  210. system.disableChatCommandDisplay("watch", hidden)
  211. system.disableChatCommandDisplay("unban", hidden)
  212. system.disableChatCommandDisplay("unadmin", hidden)
  213. system.disableChatCommandDisplay("mods", hidden)
  214. system.disableChatCommandDisplay("help", hidden)
  215. system.disableChatCommandDisplay("commands", hidden)
  216. end
  217.  
  218. function eventChatCommand(name,command)
  219. local IDList = {}
  220. if command=="clear" then
  221. for id, object in pairs(tfm.get.room.objectList) do
  222. table.insert(IDList, id)
  223. end
  224. for i, id in pairs(IDList) do
  225. tfm.exec.removeObject(id)
  226. end
  227. end
  228. if command=="s" and p[name].admin==true then
  229. if string.sub(command,3)=="" then
  230. tfm.exec.setShaman(name)
  231. else
  232. tfm.exec.setShaman(string.sub(command,3))
  233. end
  234. elseif command=="dance" and p[name].admin==true then
  235. for name,player in pairs(tfm.get.room.playerList) do
  236. p[name].randomerino=math.random(1,4)
  237. end
  238. dance=true
  239. elseif command=="danceoff" and p[name].admin==true then
  240. dance=false
  241. elseif command=="mods" then
  242. message=""
  243. for k,v in pairs(tfm.get.room.playerList) do
  244. if p[k].admin==true then
  245. message=message..tostring(k)..", "
  246. end
  247. end
  248. tfm.exec.chatMessage("<font color='#FF69B4'>The Truth/Dare moderators are: "..string.sub(message,1,-3)..".</font>", name)
  249. elseif command=="new" and name==questioner then
  250. if p[name].new==false then
  251. tfm.exec.movePlayer(answerer,400,320,false,0,0,false)
  252. answererold=answerer
  253. answerer=""
  254. choose=true
  255. p[name].new=true
  256. else
  257. ui.updateTextArea(1, "<p align='center'><b><font size='30'>You can only !new ONCE</font></b></p>", nil)
  258. end
  259. elseif command=="join" and p[name].spectator==true then
  260. if p[name].ban==false then
  261. ui.updateTextArea(1, "<p align='center'><b><font size='30'>"..name.." joined the game! :D</font></b></p>", nil)
  262. tfm.exec.chatMessage("<b><font color='#BABD2F'>You have joined the game.</font></b>", name)
  263. tfm.exec.respawnPlayer(name)
  264. tfm.exec.movePlayer(name,400,320,false,0,0,false)
  265. p[name].spectator=false
  266. table.insert(players,name)
  267. elseif p[name].ban==true then
  268. tfm.exec.chatMessage("<b><font color='#BABD2F'>You have been banned, so u cannot join the game :(</font></b>", name)
  269. end
  270. elseif command=="skip" and p[name].admin==true then
  271. timestamp=os.time()
  272. tfm.exec.chatMessage("<font color='#FF69B4'>"..questioner.."'s turn has been skipped by Truth/Dare Moderation.</font>",nil)
  273. skip=true
  274. elseif string.sub(command,0,1) == "t" and p[name].admin==true then
  275. message=string.sub(command,3)
  276. tfm.exec.chatMessage("<font color='#FF69B4'>[~Truth/Dare Moderation] "..message.."</font>", nil)
  277. elseif command=="restart" and p[name].admin==true then
  278. tfm.exec.newGame("@6411544")
  279. elseif string.sub(command,0,5)=="watch" then
  280. if string.sub(command,7)=="" then
  281. p[name].spectator=true
  282. ui.updateTextArea(1, "<p align='center'><b><font size='30'>"..name.." is now a spectator :(</font></b></p>", nil)
  283. tfm.exec.chatMessage("<b><font color='#BABD2F'>Type !join to join the game.</font></b>",name)
  284. if name==questioner or name==answerer then
  285. questioner=""
  286. answerer=""
  287. tfm.exec.movePlayer(questioner,400,320,false,0,0,false)
  288. tfm.exec.movePlayer(answerer,400,320,false,0,0,false)
  289. timestamp=os.time()
  290. skip=true
  291. end
  292. for i=1,#players do
  293. if players[i]==name then
  294. table.remove(players,i)
  295. end
  296. end
  297. else
  298. if p[name].admin==true then
  299. message=string.sub(command,7)
  300. message=string.upper(string.sub(message,0,1))..string.sub(message,2)
  301. for k,v in pairs(tfm.get.room.playerList) do
  302. if k==message and p[k].spectator==false then
  303. if k==questioner or k==answerer then
  304. skip=true
  305. timestamp=os.time()
  306. end
  307. p[k].spectator=true
  308. ui.updateTextArea(1, "<p align='center'><b><font size='30'>"..k.." is now a spectator :(</font></b></p>", nil)
  309. tfm.exec.chatMessage("<b><font color='#BABD2F'>Type !join to join the game.</font></b>",name)
  310. for i=1,#players do
  311. if players[i]==k then
  312. table.remove(players,i)
  313. end
  314. end
  315. end
  316. end
  317. end
  318. end
  319. elseif command=="help" then
  320. ui.addPopup(999,0,"<p align = 'center'><font size='40' face='impact'>Truth or Dare</font></p><font size='20' color='#FF0000'><b>About the game</b></font><font size='15'>\nEvery game, everyone will have the chance to be the Asker. On the first popup as an asker, u can click 'Yes' to randomize a answerer, or 'No' to type a particular person in room. This is similar for almost all other popups, where 'Yes' is for random and 'No' is for typing out yourself. If you are the asker, you can also type '#(number)' to give the question number of the truth/dare in the random list. There are currently <b>"..#truth.."</b> random truths and <b>"..#dare.."</b> random dares, so if you have any feedback feel free to tell me.\n<font color='#00FF00'>Created by Mousetat</font> \n</font><font face='impact' size='30'>Type !commands to see the list of commands</font>",name,100,50,600,true)
  321. elseif command=="commands" then
  322. if p[name].admin==true then
  323. ui.addPopup(999,0,"<b><font size='20' color='#FFFF00'>COMMANDS</font>\n!join to join the game if you are spectating or you just came into the room.\n!watch to be a spectator and get ignored in the game.\n!mods to see the current moderators in the room.\n!clear to clear all shaman objects.\n!new to get a new answerer(only new ONCE)(asker only)\n!help to see the information about game\n<font size='20' color='#EB1D51'>ADMIN COMMANDS</font>\n!watch (username) to make the username a spectator.\n!s to become shaman\n!admin (username) to admin a person\n!dance/!danceoff to toggle dancing\n!t (message) to speak to all)\n!restart to restart game if bugged\n!skip to skip a person's turn\n!ban (username) (reason) to ban a person(highly not advised)</b>",name,100,50,600,true)
  324. elseif p[name].admin==false then
  325. ui.addPopup(999,0,"<b><font size='20' color='#FFFF00'>COMMANDS</font>\n!join to join the game if you are spectating or you just came into the room.\n!watch to be a spectator and get ignored in the game.\n!mods to see the current moderators in the room.\n!clear to clear all shaman objects.\n!new to get a new answerer(only new ONCE)(asker only)\n!help to see the information about game",name,100,50,600,true)
  326. end
  327. elseif string.sub(command,0,3)=="ban" and p[name].admin==true then
  328. local c=0
  329. local reason=""
  330. if string.find(command," ",5)==nil then
  331. message=string.sub(command,5)
  332. else
  333. c=string.find(command," ",5)
  334. message=string.sub(command,5,c-1)
  335. reason=string.sub(command,c+1)
  336. end
  337. message=string.upper(string.sub(message,0,1))..string.sub(message,2)
  338. for k,v in pairs(tfm.get.room.playerList) do
  339. if message==k then
  340. tfm.exec.chatMessage("<font color='#FF69B4'>[~Truth/Dare Moderation] "..message.." has been banned for 9999 hours. Reason: "..reason.."</font>", nil)
  341. p[message].ban=true
  342. tfm.exec.killPlayer(k)
  343. for i=1,#players do
  344. if players[i]==k then
  345. table.remove(players,i)
  346. end
  347. end
  348. end
  349. end
  350. elseif string.sub(command,0,5)=="unban" and p[name].admin==true then
  351. message=string.sub(command,7)
  352. message=string.upper(string.sub(message,0,1))..string.sub(message,2)
  353. for k,v in pairs(tfm.get.room.playerList) do
  354. if message==k then
  355. tfm.exec.chatMessage("<font color='#FF69B4'>[~Truth/Dare Moderation] "..message.." has been unbanned.</font>", nil)
  356. p[message].ban=false
  357. tfm.exec.respawnPlayer(k)
  358. table.insert(players,k)
  359. end
  360. end
  361. elseif string.sub(command,0,5)=="admin" and p[name].admin==true then
  362. message=string.sub(command,7)
  363. message=string.upper(string.sub(message,0,1))..string.sub(message,2)
  364. for k,v in pairs(tfm.get.room.playerList) do
  365. if message==k then
  366. tfm.exec.chatMessage("<font color='#FF69B4'>[~Truth/Dare Moderation] "..message.." is now a Truth/Dare moderator. Congrats!</font>", nil)
  367. p[message].admin=true
  368. end
  369. end
  370. elseif string.sub(command,0,7)=="unadmin" and p[name].admin==true then
  371. message=string.sub(command,9)
  372. message=string.upper(string.sub(message,0,1))..string.sub(message,2)
  373. for k,v in pairs(tfm.get.room.playerList) do
  374. if message==k then
  375. tfm.exec.chatMessage("<font color='#FF69B4'>[~Truth/Dare Moderation] "..message.." is demoded. What a waste!</font>", nil)
  376. p[message].admin=false
  377. end
  378. end
  379. end
  380. end
  381. function eventLoop(time,remaining)
  382. if dance==true then
  383. for name,player in pairs(tfm.get.room.playerList) do
  384. if p[name].randomerino==1 then
  385. tfm.exec.playEmote(name,0,nil)
  386. p[name].randomerino=math.random(1,4)
  387. elseif p[name].randomerino==2 then
  388. tfm.exec.playEmote(name,15,nil)
  389. p[name].randomerino=math.random(1,4)
  390. elseif p[name].randomerino==3 then
  391. tfm.exec.playEmote(name,16,nil)
  392. p[name].randomerino=math.random(1,4)
  393. elseif p[name].randomerino==4 then
  394. tfm.exec.playEmote(name,24,nil)
  395. p[name].randomerino=math.random(1,4)
  396. end
  397. end
  398. end
  399. numplayers=#players
  400. for k,v in pairs(tfm.get.room.playerList) do
  401. if p[k].ban==true then
  402. ui.updateTextArea(1,"<b><p align = 'center'><font size='30'>You have been banned. :(</font></p></b>",k)
  403. elseif p[k].spectator==true then
  404. ui.updateTextArea(1,"<b><p align = 'center'><font size='30'>Type !join to join the game.</font></p></b>",k)
  405. end
  406. end
  407. local IDList={}
  408. for id, object in pairs(tfm.get.room.objectList) do
  409. table.insert(IDList, id)
  410. end
  411. for i, id in pairs(IDList) do
  412. if others[id].summonobject==true and timestamplol[id]<os.time()-3000 then
  413. tfm.exec.removeObject(id)
  414. others[id].summonobject=false
  415. end
  416. end
  417. if numplayers<2 then
  418. one=true
  419. else
  420. one=false
  421. end
  422. if one==true then
  423. ui.updateTextArea(1, "<p align='center'><b><font size='15'>Minimum of 2 players are needed for this game to proceed.</font></b></p>", nil)
  424. timestamp=os.time()-4000
  425. elseif timestamp < os.time()-10000 and begin==false then
  426. timestamp=os.time()
  427. begin=true
  428. restart=false
  429. ui.updateTextArea(1, "<p align='center'><b><font size='30'>Let's Begin the Game! </font></b></p>", nil)
  430. for name,player in pairs(tfm.get.room.playerList) do
  431. tfm.exec.movePlayer(name,400,320,false,0,0,false)
  432. end
  433. elseif timestamp < os.time()-5000 and begin==false then
  434. local i=1
  435. local long=""
  436. local hname=""
  437. while i<=numplayers do
  438. hname=players[i]
  439. if p[hname].spectator==false and tfm.get.room.playerList[hname].isDead==false and p[hname].out==false then
  440. long=long..tostring(players[i])..", "
  441. end
  442. i=i+1
  443. end
  444. ui.updateTextArea(1, "<p align='center'><b><font size='15'>The participating players are: "..string.sub(long,1,-3)..".</font></b></p>", nil)
  445. elseif timestamp < os.time()-3000 and begin==false and restart==true then
  446. ui.updateTextArea(1, "<p align='center'><b><font size='20'>Since everyone had their turn, I'll restart the game...", nil)
  447. end
  448. if begin==true then
  449. if timestamp < os.time()-3000 and start==true then
  450. tfm.exec.movePlayer(questioner,400,320,false,0,0,false)
  451. tfm.exec.movePlayer(answerer,400,320,false,0,0,false)
  452. answerer=""
  453. questioner=""
  454. local j=1
  455. local i=0
  456. while j<=numplayers do
  457. pname=players[j]
  458. if p[pname].questioners==false and tfm.get.room.playerList[pname].isDead==false and p[pname].spectator==false and p[pname].out==false then
  459. i=i+1
  460. end
  461. j=j+1
  462. end
  463. if i>0 then
  464. eventTruthOrDare()
  465. else
  466. local j=1
  467. while j<=numplayers do
  468. local name=players[j]
  469. p[name].questioners=false
  470. j=j+1
  471. end
  472. restart=true
  473. timestamp=os.time()
  474. begin=false
  475. end
  476. end
  477. if choose==true and one==false then
  478. rand=math.random(1,numplayers)
  479. answerer=players[rand]
  480. if questioner==answerer or tfm.get.room.playerList[answerer].isDead or p[answerer].spectator==true or answerer==answererold or p[answerer].out==true then
  481. ui.updateTextArea(1, "<p align='center'><b><font size='30'>Randomizing...</font></b></p>", nil)
  482. tfm.exec.movePlayer(answerer,400,320,false,0,0,false)
  483. answerer=""
  484. else
  485. choose=false
  486. ui.updateTextArea(1, "<b><font size='15'>"..answerer.." is now the answerer! Waiting to pick truth or dare...</font></b>", nil)
  487. ui.addPopup(3,1,"You are the answerer! Do you want Truth? If No, you will choose Dare!",answerer,250,50,300,true)
  488. end
  489. elseif choosey==true and one==false then
  490. rand=math.random(1,numplayers)
  491. questioner=players[rand]
  492. if p[questioner].questioners==false and tfm.get.room.playerList[questioner].isDead==false and p[questioner].spectator==false or p[questioner].out==false then
  493. choosey=false
  494. p[questioner].questioners=true
  495. ui.updateTextArea(1, "<b><font size='15'>"..questioner.." is now the asker! Waiting to pick an answerer...</font></b>", nil)
  496. ui.addPopup(1,1,"Do you want a random Answerer? If <b>No</b>, you will have to type in your Answerer's username",questioner,250,50,300,true)
  497. else
  498. ui.updateTextArea(1, "<p align='center'><b><font size='30'>Randomizing...</font></b></p>", nil)
  499. tfm.exec.movePlayer(questioner,400,320,false,0,0,false)
  500. questioner=""
  501. end
  502. end
  503. if skip==true then
  504. ui.updateTextArea(1, "<p align='center'><b><font size='30'>Skipping turn...</font></b></p>", nil)
  505. tfm.exec.movePlayer(questioner,400,320,false,0,0,false)
  506. tfm.exec.movePlayer(answerer,400,320,false,0,0,false)
  507. answerer=""
  508. questioner=""
  509. if timestamp < os.time()-3000 then
  510. start=true
  511. skip=false
  512. end
  513. end
  514. tfm.exec.movePlayer(questioner,120,120,false,0,0,false)
  515. tfm.exec.movePlayer(answerer,680,120,false,0,0,false)
  516. end
  517. end
  518.  
  519. function eventTruthOrDare()
  520. start=false
  521. ui.removeTextArea(2)
  522. ui.removeTextArea(3)
  523. choosey=true
  524. end
  525.  
  526. function eventPopupAnswer(id, name, answer)
  527. if id==1 and name==questioner then
  528. if answer=="yes" then
  529. answererold=""
  530. choose=true
  531. elseif answer=="no" then
  532. ui.addPopup(2,2,"Who do you want to be the answerer?",questioner,250,50,300,true)
  533. end
  534. elseif id==2 and name==questioner then
  535. x=1
  536. found=false
  537. answer=string.upper(string.sub(answer,0,1))..string.sub(answer,2)
  538. answer=string.gsub(answer, "<", "&lt;")
  539. answer=string.gsub(answer, "http", "")
  540. answer=string.gsub(answer,"fuck", "****")
  541. answer=string.gsub(answer,"shit", "****")
  542. answer=string.gsub(answer,"ass", "***")
  543. answer=string.gsub(answer,"cunt", "****")
  544. answer=string.gsub(answer,"dick", "****")
  545. while x<=numplayers do
  546. if answer==players[x] then
  547. answerer=answer
  548. if questioner==answerer or tfm.get.room.playerList[answerer].isDead or p[answerer].spectator==true or p[answerer].out==true then
  549. answerer=""
  550. found=false
  551. else
  552. ui.updateTextArea(1, "<b><font size='15'>"..answerer.." is now the answerer! Waiting to pick Truth or Dare...</font></b>", nil)
  553. ui.addPopup(3,1,"You are the answerer! Do you want Truth? If <b>No</b>, you will choose Dare!",answerer,250,50,300,true)
  554. found=true
  555. end
  556. end
  557. x=x+1
  558. end
  559. if found==false then
  560. ui.addPopup(2,2,"There is no such answerer in the room. Type out the exact username of your answerer.",questioner,250,50,300,true)
  561. end
  562. elseif id==3 and name==answerer then
  563. if answer=="yes" then
  564. ui.updateTextArea(1, "<b><font size='15'>"..answerer.." has picked Truth! Waiting for question from "..questioner.."...</font></b>", nil)
  565. ui.addPopup(4,1,"Do you want a random Truth question? If <b>No</b>, you will have to submit a question.",questioner,250,50,300,true)
  566. elseif answer=="no" then
  567. ui.updateTextArea(1, "<b><font size='15'>"..answerer.." has picked Dare! Waiting for a dare from "..questioner.."...</font></b>", nil)
  568. ui.addPopup(5,1,"Do you want a random Dare? If <b>No</b>, you will have to submit a Dare.",questioner,250,50,300,true)
  569.  
  570. end
  571. elseif id==4 and name==questioner then
  572. if answer=="yes" then
  573. question=truth[math.random(1,#truth)]
  574. ui.updateTextArea(1, "<b><font size='15'>"..questioner.." has randomed a Truth question! Waiting for "..answerer.." to respond...</font></b>", nil)
  575. ui.addTextArea(2,"<b><font size='20'>Truth: "..question.."</font></b>",nil,165,20,470,120,0x324650,0x212F36,0.8,true)
  576. ui.addPopup(8,2,"<b>Type your Truth answer below</b>",answerer,250,175,300,true)
  577.  
  578. elseif answer=="no" then
  579. ui.addPopup(6,2,"Type your Truth question below, or type #(number) for the question number from the random list.",questioner,250,50,300,true)
  580. end
  581. elseif id==5 and name==questioner then
  582. if answer=="yes" then
  583. question=dare[math.random(1,#dare)]
  584. ui.updateTextArea(1, "<b><font size='15'>"..questioner.." has randomed a Dare question! Waiting for "..answerer.." to respond...</font></b>", nil)
  585. ui.addTextArea(2,"<b><font size='20'>Dare: "..question.."</font></b>",nil,165,20,470,120,0x324650,0x212F36,0.8,true)
  586. ui.addPopup(9,1,"<b><font size='15'>Do what "..questioner.."dares you to do! If you click 'yes' you will promise that you will do your dare!</font><b>",answerer,250,175,300,true)
  587. elseif answer=="no" then
  588. ui.addPopup(7,2,"Type your Dare below, or type #(number) for the dare number from the random list.",questioner,250,50,300,true)
  589. end
  590. elseif id==6 and name==questioner then
  591. answer=string.gsub(answer, "<", "&lt;")
  592. answer=string.gsub(answer, "http", "")
  593. answer=string.gsub(answer,"fuck", "****")
  594. answer=string.gsub(answer,"shit", "****")
  595. answer=string.gsub(answer,"ass", "***")
  596. answer=string.gsub(answer,"cunt", "****")
  597. answer=string.gsub(answer,"dick", "****")
  598. if answer=="" then
  599. ui.addPopup(6,2,"You have to type something as your Truth question.",questioner,250,50,300,true)
  600. elseif string.sub(answer,0,1)=="#" and tonumber(string.sub(answer,2,3))<=#truth then
  601. question=truth[tonumber(string.sub(answer,2,3))]
  602. ui.updateTextArea(1, "<b><font size='15'>"..questioner.." has typed a Truth question! Waiting for "..answerer.." to respond...</font></b>", nil)
  603. ui.addTextArea(2,"<b><font size='20'>Truth: "..question.."</font></b>",nil,165,20,470,120,0x324650,0x212F36,0.8,true)
  604. ui.addPopup(8,2,"Type your Truth answer below",answerer,250,175,300,true)
  605. elseif string.sub(answer,0,1)=="#" and tonumber(string.sub(answer,2,3))>#truth then
  606. ui.addPopup(6,2,"You have to type a Truth question number less than or equal to "..tostring(#truth),questioner,250,50,300,true)
  607. else
  608. question=answer
  609. ui.updateTextArea(1, "<b><font size='15'>"..questioner.." has typed a Truth question! Waiting for "..answerer.." to respond...</font></b>", nil)
  610. ui.addTextArea(2,"<b><font size='20'>Truth: "..question.."</font></b>",nil,165,20,470,120,0x324650,0x212F36,0.8,true)
  611. ui.addPopup(8,2,"Type your Truth answer below",answerer,250,175,300,true)
  612. end
  613. elseif id==7 and name==questioner then
  614. answer=string.gsub(answer, "<", "&lt;")
  615. answer=string.gsub(answer, "http", "")
  616. answer=string.gsub(answer,"fuck", "****")
  617. answer=string.gsub(answer,"shit", "****")
  618. answer=string.gsub(answer,"ass", "***")
  619. answer=string.gsub(answer,"cunt", "****")
  620. answer=string.gsub(answer,"dick", "****")
  621. if answer=="" then
  622. ui.addPopup(7,2,"You have to type something as your Dare.",questioner,250,50,300,true)
  623. elseif string.sub(answer,0,1)=="#" and tonumber(string.sub(answer,2,3))<=#dare then
  624. if tonumber(string.sub(answer,2,3))==14 then
  625. mapcomplete=true
  626. end
  627. question=dare[tonumber(string.sub(answer,2,3))]
  628. ui.updateTextArea(1, "<b><font size='15'>"..questioner.." has typed a Dare question! Waiting for "..answerer.." to respond...</font></b>", nil)
  629. ui.addTextArea(2,"<b><font size='15'>Dare: "..question.."</font></b>",nil,165,20,470,120,0x324650,0x212F36,0.8,true)
  630. ui.addPopup(9,1,"<b><font size='15'>Do what "..questioner.."dares you to do! If you click 'yes' you will promise that you will do your dare!</font><b>",answerer,250,175,300,true)
  631. elseif string.sub(answer,0,1)=="#" and tonumber(string.sub(answer,2,3))>#dare then
  632. ui.addPopup(7,2,"You have to type a Dare number less than or equal to "..tostring(#dare),questioner,250,50,300,true)
  633. else
  634. question=answer
  635. ui.updateTextArea(1, "<b><font size='15'>"..questioner.." has typed a Dare question! Waiting for "..answerer.." to respond...</font></b>", nil)
  636. ui.addTextArea(2,"<b><font size='15'>Dare: "..question.."</font></b>",nil,165,20,470,120,0x324650,0x212F36,0.8,true)
  637. ui.addPopup(9,1,"<b><font size='15'>Do what "..questioner.."dares you to do! If you click 'yes' you will promise that you will do your dare!</font><b>",answerer,250,175,300,true)
  638. end
  639. elseif id==8 and name==answerer then
  640. answer=string.gsub(answer, "<", "&lt;")
  641. answer=string.gsub(answer, "http", "")
  642. answer=string.gsub(answer,"fuck", "****")
  643. answer=string.gsub(answer,"shit", "****")
  644. answer=string.gsub(answer,"ass", "***")
  645. answer=string.gsub(answer,"cunt", "****")
  646. answer=string.gsub(answer,"dick", "****")
  647. ans = answer
  648. if ans=="" then
  649. ui.addPopup(8,2,"You have to type something as your Truth Answer",answerer,250,175,300,true)
  650. else
  651. ui.addTextArea(3,"<b><font size='20'>Answer: "..ans.."</font></b>",nil,165,140,470,120,0x324650,0x212F36,0.8,true)
  652. ui.updateTextArea(1, "<b><font size='15'>"..answerer.." has answered the question! Waiting for "..questioner.." to rate the answer</font></b>", nil)
  653. ui.addPopup(10,1,"<b><font size='15'>Are you satisfied with the answer?",questioner,250,50,300,true)
  654. end
  655. elseif id==9 and name==answerer then
  656. if answer=="yes" then
  657. ui.addTextArea(3,"<b><font size='20'>I, "..answerer..", accepts the challenge and promises to do the dare.</font></b>",nil,165,140,470,120,0x324650,0x212F36,0.8,true)
  658. if mapcomplete==true then
  659. ui.updateTextArea(1, "<b><font size='15'>"..answerer.." is a warrior! He/she will have to complete the map before entering the game. Starting new game...</font></b>", nil)
  660. p[answerer].out=true
  661. mapcomplete=false
  662. for i=1,#players do
  663. if players[i]==answerer then
  664. table.remove(players,i)
  665. end
  666. end
  667. else
  668. ui.updateTextArea(1, "<b><font size='15'>"..answerer.." is a warrior! Starting new game...</font></b>", nil)
  669. end
  670. timestamp=os.time()
  671. answerer=""
  672. questioner=""
  673. start=true
  674. for name,player in pairs(tfm.get.room.playerList) do
  675. tfm.exec.movePlayer(name,400,320,false,0,0,false)
  676. p[name].new=false
  677. end
  678. elseif answer=="no" then
  679. mapcomplete=false
  680. ui.updateTextArea(1, "<b><font size='15'>"..answerer.." is a coward! Starting new game...</font></b>", nil)
  681. ui.addTextArea(3,"<b><font size='20'>I, "..answerer..", am a coward so I don't dare to do what you dared me to do.</font></b>",nil,165,140,470,120,0x324650,0x212F36,0.8,true)
  682. timestamp=os.time()
  683. answerer=""
  684. questioner=""
  685. start=true
  686. for name,player in pairs(tfm.get.room.playerList) do
  687. tfm.exec.movePlayer(name,400,320,false,0,0,false)
  688. p[name].new=false
  689. end
  690. end
  691. elseif id==10 and name==questioner then
  692. if answer=="yes" then
  693. ui.updateTextArea(1, "<b><font size='15'>"..questioner.." is a satisfied with the answer! Starting new game...</font></b>", nil)
  694. timestamp=os.time()
  695. answerer=""
  696. questioner=""
  697. start=true
  698. for name,player in pairs(tfm.get.room.playerList) do
  699. tfm.exec.movePlayer(name,400,320,false,0,0,false)
  700. p[name].new=false
  701. end
  702. elseif answer=="no" then
  703. ui.updateTextArea(1, "<b><font size='15'>"..questioner.." is a not satisfied with the answer...:( Starting new game...</font></b>", nil)
  704. timestamp=os.time()
  705. answerer=""
  706. questioner=""
  707. start=true
  708. for name,player in pairs(tfm.get.room.playerList) do
  709. tfm.exec.movePlayer(name,400,320,false,0,0,false)
  710. p[name].new=false
  711. end
  712. end
  713. end
  714. end
  715.  
  716. function eventPlayerLeft(name)
  717. ui.updateTextArea(1, "<p align='center'><b><font size='15'>"..name.." left the room... What a coward!</font></b></p>", nil)
  718. if questioner==name or answerer==name then
  719. timestamp=os.time()
  720. skip=true
  721. end
  722. for i=1,#players do
  723. if players[i]==name then
  724. table.remove(players,i)
  725. end
  726. end
  727. end
  728.  
  729. function eventPlayerDied(name)
  730. if p[name].spectator==false and p[name].ban==false then
  731. tfm.exec.respawnPlayer(name)
  732. end
  733. if p[name].ban==true then
  734. if name==questioner or name==answerer then
  735. timestamp=os.time()
  736. skip=true
  737. end
  738. end
  739. end
  740.  
  741. function eventPlayerWon(playerName,timeElapsed, timeElapsedSinceRespawn)
  742. p[playerName].cheese=false
  743. p[playerName].victor=true
  744. tfm.exec.respawnPlayer(playerName)
  745. if p[playerName].out==true then
  746. p[playerName].out=false
  747. table.insert(players,playerName)
  748. tfm.exec.chatMessage("<font color='#BABD2F'>"..playerName.." completed the map in "..(timeElapsedSinceRespawn/100).." seconds! He/she has joined back the game!</font>", nil)
  749. else
  750. tfm.exec.chatMessage("<font color='#BABD2F'>"..playerName.." completed the map in "..(timeElapsedSinceRespawn/100).." seconds!</font>", nil)
  751. end
  752. end
  753.  
  754. function eventSummoningEnd(playerName, objectType, xPosition, yPosition, angle, xSpeed, ySpeed, other)
  755. timestamplol[other.id]=os.time()
  756. others[other.id]={summonobject=true}
  757. end
Advertisement
Add Comment
Please, Sign In to add comment