Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local p = peripheral
- local r = p.wrap("back")
- local old = 0.0
- while true do
- local stored_rf = r.getEnergyStored()
- local max_rf = 10000000
- local percent = (stored_rf / max_rf)* 100
- if old == percent then
- --gay
- else
- print(string.format("%.2f%%", percent))
- old = percent
- end
- if percent > 75 then
- r.setActive(false)
- elseif percent < 25 then
- r.setActive(true)
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement