Jump to content
  • 1

Script with autoupdate(online)


Question

Posted

I want to code my script so when i upload a link (like discord attachment) the outdated script will automatically update the script(download the new version or something) can somebody help with that?

Like it is in your script BadCase

@BadCase @CmP @TopGEOYT

Recommended Posts

  • 0
Posted
I want to code my script so when i upload a link (like discord attachment) the outdated script will automatically update the script(download the new version or something) can somebody help with that?
Like it is in your script BadCase
[mention=698974]BadCase[/mention] [mention=745088]CmP[/mention] [mention=882291]TopGEOYT[/mention]
make ur script web served through pastebin and update the code on ur pastebin account

Sent from my Redmi Y1 Lite using Tapatalk

  • 0
Posted
4 hours ago, SHUVAM said:

make ur script web served through pastebin and update the code on ur pastebin account

Sent from my Redmi Y1 Lite using Tapatalk
 

I know that, but i dont know how i can make my script download another link through https or url, i tried to search up something but it doesnt work 

 

Help @Enyby

[added 0 minutes later]

https://stackoverflow.com/questions/29654194/download-file-by-url-in-lua

That doesnt seem to work for me ._. Pls help

  • 0
Posted
7 hours ago, bukandewa said:

You cant make direct link to download file via script.

BadCaseScriptLauncher... download one version before latest..

  • 0
Posted
23 hours ago, YeetMeister said:

I want to code my script so when i upload a link (like discord attachment) the outdated script will automatically update the script(download the new version or something) can somebody help with that?

Like it is in your script BadCase

@BadCase @CmP @TopGEOYT

My script does gg.makeRequest('http://httpbin.org/headers').content  to a php page which  delivers the requested script as a text string retrieved from my database which is then decoded back to its compiled form and loaded by the script as a chunk, no actual files are involved other than the launcher itself

  • 0
Posted
9 minutes ago, BadCase said:

My script does gg.makeRequest('http://httpbin.org/headers').content  to a php page which  delivers the requested script as a text string retrieved from my database which is then decoded back to its compiled form and loaded by the script as a chunk, no actual files are involved other than the launcher itself

Can you help me with that? Because i dont know anything about php and i might not be the only one who wants something like that

Would be much apreciated

  • 0
Posted
4 hours ago, YeetMeister said:

BadCaseScriptLauncher... download one version before latest..

gg.makeRequest just load raw text content in read mode, temporary, not downloaded as a file. Basically,  you need to know how script loader works. I think its not hard to understand.

Then, you should give an example of the work you have done, people will try to solve your code, also will give you some explanations. 

One more thing, everyone who have access to your 'online' file, highly possible to leak your code, like an example below.

Mortal_combat_BadCaseScriptLauncher.lua

  • 0
Posted (edited)
7 minutes ago, bukandewa said:

gg.makeRequest just load raw text content in read mode, temporary, not downloaded as a file. Basically,  you need to know how script loader works. I think its not hard to understand.

Then, you should give an example of the work you have done, people will try to solve your code, also will give you some explanations. 

One more thing, everyone who have access to your 'online' file, highly possible to leak your code, like an example below.

Mortal_combat_BadCaseScriptLauncher.lua 106.07 kB · 0 downloads

Yeah i know the chances are higher that my code gets leaked but i dont really care much its going to happen anyways

Just wanna know how to do it you know

If you send me a private message or text me through discord i can send my script

Discord: @ஜ۩۞۩ஜ[| INFINITY |]ஜ۩۞۩ஜ#1967

Edited by YeetMeister
  • 0
Posted
1 minute ago, YeetMeister said:

Yeah i know the chances are higher that my code gets leaked but i dont really care much its going to happen anyways

Just wanna know how to do it you know

If you send me a private message or text me through discord i can send my script

it doesnt make chances higher it actually adds  additional steps they must go through instead of simply running unluac,  The fact is with GG as it is currently coded along with the updates Enyby has posted to his compiler and unluac there is no realistic option to protect your code

  • 0
Posted (edited)
1 minute ago, BadCase said:

it doesnt make chances higher it actually adds  additional steps they must go through instead of simply running unluac,  The fact is with GG as it is currently coded along with the updates Enyby has posted to his compiler and unluac there is no realistic option to protect your code

I do not care its fine

They're decrypting everything, its ok if they decrypt mine.

Edited by YeetMeister
  • 0
Posted
5 minutes ago, YeetMeister said:

Yeah i know the chances are higher that my code gets leaked but i dont really care much its going to happen anyways

Just wanna know how to do it you know

If you send me a private message or text me through discord i can send my script

Discord: @ஜ۩۞۩ஜ[| INFINITY |]ஜ۩۞۩ஜ#1967

I am very rarely use discord, it will slow respond to answer. You can jump to my telegram if you want.

t.me/bukandewa

  • 0
Posted (edited)
8 minutes ago, bukandewa said:

I am very rarely use discord, it will slow respond to answer. You can jump to my telegram if you want.

t.me/bukandewa

Tha fucc is telegram

 

Ah ***** it

Untitled.lua

Edited by YeetMeister
  • 0
Posted (edited)
On 3/27/2019 at 4:42 AM, YeetMeister said:

Tha fucc is telegram

 

Ah ***** it

Untitled.lua

Version = tonumber(gg.makeRequest('https://pastebin.com/raw/GgPrZ1t9').content)
--1.1
Script = gg.makeRequest('https://pastebin.com/raw/EheRSRkv').content
--this is example

if Version == 1.2 then
gg.alert('Script is up to date.')
else
Update = gg.alert('New version '..Version..' available.\nClick button below to save the file.', 'Exit', 'Save File')

if not Update then os.exit()
end
if Update == 1 then
os.exit()
end

if Update == 2 then
--file path downloaded file
file = io.open(gg.getFile():gsub('lua', 'downloaded.lua'),'w')
file:write(Script)
file:close()
end
end

Code above just an example version checker and downloader script. You can improve as you need.

I am not recommended to share text file in pastebin, because pastebin didnt have file management.

I think github is good enough for free services. Or if you want to more advance with php, you can try 000webhost.

Edited by bukandewa
  • 0
Posted
local c_ver = "1.1"
-- Current script version
local s_ver = gg.makeRequest("https://example.com").content
if tonumber(c_ver) < tonumber(s_ver) then
  local ask=gg.alert("New version "..s_ver.." is avalible","download","dismiss")
  if ask == 1 then
    local data=gg.makeRequest("https://example.com/seript",nil,"ver="..s_ver).content
    if data then
      io.open(gg.getFile(),"w+"):write(data):close();
      gg.toast("Updated!");
      pcall(load(gg.getFile()));
     else
      print("Error: can't get server's content")
      os.exit(1);
   end
  end
end

 

  • 0
Posted
52 minutes ago, noblack said:

local c_ver = "1.1"
-- Current script version
local s_ver = gg.makeRequest("https://example.com").content
if tonumber(c_ver) < tonumber(s_ver) then
  local ask=gg.alert("New version "..s_ver.." is avalible","download","dismiss")
  if ask == 1 then
    local data=gg.makeRequest("https://example.com/seript",nil,"ver="..s_ver).content
    if data then
      io.open(gg.getFile(),"w+"):write(data):close();
      gg.toast("Updated!");
      pcall(load(gg.getFile()));
     else
      print("Error: can't get server's content")
      os.exit(1);
   end
  end
end

 

Thank you alot :)) 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.