Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- names = {" maarten"," thomas"," alexander"," shana"," the end"}
- while true do
- local moni = peripheral.wrap("top")
- itemslot = 1
- moni.clear()
- moni.setCursorPos(1,1)
- for i = 1,table.getn(names) do
- moni.setCursorPos(1,i)
- moni.write(names[i])
- end
- event, side, xPos, yPos = os.pullEvent("monitor_touch")
- print("y"..yPos)
- print("x"..xPos)
- if yPos <= table.getn(names)+1 then
- rs.setAnalogOutput("bottom",8-yPos)
- moni.setCursorPos(1,yPos)
- moni.write("*")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement