Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local cube = peripheral.wrap("left")
- local monitor = peripheral.wrap("right")
- local max = cube.getMaxEnergy()
- monitor.setTextScale(2.5)
- while true do
- term.clear()
- term.setCursorPos(1,1)
- local current = cube.getEnergy()
- print(current)
- print(max)
- local percentage = current/max*100
- print(percentage)
- local writeout = math.floor(percentage) .. "%"
- print(writeout)
- monitor.clear()
- monitor.setCursorPos(1,1)
- monitor.write(writeout)
- sleep(3)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement