Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Function to clear the turtle's screen
- local function clearScreen()
- term.clear()
- term.setCursorPos(1, 1)
- end
- -- Function to display the fuel level on the turtle's screen
- local function displayFuelLevel()
- clearScreen()
- local fuelLevel = turtle.getFuelLevel()
- if fuelLevel == "unlimited" then
- print("Fuel Level: Unlimited")
- elseif fuelLevel ~= nil then
- print("Fuel Level: " .. fuelLevel)
- else
- print("Fuel Level: Unknown")
- end
- end
- displayFuelLevel()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement