Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --DoorOpener
- tabID = multishell.getCurrent()
- multishell.setTitle(tabID,"DoorOpener")
- local reactor
- reactor = peripheral.wrap("top")
- function Toggle()
- status = rs.testBundledInput("bottom" ,colors.gray)
- if status == true then
- rs.setBundledOutput("bottom" ,colors.subtract(rs.getBundledOutput("bottom"), colors.gray))
- else
- rs.setBundledOutput("bottom", colors.combine(rs.getBundledOutput("bottom"), colors.gray))
- end
- end
- while true do
- if disk.isPresent("drive_0") == true then
- sleep(2)
- ident = disk.getID("drive_0")
- if ident == 5 then
- disk.eject("drive_0")
- Toggle()
- else
- disk.eject("drive_0")
- end
- else
- sleep(1)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement