Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local fs = require("filesystem")
- local gpu = require("component").gpu
- local unicode = require("unicode")
- local s = {
- unicode.char(8730),
- unicode.char(9587),
- unicode.char(8681)
- }
- print("Downloading files paths...")
- assert(loadfile("/bin/pastebin.lua"))("get", "-f", "FUFz0Wmg", "/lib/timlessPaths.lua")
- local paths = require("timlessPaths")
- print("Downloading ExtraUtilits library...")
- assert(loadfile("/bin/pastebin.lua"))("get", "-f", paths.ExtraUtilits, "/lib/ExtraUtilits.lua")
- local EU = require("ExtraUtilits")
- pclose = false
- edit = {mode = true}
- mkdir = {mode = true}
- edit.func = function()
- if edit.mode then
- buttons[2][6] = 0xff0000
- buttons[2][7] = s[2]
- edit.mode = false
- elseif not edit.mode then
- buttons[2][6] = 0x00ff00
- buttons[2][7] = s[1]
- edit.mode = true
- end
- EU.draw(buttons)
- end
- mkdir.func = function()
- if mkdir.mode then
- buttons[3][6] = 0xff0000
- buttons[3][7] = s[2]
- mkdir.mode = false
- elseif not mkdir.mode then
- buttons[3][6] = 0x00ff00
- buttons[3][7] = s[1]
- mkdir.mode = true
- end
- EU.draw(buttons)
- end
- function close()
- buttons.close = true
- pclose = true
- end
- function download()
- buttons.close = true
- end
- function main()
- gpu.setBackground(0x323232)
- gpu.fill(60, 20, 40, 20, " ")
- gpu.set(63, 21, "/bin/edit.lua")
- gpu.set(63, 22, "/bin/mkdir.lua")
- gpu.setForeground(0xff8f40)
- gpu.set(60, 20, "AdvancedOS V1.1")
- gpu.set(62, 21, "|")
- gpu.set(62, 22, "|")
- buttons = {
- {99, 20, 1, 1, 0x323232, 0xff0000, s[2], close},
- {61, 21, 1, 1, 0x323232, 0x00ff00, s[1], edit.func},
- {61, 22, 1, 1, 0x323232, 0x00ff00, s[1], mkdir.func},
- {99, 39, 1, 1, 0x323232, 0x00ff00, s[3], download}
- }
- EU.draw(buttons)
- EU.buttonPress(buttons)
- if not pclose then
- if edit.mode then
- gpu.setBackground(0xff0000)
- gpu.set(98, 21, " ")
- gpu.set(98, 22, " ")
- gpu.setBackground(0x323232)
- gpu.setForeground(0xff8f40)
- gpu.set(60, 39, "Downloading edit.lua...")
- os.sleep(1)
- assert(loadfile("/bin/pastebin.lua"))("get", "-f", paths.edit, "/bin/edit.lua")
- gpu.setBackground(0x00ff00)
- gpu.set(98, 21, " ")
- end
- if mkdir.mode then
- gpu.setBackground(0x323232)
- gpu.setForeground(0xff8f40)
- gpu.set(60, 39, "Downloading mkdir.lua...")
- os.sleep(1)
- assert(loadfile("/bin/pastebin.lua"))("get", "-f", paths.mkdir, "/bin/mkdir.lua")
- gpu.setBackground(0x00ff00)
- gpu.set(98, 22, " ")
- end
- end
- end
- EU.screenBackup(main)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement