Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function clear()
- term.setTextColor(colors.white)
- term.setBackgroundColor(colors.gray)
- term.clear()
- term.setCursorPos(1, 1)
- term.setBackgroundColor(colors.blue)
- term.clearLine()
- term.setCursorPos(2, 1)
- write("JakeOS Settings")
- term.setCursorPos(2, 3)
- term.setBackgroundColor(colors.gray)
- end
- x, y = term.getSize()
- loadX = x - 1
- loadY = y - 1
- while true do
- clear()
- paintutils.drawFilledBox(2, 3, loadX, loadY, colors.cyan)
- term.setCursorPos(3, 4)
- term.setBackgroundColor(colors.cyan)
- write("Settings:")
- term.setCursorPos(3, 6)
- write("[1] Os Version")
- term.setCursorPos(3, 7)
- write("[2] Os Name")
- term.setCursorPos(3, 8)
- write("[3] Autorun Program")
- term.setCursorPos(3, 9)
- write("[4] Continue To OS")
- term.setCursorPos(4, 11)
- write("Only Press the keys if you want to add these.")
- evt, key = os.pullEvent("key")
- if key == 2 then
- clear()
- write("Version: ")
- oem = read()
- end
- if key == 3 then
- clear()
- write("Name: ")
- name = read()
- end
- if key == 4 then
- clear()
- write("Autorun: ")
- autorun = read()
- end
- if key == 5 then
- f = fs.open("/JakeOS/sys.config","w")
- if oem == nil then
- else
- f.writeLine("oem = '"..oem.."'")
- end
- if autorun == nil then
- else
- f.writeLine("autorun = '"..autorun.."'")
- end
- if name == nil then
- else
- f.writeLine("name = '"..name.."'")
- end
- os.reboot()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement