Advertisement
goldfiction

ishd

Jun 26th, 2025
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.79 KB | Gaming | 0 0
  1. ish_url = "http://raw.githubusercontent.com/Tijndagamer/ISH/master/"
  2. ishd_url = ish_url .. "ishd.lua"
  3. ish_client_url = ish_url .. "ish_client.lua"
  4.  
  5. local function get (url)
  6.   write("Connecting to " .. url .. " ... ")
  7.   local response = http.get(url)
  8.   if response then
  9.     print("Success.")
  10.     local contents = response.readAll()
  11.     response.close()
  12.     return contents
  13.   else
  14.     print("Failed.")
  15.   end
  16. end
  17.  
  18. local function save (filename, contents)
  19.   if fs.exists(filename) then
  20.     print("File already exists, overwriting...")
  21.     fs.delete(filename)
  22.   end
  23.   if contents then
  24.     local file = fs.open(filename, "w")
  25.     file.write(contents)
  26.     file.close()
  27.   else
  28.     print("Error opening file")
  29.   end
  30. end
  31.  
  32. save("/ishd", get(ishd_url))
  33. save("/ish_client", get(ish_client_url))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement