Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- term.setCursorPos(17,6)
- print("LukyOS - Instalace")
- sleep(0.8)
- -- Kontrola barevnosti PC
- if not term.isColor() then
- term.setCursorPos(10,8)
- print("LukyOS vyzaduje Advanced Computer.")
- term.setCursorPos(13,9)
- print("Toto neni Advanced Computer.")
- sleep(4)
- shell.run("clear")
- return
- end
- function get(code,fileName)
- local response = http.get("https://pastebin.com/raw/"..textutils.urlEncode(code))
- if response then
- local responseText = response.readAll()
- response.close()
- newFile = fs.open(fileName,"w")
- newFile.write(responseText)
- newFile.close()
- end
- end
- term.clear()
- term.setCursorPos(11,8)
- print("Stahovani instalacniho souboru.")
- get("5U4uqkj6","API")
- get("W07fj9Lx","instal.lua")
- if fs.exists("API") then
- if fs.exists("instal.lua") then
- term.setCursorPos(14,9)
- print("Spoustim instalacni soubor")
- fs.delete(shell.getRunningProgram())
- sleep(1)
- shell.run("instal.lua")
- else
- term.setCursorPos(13,9)
- print("Instalacni soubor nenalezen!")
- sleep(1)
- end
- else
- term.setCursorPos(13,9)
- print(" API data nenalezeny! ")
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement