Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local bEnd = false;
- print( "press <SPACE> to stop attacking." )
- parallel.waitForAny(
- function()
- while not bEnd do
- local event, key = os.pullEvent("key");
- if key ~= 1 then
- bEnd = true;
- print("Aborting...");
- end
- end
- end,
- function()
- while not bEnd do
- turtle.attack()
- sleep(0.25)
- end
- end
- )
Advertisement
Add Comment
Please, Sign In to add comment