Sirshark10

Libturtle

May 4th, 2017
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. oldF = _G.turtle.forward
  2. oldB = _G.turtle.back
  3. oldU = _G.turtle.up
  4. oldD = _G.turtle.down
  5. oldR = _g.turtle.refuel
  6. local function lab()
  7.   os.setComputerLabel("Matts Turtle | ".. turtle.getFuelLevel())
  8. end
  9. _G.turtle.forward = function()
  10.   oldF()
  11.   return lab()  
  12. end
  13.  
  14. _G.turtle.back = function()
  15.   oldB()
  16.   return lab()
  17. end
  18.  
  19. _G.turtle.up = function()
  20.   oldU()
  21.   return lab()
  22. end
  23.  
  24. _G.turtle.down = function()
  25.   oldD()
  26.   return lab()
  27. end
  28.  
  29. _G.turtle.refuel = function()
  30.     oldR()
  31.     return lab()
  32. end
Add Comment
Please, Sign In to add comment