View difference between Paste ID: NsVZmmei and fFiABipV
SHOW: | | - or go back to the newest paste.
1
filename = "adminsuccess.txt"
2
local adminpassword = "testpassword"
3
4
function import(ID, name)
5
    local pastebinID = ID
6
    local scriptFileName = name .. ".lua"  -- Change this to the desired filename
7
 
8
    -- Download the script from Pastebin
9
    local response = http.get("https://pastebin.com/raw/" .. pastebinID)
10
 
11
    -- Check if the download was successful
12
    if response then
13
        -- Read the contents of the script
14
        local scriptContent = response.readAll()
15
        response.close()
16
 
17
        -- Open a file on the turtle's file system and write the script content to it
18
        local file = fs.open(scriptFileName, "w")
19
        file.write(scriptContent)
20
        file.close()
21
    else
22
        print("Failed to download script from Pastebin")
23
    end
24
end
25
26
function adminPassword()
27
    local file = fs.open(filename, "w")
28
    file.write(adminpassword)
29
    file.close()
30
end
31
32
import("FCCHNgHS", "rentSmartMiningTurtle")
33
import("hV6x6tNr", "smartManualQuarry")
34
os.pullEvent = os.pullEventRaw
35
adminPassword()
36
os.loadAPI("rentSmartMiningTurtle.lua")
37
os.shutdown()