Shadows_Player

Tank

Jan 7th, 2022
790
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.91 KB | None | 0 0
  1. local wmod = peripheral.wrap("top")
  2.  
  3. wmod.closeAll()
  4. wmod.open(2)
  5.  
  6.  
  7. term.clear()
  8. term.setTextColor(colors.white)
  9. term.setCursorPos(1,1)
  10. print("Liquid status:")
  11. local event, modemSide, senderChannel, replyChannel, message, senderDistance = os.pullEvent("modem_message")
  12.  
  13. while true do
  14.  while redstone.testBundledInput("front", colors.orange) == true do
  15.   if message["water"] > 30 then
  16.    term.setTextColor(colors.white)
  17.    term.setCursorPos(1,2)
  18.    print("Water :")
  19.    term.setTextColor(colors.green)
  20.    term.setCursorPos(8,2)
  21.    print( message["water"] .."%")
  22.   end
  23.   if message["water"] < 30 then
  24.    term.setTextColor(colors.white)
  25.    term.setCursorPos(1,2)
  26.    print("Water :")
  27.    term.setCursorPos(8,2)
  28.    term.setTextColor(colors.red)
  29.    print(message["water"] .."%")
  30.   end
  31. end
  32.  while redstone.testBundledInput("front", colors.orange) == false do
  33.  term.clear()
  34.  shell.run("menu")
  35.  end
  36. end
Advertisement
Add Comment
Please, Sign In to add comment