jamtholee

Torch Layer

Mar 29th, 2013
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local count
  2.  
  3. if fs.exists("count") == true then
  4.  local a = fs.open("count", "r")
  5.  count = a.readLine()
  6.  a.close()
  7.  mon(count)
  8. else
  9.  count = 0
  10. end
  11.  
  12. while true do
  13.  if redstone.getInput("back") == true then
  14.   count = count + 1
  15.   local b = fs.open("count", "w")
  16.   b.write(count)
  17.   b.close()
  18.   if count % 6 == 0 then
  19.    redstone.setOutput("left", true)
  20.    sleep(1)
  21.    rs.setOutput("left", false)
  22.   end
  23.  end
  24.  sleep(0)
  25. end
Advertisement
Add Comment
Please, Sign In to add comment