In-Game System Messages

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…

2 Likes

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:

https://www.roblox.com/library/4767448353/System-Messages?nl=true

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

1 Like

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

Ok then thanks for the advice I’ll add the changes now

For some reason I can’t watch the Video, can you send the link?

Sorry, the video got deleted on the site it was on. I’ll re-upload another video on the post, thanks for the reminder!

1 Like