Atom888

XynSoft 1.0 - Logon

Dec 4th, 2017
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.14 KB | None | 0 0
  1. os.loadAPI("/XynSoft/System/SystemCC/xs")
  2. function Logon()
  3.    xs.FS(colors.white,false)
  4.    image = paintutils.loadImage("/XynSoft/System/Libraries/Logon/LogonBackgroundImage")
  5.    paintutils.drawImage(image,1,1)
  6.    xs.F("h",5,colors.gray)
  7.    xs.F("h",6,colors.gray)
  8.    xs.F("h",7,colors.gray)
  9.    xs.F("h",8,colors.gray)
  10.    xs.F("h",9,colors.gray)
  11.    xs.F("h",10,colors.gray)
  12.    xs.F("h",11,colors.gray)
  13.    file = fs.open("/XynSoft/System/Libraries/Logon/LogonDataPath")
  14.    path = file.readAll()
  15.    file.close()
  16.    file = fs.open(path,"r")
  17.    vdata = file.readAll()
  18.    file.close()
  19.    user = vdata[username]
  20.    xs.Write("Login to"..user.."..",17,6,colors.gray,colors.white)
  21.    pass = vdata[password]
  22.    a = xs.Input("Password - ","o",9,8,colors.gray,colors.white)
  23.    if a == pass then
  24.       file = fs.open("/XynSoft/Data/User/ThemeSettings")
  25.       cdata = file.readAll()
  26.       file.close()
  27.       color = cdata[color]
  28.       Write("Welcome"..user.."!",17,10,colors.gray,color)
  29.       sleep(1)
  30.       shell.run("Desktop")
  31.    else
  32.       Write("Incorrect!",17,10,colors.gray,colors.lightGray)
  33.       sleep(1)
  34.       Logon()
  35.    end
  36. end
  37. Logon()
Advertisement
Add Comment
Please, Sign In to add comment