Scrambled Chat Option

Hey Developers!

I wanna figure out how to make it where you can toggle an option and only certain players can see that chat and others see nothing or just scrambled text (random letters like “ahejcjehfhfjwurj” instead of the actual message”) I think this is possible due to I think I saw it before but I’m not sure how to.

If you know how to please leave a reply!

Three words, custom chat system.

Or make some chat event hooks (not sure about this one)

I have never made a custom chat system how does one do this with also bubble chat? I would also like to use the default message looks due to they look nice to me.

hello this is possible to do and i think you can do this by using a get players function and detect all players currently in the server and set a random term for how many of them can see it, you can use something called “string” which is useful for replacing words in a chat sentence, i’m not very familliar with string so take your time learning it and see some stuff that’ll fit what you need to do

(it’s extremely complex)

1 Like

Thanks! I will reply to this if I need anymore help.

Hey! I got this to semi work. But It dosnt change my actual message, this is it. Hope you can help.

-- DT Chated

local random =
local letters = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'}

function getRandomLetter()
	return letters[random:NextInteger(1,#letters)]

function getRandomString(length, includeCapitals)
	local length = length or 10
	local str = ''
	for i=1,length do
		local randomLetter = getRandomLetter()
		if includeCapitals and random:NextNumber() > .5 then
			randomLetter = string.upper(randomLetter)
		str = str .. randomLetter
	return str

		if not player:IsInGroup(12238766) then print("Return") return end -- Scramble Wl
		local DTValue = player.Backpack.DTValue
			if DTValue.Value == true then
				print("Player and DT True")
				for i, op in ipairs(Players:GetChildren()) do
					if not op:IsInGroup(12238766) then -- Can add more or not player:userid(id) or IsInGroup etc for peeps to see the chat
						local scram = getRandomString(string.len(msg), true)
						msg = scram

hmm i don’t know what else prevents the message from being encoded but can you try looking in the output? or the problem is that you might not be in the group