Games IA ChatGPT 8 visualizacoes

Safe Roblox Chat with Filter, UI, and Commands

roblox luau lua chat textservice remoteevent moderation security
ESCOPO

This prompt generates a custom chat system for Roblox with a secure client-server architecture. It covers a custom chat interface, sending and receiving messages, mandatory TextService filtering, and anti-spam limits to protect the multiplayer experience.

It also includes an extensible foundation for chat commands such as /help, /me, /mute, and administrative commands conditioned on configurable UserIds or roles. The result is ideal for developers who need to replace or complement the default chat with full control over layout, rules, and moderation.

The prompt asks the AI to adapt the code to the project's real structure, including RemoteEvent names, UI objects, and existing permissions. The implementation prioritizes an authoritative server, data validation, and practical testing instructions in Roblox Studio.

Conteudo
Prompt principal
Act as a senior Roblox developer, specializing in Luau, TextChatService, TextService, client-server security, and scalable multiplayer systems. Create a complete custom chat system with its own interface, mandatory message filtering, and chat commands processed with server authority. Before writing the code, use the context of my project below to adapt names, paths, and integrations.

MY GAME CONTEXT (I will fill this in before sending):
- Name of the chat ScreenGui and path in Explorer: [E.G.: StarterGui/CustomChatGui]
- Name and path of the input TextBox: [E.G.: CustomChatGui/Main/InputBox]
- Name and path of the message container: [E.G.: CustomChatGui/Main/MessageList]
- Existing message visual template and its children: [E.G.: MessageTemplate with Username, Body, and Timestamp]
- Existing RemoteEvents/RemoteFunctions and their respective paths: [E.G.: ReplicatedStorage/Remotes/ChatMessageEvent]
- Desired commands and rules: [E.G.: /help, /me text, /mute player, /unmute player, /clear]
- UserIds, roles, or existing admin permission system: [TO FILL IN]
- Character limit, cooldown, maximum visible messages, and message range: [TO FILL IN]
- Whether I want to keep or disable the default Roblox chat window: [TO FILL IN]
- Other integrations, such as mute DataStore, team system, or logs: [TO FILL IN]

If any information is missing, use clear default names, state the assumptions before the code, and make the system work without relying on external assets. Do not ask additional questions: deliver a functional implementation and explain how to change the configurable points.

The solution must be composed of TWO coordinated complete scripts:
1. A server Script in ServerScriptService, for example `CustomChatServer`. It is the source of truth for validation, filtering, rate limiting, permissions, mutes, command interpretation, and message distribution.
2. A LocalScript in StarterPlayer > StarterPlayerScripts, for example `CustomChatClient`. It controls only the local UI: capturing the TextBox, rendering received messages, auto-scrolling, and visual feedback. It never decides whether a message, command, damage, currency, mute, or privilege is valid.

Use a RemoteEvent in ReplicatedStorage, preferably inside a `Remotes` folder, to send message attempts from the client to the server and to deliver approved messages to clients. If the RemoteEvent does not exist, the server Script must create it safely with `FindFirstChild` before instantiating, without duplicating objects. Specify exactly the chosen name and the final path in Explorer. Do not use RemoteFunction for normal message sending unless there is a concrete technical justification.

Mandatory security and behavior requirements:
- The server must strictly validate type, length, empty content, extra spaces, sending frequency, and player state before processing any data received through the RemoteEvent.
- Implement server-side rate limiting per player, with configurable cooldown and a limit of messages per time window. Excess messages must be rejected without replication.
- Filter every normal message and every free text used by commands with `TextService:FilterStringAsync`, using the author's UserId, and convert the output with `GetChatForUserAsync` for EACH recipient player. Never send unfiltered text to other players and handle TextService failures with `pcall`, rejecting the message safely when filtering fails.
- Commands must start with `/`, have predictable parsing, case-insensitive comparison, and a configurable permissions table. Implement at least `/help`, `/me <text>`, `/mute <player>`, and `/unmute <player>`. Only authorized administrators may mute or unmute; muted players may not send messages or normal commands, unless you document a safe exception.
- For player lookup in commands, handle ambiguous partial names, nonexistent players, and attempts to act on oneself when applicable. Do not trust the name or UserId provided by the client: determine the sender exclusively by the `Player` parameter of the event on the server.
- Preserve the message author, UserId, message type (normal, action, or system), timestamp, and already filtered text in the payload delivered to the client. The client should superficially validate the received payload before rendering and escape/handle text appropriately so the UI does not break.
- Use `TextChatService` only when it is compatible with the chosen strategy. Since this is a custom UI, do not depend on the default chat for security. If disabling the default chat requires manual property configuration, explain it clearly without using obsolete APIs or unsafe behavior.
- Avoid unnecessary waiting loops, legacy `wait()`, deprecated APIs, and fragile references. Use `WaitForChild` carefully and configurable constants at the top of the scripts.

Deliver the response in this order: (1) summary of the architecture and assumptions adopted; (2) exact Explorer object tree, including RemoteEvent and minimum UI elements; (3) full code of the server Script in a markdown ` ```lua ` block; (4) full code of the LocalScript in another markdown ` ```lua ` block; (5) objective installation and testing instructions with two players using Start Server in Roblox Studio; (6) security checklist and points for expansion, such as mute persistence via DataStore, moderation logs, and team channels.

The code must be complete, ready to paste, heavily commented in Brazilian Portuguese, with no pseudocode, no omitted sections, and no dependence on unprovided modules. Prioritize compatibility with current Roblox and explain any unavoidable limitation of the official filter.

Conteudo completo

Cabecalho, escopo, prompt principal, modulos, agentes

Visao completa do projeto

Safe Roblox Chat with Filter, UI, and Commands

# www.prompthubai.com.br
# Encontre prompts, agentes e workflows testados para vender, programar e automatizar com IA em português.

# Safe Roblox Chat with Filter, UI, and Commands

## Cabecalho
- Tipo: Conteudo
- Categoria: Games
- Modulos: 0
- Agentes: 0

## Escopo
This prompt generates a custom chat system for Roblox with a secure client-server architecture. It covers a custom chat interface, sending and receiving messages, mandatory TextService filtering, and anti-spam limits to protect the multiplayer experience.

It also includes an extensible foundation for chat commands such as /help, /me, /mute, and administrative commands conditioned on configurable UserIds or roles. The result is ideal for developers who need to replace or complement the default chat with full control over layout, rules, and moderation.

The prompt asks the AI to adapt the code to the project's real structure, including RemoteEvent names, UI objects, and existing permissions. The implementation prioritizes an authoritative server, data validation, and practical testing instructions in Roblox Studio.

## Prompt Principal
Act as a senior Roblox developer, specializing in Luau, TextChatService, TextService, client-server security, and scalable multiplayer systems. Create a complete custom chat system with its own interface, mandatory message filtering, and chat commands processed with server authority. Before writing the code, use the context of my project below to adapt names, paths, and integrations.

MY GAME CONTEXT (I will fill this in before sending):
- Name of the chat ScreenGui and path in Explorer: [E.G.: StarterGui/CustomChatGui]
- Name and path of the input TextBox: [E.G.: CustomChatGui/Main/InputBox]
- Name and path of the message container: [E.G.: CustomChatGui/Main/MessageList]
- Existing message visual template and its children: [E.G.: MessageTemplate with Username, Body, and Timestamp]
- Existing RemoteEvents/RemoteFunctions and their respective paths: [E.G.: ReplicatedStorage/Remotes/ChatMessageEvent]
- Desired commands and rules: [E.G.: /help, /me text, /mute player, /unmute player, /clear]
- UserIds, roles, or existing admin permission system: [TO FILL IN]
- Character limit, cooldown, maximum visible messages, and message range: [TO FILL IN]
- Whether I want to keep or disable the default Roblox chat window: [TO FILL IN]
- Other integrations, such as mute DataStore, team system, or logs: [TO FILL IN]

If any information is missing, use clear default names, state the assumptions before the code, and make the system work without relying on external assets. Do not ask additional questions: deliver a functional implementation and explain how to change the configurable points.

The solution must be composed of TWO coordinated complete scripts:
1. A server Script in ServerScriptService, for example `CustomChatServer`. It is the source of truth for validation, filtering, rate limiting, permissions, mutes, command interpretation, and message distribution.
2. A LocalScript in StarterPlayer > StarterPlayerScripts, for example `CustomChatClient`. It controls only the local UI: capturing the TextBox, rendering received messages, auto-scrolling, and visual feedback. It never decides whether a message, command, damage, currency, mute, or privilege is valid.

Use a RemoteEvent in ReplicatedStorage, preferably inside a `Remotes` folder, to send message attempts from the client to the server and to deliver approved messages to clients. If the RemoteEvent does not exist, the server Script must create it safely with `FindFirstChild` before instantiating, without duplicating objects. Specify exactly the chosen name and the final path in Explorer. Do not use RemoteFunction for normal message sending unless there is a concrete technical justification.

Mandatory security and behavior requirements:
- The server must strictly validate type, length, empty content, extra spaces, sending frequency, and player state before processing any data received through the RemoteEvent.
- Implement server-side rate limiting per player, with configurable cooldown and a limit of messages per time window. Excess messages must be rejected without replication.
- Filter every normal message and every free text used by commands with `TextService:FilterStringAsync`, using the author's UserId, and convert the output with `GetChatForUserAsync` for EACH recipient player. Never send unfiltered text to other players and handle TextService failures with `pcall`, rejecting the message safely when filtering fails.
- Commands must start with `/`, have predictable parsing, case-insensitive comparison, and a configurable permissions table. Implement at least `/help`, `/me <text>`, `/mute <player>`, and `/unmute <player>`. Only authorized administrators may mute or unmute; muted players may not send messages or normal commands, unless you document a safe exception.
- For player lookup in commands, handle ambiguous partial names, nonexistent players, and attempts to act on oneself when applicable. Do not trust the name or UserId provided by the client: determine the sender exclusively by the `Player` parameter of the event on the server.
- Preserve the message author, UserId, message type (normal, action, or system), timestamp, and already filtered text in the payload delivered to the client. The client should superficially validate the received payload before rendering and escape/handle text appropriately so the UI does not break.
- Use `TextChatService` only when it is compatible with the chosen strategy. Since this is a custom UI, do not depend on the default chat for security. If disabling the default chat requires manual property configuration, explain it clearly without using obsolete APIs or unsafe behavior.
- Avoid unnecessary waiting loops, legacy `wait()`, deprecated APIs, and fragile references. Use `WaitForChild` carefully and configurable constants at the top of the scripts.

Deliver the response in this order: (1) summary of the architecture and assumptions adopted; (2) exact Explorer object tree, including RemoteEvent and minimum UI elements; (3) full code of the server Script in a markdown ` ```lua ` block; (4) full code of the LocalScript in another markdown ` ```lua ` block; (5) objective installation and testing instructions with two players using Start Server in Roblox Studio; (6) security checklist and points for expansion, such as mute persistence via DataStore, moderation logs, and team channels.

The code must be complete, ready to paste, heavily commented in Brazilian Portuguese, with no pseudocode, no omitted sections, and no dependence on unprovided modules. Prioritize compatibility with current Roblox and explain any unavoidable limitation of the official filter.

Todos os modulos

0 modulos deste projeto

Todos os agentes

0 agentes deste projeto

Prompts Relacionados

Safe Melee Combat with Hitbox, Animation, and Cooldown
Games ChatGPT
Operational prompt Ideal for Builders and SaaS

Safe Melee Combat with Hitbox, Animation, and Cooldown

MVP, product flow and interface

Advanced prompt to generate a Roblox melee combat system with hitbox detection via OverlapParams, server-validated damag…

Saves: 1 setup sprint Includes: prompt + structure Ready to adapt
Server-Authoritative Long-Range Combat with Raycasting
Games ChatGPT
Operational prompt Ideal for Teams putting AI to work

Server-Authoritative Long-Range Combat with Raycasting

Faster delivery with real context

Generate an advanced Luau script for ranged weapons with server-simulated projectiles, continuous raycasting, validated …

Saves: less trial and error Includes: prompt + context Ready to adapt
Roblox Life, Shield, and Damage Feedback System
Games ChatGPT
Operational prompt Ideal for Teams putting AI to work

Roblox Life, Shield, and Damage Feedback System

Faster delivery with real context

Advanced prompt for generating a secure Luau system with health, regeneration, absorbing shield, and damage visual effec…

Saves: less trial and error Includes: prompt + context Ready to adapt