Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- local success, data = turtle.inspect()
- if success then
- term.clear()
- term.setCursorPos(1,1)
- print(data.name)
- if data.name == "minecraft:gold_block" then
- print("ticket accepted")
- sleep(1)
- turtle.dig()
- sleep(.1)
- turtle.turnLeft()
- sleep(.1)
- turtle.turnLeft()
- sleep(.1)
- turtle.drop()
- sleep(1)
- turtle.turnRight()
- sleep(.1)
- turtle.turnRight()
- sleep(.1)
- redstone.setOutput("bottom", true)
- sleep(3.5)
- redstone.setOutput("bottom", false)
- os.reboot()
- elseif data.name == "minecraft:emerald_block" then
- term.clear()
- term.setCursorPos(1, 1)
- shell.run("dir")
- else
- print("block not accepted as ticket")
- sleep(1)
- turtle.dig()
- sleep(1)
- turtle.drop()
- sleep(1)
- os.reboot()
- end
- else
- sleep(1)
- term.clear()
- term.setCursorPos(1, 1)
- os.reboot()
- end
RAW Paste Data
Copied