How can I filter this

Hello, so, I have this plate giver system, but there’s a trouble, basically, that it gives a plate, but there’s a trouble, how can I filter it, because, if I filter string for broadcast, it will tag numbers, and I need the numbers, how can I make sure it doesn’t says a word like well, no need to say it, just to make sure no insults?

local letters = {"a", "b", "c","d", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"}
		local numbers = {"1", "2", "3", "4", "5", "6", "7", "8", "9"}
		function GivePlate(plr, VehicleModel)
			local plate
				plate = string.upper(letters[math.random(1, #letters)])..string.upper(letters[math.random(1, #letters)])..string.upper(letters[math.random(1, #letters)]).." "..numbers[math.random(1, #numbers)]..numbers[math.random(1, #numbers)]..numbers[math.random(1, #numbers)]
			until not PlatesData:GetAsync(plate)
			if plate and not PlatesData:GetAsync(plate) then
				PlatesData:SetAsync(plate, {owner=plr.Name, vehiclemodel=tostring(VehicleModel)})

This are some of the plates that it would show, i think it’s kinda impossible for it to say a bad word, right?

1 Like

You wont need to censor it, You could just make a table of bad words that are 3 letters long, And do this.

local BadWords = {};
local Tag = "FF1 987"

if BadWords[string.sub(Tag, 1, 3)] then
   Tag = RandomizeTag() -- Whatever function u made to make a random tag.