Advertisement
tomonaoboys

translator?(do not use it to translate , its INSANELY bad)

Feb 24th, 2018
311
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.64 KB | None | 0 0
  1. --DO NOT USE IT TO TRANSLATE , IT BREAKS EVERYTHING YOU LEARNED IF USED TO TRANSLATE AND REMEMBER please remember this and please promise with me
  2. --this is only en - jp i promise ...
  3. --to add, en , jp , killfromthisscript
  4. local W={}
  5. W[1]={"hello","こんにちは"}
  6. W[2]={"world","世界"}
  7. W[3]={"i","私"}
  8. W[4]={"am","は"}
  9. W[5]={"im","私は"}
  10. W[6]={"you","あなた"}
  11. W[7]={"your","あなたの"}
  12. W[8]={"are","は"}
  13. W[9]={"is","は"}
  14. W[10]={"this","これ"}
  15. W[11]={"that","あれ"}
  16. W[12]={"he","彼"}W[13]={"his","彼の"}W[14]={"him","彼"} --after this im tired to add
  17. local function add(en,jp,isfilt)
  18.     table.insert(W,{en,jp,isfilt})
  19. end
  20. if 1 then --normals
  21. add("she","彼女")add("her","彼女の")add("hers","彼女の")add("the","")add("me","私の")
  22. add("there","これらの")add("those","それらの")add("which","どれの")add("item","もの")add("items","もの")
  23. add("newbie","初心者")add("beginner","初心者")add("screen","画面")
  24. add("what","なぜ")add("which","どちらの")add("where","どこ")add("whose","誰の")add("how","なぜ")
  25. add("when","いつ")
  26. end
  27.  
  28. if 1 then --if
  29.     add("u","あなた")add("ur","あなたの")add("urs","あなたの")add("noob","初心者")add("nub","初心者")
  30. end
  31. local illegal={"!",".",","}--i remove them for some reason
  32. local loopstop=256 --to doesn't break roblox by inf loop
  33. local ply=game:service("Players").LocalPlayer
  34. function ConvertReq(word)word=game:service("Chat"):FilterStringAsync(word,ply,ply)
  35.     word=word.." "
  36.     word=string.lower(word)
  37.     --print(word)
  38.     local cut={}local cp=1
  39.     local num=0
  40.     local loop=0
  41.     local built=""
  42.     while loop<loopstop do
  43.     loop=loop+1
  44.     if word==""then break end
  45.     for i=1,word:len()do
  46.         local eflg=false for i2 in pairs(illegal)do if word:sub(i,i)==illegal[i2]then eflg=true end end
  47.         if word:sub(i,i)~=" "and word:sub(i,i)~=string.char(10)and word:sub(i,i)~=""and eflg~=true then
  48.         built=built..word:sub(i,i)
  49.         --print(word:sub(i,i))
  50.         else
  51.         word=word:sub(i+1)
  52.         --print(built)
  53.         cut[num]=built num=num+1
  54.         built=""--print("-----------------")
  55.         break
  56.         end
  57.     end
  58.     end
  59.    
  60.     for i=1,#cut do local ct=""for i2=1,cut[i]:len()do
  61.     if cut[i]:sub(i2,i2)~=" "then ct=ct..cut[i]:sub(i2,i2)end
  62.     end end
  63.     for i=0,#cut do
  64.         print(cut[i])
  65.     end
  66.     --checking
  67.     local fword=""
  68.     for i=0,#cut do local isf=false
  69.         for i2,w in pairs(W)do
  70.             if W[i2][1]==cut[i]then
  71.             if W[i2][3]then fword=fword.."#検閲されました#"isf=true else
  72.             fword=fword..W[i2][2]isf=true end
  73.             end
  74.         end
  75.         if not isf then fword=fword..cut[i]end
  76.     end
  77.     print(fword)
  78. end
  79.  
  80. ConvertReq("hello world! im")
  81. game.Players.LocalPlayer.Chatted:connect(function(m)ConvertReq(m)end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement