Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function mine(d)
- if (d=="stop") then
- redstone.setOutput("bottom",false)
- redstone.setOutput("front",true)
- elseif (d=="start") then
- redstone.setOutput("bottom",true)
- redstone.setOutput("front",false)
- end
- end
- while true do
- event = os.pullEvent()
- if event == "redstone" then
- if redstone.getInput("back")==true then
- print("Back redstone")
- mine("stop")
- sleep(5)
- for i=1,8 do
- print(i)
- redstone.setOutput("left",true)
- sleep(0.9)
- redstone.setOutput("left",false)
- sleep(0.9)
- end
- mine("start")
- elseif redstone.getInput("top")==true then
- print("Top redstone")
- mine("stop")
- sleep(5)
- a=true
- while a==true do
- ev = os.pullEvent()
- if ev=="redstone" then
- if redstone.getInput("top")==false then
- a=false
- end
- end
- end
- mine("start")
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment