hello i know i have posted a few topics but this is the best one, it will kill things in front of it and it will easily pass gravel.
pastebin : http://pastebin.com/2yM8YLkQ

cond = 1
while cond ~= 50 do
turtle.dig()
turtle.digUp()
turtle.digDown()
turtle.forward()
turtle.attack()
cond = cond + 1
end
if cond == 50 then
turtle.turnLeft()
turtle.turnLeft()
end
while cond ~= 100 do
turtle.forward()
turtle.dig()
turtle.attack()
cond = cond + 1
end