View difference between Paste ID: raBYECfL and 05W8Ayx7
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", "rentMiningTurtle")
33
import("hV6x6tNr", "smartManualQuarry")
34
import("FgcnJWmH", "manualQuarry")
35
import("yk8MCctB", "manualQuarryShaft")
36
import("TUN2J3cN", "predictSimpleQuarry")
37
import("X1ch3aiN", "getTurtleFuel")
38
import("172twws3", "simpleQuarry")
39
import("Qps5qT3b", "turtleChest")
40
import("9FTwRmF1", "turtleForward")
41
import("er0pq47H", "turtleRefuel")
42
import("L7fFQb7x", "userInput")
43
44
45
os.pullEvent = os.pullEventRaw
46
adminPassword()
47
os.loadAPI("rentMiningTurtle.lua")
48
os.shutdown()