Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local chatBox = peripheral.find("chatBox")
- while true do
- local event, username, message = os.pullEvent("chat")
- if message:find("joined the game") then
- print("Player joined: " .. username)
- chatBox.sendMessage("hello " .. username)
- -- Optionally: trigger redstone here too
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment