Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mouse = term.getMouse() -- Returns the mouse like peripheral.wrap returns the peripheral
- mouse.release() -- Releases the mouse from typing
- while true do
- x, y = mouse.getPos() -- Gets the mouse's X and Y
- if mouse.click() then -- Detects if the mouse is clicking
- term.setCursorPos(1,2)
- print("Your mouse is at "..x","..y")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement