Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local raw = file.Read("ahuddata.txt")
- local dat = string.Explode("\n", raw, false)
- dat[#dat] = nil
- local out = {}
- for i=1, #dat do
- out[i] = ""
- for j=1, #dat[i] do
- local byt = string.byte(dat[i][j])
- if byt < 32 or byt > 126 then
- out[i] = out[i].."\\"..byt
- else
- out[i] = out[i]..dat[i][j]
- end
- end
- end
- local finalout = "{"
- for i=1, #out do
- finalout = finalout..string.format('\n\t"%s"%s', out[i], i==#out and "\n}\n" or ",")
- end
- file.Append("ahuddata_processed.txt", finalout)
- print(finalout)
Add Comment
Please, Sign In to add comment