Advertisement
cobra_tomtrein

Untitled

Oct 22nd, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. term.setTextColor(colors.black)
  2. term.setBackgroundColor(colors.black)
  3. term.clear()
  4. local image = paintutils.loadImage("menupic")
  5. paintutils.drawImage(image, 13, 5)
  6.  
  7. local user = ""
  8.  
  9. while true do
  10. local event, button, x, y = os.pullEvent( "mouse_click" )
  11. if y==8 and x>13 and x<31 then
  12. paintutils.drawLine(14,8,30,8,colors.lightBlue)
  13. term.setBackgroundColor(colors.lightBlue)
  14. term.setCursorPos(14, 8)
  15. user = read()
  16. end
  17. if y==11 and x>13 and x<31 then
  18. paintutils.drawLine(14,11,30,11,colors.lightBlue)
  19. term.setBackgroundColor(colors.lightBlue)
  20. term.setCursorPos(14, 11)
  21. pass = read("*")
  22. end
  23. if y==13 and x>13+18 and x<31+18 then
  24. term.setCursorPos(14, 13)
  25. if user=="tomtrein" and pass=="password" then
  26. term.clear()
  27. else
  28. term.setBackgroundColor(colors.blue)
  29. term.setTextColor(colors.red)
  30. term.write("incorrect")
  31. term.setTextColor(colors.black)
  32. end
  33. end
  34. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement