Barnet

Chatbot3000

Jun 16th, 2021 (edited)
10
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. chat = peripheral.wrap("back")
  2. detector = peripheral.wrap("bottom")
  3.  
  4. function SendMessage(s, target)
  5.   if target ~= nil then
  6.     write("-> " .. target .. ": ")
  7.     chat.sendMessageToPlayer(s, target)
  8.   else
  9.     chat.sendMessage(s)
  10.   end
  11.   print(s)
  12. end
  13.  
  14. player = ""
  15. sleepTime = arg[1]
  16. if sleepTime == nil then
  17.   sleepTime = 1
  18. else
  19.   sleepTime = tonumber(sleepTime)
  20. end
  21.  
  22. blackNames = {}
  23. blacklist = fs.open(shell.dir() .. "/blacklist", "r")
  24. if blacklist == nil then
  25.   blacklist = fs.open(shell.dir() .. "/blacklist", "w")  
  26.   blacklist.close()
  27. else
  28.   while true do
  29.     name = blacklist.readLine()
  30.     if name == nil or name == "" then
  31.       blacklist.close()
  32.       break
  33.     else
  34.       blackNames[name] = true      
  35.     end
  36.   end
  37. end
  38.  
  39. while player == "" do
  40.   players = detector.getPlayersInRange(10000)
  41.   if players ~= nil then
  42.     for i = 1, table.maxn(players), 1 do
  43.       if not blackNames[players[i]] then
  44.         player = players[i]
  45.         break
  46.       end
  47.     end
  48.   end
  49.   sleep(1)
  50. end
  51.  
  52. sleep(sleepTime)
  53. SendMessage("<Herobrine> I see you, " .. player .. ".", player)
  54. sleep(sleepTime)
  55. SendMessage("<Herobrine> I am coming for you.", player)
  56. sleep(sleepTime)
  57. SendMessage("<Herobrine> I am close.", player)
  58. sleep(sleepTime)
  59. SendMessage("<Herobrine> Can you see me?", player)
  60.  
  61. os.startTimer(sleepTime * 2)
  62. while true do
  63.   event, playername, message = os.pullEvent()
  64.   if event == "timer" then
  65.     SendMessage("<Herobrine> The silent type... I see.", player)
  66.     break
  67.   elseif playername == player then
  68.     message = string.lower(message)
  69.     sleep(1)
  70.     if string.find(message, "yes") ~= nil then
  71.       SendMessage("<Herobrine> I know you are lying.", player)
  72.       break
  73.     elseif string.find(message, "no") ~= nil then
  74.       SendMessage("<Herobrine> Good.", player)
  75.       break
  76.     else
  77.       SendMessage("<Herobrine> A simple 'yes' or 'no' would suffice.", player)
  78.     end
  79.   end
  80. end
  81.  
  82. sleep(sleepTime)
  83. SendMessage("<Herobrine> " .. player .. ".", player)
  84. sleep(1)
  85. SendMessage("<Herobrine> You", player)
  86. sleep(1)
  87. SendMessage("<Herobrine> will", player)
  88. sleep(1)
  89. SendMessage("<Herobrine> die", player)
  90. sleep(1)
  91. SendMessage("<Herobrine> NOW!", player)
  92. sleep(sleepTime)
  93. SendMessage("<Herobrine> ...", player)
  94. sleep(sleepTime)
  95. SendMessage("<Herobrine> something is wrong..", player)
  96. sleep(sleepTime)
  97. SendMessage("<Bakabrine> OOPSIE WOOPSIE!! Uwu I make a fucky wucky!! A wittle fucko boingo! I am wowking VEWY HAWD to fix this! UwU", player)
  98. sleep(4)
  99. SendMessage("War nur'n Prank lol", player)
  100. sleep(1)
  101. SendMessage("Aber eine Sache muss ich noch machen.", player)
  102. sleep(2)
  103. SendMessage("<"..player.."> Ich finde furry porn schon irgendwie nice.")
  104. sleep(2)
  105. SendMessage("So. Das war's.", player)
  106.  
  107. blacklist = fs.open(shell.dir() .. "/blacklist", "a")
  108. blacklist.writeLine(player)
  109. blacklist.close()
RAW Paste Data