Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- term.setCursorPos(1,1)
- fs.makeDir("disk/Stolen")
- print("Type 'A' to steal files")
- print("Type 'B' to run a stolen computer")
- print("Type anything else to run shell")
- reada = read()
- if reada == "A" then
- files = fs.list("/")
- fs.delete("disk/Stolen/" ..os.getComputerID())
- fs.makeDir("disk/Stolen/" ..os.getComputerID())
- for i=1,#files do
- if files[i] == "rom" or files[i] == "disk" then
- print("Copying " ..files[i].. " to disk/Stolen... Failed")
- else
- if fs.copy(files[i], "disk/Stolen/" ..os.getComputerID().. "/" ..files[i]) == false then
- print("Copying " ..files[i].. " to disk/Stolen... Failed")
- else
- print("Copying " ..files[i].. " to disk/Stolen... Success")
- end
- end
- end
- print("Done!")
- elseif reada == "B" then
- print("Enter a computer ID: ")
- idd = read()
- if fs.exists("disk/Stolen/" ..idd) then
- shell.setDir("disk/Stolen/" ..idd)
- term.clear()
- term.setCursorPos(1,1)
- print("CraftOS Emulated v1.0")
- if fs.exists("disk/Stolen/" ..idd.. "/startup") then
- -- shell.run("disk/Stolen/" ..idd.. "/startup")
- end
- while not bExit do
- write( "> " )
- local sLine = read()
- local tWords = {}
- for match in string.gmatch(sLine, "[^ \t]+") do
- table.insert( tWords, match )
- end
- local sCommand = tWords[1]
- if sCommand then
- shell.run( sCommand, unpack( tWords, 2 ) )
- end
- end
- else
- print("ID doesn't exist.")
- end
- else
- term.clear()
- term.setCursorPos(1,1)
- print(os.version())
- end
Advertisement
Add Comment
Please, Sign In to add comment