Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m=peripheral.wrap("right")
- m.setBackgroundColor(colors.black)
- m.clear()
- function wt(x,y,t,c)
- m.setBackgroundColor(c) --use {colors.black} for c
- m.setCursorPos(x,y)
- m.write(t) --use {"your text here"} for t
- end
- function Touch()
- if mouseWidth > 1 and mouseWidth < 8 and mouseHeight == 2 then
- redstone.setOutput("right",true)
- elseif mouseWidth > 1 and mouseWidth < 8 and mouseHeight == 4 then
- redstone.setOutput("right",false)
- end
- end
- repeat
- event,p1,p2,p3 = os.pullEvent()
- if event=="monitor_touch" then
- mouseWidth = p2
- mouseHeight = p3
- Touch()
- end
- until event=="char" and p1==("x") --press x to exit
Add Comment
Please, Sign In to add comment