Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.setTextColor(colors.black)
- term.setBackgroundColor(colors.black)
- term.clear()
- local image = paintutils.loadImage("menupic")
- paintutils.drawImage(image, 13, 5)
- local user = ""
- while true do
- local event, button, x, y = os.pullEvent( "mouse_click" )
- if y==8 and x>13 and x<31 then
- paintutils.drawLine(14,8,30,8,colors.lightBlue)
- term.setBackgroundColor(colors.lightBlue)
- term.setCursorPos(14, 8)
- user = read()
- end
- if y==11 and x>13 and x<31 then
- paintutils.drawLine(14,11,30,11,colors.lightBlue)
- term.setBackgroundColor(colors.lightBlue)
- term.setCursorPos(14, 11)
- pass = read("*")
- end
- if y==13 and x>13+18 and x<31+18 then
- term.setCursorPos(14, 13)
- if user=="tomtrein" and pass=="password" then
- term.clear()
- else
- term.setBackgroundColor(colors.blue)
- term.setTextColor(colors.red)
- term.write("incorrect")
- term.setTextColor(colors.black)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement