Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local monitor = peripheral.wrap("front")
- local redstoneOutput = "back"
- local function drawScreen()
- term.redirect(monitor)
- monitor.clear()
- monitor.setBackgroundColor(colors.lightGray)
- monitor.setTextScale(0.9)
- paintutils.drawBox(2, 4, 13, 8, colors.red)
- monitor.setCursorPos(4, 6)
- monitor.setBackgroundColor(colors.blue)
- monitor.setTextColor(colors.white)
- monitor.write("[ Call ]")
- end
- drawScreen()
- while true do
- local event, side, x, y = os.pullEvent("monitor_touch")
- if x >= 1 and x <= 10 and y >= 4 and y <= 6 then
- redstone.setOutput(redstoneOutput, true)
- sleep(2)
- redstone.setOutput(redstoneOutput, false)
- end
- drawScreen()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement