Quant

R Getter

Jul 2nd, 2015
250
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local e = require("event")
  2. local c = require("component")
  3. local s = require("sides")
  4. local r = c.redstone
  5. local l = 0
  6. local t = 15
  7. function f()
  8. t=3
  9. if r.getInput(s.left)>0 then l = l+10^(r.getInput(s.left)-1)
  10. end;end;
  11. e.listen("redstone_changed",f)
  12. while t>0 do os.sleep(1) t = t - 1
  13. end;
  14. e.ignore("redstone_changed",f)
  15. print(l)
RAW Paste Data