Guest User

Untitled

a guest
Jan 15th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. local mouse = {
  2. [1] = {buttonX = 1, buttonY = 2, command = "print('Hi')"}
  3. }
  4. local function she()
  5. shell.run("shell")
  6. end
  7. local function getMouse()
  8. while true do
  9. event, p1, p2, p3 = os.pullEvent()
  10. if event == "click" then
  11. for k, v in ipairs(mouse) do
  12. if mouse[k].buttonX == p1 and mouse[k].buttonY == p2 then
  13. print("hi")
  14. end
  15. end
  16. end
  17. end
  18. end
  19. getMouse()
Add Comment
Please, Sign In to add comment