Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- term.setCursorPos(1,1)
- print("Check for Internet Connection...")
- Connection = false
- function invisiblepastebin(code,name)
- local response = http.get(
- "http://pastebin.com/raw/"..code
- )
- if response then
- local sResponse = response.readAll()
- response.close()
- h = fs.open(name,"w")
- h.write(sResponse)
- h.close()
- Connection = true
- return sResponse
- else
- Connection = false
- end
- end
- invisiblepastebin("0K6gN8u8","asudixjasdiojasjdojosjiaojij")
- fs.delete("asudixjasdiojasjdojosjiaojij")
- if Connection then
- sleep(0.3)
- print("Internet Connection: YES")
- print("Checking for updates...")
- fs.delete("updateFILE")
- invisiblepastebin("0K6gN8u8","updateFILE")
- local h = fs.open("updateFILE","r")
- text = h.readAll()
- h.close()
- if text == "false" then
- print("No Update Found")
- else
- fs.delete("updateFILE")
- print("Updateing...")
- invisiblepastebin(text,"UPDATEFILE123")
- shell.run("UPDATEFILE123")
- fs.delete("UPDATEFILE123")
- fs.delete("updateFILE")
- end
- else
- sleep(0.3)
- print("Can not update no Internet Connection ")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement