Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local thing
- local function TROLL(name, TorS, name2)
- if TorS == "table" or TorS == "t" then
- local file = fs.open(name,"r")
- local sContents = file.readAll()
- file.close()
- thing = textutils.unserialize(sContents)
- h=fs.open(name2, "a")
- h.writeLine(textutils.serialize(thing))
- h.close()
- elseif TorS == "string" or TorS == "s" then
- local file = fs.open(name,"r")
- local sContents = file.readAll()
- file.close()
- thing = sContents
- h=fs.open(name2, "a")
- h.writeLine(thing)
- h.close()
- end
- end
- print("File/program name that you want to copy?")
- print("> ")
- print("Is it a table or a string?")
- print("if it is program, then it is string")
- print("> ")
- print("File/program name that you want to paste?")
- print("> ")
- term.setCursorPos(2,2)
- local name = read()
- term.setCursorPos(2,5)
- local TorS = read()
- term.setCursorPos(2,7)
- local name2 = read()
- TROLL(name, TorS, name2)
- print(thing)
Advertisement
Add Comment
Please, Sign In to add comment