Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("ocs/apis/sensor")
- prox = sensor.wrap("back")
- while true do
- local target = prox.getTargets()
- for tarName, _ in pairs(target) do
- --fetch the detailed information table for the current target.
- local details = prox.getTargetDetails(tarName)
- if details ~= nil then
- if details.Riding ~= nil then
- if details.Riding.Name == "Creeper" then
- while rs.testBundledInput("left", colors.green) == false do
- print("Wait")
- rs.setBundledOutput("right", colors.white)
- os.sleep(0.5)
- end
- rs.setBundledOutput("right",0)
- os.reboot()
- break
- end
- else
- break
- end
- else
- break
- end
- end
- os.sleep(0.5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement