SHARE
TWEET

startup

a guest Jul 24th, 2019 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. password = "test"
  2. remoteId = 2
  3. rednet.open("top")
  4. local status = false
  5. redstone.setOutput("front",false)
  6.  
  7. while true do
  8.   id, message = rednet.receive()
  9.   if id == remoteId and message == password then
  10.     if status == false then
  11.       status = true
  12.       redstone.setOutput("front",true)
  13.     elseif status == true then
  14.       status = false
  15.       redstone.setOutput("front",false)
  16.     end
  17.   elseif id == remoteId and message == "ping" then
  18.     sleep(.1)
  19.     rednet.send(remoteId,status)
  20.   end
  21. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top