Advertisement
LeviathanV

Stuff

Jan 1st, 2023
1,356
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.34 KB | None | 0 0
  1. while true do
  2.  
  3. local function plant(num)
  4.     for i = 1,num do
  5.     turtle.select(1)
  6.     turtle.place()
  7.     end
  8. end
  9.  
  10. local function grow()
  11.     if turtle.detect() then
  12.     turtle.select(2)
  13.     turtle.place()
  14.     else
  15.         sleep(1)
  16.     end
  17. end
  18.  
  19.  
  20. local function check()
  21.     if not turtle.detect() then
  22.     plant(1)
  23.     else
  24.         sleep(1)
  25.     end
  26. end
  27.  
  28. check()
  29. grow()
  30.  
  31. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement