Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function eventHandler()
- event, param1, param2 = os.pullEvent()
- if event == "redstone" then
- for i=1,1575 do
- turtle.attack()
- sleep(0.1)
- end
- elseif event == "char" and param1 == "q" then
- print("exiting...")
- sleep(1)
- error("program closed")
- end
- end
- term.clear()
- term.setCursorPos(1,1)
- print("press button to grind, or Q to quit")
- while true do
- eventHandler()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement