View difference between Paste ID: Ga6yY2HB and NmAwBqQc
SHOW: | | - or go back to the newest paste.
1
local count
2-
local m = peripheral.wrap("top")
2+
3
if fs.exists("count") == true then
4-
function mon(count)
4+
5-
 m.clear()
5+
6-
 m.setCursorPos(2,2)
6+
7-
 m.write("UU Count: ")
7+
8-
 m.write(count)
8+
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-
 count = 1
17+
18
  if count % 6 == 0 then
19
   redstone.setOutput("left", true)
20
   sleep(1)
21-
 if redstone.getInput("bottom") == true then
21+
   rs.setOutput("left", false)
22
  end
23
 end
24
 sleep(0)
25
end