Advertisement
Guest User

startup.lua

a guest
Jun 7th, 2021
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.18 KB | None | 0 0
  1. local s = "back"
  2. local o = peripheral.wrap(s)
  3.  
  4. while true do
  5.     local l = o.getEnergyStored() / o.getEnergyCapacity()
  6.     print(l)
  7.     rs.setOutput(s, l < 0.8)
  8.     sleep(0.5)
  9. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement