Advertisement
Batponney

ApiConnect

Jun 17th, 2016
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. term.clear() -- Clears the screen
  2. term.setCursorPos(1, 1)
  3. username = {"Batponney","cleyms"}
  4. password = {"Root","Admin"}
  5. i = paintutils.loadImage("interfaceConnect")
  6. paintutils.drawImage(i, 1, 1)
  7. term.setCusorPos(16,2)
  8. term.setBackgroudColor(colors.orange)
  9. term.setTextColor(colors.black)
  10. term.setCusorPos(5,5)
  11. term.setBackgroudColor(colors.black)
  12. term.setTextColor(colors.orange)
  13. term.write("Batponney")
  14. term.setCursorPos(21,5)
  15. term.write("<-users->")
  16. term.setCursorPos(42,5)
  17. term.write("cleyms")
  18. term.setCursorPos(1,8)
  19. term.write("------------------------------------------------------------")
  20. while true do
  21. local event, button, x, y = os.pullEvent( "mouse_click" )
  22. if x >= 3 and x <= 16 and y >= 4 and y <= 6 then
  23. user == "Batponney"
  24. term.setCursorPos(21,10)
  25. textutils.slowWrite("Password:")
  26. term.setCursorPos(23,11)
  27. pass = read('#')
  28. break
  29. elseif x >= 38 and x <= 50 and y >= 4 and y <= 6 then
  30. user == "cleyms"
  31. term.setCursorPos(21,10)
  32. textutils.slowWrite("Password:")
  33. term.setCursorPos(22,11)
  34. pass = read('#')
  35. break
  36.  
  37. end
  38.  
  39. for i=1, #username do -- Starts a loop
  40. if user == username[i] and pass == password[i] then
  41. access = true
  42. else access = false
  43. end
  44. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement