Advertisement
kanewutt

aniban

May 21st, 2016
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. --This bans anyone who wishes to date on any server or game.
  2. --Just put the words you don't want them saying, and if they do say it, they're banned.
  3. --YellowPurpleFlowers
  4. filteredWords = { "kick ii","kick iicxn","ban iicxn","ban ii","block ii","block iicxn","kick all","ban all","block","sex","s3x","s*x","f*ck","sh*t","a** wh*le","b*tch","****","gf","bf","boy friend","girl friend","date","dating","","","","","","","","","","","","","","" }
  5.  
  6. function checkForRecord(name)
  7. local name = string.lower(name)
  8. local p = script:GetChildren()
  9. for i = 1,#p do
  10. if string.lower(p[i].Name) == name then
  11. return true
  12. end
  13. end
  14. return false
  15. end
  16.  
  17. function onChatted(msg, recipient, speaker)
  18. for i = 1,#filteredWords do
  19. if string.match(string.lower(msg), string.lower(filteredWords[i])) then
  20. if checkForRecord(speaker.Name) then
  21. table.insert(banned, string.lower(speaker.Name))
  22. speaker.Parent = nil
  23. else
  24. local tag = Instance.new("IntValue")
  25. tag.Name = speaker.Name
  26. tag.Parent = script
  27. speaker.Parent = nil
  28. end
  29. end
  30. end
  31. end
  32.  
  33. function onEntered(newPlayer)
  34. for i = 1,#banned do
  35. if string.lower(banned[i]) == string.lower(newPlayer.Name) then
  36. newPlayer:Remove()
  37. end
  38. end
  39. newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end)
  40. end
  41.  
  42. game.Players.ChildAdded:connect(onEntered)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement