Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("/XynSoft/System/SystemCC/xs")
- xs.FS(colors.black)
- sleep(0.1)
- xs.FS(colors.gray)
- sleep(0.1)
- xs.FS(colors.lightGray)
- sleep(0.1)
- xs.FS(colors.white,false)
- xs.DrawTitleBar("XynSoft",colors.gray,2,"Setup")
- xs.Write("Username - ",7,8,colors.white,colors.black)
- xs.Write("Password - ",7,10,colors.white,colors.black)
- xs.Write(" Label - ",7,12,colors.white,colors.black)
- user = xs.Input("Username - ",7,8,colors.white,colors.black)
- pass = xs.Input("Password - ",7,10,colors.white,colors.black)
- labl = xs.Input(" Label - ",7,12,colors.white,colors.black)
- fs.open("/XynSoft/Data/User/Username","w")
- fs.close()
- fs.open("/XynSoft/Data/User/Password","w")
- fs.close()
- fs.open("/XynSoft/Data/Label","w")
- fs.close()
- xs.FS(colors.white,false,nil,nil)
- xs.DrawTitleBar("XynSoft",
- function UpdateColor(colr)
- local col = colr
- xs.F(h,1,col)
- xs.F(h,2,col)
- xs.F(h,3,col)
- xs.Write("XynSoft 0.0",3,2,col,colors.white)
- xs.Write("Setup",15,2,col,colors.lightGray)
- xs.Button("Next",5,16,colr,colr)
- syscol = colr
- end
- function UC()
- local col = syscol
- xs.FS(colors.white,false)
- xs.DrawTitleBar("XynSoft",colors.gray,2,"Setup")
- end
- c1 = 7
- c2 = 9
- xs.Write(" ",16,8,colors.white,colors.yellow)
- xs.Write(" ",18,8,colors.white,colors.orange)
- xs.Write(" ",20,8,colors.white,colors.red)
- xs.Write(" ",22,8,colors.white,colors.lime)
- xs.Write(" ",24,8,colors.white,colors.green)
- xs.Write(" ",26,8,colors.white,colors.lightBlue)
- xs.Write(" ",28,8,colors.white,colors.blue)
- xs.Write(" ",30,8,colors.white,colors.pink)
- xs.Write(" ",32,8,colors.white,colors.magenta)
- xs.Write(" ",34,8,colors.white,colors.brown)
- a = true
- while a do
- if xs.ShellEventAdv(mouse_click,1,16,17,8,8) then
- UpdateColor(colors.yellow)
- CP(1,c1)
- term.clearLine()
- CP(1,c2)
- term.clearLine()
- xs.Write("__",16,c1,colors.white,colors.lightGray)
- xs.Write("__",16,c2,colors.white,colors.lightGray)
- elseif xs.ShellEventAdv(mouse_click,1,18,19,8,8) then
- UpdateColor(colors.orange)
- CP(1,c1)
- term.clearLine()
- CP(1,c2)
- term.clearLine()
- xs.Write("__",18,c1,colors.white,colors.lightGray)
- xs.Write("__",18,c2,colors.white,colors.lightGray)
- elseif xs.ShellEventAdv(mouse_click,1,20,21,8,8) then
- UpdateColor(colors.red)
- CP(1,c1)
- term.clearLine()
- CP(1,c2)
- term.clearLine()
- xs.Write("__",20,c1,colors.white,colors.lightGray)
- xs.Write("__",20,c2,colors.white,colors.lightGray)
- elseif xs.ShellEventAdv(mouse_click,1,22,23,8,8) then
- UpdateColor(colors.lime)
- CP(1,c1)
- term.clearLine()
- CP(1,c2)
- term.clearLine()
- xs.Write("__",22,c1,colors.white,colors.lightGray)
- xs.Write("__",22,c2,colors.white,colors.lightGray)
- elseif xs.ShellEventAdv(mouse_click,1,24,25,8,8) then
- UpdateColor(colors.green)
- CP(1,c1)
- term.clearLine()
- CP(1,c2)
- term.clearLine()
- xs.Write("__",24,c1,colors.white,colors.lightGray)
- xs.Write("__",24,c2,colors.white,colors.lightGray)
- elseif xs.ShellEventAdv(mouse_click,1,26,27,8,8) then
- UpdateColor(colors.lightBlue)
- CP(1,c1)
- term.clearLine()
- CP(1,c2)
- term.clearLine()
- xs.Write("__",26,c1,colors.white,colors.lightGray)
- xs.Write("__",26,c2,colors.white,colors.lightGray)
- elseif xs.ShellEventAdv(mouse_click,1,28,29,8,8) then
- UpdateColor(colors.blue)
- CP(1,c1)
- term.clearLine()
- CP(1,c2)
- term.clearLine()
- xs.Write("__",28,c1,colors.white,colors.lightGray)
- xs.Write("__",28,c2,colors.white,colors.lightGray)
- elseif xs.ShellEventAdv(mouse_click,1,30,31,8,8) then
- UpdateColor(colors.pink)
- CP(1,c1)
- term.clearLine()
- CP(1,c2)
- term.clearLine()
- xs.Write("__",30,c1,colors.white,colors.lightGray)
- xs.Write("__",30,c2,colors.white,colors.lightGray)
- elseif xs.ShellEventAdv(mouse_click,1,32,33,8,8) then
- UpdateColor(colors.magenta)
- CP(1,c1)
- term.clearLine()
- CP(1,c2)
- term.clearLine()
- xs.Write("__",32,c1,colors.white,colors.lightGray)
- xs.Write("__",32,c2,colors.white,colors.lightGray)
- elseif xs.ShellEventAdv(mouse_click,1,34,35,8,8) then
- UpdateColor(colors.brown)
- CP(1,c1)
- term.clearLine()
- CP(1,c2)
- term.clearLine()
- xs.Write("__",34,c1,colors.white,colors.lightGray)
- xs.Write("__",34,c2,colors.white,colors.lightGray)
- end
- if xs.ShellEventAdv(mouse_click,1,5,10,15,17) then
- a = false
- end
- end
- xs.FS(colors.white,false)
- UC()
- xs.Write("Advanced Options",16,6,colors.white,colors.gray)
- xs.Write("Login",7,9,colors.white,colors.lightGray)
- xs.Write("Auto Update",7,11,colors.white,colors.lightGray)
- adv_2 = true
- adv_1 = true
- function UpdateA()
- adv_1 = not adv_1
- if adv_1 then
- xs.Write(" ",19,9,syscol,colors.white)
- xs.Write(" ",21,9,colors.gray,colors.white)
- else
- xs.Write(" ",19,9,gray,colors.white)
- xs.Write(" ",20,9,colors.lightGray,colors.white)
- end
- end
- function UpdateB()
- adv_2 = not adv_2
- if adv_2 then
- xs.Write(" ",19,11,syscol,colors.white)
- xs.Write(" ",21,11,colors.gray,colors.white)
- else
- xs.Write(" ",19,11,gray,colors.white)
- xs.Write(" ",20,11,colors.lightGray,colors.white)
- end
- end
- xs.Button("Next",38,17,syscol,colors.white)
- b = true
- while b do
- if xs.ShellEventAdv("mouse_click",1,37,16,43,18) then
- b = false
- end
- if xs.ShellEventAdv("mouse_click",1,19,9,21,9) then
- UpdateA()
- end
- if xs.ShellEventAdv("mouse_click",1,19,11,21,11) then
- UpdateB()
- end
- end
- xs.FS(colors.white,false)
- xs.DrawTitleBar("XynSoft",colors.gray,2,"Setup")
- UC()
- xs.Button("Configurate",18,9,syscol,colors.white)
- c = true
- function A()
- xs.GlobalWrite("/XynSoft/Data/User/Username",user)
- end
- function B()
- xs.GlobalWrite("/XynSoft/Data/User/Password",pass)
- end
- function C()
- xs.GlobalWrite("/XynSoft/Data/Label",labl)
- end
- function D()
- xs.GlobalWrite("/XynSoft/Data/User/Color",syscol)
- end
- function E()
- local u = fs.open("/XynSoft/Data/AdvSettings","w")
- u.writeLine(adv_1)
- u.writeLine(adv_2)
- fs.close(u)
- end
- function End()
- Config()
- xs.FS(colors.white,false)
- UC()
- xs.Write("Your computer got succesfully configurated...",15,9,colors.white,colors.lightGray)
- xs.Write("Welcome, "..user.."!",20,11,colors.white,colors.gray)
- xs.Button("Restart",23,17,syscol,colors.white)
- c = true
- while c do
- if xs.ShellEventAdv("mouse_click",1,22,16,31,18) then
- c = false
- end
- end
- os.reboot()
- end
- function Config()
- xs.FS(colors.white)
- UC()
- xs.Write(" ",7,colors.lightGray,colors.white)
- sleep(0.5)
- A()
- xs.Write(" ",7,syscol,colors.white)
- sleep(1)
- B()
- xs.Write(" ",12,syscol,colors.white)
- sleep(0.3)
- C()
- xs.Write(" ",17,syscol,colors.white)
- sleep(0.5)
- D()
- xs.Write(" ",22,syscol,colors.white)
- sleep(0.8)
- E()
- xs.Write(" ",27,syscol,colors.white)
- sleep(1)
- End()
- end
- End()
Add Comment
Please, Sign In to add comment