Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local gearshift = "right"
- local clutch = "top"
- local trigger = "bottom"
- local enable = "left"
- local timing = 0.95
- local delay = 0.1
- local upDir = false
- reader = peripheral.wrap("blockReader_0")
- data = reader.getBlockData()
- function homing()
- if data == nil then return true end
- if not data.id == "create:sticker" then return true end
- return false
- end
- while homing() do
- redstone.setOutput(gearshift,not upDir)
- redstone.setOutput(clutch,true)
- sleep(timing)
- redstone.setOutput(clutch,false)
- sleep(0.5)
- data = reader.getBlockData()
- end
- print("down!!!")
- redstone.setOutput(gearshift,not upDir)
- redstone.setOutput(clutch,true)
- sleep(timing)
- redstone.setOutput(clutch,false)
- sleep(1)
- redstone.setOutput(gearshift,upDir)
- redstone.setOutput(clutch,true)
- sleep(timing)
- redstone.setOutput(clutch,false)
- while true do
- while not redstone.getInput(enable) do
- sleep(1)
- end
- sleep(delay)
- redstone.setOutput(trigger,true)
- sleep(delay)
- redstone.setOutput(trigger,false)
- redstone.setOutput(gearshift,upDir)
- redstone.setOutput(clutch,true)
- sleep(timing)
- redstone.setOutput(clutch,false)
- sleep(delay)
- redstone.setOutput(trigger,true)
- sleep(delay)
- redstone.setOutput(trigger,false)
- redstone.setOutput(gearshift,not upDir)
- redstone.setOutput(clutch,true)
- sleep(timing)
- redstone.setOutput(clutch,false)
- end
- print("completed!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement