Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- admin="Mousetat"
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.disableAfkDeath(true)
- tfm.exec.disableAutoShaman(true)
- tfm.exec.disableAutoScore(true)
- tfm.exec.newGame("@6411544")
- players={}--respawn place is 400,320
- p={}
- timestamp=os.time()
- numplayers=0
- begin=false
- answerer="lol"
- questioner="lol"
- question="lol"
- ans="lol"
- new=false
- restart=false
- choose=false
- start=true
- choosey=false
- skip=false
- message=""
- others={}
- summonobject=false
- timestamplol={}
- answererold=""
- one=false
- truth={}--you can follow the format 'truth[number]="question"'
- truth[1]="Who is your crush in this game?"
- truth[2]="What is your favourite food?"
- truth[3]="Who is you model/favourite person in game?"
- truth[4]="What games do you play besides Transformice?"
- truth[5]="What would you like to be when you grow up?"
- truth[6]="Have you sucked your thumb before?"
- truth[7]="What brand of phone do you have currently?"
- truth[8]="Have you ever farted in front of your friends or teachers in real life?"
- truth[9]="If you could hack transformice, what would you do?"
- truth[10]="What is your favourite fur in Transformice if you have to choose?"
- truth[11]="Why do you like Transformice?"
- truth[12]="What do you dislike/hate most about yourself, whether in personality or physically?"
- truth[13]="What do you love most about yourself, whether in personality or physically?"
- truth[14]="Tell us whether you love yourself more or hate/dislike yourself more, and tell us why."
- truth[15]="Why do you like your current crush in real life, in personality terms AND physical terms?"
- truth[16]="Tell us why you hate the person you currently hate in real life, in personality terms."
- dare={}--you can follow the format 'dare[number]="Dare"'
- dare[1]="I dare you go into EN/EN2 room 2 and spam this message 10 times: I AM A GUMMY BEAR!I AM A GUMMY BEAR!I AM A GUMMY BEAR!"
- dare[2]="I dare you whisper a moderator a swear word."
- dare[3]="I dare you tell your crush, or anybody in this room that you love him/her right now"
- dare[4]="I dare you go into EN/EN2 room 1 and spam this message 10 times: I'M FLOODING REPORT ME!"
- dare[5]="I dare you report a moderator for hacking"
- 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!"
- dare[7]="I dare you tell your real life name to everybody in chat"
- dare[8]="I dare you take a picture of your real life face and send it to everyone to see."
- dare[9]="I dare you go into any #utility room with at least 3 people in it and crash the room."
- dare[10]="I dare you give me, the questioner, every ball you have in your inventory, if you have any."
- dare[11]="I dare you to disconnect and reconnect right now."
- dare[12]="I dare you to say who would be your most likely crush among the players in this room we are in."
- dare[13]="I dare you to give all your selfies to me right now, if you have any balls to do it via trade"
- dare[14]="I dare you complete this map without cheating!"
- 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."
- dare[16]="I dare you kiss me, the questioner, 20 times :)"
- dare[17]="I dare you marry your closest friend, if u are not already married"
- function eventNewPlayer(name)
- ui.addTextArea(1,"<b><p align = 'center'><font size='30'>Type !join to join the game.</font></p></b>",name,50,355,700,40,0x324650,0x212F36,0.8,true)
- p[name]={questioners=false, admin=false, spectator=true, ban=false}
- end
- function eventNewGame()
- ui.addTextArea(1,"<b><p align = 'center'><font size='30'>Welcome to Truth or Dare Game!</font></p></b>",nil,50,355,700,40,0x324650,0x212F36,0.8,true)
- ui.addPopup(999,0,"<p align = 'center'><font size='50' face='impact'>Truth or Dare</font></p><font size='30' color='#FF0000'><b>Rules</b></font>\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. There are currently <b>10</b> random truths and <b>10</b> random dares, so if you have any feedback feel free to tell me, Mousetat.\n<b><font size='30' 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!s to be shaman(although it is strongly not advised to do so)\n!new to get a new answerer(asker only)\n!admin <username> to admin a person(admins only)\n!c to speak to all(admins only)\n!restart to restart game if bugged(admins only)\n!skip to skip a person's turn(admins only)\n!help to see this popup again</b>",nil,100,20,600,true)
- answerer=""
- questioner=""
- begin=false
- start=true
- numplayers=0
- count=1
- one=false
- for name,player in pairs(tfm.get.room.playerList) do
- p[name]={questioners=false, admin=false, spectator=true, ban=false}
- players[count]=name
- timestamp=os.time()
- numplayers=numplayers+1
- count=count+1
- p[name].spectator=false
- p[name].questioners=false
- if name==admin then
- p[name].admin=true
- end
- end
- print(numplayers)
- system.disableChatCommandDisplay("c", hidden)
- system.disableChatCommandDisplay("admin", hidden)
- system.disableChatCommandDisplay("restart", hidden)
- end
- function eventChatCommand(name,command)
- local IDList = {}
- if command=="s" then
- tfm.exec.setShaman(name)
- elseif command=="mods" then
- message=""
- for k,v in pairs(tfm.get.room.playerList) do
- if p[k].admin==true then
- message=message..tostring(k)..", "
- end
- end
- ui.updateTextArea(1, "<p align='center'><b><font size='15'>The moderators are: "..string.sub(message,1,-3)..".</font></b></p>", name)
- elseif command=="new" and name==questioner then
- tfm.exec.movePlayer(answerer,400,320,false,0,0,false)
- answererold=answerer
- answerer=""
- choose=true
- elseif command=="join" and p[name].spectator==true then
- if p[name].ban==false then
- ui.updateTextArea(1, "<p align='center'><b><font size='30'>"..name.." joined the game! :D</font></b></p>", nil)
- tfm.exec.respawnPlayer(name)
- tfm.exec.movePlayer(name,400,320,false,0,0,false)
- numplayers=numplayers+1
- players[numplayers]=name
- p[name].spectator=false
- elseif p[name].ban==true then
- ui.updateTextArea(1, "<p align='center'><b><font size='30'>You have been banned, so u cannot join the game :(</font></b></p>", name)
- end
- elseif command=="skip" and p[name].admin==true then
- timestamp=os.time()
- skip=true
- elseif command:sub(0,1) == "c" and p[name].admin==true then
- message=command:sub(3)
- ui.updateTextArea(1, "<p align='center'><b><font size='15' color='#ED67EA'>[~Moderation] "..message.."</font></b></p>", nil)
- elseif command=="restart" and p[name].admin==true then
- tfm.exec.newGame("@6411544")
- elseif command:sub(0,5)=="watch" and p[name].admin==true then
- if command:sub(7)=="" then
- p[name].spectator=true
- numplayers=numplayers-1
- ui.updateTextArea(1, "<p align='center'><b><font size='30'>"..name.." is now a spectator :(</font></b></p>", nil)
- if name==questioner or name==answerer then
- questioner=""
- answerer=""
- tfm.exec.movePlayer(questioner,400,320,false,0,0,false)
- tfm.exec.movePlayer(answerer,400,320,false,0,0,false)
- timestamp=os.time()
- skip=true
- end
- for i=1,#players do
- if players[i]==name then table.remove(players,i)
- end
- end
- else
- message=command:sub(7)
- message=string.upper(message:sub(0,1))..message:sub(2)
- for k,v in pairs(tfm.get.room.playerList) do
- if k==message and p[k].spectator==false then
- if k==questioner or k==answerer then
- skip=true
- timestamp=os.time()
- end
- p[k].spectator=true
- numplayers=numplayers-1
- ui.updateTextArea(1, "<p align='center'><b><font size='30'>"..k.." is now a spectator :(</font></b></p>", nil)
- for i=1,#players do
- if players[i]==k then table.remove(players,i)
- end
- end
- end
- end
- end
- elseif command=="respawn" then
- tfm.exec.respawnPlayer(name)
- elseif command=="help" then
- ui.addPopup(999,0,"<p align = 'center'><font size='50' face='impact'>Truth or Dare</font></p><font size='30' color='#FF0000'><b>Rules</b></font>\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. There are currently <b>10</b> random truths and <b>10</b> random dares, so if you have any feedback feel free to tell me, Mousetat.\n<b><font size='30' 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!s to be shaman(although it is strongly not advised to do so)\n!new to get a new answerer(asker only)\n!admin <username> to admin a person(admins only)\n!c to speak to all(admins only)\n!restart to restart game if bugged(admins only)\n!skip to skip a person's turn(admins only)\n!help to see this popup again</b>",name,100,20,600,true)
- elseif command:sub(0,3)=="ban" and p[name].admin==true then
- message=command:sub(5)
- message=string.upper(message:sub(0,1))..message:sub(2)
- for k,v in pairs(tfm.get.room.playerList) do
- if message==k then
- ui.updateTextArea(1, "<p align='center'><b><font size='15' color='#ED67EA'>[~Moderation] "..message.." has been banned for 9999 hours.</font></b></p>", nil)
- p[message].ban=true
- p[message].spectator=true
- tfm.exec.killPlayer(k)
- numplayers=numplayers-1
- end
- end
- elseif command:sub(0,5)=="unban" and p[name].admin==true then
- message=command:sub(7)
- message=string.upper(message:sub(0,1))..message:sub(2)
- for k,v in pairs(tfm.get.room.playerList) do
- if message==k then
- ui.updateTextArea(1, "<p align='center'><b><font size='15' color='#ED67EA'>[~Moderation] "..message.." has been unbanned.</font></b></p>", nil)
- p[message].ban=false
- p[message].spectator=false
- tfm.exec.respawnPlayer(k)
- numplayers=numplayers+1
- end
- end
- elseif command:sub(0,5)=="admin" and p[name].admin==true then
- message=command:sub(7)
- message=string.upper(message:sub(0,1))..message:sub(2)
- for k,v in pairs(tfm.get.room.playerList) do
- if message==k then
- ui.updateTextArea(1, "<p align='center'><b><font size='15' color='#ED67EA'>[~Moderation] "..message.." is now a moderator. Congrats!</font></b></p>", nil)
- p[message].admin=true
- end
- end
- end
- end
- function eventLoop(time,remaining)
- local IDList={}
- for id, object in pairs(tfm.get.room.objectList) do
- table.insert(IDList, id)
- end
- for i, id in pairs(IDList) do
- if others[id].summonobject==true and timestamplol[id]<os.time()-3000 then
- tfm.exec.removeObject(id)
- others[id].summonobject=false
- end
- end
- if numplayers<2 then
- one=true
- else
- one=false
- end
- if one==true then
- 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)
- timestamp=os.time()-4000
- elseif timestamp < os.time()-10000 and begin==false then
- timestamp=os.time()
- begin=true
- restart=false
- ui.updateTextArea(1, "<p align='center'><b><font size='30'>Let's Begin the Game! </font></b></p>", nil)
- for name,player in pairs(tfm.get.room.playerList) do
- tfm.exec.movePlayer(name,400,320,false,0,0,false)
- end
- elseif timestamp < os.time()-5000 and begin==false then
- local i=1
- local long=""
- local hname=""
- while i<=numplayers do
- hname=players[i]
- if p[hname].spectator==false and tfm.get.room.playerList[hname].isDead==false then
- long=long..tostring(players[i])..", "
- end
- i=i+1
- end
- ui.updateTextArea(1, "<p align='center'><b><font size='15'>The participating players are: "..string.sub(long,1,-3)..".</font></b></p>", nil)
- elseif timestamp < os.time()-3000 and begin==false and restart==true then
- ui.updateTextArea(1, "<p align='center'><b><font size='20'>Since everyone had their turn, I'll restart the game...", nil)
- end
- if begin==true then
- if timestamp < os.time()-3000 and start==true then
- tfm.exec.movePlayer(questioner,400,320,false,0,0,false)
- tfm.exec.movePlayer(answerer,400,320,false,0,0,false)
- answerer=""
- questioner=""
- local j=1
- local i=0
- while j<=numplayers do
- pname=players[j]
- if p[pname].questioners==false and tfm.get.room.playerList[pname].isDead==false and p[pname].spectator==false then
- i=i+1
- end
- j=j+1
- end
- if i>0 then
- eventTruthOrDare()
- else
- local j=1
- while j<=numplayers do
- local name=players[j]
- p[name].questioners=false
- j=j+1
- end
- restart=true
- timestamp=os.time()
- begin=false
- end
- end
- if choose==true and one==false then
- rand=math.random(1,numplayers)
- print(questioner)
- answerer=players[rand]
- print(answerer)
- print(p[answerer].spectator)
- if questioner==answerer or tfm.get.room.playerList[answerer].isDead or p[answerer].spectator==true or answerer==answererold then
- ui.updateTextArea(1, "<p align='center'><b><font size='30'>Randomizing...</font></b></p>", nil)
- tfm.exec.movePlayer(answerer,400,320,false,0,0,false)
- answerer=""
- else
- choose=false
- ui.updateTextArea(1, "<b><font size='15'>"..answerer.." is now the answerer! Waiting to pick truth or dare...</font></b>", nil)
- ui.addPopup(3,1,"You are the answerer! Do you want Truth? If No, you will choose Dare!",answerer,250,50,300,true)
- end
- elseif choosey==true and one==false then
- rand=math.random(1,numplayers)
- questioner=players[rand]
- print(questioner)
- print(p[questioner].questioners)
- print(p[questioner].spectator)
- if p[questioner].questioners==false and tfm.get.room.playerList[questioner].isDead==false and p[questioner].spectator==false then
- choosey=false
- p[questioner].questioners=true
- ui.updateTextArea(1, "<b><font size='15'>"..questioner.." is now the asker! Waiting to pick an answerer...</font></b>", nil)
- 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)
- else
- ui.updateTextArea(1, "<p align='center'><b><font size='30'>Randomizing...</font></b></p>", nil)
- tfm.exec.movePlayer(questioner,400,320,false,0,0,false)
- questioner=""
- end
- end
- if skip==true then
- ui.updateTextArea(1, "<p align='center'><b><font size='30'>Skipping turn...</font></b></p>", nil)
- tfm.exec.movePlayer(questioner,400,320,false,0,0,false)
- tfm.exec.movePlayer(answerer,400,320,false,0,0,false)
- answerer=""
- questioner=""
- if timestamp < os.time()-3000 then
- start=true
- skip=false
- end
- end
- tfm.exec.movePlayer(questioner,120,120,false,0,0,false)
- tfm.exec.movePlayer(answerer,680,120,false,0,0,false)
- end
- end
- function eventTruthOrDare()
- start=false
- ui.removeTextArea(2)
- ui.removeTextArea(3)
- choosey=true
- end
- function eventPopupAnswer(id, name, answer)
- if id==1 and name==questioner then
- if answer=="yes" then
- answererold=""
- choose=true
- elseif answer=="no" then
- ui.addPopup(2,2,"Who do you want to be the answerer?",questioner,250,50,300,true)
- end
- elseif id==2 and name==questioner then
- x=1
- found=false
- answer=string.upper(answer:sub(0,1))..answer:sub(2)
- while x<=numplayers do
- print(players[x])
- if answer==players[x] then
- answerer=answer
- if questioner==answerer or tfm.get.room.playerList[answerer].isDead or p[answerer].spectator==true then
- answerer=""
- found=false
- else
- ui.updateTextArea(1, "<b><font size='15'>"..answerer.." is now the answerer! Waiting to pick Truth or Dare...</font></b>", nil)
- 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)
- found=true
- end
- end
- x=x+1
- end
- if found==false then
- 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)
- end
- elseif id==3 and name==answerer then
- if answer=="yes" then
- ui.updateTextArea(1, "<b><font size='15'>"..answerer.." has picked Truth! Waiting for question from "..questioner.."...</font></b>", nil)
- 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)
- elseif answer=="no" then
- ui.updateTextArea(1, "<b><font size='15'>"..answerer.." has picked Dare! Waiting for a dare from "..questioner.."...</font></b>", nil)
- 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)
- end
- elseif id==4 and name==questioner then
- if answer=="yes" then
- question=truth[math.random(1,16)]
- ui.updateTextArea(1, "<b><font size='15'>"..questioner.." has randomed a Truth question! Waiting for "..answerer.." to respond...</font></b>", nil)
- ui.addTextArea(2,"<b><font size='20'>Truth: "..question.."</font></b>",nil,165,20,470,120,0x324650,0x212F36,0.8,true)
- ui.addPopup(8,2,"<b>Type your Truth answer below</b>",answerer,250,175,300,true)
- --need to ask if questioner is satisfied with answer
- elseif answer=="no" then
- ui.addPopup(6,2,"Type your Truth question below.",questioner,250,50,300,true)
- end
- elseif id==5 and name==questioner then
- if answer=="yes" then
- question=dare[math.random(1,17)]
- ui.updateTextArea(1, "<b><font size='15'>"..questioner.." has randomed a Dare question! Waiting for "..answerer.." to respond...</font></b>", nil)
- ui.addTextArea(2,"<b><font size='20'>Dare: "..question.."</font></b>",nil,165,20,470,120,0x324650,0x212F36,0.8,true)
- 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)
- elseif answer=="no" then
- ui.addPopup(7,2,"Type your Dare below.",questioner,250,50,300,true)
- end
- elseif id==6 and name==questioner then
- question=answer
- ui.updateTextArea(1, "<b><font size='15'>"..questioner.." has typed a Truth question! Waiting for "..answerer.." to respond...</font></b>", nil)
- ui.addTextArea(2,"<b><font size='20'>Truth: "..question.."</font></b>",nil,165,20,470,120,0x324650,0x212F36,0.8,true)
- ui.addPopup(8,2,"Type your Truth answer below",answerer,250,175,300,true)
- elseif id==7 and name==questioner then
- question=answer
- ui.updateTextArea(1, "<b><font size='15'>"..questioner.." has typed a Dare question! Waiting for "..answerer.." to respond...</font></b>", nil)
- ui.addTextArea(2,"<b><font size='15'>Dare: "..question.."</font></b>",nil,165,20,470,120,0x324650,0x212F36,0.8,true)
- 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)
- elseif id==8 and name==answerer then
- ans = answer
- ui.addTextArea(3,"<b><font size='20'>Answer: "..ans.."</font></b>",nil,165,140,470,120,0x324650,0x212F36,0.8,true)
- ui.updateTextArea(1, "<b><font size='15'>"..answerer.." has answered the question! Waiting for "..questioner.." to rate the answer</font></b>", nil)
- ui.addPopup(10,1,"<b><font size='15'>Are you satisfied with the answer?",questioner,250,50,300,true)
- elseif id==9 and name==answerer then
- if answer=="yes" then
- 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)
- ui.updateTextArea(1, "<b><font size='15'>"..answerer.." is a warrior! Starting new game...</font></b>", nil)
- timestamp=os.time()
- answerer=""
- questioner=""
- start=true
- for name,player in pairs(tfm.get.room.playerList) do
- tfm.exec.movePlayer(name,400,320,false,0,0,false)
- end
- elseif answer=="no" then
- ui.updateTextArea(1, "<b><font size='15'>"..answerer.." is a coward! Starting new game...</font></b>", nil)
- 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)
- timestamp=os.time()
- answerer=""
- questioner=""
- start=true
- for name,player in pairs(tfm.get.room.playerList) do
- tfm.exec.movePlayer(name,400,320,false,0,0,false)
- end
- end
- elseif id==10 and name==questioner then
- if answer=="yes" then
- ui.updateTextArea(1, "<b><font size='15'>"..questioner.." is a satisfied with the answer! Starting new game...</font></b>", nil)
- timestamp=os.time()
- answerer=""
- questioner=""
- start=true
- for name,player in pairs(tfm.get.room.playerList) do
- tfm.exec.movePlayer(name,400,320,false,0,0,false)
- end
- elseif answer=="no" then
- ui.updateTextArea(1, "<b><font size='15'>"..questioner.." is a not satisfied with the answer...:( Starting new game...</font></b>", nil)
- timestamp=os.time()
- answerer=""
- questioner=""
- start=true
- for name,player in pairs(tfm.get.room.playerList) do
- tfm.exec.movePlayer(name,400,320,false,0,0,false)
- end
- end
- end
- end
- function eventPlayerLeft(name)
- numplayers=numplayers-1
- ui.updateTextArea(1, "<p align='center'><b><font size='15'>"..name.." left the room... What a coward!</font></b></p>", nil)
- if questioner==name or answerer==name then
- timestamp=os.time()
- skip=true
- end
- for i=1,#players do
- if players[i]==name then table.remove(players,i)
- end
- end
- end
- function eventPlayerDied(name)
- if p[name].spectator==false then
- tfm.exec.respawnPlayer(name)
- end
- if p[name].ban==true then
- timestamp=os.time()
- skip=true
- end
- end
- function eventPlayerWon(playerName,timeElapsed)
- tfm.exec.respawnPlayer(playerName)
- end
- function eventSummoningEnd(playerName, objectType, xPosition, yPosition, angle, xSpeed, ySpeed, other)
- timestamplol[other.id]=os.time()
- others[other.id]={summonobject=true}
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement