Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --MouseClick
- function click(x1,y1,x2,y2)
- local event,button,x,y = os.pullEvent()
- if event == "mouse_click" then
- if x1 == "get" then
- return x,y
- elseif x1 == nil or y1 == nil then
- return true
- else
- x1 = tonumber(x1)
- y1 = tonumber(y1)
- x2 = tonumber(x2)
- y2 = tonumber(y2)
- if x > x1 - 1 and x < x2 + 1 and y > y1 - 1 and y < y2 + 1 then
- return true
- else
- return false
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement