Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local monitor = peripheral.wrap("left")
- local count = 4
- term.write("Click to Stop")
- while(redstone.getInput("bottom") == false) do
- monitor.setCursorPos(1,1)
- monitor.write("Select the amount of MFSUs")
- monitor.setCursorPos(1,2)
- monitor.write("- " .. count .. " +")
- monitor.setCursorPos(1,3)
- monitor.write("")
- monitor.setCursorPos(1,5)
- monitor.write(" CRAFT! ")
- local event, side, xPos, yPos = os.pullEvent()
- if(event == "monitor_touch") then
- if(yPos == 2 ) then
- if(xPos < 8)then
- if(count > 1)then
- count = count - 1
- end
- end
- end
- if(yPos == 2) then
- if(xPos > 11)then
- if(count < 10)then
- count = count + 1
- end
- end
- end
- if(yPos == 5) then
- while(count > 1) do
- redstone.setOutput("back",true)
- sleep(1)
- redstone.setOutput("back",false)
- sleep(150)
- count = count - 1
- end
- redstone.setOutput("back",true)
- sleep(1)
- redstone.setOutput("back",false)
- end
- monitor.setTextScale(1)
- monitor.clear()
- elseif(event == "mouse_click") then
- term.clear()
- term.setCursorPos(1,1)
- term.write("XPOS:" .. xPos .. " YPOS:" .. yPos .. " SIDE:" .. side)
- sleep(3)
- return
- end
- sleep(0.01)
- end
Advertisement
Add Comment
Please, Sign In to add comment