Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tUp = false
- local tDown = false
- local tFront = false
- while true do
- tUp = false
- tDown = false
- tFront = false
- if turtle.detectUp(Sand) then
- while turtle.detectUp(Sand) do
- turtle.digUp()
- tUp = true;
- end
- elseif turtle.detectDown(Sand) then
- while turtle.detectDown(Sand) do
- turtle.digDown()
- tDown = true;
- end
- elseif turtle.detect(Sand) then
- while turtle.detect(Sand) do
- turtle.dig()
- tFront = true;
- end
- end
- if tUp == true then
- turtle.up()
- elseif tDown == true then
- turle.down()
- elseif tFront == true then
- turtle.forward()
- else
- turtle.turnLeft()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement