Ledger Nano X - The secure hardware wallet
SHARE
TWEET

TurbineONOFF

todolodo Apr 7th, 2020 120 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local turbine = peripheral.wrap("back")
  2. if turbine.getConnected then
  3.   print("Connected to turbine!")
  4.   if redstone.getInput("bottom",true) then
  5.     print("[ON] Engaging coils!")
  6.     turbine.setInductorEngaged(true)
  7.     turbine.setActive(true)
  8.   else
  9.     print("[OFF] Disengaging coils!")
  10.     turbine.setInductorEngaged(false)
  11.     turbine.setActive(false)
  12.   end
  13. else
  14.   print("Error, no turbine connected!")
  15. end
  16. while true do
  17.   local event = os.pullEvent("redstone")
  18.   if redstone.getInput("bottom",true) then
  19.     print("[ON] Engaging coils!")
  20.     turbine.setInductorEngaged(true)
  21.     turbine.setActive(true)
  22.   else
  23.     print("[OFF] Disengaging coils!")
  24.     turbine.setInductorEngaged(false)
  25.     turbine.setActive(false)
  26.   end
  27. 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