--[[ Some Variables ]] local host = "mcseb.net16.net" -- Domain local path = "download.php" -- Path to splitting script local script = '' local current = 0 local part = 1 local data = "" local vip = false local ready = false local scriptName = "" local downloading = false -- [[ End of variables ]] function Download() if isDone(0) then PrintChat("Downloading...") LoadEncryptedWebScript("http://puu.sh/2Gcv0",true) end end function isDone(cu) if current == cu and downloading == false then return true end return false end function OnTick() Download() if ready then ready = false GetAsyncWebResult(host,path..'?url='..script..'&part='..part,doEncrypted) end end function reset() data = "" part = 1 scriptName = "" current = current+1 script = "" vip = false downloading = false end function doPlain(response) -- PrintChat(""..part) if response ~= "ok" and response ~= "okok" then data = data..response part = part+1 GetAsyncWebResult(host,path..'?url='..script..'&part='..part,doPlain) return end PrintChat("Script Downloaded!") local file = io.open(SCRIPT_PATH .. scriptName, "w") file:write(data) file:close() LoadScript(scriptName) reset() end function doNothing() end function doEncrypted(response) -- PrintChat(""..part) if response ~= "ok" and response ~= "okok" then data = data..response part = part+1 ready = true return end PrintChat("Script Downloaded!") if vip == true then LoadVIPScript(data) else LoadProtectedScript(data) end reset() end function LoadWebScript(file,name) scriptName = name -- PrintChat("Downloading script...") downloading = true script = file GetAsyncWebResult(host,path..'?url='..script..'&part='..part,doPlain) end function LoadEncryptedWebScript(file,needsVIP) vip = needsVIP PrintChat("Downloading script...") downloading = true script = file GetAsyncWebResult(host,path..'?url='..script..'&part='..part,doEncrypted) end