arismoko

buddy test

Sep 27th, 2021 (edited)
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local detector = peripheral.find("playerDetector")
  2. local chat = peripheral.find("chatBox")
  3. local players = detector.getPlayersInRange(50)
  4.  
  5.     for k,v in pairs(players) do
  6.     if v == "D3tra"
  7.         then chat.sendMessage("hi ari!", "buddytron-3000")
  8.     elseif v == "D3tra" and "roachinator"
  9.         then chat.sendMessage("hi rochelle! hi ari! ", "buddytron-3000")
  10.     elseif v == "CDSabo"
  11.         then chat.sendMessage("what are you doing here?", "buddytron-3000")
  12.     elseif v == "Scorpion2561"
  13.         then chat.sendMessage("brandon, how are you doing?", "buddytron-3000")
  14.     elseif v == "Jesse"
  15.         then chat.sendMessage("jesse... hope u dont got the ender-flu.", "buddytron-3000")
  16.     elseif v == "ItzzzCazzz"
  17.         then chat.sendMessage("long time no see cazaroni", "buddytron-3000")
  18.             sleep(1)
  19. end
  20. end
  21. local pos = detector.getPlayerPos(Scorpion2124)
  22. while true do
  23.   local players = detector.getPlayersInRange(50)
  24.   event, username, message = os.pullEvent("chat") -- Will be fired when someone sends a chat message
  25.   print(username.. " just wrote: ".. message) -- Prints "*User* just wrote: *Message*"
  26.     if message == "hi" then chat.sendMessage("hey!", "buddytron-3000")
  27.         elseif message == "?" then chat.sendMessage("i'm buddytron-3000!", "buddytron-3000")
  28.         elseif message == "who are you" then chat.sendMessage("i'm buddytron-3000!", "buddytron-3000")
  29.         elseif message == "who are you?" then chat.sendMessage("i'm buddytron-3000!", "buddytron-3000")
  30.         elseif message == "how are you doing?" then chat.sendMessage("i'm good what about you?", "buddytron-3000")
  31.         elseif message == "good" then chat.sendMessage("awesome", "buddytron-3000")
  32.         elseif message == "where is brandon?" then chat.sendMessage("pos.x, pos,y, pos.z")
  33.     end
  34.  
  35.  
  36.        
  37.     end
  38.  
Add Comment
Please, Sign In to add comment