Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function login( u, p )
- maxU = 1
- us = {}
- us[1] = "Retsonine"
- ps = {}
- ps[1] = "password"
- for i = 1, maxU do
- if string.lower(u) == string.lower(us[i]) and p == ps[i] then
- versionHead()
- print( "Welcome, " .. us[i] .. "." )
- return
- end
- end
- if term.isColour() then term.setTextColour( colours.red ) end
- print( "\nIncorrect login." )
- if term.isColour() then term.setTextColour( colours.white ) end
- print( "Rebooting..." )
- os.sleep(2)
- os.reboot()
- end
- function versionHead()
- term.clear()
- term.setCursorPos(1,1)
- print( "Rets0S v0.0.1" )
- end
- versionHead()
- print( "Username:" )
- username = io.read()
- print( "\nPassword:" )
- password = read("*")
- login( username, password )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement