Pandana

ClutchReceiver

Jan 25th, 2021 (edited)
784
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. shutdown_output_side = "top"
  2. shutdown_output = true
  3. shutdown_message = "shutdown_lift"
  4. startup_message = "startup_lift"
  5. rednet_side = "back"
  6.  
  7. rednet.open(rednet_side)
  8.  
  9. while true do
  10.    
  11.     id, message = rednet.receive()
  12.    
  13.     if message == shutdown_message then
  14.        
  15.         rs.setOutput(shutdown_output_side, shutdown_output)
  16.        
  17.     elseif message == startup_message then
  18.    
  19.         rs.setOutput(shutdown_output_side, ~shutdown_output)    
  20.    
  21.     end
  22.    
  23. end
RAW Paste Data