Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local run=true
- local attack = false
- peripheral.wrap("left")
- rednet.open("left")
- while run==true do
- while attack == false do
- local senderId, message, protocol = rednet.receive("start")
- attack==true
- end
- while attack == true do
- turtle.attack()
- local senderId, message, protocol = rednet.receive("stop",1)
- if message=="stop" then
- attack==false
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement