Advertisement
CelticCoder

startup

Jun 18th, 2024 (edited)
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.05 KB | None | 0 0
  1. filename = "adminsuccess.txt"
  2. local adminpassword = "password"
  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("jiYE76jD", "rentTurtle")
  33. import("FgcnJWmH", "manualQuarry")
  34. os.pullEvent = os.pullEventRaw
  35. adminPassword()
  36. os.loadAPI("rentTurtle.lua")
  37. os.shutdown()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement