Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local robot = require("robot")
- local sides = require("sides")
- local component = require("component")
- local inv = component.inventory_controller
- local rs = component.redstone
- function swingTiCo(x)
- for i=1, x do
- os.sleep(0.05)
- robot.swing()
- end
- end
- function swing(x)
- for i=1, x do
- rs.setOutput(sides.top, 255)
- os.sleep(0.05)
- rs.setOutput(sides.top, 0)
- robot.swing()
- end
- end
- function reload()
- inv.equip()
- inv.dropIntoSlot(0, 1)
- os.sleep(120)
- inv.suckFromSlot(0, 1)
- inv.equip()
- end
- while true do
- swing(1000)
- reload()
- end
Add Comment
Please, Sign In to add comment