View difference between Paste ID: 2Rq6zu01 and S8Ws4sdd
SHOW: | | - or go back to the newest paste.
1-
local i=1
1+
while true do
2
   if not redstone.getAnalogInput("back") > 13 then
3-
while not redstone.getInput("right") do
3+
           redstone.setOutput("back", true)
4-
os.queueEvent("randomEvent")
4+
   end
5-
os.pullEvent()
5+
   if redstone.getAnalogInput("back") < 14 then
6-
redstone.setOutput("back", true)
6+
	  redstone.setOutput("back", false)
7-
sleep(.1)	
7+
   end
8-
redstone.setOutput("back", false)
8+
9-
sleep(.1)
9+
   sleep(.4)
10
end