Advertisement
Guest User

Untitled

a guest
Jan 24th, 2020
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. while wait() do
  2. local player = game.Players.LocalPlayer
  3. local alreadyUsed = {}
  4. loadstring(game:HttpGet("https://raw.githubusercontent.com/angeld23/raw-text-host/master/condensed_english_words", true))()
  5. function tableItemExists(array, val)
  6. for i,v in pairs (array) do
  7. if v == val then
  8. return true
  9. end
  10. end
  11. return false
  12. end
  13. function findWord (str)
  14. local found = nil
  15. for i,v in pairs (ENGLISH_WORDS) do
  16. if string.find(v, string.lower(str)) and not tableItemExists(alreadyUsed, v) then
  17. found = v
  18. table.insert(alreadyUsed, v)
  19. break
  20. end
  21. end
  22. return found
  23. end
  24. while wait(math.random(2,4.5)) do
  25. subtitle = player.PlayerGui.WordBombUI.UIContainer.StageContainer.PC.TitleFrame.Subtitle.Text
  26. local word = findWord(subtitle)
  27. game.ReplicatedStorage.RemoteEvents.StageEvent:FireServer("Typed",word:upper())
  28. end
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement