Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("maxintosh/mAPI")
- --Style
- paintutils.drawFilledBox(44,1,51,6,colors.white)
- term.setCursorPos(44,1)
- term.setTextColor(colors.purple)
- write("Settings")
- term.setTextColor(colors[colText])
- term.setCursorPos(44,2)
- write("Design")
- term.setCursorPos(44,3)
- write("Bios")
- term.setCursorPos(44,4)
- write(currentUser)
- term.setCursorPos(44,5)
- print("System")
- term.setCursorPos(44,6)
- write("Programs")
- --Testing for click
- while true do
- event,n,x,y=os.pullEvent("mouse_click")
- --Settings
- if x>43 and y==1 then
- shell.run("maxintosh/desktop")
- error()
- end
- --Bios
- if x>43 and y==3 then
- term.setTextColor(colors.purple)
- term.setCursorPos(1,19)
- textutils.slowPrint("..entering Bios..")
- term.setCursorPos(1,18)
- sleep(0.5)
- term.setBackgroundColor(colors.black)
- term.clear()
- shell.run("clear")
- print("--Bios--")
- print()
- term.setTextColor(colors.white)
- error()
- end
- --System
- if x>43 and y==5 then
- mAPI.drawWindow(2,2,colWind)
- term.setBackgroundColor(colors[colWind])
- term.setTextColor(colors[colText])
- term.setCursorPos(4,4)
- write("reinstall Maxintosh")
- term.setCursorPos(4,7)
- write("uninstall Maxintosh")
- term.setCursorPos(4,11)
- write("change ServerID:")
- term.setCursorPos(44,3)
- print("ID:",os.getComputerID())
- while true do
- event,n,x,y=os.pullEvent("mouse_click")
- if x==50 and y==2 then
- shell.run("maxintosh/desktop")
- error()
- end
- if y==4 and x<25 and x>3 then
- term.setCursorPos(1,1)
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.white)
- shell.run("clear")
- fs.delete("startup")
- shell.run("pastebin run rMhPLm9D")
- error()
- end
- if y==7 and x<25 and x>3 then
- fs.delete("startup")
- fs.delete("maxintosh")
- os.reboot()
- end
- if y==11 then
- term.setCursorPos(21,11)
- newID=read()
- file=fs.open("maxintosh/serverID","w")
- file.writeLine(newID)
- file.close()
- end
- end
- end
- --Account
- if x>43 and y==4 then
- mAPI.drawWindow(2,2,colWind)
- term.setBackgroundColor(colors[colWind])
- term.setTextColor(colors[colText])
- term.setCursorPos(22,6)
- write("Logout")
- term.setCursorPos(6,10)
- write("change Password")
- term.setCursorPos(6,14)
- write("delete Account")
- while true do
- event,n,x,y=os.pullEvent("mouse_click")
- if x==50 and y==2 then
- shell.run("maxintosh/desktop")
- error()
- end
- if x>22 and x<29 and y==6 then
- shell.run("maxintosh/login")
- error()
- end
- if x>5 and x<23 and y==14 then
- fs.delete("maxintosh/logindata/"..currentUser)
- fs.delete("maxintosh/"..currentUser)
- os.shutdown()
- error()
- end
- if x>5 and x<22 and y==10 then
- term.setCursorPos(26,10)
- write("new password: ")
- newPassword=read()
- file=fs.open("maxintosh/logindata/"..currentUser,"w")
- file.writeLine(newPassword)
- file.close()
- paintutils.drawBox(26,10,47,10,colors[colWindow])
- term.setCursorPos(26,10)
- print(" changed to ",newPassword)
- end
- end
- end
- --Design
- if x>43 and y==2 then
- mAPI.drawWindow(2,2,colWind)
- term.setBackgroundColor(colors[colWind])
- term.setTextColor(colors[colText])
- term.setCursorPos(4,5)
- write("Desktop Color")
- term.setCursorPos(4,8)
- write("Window Color")
- term.setCursorPos(4,11)
- write("Text Color")
- term.setCursorPos(4,14)
- write("change Desktop Picture")
- while true do
- event,n,x,y=os.pullEvent("mouse_click")
- if x==50 and y==2 then
- shell.run("maxintosh/desktop")
- error()
- end
- if x>3 and x<20 and y==5 then
- term.setCursorPos(19,5)
- write("new Color: ")
- newColor=read()
- paintutils.drawBox(19,5,48,5,colors[colWindow])
- file=fs.open("maxintosh/"..currentUser.."/color","w")
- file.writeLine(newColor)
- file.writeLine(colWind)
- file.writeLine(colText)
- col=newColor
- file.close()
- end
- if x>3 and x<20 and y==8 then
- term.setCursorPos(18,8)
- write("new Color: ")
- newColor=read()
- paintutils.drawBox(18,8,48,8,colors[colWindow])
- file=fs.open("maxintosh/"..currentUser.."/color","w")
- file.writeLine(col)
- file.writeLine(newColor)
- file.writeLine(colText)
- colWind=newColor
- file.close()
- end
- if x>3 and x<20 and y==11 then
- term.setCursorPos(16,11)
- write("new Color: ")
- newColor=read()
- paintutils.drawBox(16,11,48,11,colors[colWindow])
- file=fs.open("maxintosh/"..currentUser.."/color","w")
- file.writeLine(col)
- file.writeLine(colWind)
- file.writeLine(newColor)
- colText=newColor
- file.close()
- end
- if x>3 and x<20 and y==14 then
- term.setCursorPos(1,1)
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.white)
- term.clear()
- shell.run("paint maxintosh/"..currentUser.."/desktopBackground")
- shell.run("maxintosh/desktop")
- end
- end
- end
- --PROGRAMS
- if x>43 and y==6 then
- mAPI.drawWindow(2,2,colWind)
- Programs={}
- yToP={}
- Programs=fs.list("maxintosh/"..currentUser.."/programs/")
- max=table.getn(Programs)
- term.setTextColor(colors[colText])
- term.setBackgroundColor(colors[colWind])
- term.setCursorPos(31,4)
- if not(colWind=="green") then term.setTextColor(colors.green) end
- write("create new Program")
- term.setTextColor(colors[colText])
- for i=1,max do
- term.setCursorPos(4,((i*2)+2))
- write(Programs[i])
- yToP[(i*2)+2]=Programs[i]
- end
- while true do
- event,n,x,y=os.pullEvent("mouse_click")
- if x==50 and y==2 then
- shell.run("maxintosh/desktop")
- error()
- end
- if x>30 and y==4 then
- term.setCursorPos(29,6)
- write("name: ")
- PName=read()
- shell.run("edit maxintosh/"..currentUser.."/programs/"..PName)
- shell.run("maxintosh/desktop")
- error()
- end
- if not(yToP[y]==nil) and x<20 then
- name=y
- if n==1 then
- shell.run("maxintosh/"..currentUser.."/programs/"..yToP[name])
- shell.run("maxintosh/desktop")
- error()
- elseif n==2 then
- mAPI.drawWindow(5,4,colWin)
- term.setTextColor(colors[colText])
- term.setBackgroundColor(colors[colWind])
- term.setCursorPos(7,6)
- write(yToP[name])
- term.setCursorPos(22,10)
- write("uninstall")
- term.setCursorPos(23,12)
- write("rename")
- term.setCursorPos(24,8)
- write("edit")
- while true do
- event,n,x,y=os.pullEvent("mouse_click")
- if y==4 then
- shell.run("maxintosh/desktop")
- error()
- end
- if y==8 then
- shell.run(" edit maxintosh/"..currentUser.."/programs/"..yToP[name])
- shell.run("maxintosh/desktop")
- error()
- end
- if y==10 then
- fs.delete("maxintosh/"..currentUser.."/programs/"..yToP[name])
- shell.run("maxintosh/desktop")
- error()
- end
- if y==12 then
- term.setCursorPos(22,13)
- n=read()
- fs.copy("maxintosh/"..currentUser.."/programs/"..yToP[name],"maxintosh/"..currentUser.."/programs/"..n)
- fs.delete("maxintosh/"..currentUser.."/programs/"..yToP[name])
- paintutils.drawBox(22,13,40,13,colors[colWind])
- end
- end
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment