Advertisement
johnnic431

Untitled

Oct 3rd, 2013
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. replaced={}
  2. replcdby={}
  3. stringthing="ehllo there my claer freinds."
  4.  
  5. r=fs.open(".revolutOS/programs/adveditor/words","r")
  6. sLine=r.readLine()
  7. while sLine do
  8.     e={string.find(sLine,":")}
  9.     table.insert(replaced,string.sub(sLine,1,e[1]-1))
  10.     table.insert(replcdby,string.sub(sLine,e[1]+1,string.len(sLine)))
  11.     sLine=r.readLine()
  12. end
  13. r.close()
  14. for p,m in pairs(replaced) do
  15.     while stringthing:gsub(m,replcdby[p]) do
  16.         print("FOUND")
  17.     end
  18. end
  19. print(stringthing)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement