Advertisement
andly654321

furry caht

Jun 1st, 2020
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.24 KB | None | 0 0
  1. -- go talk in furry language, feel free to add more owos to the owos table
  2. local owos = {
  3. "UwU",
  4. "uwu",
  5. "^w^",
  6. ">w<",
  7. "(´•ω•`)"
  8. }
  9.  
  10. local hyper_links = {}
  11. local players = game:GetService("Players")
  12.  
  13. local function replace_link(string)
  14. table.insert(hyper_links, string)
  15. return "owo" .. #hyper_links
  16. end
  17.  
  18. local function trim(string)
  19. return string.match(string, "^%s*(.-)%s*$")
  20. end
  21.  
  22. local function owo_convert(speech)
  23. local selected_owo = owos[math.random(1, #owos)]
  24. local modifier = math.random(1, 5)
  25. local output = ""
  26.  
  27. output = speech:gsub("|c.-|r", replace_link)
  28.  
  29. output = output:gsub("[LR]", "W")
  30. output = output:gsub("[lr]", "w")
  31.  
  32. if modifier < 5 then
  33. output = output:gsub("U([^VW])", "UW%1")
  34. output = output:gsub("u([^vw])", "uw%1")
  35. end
  36.  
  37. output = output:gsub("ith " , "if ")
  38. output = output:gsub("([fps])([aeio]%w+)", "%1w%2") or output
  39. output = output:gsub("n([aeiou]%w)", "ny%1") or output
  40. output = output:gsub(" th", " d") or output
  41.  
  42. output = string.format(" %s ", output)
  43.  
  44. for character in string.gmatch(output, "%a+") do
  45. if math.random(1, 5) == 5 then
  46. local first_character = character:sub(1, 1)
  47. output = output:gsub(string.format(" %s ", character), string.format(" %s-%s ", first_character, character))
  48. end
  49. end
  50.  
  51. output = trim(output)
  52. output = modifier == 5 and output .. " " .. selected_owo or output:gsub("!$", " " .. selected_owo)
  53.  
  54. return output
  55. end
  56.  
  57. local meta_table = getrawmetatable(game)
  58. local namecall = meta_table.__namecall
  59. setreadonly(meta_table, false)
  60.  
  61. meta_table.__namecall = newcclosure(function(self, ...)
  62. local method = getnamecallmethod()
  63. local args = {...}
  64.  
  65. if method == "FireServer" and self.Name == "SayMessageRequest" then
  66. local message = args[1]
  67. message = owo_convert(message)
  68. end
  69.  
  70. return namecall(self, unpack(args))
  71. end)
  72.  
  73. for _, signal in pairs(getconnections(players.LocalPlayer.Chatted)) do
  74. local func = signal.Function
  75. local old
  76.  
  77. old = hookfunction(func, function(message)
  78. message = owo_convert(message)
  79.  
  80. return old(message)
  81. end)
  82. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement