Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- wait till redstone event, then attack
- function detect()
- os.pullEvent("redstone")
- while redstone.getInput(side) do
- turtle.attack()
- sleep(0.5)
- end
- end
- -- ---------- Running programm ----------
- -- Set params
- side = "back"
- -- repeat loop and never stop
- repeat
- result, err = pcall(detect)
- if not result then
- print("Horrible nasty stuff happened...")
- print(err)
- print("Whatever happened... The killing needs to resume!")
- end
- until false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement