Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function import(ID, name)
- local pastebinID = ID
- local scriptFileName = name .. ".lua" -- Change this to the desired filename
- -- Download the script from Pastebin
- local response = http.get("https://pastebin.com/raw/" .. pastebinID)
- -- Check if the download was successful
- if response then
- -- Read the contents of the script
- local scriptContent = response.readAll()
- response.close()
- -- Open a file on the turtle's file system and write the script content to it
- local file = fs.open(scriptFileName, "w")
- file.write(scriptContent)
- file.close()
- print("Script downloaded and saved as " .. scriptFileName)
- else
- print("Failed to download script from Pastebin")
- end
- end
- fs.delete("temp.lua")
- import("NXanBmQA", "temp")
- os.loadAPI("temp.lua")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement