Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- term.setCursorPos(1,1)
- print("Name of installer?")
- inna = read()
- print("creating file...")
- h = fs.open(inna,"w")
- h.writeLine("local function ininstaller(code,name)")
- h.writeLine("local response = http.get(")
- h.writeLine(" 'http://pastebin.com/raw/'..code")
- h.writeLine(" ")
- h.writeLine(")")
- h.writeLine(" if response then")
- h.writeLine("")
- h.writeLine(" local sResponse = response.readAll()")
- h.writeLine(" response.close()")
- h.writeLine(" h = fs.open(name,'w')")
- h.writeLine(" h.write(sResponse)")
- h.writeLine(" h.close()")
- h.writeLine(" return sResponse")
- h.writeLine(" else")
- h.writeLine(" print( 'Failed.' )")
- h.writeLine(" end")
- h.writeLine("end")
- h.close()
- while true do
- term.clear()
- term.setCursorPos(1,1)
- print("Name of Program? enter finish for close installercreator")
- name = read()
- if name == "finish" == true then
- print("rebooting...")
- h = fs.open(inna,"a")
- h.writeLine("print('Installed succes full') ")
- os.reboot()
- elseif name == "finish" == false then
- print("Pastebin code?")
- name2 = read()
- print("adding to installer")
- sleep(0.2)
- h = fs.open(inna,"a")
- downloading = "ininstaller('"..name2.."','"..name.."')"
- ifex = "if not fs.exists('"..name.."') == true then"
- h.writeLine("term.setCursorPos(1,1)")
- h.writeLine("term.clear()")
- h.writeLine('print("Installing")')
- h.writeLine(ifex)
- h.writeLine(downloading)
- h.writeLine("sleep(2)")
- h.writeLine("end")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement