Overjoy06

Red Room Tortures

Sep 16th, 2020
941
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. t=0
  2.  oldTime=os.time()
  3.   tfm.exec.disableAutoShaman(true)
  4.    tfm.exec.disableAfkDeath(true)
  5.     tfm.exec.disableAutoNewGame(true)
  6.      tfm.exec.newGame("@7588958")
  7.  
  8.    function eventNewGame()
  9.     for name in next, tfm.get.room.playerList do
  10.      tfm.exec.setPlayerScore(name, 0, false)
  11.     end
  12.      end
  13.  
  14.      players = {}
  15.     for name, data in next, tfm.get.room.playerList do
  16.    table.insert(players, name)
  17.   end
  18.  randomPlayer = players[math.random(1,#players)]
  19. tfm.exec.movePlayer(randomPlayer,400,380,false,0,50,false)
  20.  
  21. tfm.exec.setUIMapName("<font color='#98E2EB'>"..randomPlayer.."<font color='#2E72CB'> Is the chosen player who would be tortured for this day!")
  22.  
  23. function eventLoop(currentTime,timeRemaining)
  24. t=t+1
  25.  
  26. if t==7 then
  27.   ui.addTextArea(1,"<font size='15px'>Game starts in 5 seconds!",n,285,185,350,250,0x0000000,0x000000,9,true)
  28.  ui.removeTextArea(1,randomPlayer)
  29. end
  30.  
  31.  if t==17 then
  32.   ui.removeTextArea(1,n)
  33.    ui.addTextArea(2,"<a href='event:wat'><font size='15px'>Click me!</a>",n,355,185,150,250,0x000000,0x000000,9,true)
  34.   ui.removeTextArea(2,randomPlayer)
  35.  end
  36. end
  37.  
  38. function eventTextAreaCallback(id,name,evt)
  39.   if evt=="wat" then
  40.  tfm.exec.setPlayerScore(name, 1, true)
  41. end
  42.  
  43. if t==37 then
  44.  ui.removeTextArea(2,n)
  45. end
  46.  
  47. if t==37 then
  48.  local max
  49.   for playerName, playerData in next, tfm.get.room.playerList do
  50.    local points
  51.     if tfm.get.room.playerList[max] then
  52.      points = tfm.get.room.playerList[max].score
  53.       else
  54.        points = -1
  55.       end
  56.      if playerData.score > points then
  57.     max = playerName
  58.    end
  59.   ui.addTextArea(3, "<a href='event:commands'>?", max, 7, 26, 12, 20, 0x324650, 0x000000, 1, true)
  60.  ui.removeTextArea(3,randomPlayer)
  61. end
  62.  
  63.  function eventTextAreaCallback(id, n, evt)
  64.   if evt == "commands" then
  65.    ui.addTextArea(4, "<p align='center'> Commands :\n !kill - kills the player.\n!respawn - kills the player.\n!shaman - shamans the player.", max, 7, 26, 437, 164, 0x324650, 0x000000, 1, true)
  66.     ui.removeTextArea(4,randomPlayer)
  67.    end
  68.   end
  69.  end
  70. end
RAW Paste Data