Advertisement
jaklsfjlsak

护盾红石开关

Jul 11th, 2023
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.34 KB | None | 0 0
  1. local shield = peripheral.find("warpdriveForceFieldProjector")
  2. local state = true
  3. while true do
  4.     os.sleep(0.5)
  5.     if os.pullEvent("redstone") then
  6.         if state == true then
  7.             shield.enable(true)
  8.             state = false
  9.         else
  10.             shield.enable(false)
  11.             state = true
  12.         end
  13.     end
  14. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement