Hello! TechGroupMedia here!
If you want to just learn how to build it, you can scroll down until you see How To Make.
A few months ago, I released a project onto the Devfourm known as Chat Assistant, View it Here: Chat Assistant- The Next Way To Communicate With Others
Anyway, I think people enjoyed it as 60 people voted and 43 said that they liked it.
Now, I Remade the project into a better one, that fixed an issue. Messaging Service has its flaws, such as a limit to the number of messages that can be sent. This product has a Filter still in Beta that detects if the limit has been reached using algorithms and, will wait a minute until posting the message.
With this note, there might still be some bugs, you can message me @TechGroupMedia. Anyways, let’s get started on the Project!
How To Make:
-
Load up Roblox Studio.
You need Roblox Studio for this. -
Load up the game
Load up the game you want the Global Chatting Game System to be on. -
Put a script into ServerScriptService
Place a script into ServerScriptService and name it “GlobalChattingSystemMain”
4.Place a Local Script into Starter Player < StarterPlayerScripts
Place a Local Script into Starter Player < StarterPlayerScripts and name it “GlobalChattingSystemClient”
-
Place a RemoteEvent into ReplicatedStorage
Place a RemoveEvent into ReplicatedStorage and call it “NewChatFromServer” -
Make sure your game looks like this:
-
Now please go to GlobalChattingSystemMain and put in the Following Code:
local MessagesLeftToSend = 0
local ValueBefore = 0
game.Players.PlayerAdded:Connect(function(plr)
local playersinServer = 0
print(plr.Name.." Has Joined!")
repeat wait() until plr
for i,v in pairs(game.Players:GetPlayers()) do
playersinServer = playersinServer +1
end
wait(0.1)
local Value1 = playersinServer*60
local Value2 = Value1+150
if MessagesLeftToSend == Value2 then
ValueBefore = Value2
else
local Minus = ValueBefore - MessagesLeftToSend
local Value = Value2 - Minus
ValueBefore = Value
MessagesLeftToSend = Value
end
print("function ended 1")
end)
game.Players.PlayerRemoving:Connect(function()
local playersinServer = 0
for i,v in pairs(game.Players:GetPlayers()) do
playersinServer = playersinServer +1
end
wait(0.1)
local Value3 = playersinServer-1
local Value1 = Value3*60
local Value2 = Value1+150
if MessagesLeftToSend == Value2 then
ValueBefore = Value2
else
local Minus = ValueBefore - MessagesLeftToSend
local Value = Value2 - Minus
ValueBefore = Value
MessagesLeftToSend = Value
end
end)
local function IsPlayerInGame(player)
local Var = false
for i,v in pairs(game.Players:GetPlayers()) do
if v.Name == player then
Var = true-- change to true
end
end
wait()
if Var == true then
return true
elseif Var == false then
return false
end
end
local function MessageSent()
local Value = MessagesLeftToSend - 1
MessagesLeftToSend = Value
wait(60)
MessagesLeftToSend = MessagesLeftToSend +1
end
game.Players.PlayerAdded:Connect(function(plr)plr.Chatted:Connect(function(msg)
if MessagesLeftToSend <= 0 then
print("Maximum Messages Sent, Messages will be sent to Servers in 1 minute.")
wait(60)
local Filter = game.Chat:FilterStringForBroadcast(msg,plr)
local Data = {plr.Name,Filter}
local Code = game.HttpService:JSONEncode(Data)
local MS = game:GetService("MessagingService")
MS:PublishAsync("Chat",Code)
MessageSent()
else
local Filter = game.Chat:FilterStringForBroadcast(msg,plr)
local Data = {plr.Name,Filter}
local Code = game.HttpService:JSONEncode(Data)
local MS = game:GetService("MessagingService")
MS:PublishAsync("Chat",Code)
MessageSent()
end
end)end)
game:GetService("MessagingService"):SubscribeAsync("Chat",function(Data)
local Info = Data.Data
local NewInfo = game.HttpService:JSONDecode(Info)
local PlrthatSentMessage = NewInfo[1]
local MessageInfo = NewInfo[2]
if IsPlayerInGame(PlrthatSentMessage) == false then
game.ReplicatedStorage.NewChatFromServer:FireAllClients(PlrthatSentMessage,MessageInfo)
end
end)
- Now, go over to the LocalScript, GlobalChattingSystemClient, and put this code in:
game.ReplicatedStorage.NewChatFromServer.OnClientEvent:Connect(function(plrthatSent,Msg)
game.StarterGui:SetCore("ChatMakeSystemMessage",{
Text = "["..plrthatSent.."]: "..Msg;
Font = Enum.Font.SourceSansBold;
})
end)
You’re about done!
-
Click Game Settings
Click the Game Settings button on the top of your screen. -
Click Security and Enable HTTP Service and Studio Access to API Services.
A little bit of the script uses HTTP Service to Encode a Table. -
Publish the game and you should be done!
Remember, this is still in Beta. Please message me if there are any errors. Please don’t claim it as your own, it isn’t, Babycorndog10 and I made it.
Cool Features:
Uses Messaging Service
Filters the messages using Roblox’s Chat Filter
Manages the messages sent limit
Can Control many things.
Want to customize it a bit? Click the Extra Features button below to see what you can add!
Extra Features
How to change the Chat Color or Font
Go to Starter Player < StarterPlayerScripts and open GlobalChattingSystemClient.
To change the Font:
Find where it says font, you Can delete SourceSansBold and Pick from the options.
To change the Color:
Right Below Font, Write Color
Now make it say Color = BrickColor.new()
Between the parentheses, put a string and choose a Color.
When your done selecting the color, put .Color; behind it.
How to change the Chat Tag
Go to Starter Player < StarterPlayerScripts and open GlobalChattingSystemClient.
Find Text, most likely going to be on Line 3.
After the equal sign, there should be a String. This is what the Text is going to be.
You can make it in
If you just want to insert it, you can run this Code: Works both in Command Bar and in a Script.
game:GetService("InsertService"):LoadAsset(6104167920).Parent = game.Workspace
If you want to test the script, you can visit this game:
https://www.roblox.com/games/6100737077/New-Chat-Server-Testing
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
0 voters