Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local detector = peripheral.find("playerDetector")
- local chat = peripheral.find("chatBox")
- local players = detector.getPlayersInRange(50)
- for k,v in pairs(players) do
- if v == "D3tra"
- then chat.sendMessage("hi ari!", "buddytron-3000")
- elseif v == "D3tra" and "roachinator"
- then chat.sendMessage("hi rochelle! hi ari! ", "buddytron-3000")
- elseif v == "CDSabo"
- then chat.sendMessage("what are you doing here?", "buddytron-3000")
- elseif v == "Scorpion2561"
- then chat.sendMessage("brandon, how are you doing?", "buddytron-3000")
- elseif v == "Jesse"
- then chat.sendMessage("jesse... hope u dont got the ender-flu.", "buddytron-3000")
- elseif v == "ItzzzCazzz"
- then chat.sendMessage("long time no see cazaroni", "buddytron-3000")
- sleep(1)
- end
- end
- local pos = detector.getPlayerPos(Scorpion2124)
- while true do
- local players = detector.getPlayersInRange(50)
- event, username, message = os.pullEvent("chat") -- Will be fired when someone sends a chat message
- print(username.. " just wrote: ".. message) -- Prints "*User* just wrote: *Message*"
- if message == "hi" then chat.sendMessage("hey!", "buddytron-3000")
- elseif message == "?" then chat.sendMessage("i'm buddytron-3000!", "buddytron-3000")
- elseif message == "who are you" then chat.sendMessage("i'm buddytron-3000!", "buddytron-3000")
- elseif message == "who are you?" then chat.sendMessage("i'm buddytron-3000!", "buddytron-3000")
- elseif message == "how are you doing?" then chat.sendMessage("i'm good what about you?", "buddytron-3000")
- elseif message == "good" then chat.sendMessage("awesome", "buddytron-3000")
- elseif message == "where is brandon?" then chat.sendMessage("pos.x, pos,y, pos.z")
- end
- end
Add Comment
Please, Sign In to add comment