local tunnelDepth = 24 local tunnels = 3 for tunnel = 1, tunnels do for i = 1, tunnelDepth do if turtle.detect() then turtle.dig() end turtle.forward() if turtle.detectDown() then turtle.digDown() end if turtle.detectUp() then turtle.digUp() end end for j = 1, tunnelDepth do turtle.back() end turtle.turnLeft() turtle.forward() turtle.turnRight() end