Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- key2 = {}
- change = function(letter)
- char = 0
- for i=1, #key2 do
- if letter == key2[i] then
- char = i + 34
- if char < #key2 then
- char = char - #key2
- end
- return key2[char]
- end
- end
- end
- print("file:")
- file = fs.open(read(), "r")
- reading = true
- linenum = 0
- filestring
- while reading == true do
- curline = file.readLine()
- if linenum == 0 then
- filestring = curline
- elseif file.readLine() == nil then
- reading = false
- else
- filestring = filestring.."&"..curline
- end
- end
- file.close()
- shell.run("delete", "key")
- shell.run("pastebin", "get", "0ZGDdCwk", "key")
- key = fs.open("key", "r")
- reading = true
- while reading == true do
- curline = key.readLine()
- if curline == nil then
- reading = false
- else
- table.insert(key2, curline)
- end
- end
- for a = 1, #filestring do
- print(change(string.sub(filestring, a,a)))
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement