In-Game System Messages

Create messages in-game which can say anything of your liking in any color, font, or font size. Have fun playing around with it!
Script:

(Remember to place the local script in StarterPlayerScripts!)

Side note: If any of you think this is a backdoor, it is not and I guarantee you it is 100% safe.

View the below clip to see what you can do with it! The default cooldown was shortened to show all the messages, so don’t worry about the delivery speed.

57 Likes

Wow! Thanks a bunch. This will definitely help me out a lot.

2 Likes

Simple and easy to use. Might want to add the ‘opensource’ tag! :slight_smile:

5 Likes

This should be called “In-Game Message Carousel” due to the way it interacts with players.

It is a typical way to engage with players further, such as in Darkenmoor.

2 Likes

Very simple and easy to use. Personally it fits low poly then realistic.
Looks very clean and smooth!

1 Like

The thing is, nothing censors…

1 Like

The messages are custom, why would there need to be censorship?

1 Like

Because lets say people like tubers93, the group, does something and can put these messages non-stop continuously saying bad things

But on the bright side it can say discord!

1 Like

Your example can be said about anything. “Tubers93” could make hints or text labels say bad things too. Also if it did have censorship, “Tubers93” could just erase it if they were that determined to create bad messages.

I mean yes it is true but it still might be bad, but I understand.

While this messaging system is really good it is unnecessarily long and can be shortened considerably by removing all the repeated code. This is the shortened code:

--- Customizable System Messages
--- Created by ZurichBT Edited By TSevik

--- Enter your text messages in this table here for it to be displayed.
local Text = { -- Optional You Can Store These In A Module Script
	"Enjoying your time here? Like the game to support it!",
	"The game creator worked very hard on this game. Likes are greatly appreciated!",
	"Follow the game to be updated on what's new!",
	"Do you play this game regularly? Make sure to favorite it to show your support!",
}

--- Enter your wait cooldown between or before messages.
local startcooldown = 6 --- cooldown before any messages are sent
local cooldown = 60 --- cooldown between messages being sent

--- Message colors, fonts, and font sizes.
local MessageFontSize = Enum.FontSize.Size24 -- Text Size 
local MessageColor = Color3.fromRGB(255,0,0) --- enter RGB values here
local randomfont = Enum.Font.Antique -- Text Font

--- Main script, please do not mess with it unless you know what you are doing.

if script.Disabled then return end -- Guard Clauses Optional But Recommended

local RunService = game:GetService("RunService")
-- Accurate Wait Function Made By Cinema_Sin
local function accuratewait(n)
    local dt = 0

    while dt < n do
        dt = dt + RunService.Heartbeat:Wait()
    end
    return false, dt, accuratewait
end

accuratewait(startcooldown)
-- Main Loop Made By TSevik
while true do
	for i,text in ipairs(Text) do -- Iterate Through The Text Table
		accuratewait(cooldown)
		game.StarterGui:SetCore("ChatMakeSystemMessage",{ -- Create Message
			Text = text; -- Setting The Message Text To the chosen value in the table
			Color = MessageColor;
			Font = randomfont;
			FontSize = MessageFontSize;
		})
		print(text) -- Printing The Chosen Text
	end
end

Script Model:
7 Likes

It is your responsibility to ensure that any messages you pass through any system are either completely safe for Roblox, or filtered using Chat:FilterStringForBroadcast / TextService:FilterStringAsync.

The fact that a message system does not include this filtering by default does not make it a bad system.

It’s your responsibility to do filtering if there’s a chance of a ‘bad’ message getting through.

Wow thank you! I modified this to replicate into player’s backpacks then their PlayerScripts so I can do hints and make NPCs talk in the chat.

2 Likes

Thanks for all the feedback! It really inspires me to keep providing for the community. :smile:

1 Like

Nice! But I found a problem:

You might want to read Avoiding wait() and why , this post is helpful explaining why you should avoid this kind of loops using wait().

Wowzers that was a very interesting article. What do you suggest I use instead of wait()? I dont think I can use Heartbeat:Wait() / Stepped:Wait() or :Wait() in this code. Also the article also doesn’t suggest any alternatives to wait(n) which I use to wait the cooldown time.

Use this:

local RunService = game:GetService("RunService")

local function wait(n)
    local dt = 0

    while dt < n do
        dt = dt + RunService.Heartbeat:Wait()
    end
    return false, dt
end

return wait

courtesy of @incapaxx

I think you can use while true do instead, if you don’t want then you can use while wait(cooldown) do