|
| 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 |
|
| |
| |
| |
| |
|
| 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 |
|
| |
|
| 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 |
|
| |