Advertisement
Mr_jack

installer

Jan 23rd, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.14 KB | None | 0 0
  1. --Gui---------------
  2. Xs,Ys = term.getSize()
  3. term.setBackgroundColor(colors.white)
  4. term.setTextColor(colors.black)
  5. paintutils.drawPixel(1,1,colors.white)
  6. term.clear()
  7. text = "Welcome to mr_jack"
  8. term.setCursorPos(Xs/2-#text/2,Ys/2-1)
  9. print(text)
  10. text = "installer"
  11. term.setCursorPos(Xs/2-#text/2,Ys/2)
  12. print(text)
  13. term.setCursorPos(Xs/2-5,Ys/2+2)
  14. term.setBackgroundColor(colors.green)
  15. term.setTextColor(colors.black)
  16. write("Install API")
  17. term.setCursorPos(Xs,1)
  18. term.setTextColor(colors.red)
  19. term.setBackgroundColor(colors.white)
  20. print("x")
  21. --Other--------------
  22. while true do
  23. e,key,x,y = os.pullEvent()
  24. term.setCursorPos(1,1)
  25. rXa = math.floor(Xs/2-5)
  26. rXb = math.floor(Xs/2+5)
  27. rY = math.floor(Ys/2+2)
  28. if e == "mouse_click" and rXa <= x and rXb >= x and y == rY then
  29.   term.setCursorPos(1,1)
  30.   term.setBackgroundColor(colors.white)
  31.   term.setTextColor(colors.black)
  32.   paintutils.drawPixel(1,1,colors.black)
  33.   term.clear()
  34.   shell.run("pastebin get 0Nmm13K0 System/API/sysapi")
  35.   term.clear()
  36.   break
  37. elseif e == "mouse_click" and x == Xs and y == 1 then
  38.   paintutils.drawPixel(1,1,colors.black)
  39.   term.clear()
  40.   break
  41. end
  42. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement