Advertisement
MigasRocha

UraniumChest Counter/Computer ID:19

Dec 26th, 2024
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.42 KB | Gaming | 0 0
  1. while true do
  2.  
  3. mon = peripheral.find("monitor")
  4. chest = peripheral.wrap("top")
  5. items = chest.list()
  6. totalCount = 0
  7. for slot, item in pairs(items) do
  8.     totalCount = totalCount + (item.count or 0)
  9. end
  10.  
  11. -- Contagem no Monitor
  12. mon.clear()
  13. mon.setCursorPos(1,1)
  14. mon.setTextColor(colors.lime)
  15. mon.write("Uranium:")
  16. mon.setCursorPos(1,3)
  17. mon.setTextColor(colors.white)
  18. mon.write(totalCount.."/576")
  19. sleep(0.3)
  20. end
  21.  
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement