Advertisement
Unbox101

airshipThrustController

Apr 28th, 2022 (edited)
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.47 KB | None | 0 0
  1. local arg1 = ...
  2. local direction = arg1
  3.  
  4. rednet.open("right")
  5.  
  6. local redstoneOutput = false
  7. if direction == nil then
  8.     error("You must launch this program with a direction argument! Perferably using startup.lua!")
  9. end
  10. while true do
  11.     id, message, password = rednet.receive("u", 0.1)
  12.     redstoneOutput = false
  13.     if id == 1 then
  14.         if message == direction then
  15.             redstoneOutput = true
  16.         end
  17.     end
  18.     redstone.setOutput("back", redstoneOutput)
  19. end
  20.  
  21. rednet.close("right")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement