Advertisement
Guest User

ifthen

a guest
Jun 26th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.52 KB | None | 0 0
  1. print("Hello World!")
  2. local x = 6
  3. local y = 6
  4. print("Variablex: "..x)
  5. print("variabley: "..y)
  6.  
  7. if x>5 or y>5 then
  8.    print("One Is Greater!")
  9. else
  10.    print("Neither Is Greater!")
  11. end      
  12.  
  13. if x>5 then
  14.    print("Greater!")
  15.    --print("I said FIVE!")
  16. elseif x<5 then
  17.    print("Lesser!")
  18. else
  19.    print("Equal!")
  20.    --print("I said NOT FIVE!")  
  21. end
  22.  
  23. print("We're done")
  24.  
  25. if turtle.forward() then
  26.    print("Moving Forward")
  27. else
  28.    print("Stuck - MINING!")
  29.    turtle.dig()
  30.    turtle.forward()
  31. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement