generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

How would I filter my chat?

Previous Thread :: Next Thread 
Studio_FPS is not online. Studio_FPS
Joined: 05 Jun 2016
Total Posts: 53
06 Jul 2016 08:37 PM
local storage=game:GetService("ServerStorage")
local sharedstorage=game:GetService("ReplicatedStorage")
local chatevent=sharedstorage:WaitForChild("ChatEvent")


local systemfontcolor=Color3.new(.83,.83,.83)


function sendchat(chattype,name,chat,namecolor,textcolor)
if chattype=="system" or chattype=="outmatch" then
for _,plr in pairs(game.Players:GetPlayers()) do
if true then --some kind of exclusive chat
chatevent:FireClient(plr,name,chat,namecolor,textcolor)
return game:GetService("Chat"):FilterStringForPlayerAsync(chat,plr)
end
end
elseif chattype=="inmatch" then
chatevent:FireAllClients(name,chat,namecolor,textcolor)
else
chatevent:FireAllClients(name,chat,namecolor,textcolor)
end
end

function newplayer(plr)
print("Player added yes",plr)
sendchat("system",nil,""..plr.Name.." joined",systemfontcolor,systemfontcolor)
local lastchattime=tick()
local lastmsg=""
plr.Chatted:connect(function(msg)
local currenttime=tick()
if plr and msg and msg~="" and string.sub(msg,1,2)~="/w" and string.sub(msg,1,2)~="/e" and(msg~=lastmsg or (currenttime-lastchattime)>3) and (currenttime-lastchattime)>.5 then
lastchattime=currenttime
local lastmsg=msg
if hascharactertag and hascharactertag.Value and plr.Character then
sendchat("outmatch",plr.Name..":",msg)
else
sendchat("inmatch",plr.Character.Name..":",msg,Color3.new(.509,.796,1))
end
end
end)
end

game.Players.PlayerAdded:connect(newplayer)
for _,plr in pairs(game.Players:GetPlayers()) do
newplayer(plr)
end

game.Players.PlayerRemoving:connect(function(plr)
if plr then
sendchat("system",nil,""..plr.Name.." left",systemfontcolor,systemfontcolor)
end
end)


Report Abuse
Studio_FPS is not online. Studio_FPS
Joined: 05 Jun 2016
Total Posts: 53
06 Jul 2016 08:42 PM
b


Report Abuse
Studio_FPS is not online. Studio_FPS
Joined: 05 Jun 2016
Total Posts: 53
06 Jul 2016 08:45 PM
b2


Report Abuse
Studio_FPS is not online. Studio_FPS
Joined: 05 Jun 2016
Total Posts: 53
06 Jul 2016 08:47 PM
b3


Report Abuse
Studio_FPS is not online. Studio_FPS
Joined: 05 Jun 2016
Total Posts: 53
06 Jul 2016 08:53 PM
b


Report Abuse
Lord_Narwhal is not online. Lord_Narwhal
Joined: 05 May 2012
Total Posts: 3242
06 Jul 2016 08:59 PM
"string
FilterStringAsync ( string stringToFilter, Player playerFrom, Player playerTo )
Filters a string being sent to playerTo from playerFrom with filtering that is appropriate to the given player's account settings."


Add 13,000 posts
Report Abuse
Studio_FPS is not online. Studio_FPS
Joined: 05 Jun 2016
Total Posts: 53
06 Jul 2016 09:01 PM
b5


Report Abuse
iiballer1221 is not online. iiballer1221
Joined: 14 Jun 2016
Total Posts: 5
06 Jul 2016 09:26 PM
Sometimes my chat glichest
And also buy mg t-shirts
1.go to my inventory
2. Go tp t-shirts
3. Buy some
Thats all you have to do 3 simple steps
But yea about my chat i hate when it do these hashtags do anyone else do
Report Abuse
Studio_FPS is not online. Studio_FPS
Joined: 05 Jun 2016
Total Posts: 53
07 Jul 2016 09:38 PM
no i dont buy from oders


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image