daily pastebin goal
39%
SHARE
TWEET

light

a guest Mar 24th, 2019 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -------------------------
  2. --        Lights       --
  3. -------------------------
  4. --       Functions     --
  5. -------------------------
  6. function clear()
  7.   term.clear()
  8.   term.setCursorPos(1,1)
  9. end
  10. function click()
  11.   event, p1, x, y =os.pullEvent(mouse_click)
  12. end
  13. function arrow()
  14.   term.setCursorPos(25,20)
  15.   term.write("->")
  16.   term.setCursorPos(1,1)
  17. end
  18.  
  19. -------------------------
  20. --         Main        --
  21. -------------------------
  22. while true do
  23.   clear()
  24.   arrow()
  25.   print("Lights")
  26.   click()
  27.   if y == 20 and x == 26 then
  28.     shell.run("desktop")
  29.     y = 0
  30.     x = 0
  31.   end
  32. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top