Advertisement
Guest User

server.lua

a guest
Dec 6th, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.61 KB | None | 0 0
  1. rednet.close("right")
  2. rednet.open("right")
  3. rednet.broadcast("lol")
  4. print("XD")
  5. local id, message = rednet.receive()
  6. print("Do you want to accept this pc to control you? (Type accept if you want that)")
  7. bool = read()
  8. if bool == "accept" then
  9.     rednet.send(id, "accepted")
  10.     else
  11.         term.clear()
  12.         term.setCursorPos(1,1)
  13.         --break
  14. end
  15. while true do
  16.     local id, message = rednet.receive()
  17.     if message == "rtrue" then
  18.         redstone.setOutput("left", true)
  19.     else if message == "rfalse" then
  20.         redstone.setOutput("left", false)
  21.     end
  22.     end
  23.     sleep(1/10)    
  24. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement