Games IA ChatGPT 5 visualizacoes

Safe Loot Boxes with Rarities and Roblox Animation

roblox luau lua loot box rewards rarities remoteevent ui
ESCOPO

Create a professional loot box system for Roblox, with weighted probabilities, configurable rarities, unique rewards, and a visual opening animation. The prompt guides the AI to strictly separate authoritative server logic from client presentation, avoiding common exploits involving currency, inventory, and manipulated rolls.

Ideal for developers who already have or want to integrate currency, inventory, RemoteEvents, and custom interfaces. Just paste the names and paths of the existing objects in Explorer into the prompt to receive complete Luau scripts, commented and ready to implement in Roblox Studio.

The requested solution includes purchase validation, anti-spam cooldown, weighted rolling, secure communication via RemoteEvents, failure handling, and practical testing instructions in client-server mode.

Conteudo
Prompt principal
Act as a senior Roblox Luau developer, specialized in secure multiplayer systems, responsive interfaces, and client-server architecture. Generate a complete reward box system (loot boxes) with purchase, weighted rarities, opening animation, and secure item delivery, adapted to the context of my game that I will paste below.

Before writing the code, use the provided context to rigorously respect the names, paths, and conventions already existing in my project. If any indispensable data is missing, do not invent silent integrations: state the assumptions in a short section called "Premises" and use clear names that are easy to replace. Do not ask follow-up questions; deliver a functional implementation with configurable default values.

MY GAME CONTEXT — I will fill in:
- Currency used to buy boxes and where it is stored (e.g.: leaderstats.Coins, attribute, existing DataStore): [FILL IN]
- Name/path of the RemoteEvent or RemoteFunction for the opening request, if it already exists: [FILL IN]
- Name/path of the RemoteEvent for the result and animation, if it already exists: [FILL IN]
- Inventory location and existing function/module to grant item, if any: [FILL IN]
- Box name, price, currency, and desired cooldown: [FILL IN]
- List of rewards, IDs/names, rarities, and desired weights: [FILL IN]
- Structure of the existing interface in StarterGui (ScreenGui, buttons, frames, labels, and templates): [FILL IN]
- Animation, sound, and duration preferences: [FILL IN]

The mandatory architecture must contain TWO scripts, because the server must be authoritative and the animation must run on the client:
1. A server Script called, for example, "LootBoxServer", placed in ServerScriptService. It must be the single source of truth for price, balance, cooldown, reward table, rolling, and item granting.
2. A LocalScript called, for example, "LootBoxClient", placed in StarterPlayer > StarterPlayerScripts. It must control the interface and the opening animation. If my UI already exists in StarterGui, locate it with WaitForChild; if it does not exist, create a minimal, clean, and functional UI programmatically on the client.

Use ReplicatedStorage for RemoteEvents and, if necessary, a ModuleScript configuration called "LootBoxConfig" in ReplicatedStorage. If you use this module, also provide its complete code and indicate exactly where to create it. Prefer a configurable table containing each reward with fields such as Id, DisplayName, Rarity, Weight, Icon, and any necessary metadata. Implement weighted rolling correctly and independently from the client. Include rarities such as Common, Uncommon, Rare, Epic, and Legendary, but allow easy changing of names, colors, and probabilities.

Mandatory security and consistency requirements:
- The client only requests the opening; it never sends or defines item, rarity, price, balance, weight, result, or quantity.
- Validate on the server whether the player exists, whether the request respects cooldown, whether they have sufficient balance, and whether the box configuration and the rolled reward are valid.
- Deduct the currency and grant the item only on the server. The result sent to the client must be generated exclusively after validation and the server-side roll.
- Protect against RemoteEvent spam with debounce/cooldown per player and clean up the data when PlayerRemoving occurs.
- Do not use DataStore to save inventory or currency if I do not provide an existing persistence API. Instead, create clearly marked integration points, such as GrantReward and TrySpendCurrency functions, explaining how to connect them to my system.
- Use pcall wherever there are calls that may fail in external integrations. Handle missing references without freezing the entire game and send friendly error messages to the client without revealing sensitive logic.

In the LocalScript, implement a polished visual animation with TweenService: disable the button during the opening, show a sequence/carousel of items passing by, progressively slow down, highlight the final prize with rarity color, play sounds only if the objects exist, and reactivate controls when finished. The animation is visual only: make it explicit in the code that the item has already been defined and delivered by the server. Avoid allowing multiple concurrent animations.

Mandatory response format:
1. "Premises and structure in Explorer", with a short tree showing each Script, LocalScript, ModuleScript, and RemoteEvent needed.
2. Full code for each file, without pseudocode, each inside its own markdown block identified as ```lua. Comment important sections in Portuguese.
3. "How to test in Roblox Studio", with objective steps including Test > Start Server and at least two Players, insufficient balance validation, cooldown, rare reward, and an attempt to fire remotes from the client.
4. "Integration points", indicating exactly which functions/lines I should adapt to connect my existing inventory, currency, icons, and UI.

Produce valid Luau for Roblox Studio, with current APIs, appropriate WaitForChild usage, optional types only when they improve clarity, and no external dependencies.

Conteudo completo

Cabecalho, escopo, prompt principal, modulos, agentes

Visao completa do projeto

Safe Loot Boxes with Rarities and Roblox Animation

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

# Safe Loot Boxes with Rarities and Roblox Animation

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

## Escopo
Create a professional loot box system for Roblox, with weighted probabilities, configurable rarities, unique rewards, and a visual opening animation. The prompt guides the AI to strictly separate authoritative server logic from client presentation, avoiding common exploits involving currency, inventory, and manipulated rolls.

Ideal for developers who already have or want to integrate currency, inventory, RemoteEvents, and custom interfaces. Just paste the names and paths of the existing objects in Explorer into the prompt to receive complete Luau scripts, commented and ready to implement in Roblox Studio.

The requested solution includes purchase validation, anti-spam cooldown, weighted rolling, secure communication via RemoteEvents, failure handling, and practical testing instructions in client-server mode.

## Prompt Principal
Act as a senior Roblox Luau developer, specialized in secure multiplayer systems, responsive interfaces, and client-server architecture. Generate a complete reward box system (loot boxes) with purchase, weighted rarities, opening animation, and secure item delivery, adapted to the context of my game that I will paste below.

Before writing the code, use the provided context to rigorously respect the names, paths, and conventions already existing in my project. If any indispensable data is missing, do not invent silent integrations: state the assumptions in a short section called "Premises" and use clear names that are easy to replace. Do not ask follow-up questions; deliver a functional implementation with configurable default values.

MY GAME CONTEXT — I will fill in:
- Currency used to buy boxes and where it is stored (e.g.: leaderstats.Coins, attribute, existing DataStore): [FILL IN]
- Name/path of the RemoteEvent or RemoteFunction for the opening request, if it already exists: [FILL IN]
- Name/path of the RemoteEvent for the result and animation, if it already exists: [FILL IN]
- Inventory location and existing function/module to grant item, if any: [FILL IN]
- Box name, price, currency, and desired cooldown: [FILL IN]
- List of rewards, IDs/names, rarities, and desired weights: [FILL IN]
- Structure of the existing interface in StarterGui (ScreenGui, buttons, frames, labels, and templates): [FILL IN]
- Animation, sound, and duration preferences: [FILL IN]

The mandatory architecture must contain TWO scripts, because the server must be authoritative and the animation must run on the client:
1. A server Script called, for example, "LootBoxServer", placed in ServerScriptService. It must be the single source of truth for price, balance, cooldown, reward table, rolling, and item granting.
2. A LocalScript called, for example, "LootBoxClient", placed in StarterPlayer > StarterPlayerScripts. It must control the interface and the opening animation. If my UI already exists in StarterGui, locate it with WaitForChild; if it does not exist, create a minimal, clean, and functional UI programmatically on the client.

Use ReplicatedStorage for RemoteEvents and, if necessary, a ModuleScript configuration called "LootBoxConfig" in ReplicatedStorage. If you use this module, also provide its complete code and indicate exactly where to create it. Prefer a configurable table containing each reward with fields such as Id, DisplayName, Rarity, Weight, Icon, and any necessary metadata. Implement weighted rolling correctly and independently from the client. Include rarities such as Common, Uncommon, Rare, Epic, and Legendary, but allow easy changing of names, colors, and probabilities.

Mandatory security and consistency requirements:
- The client only requests the opening; it never sends or defines item, rarity, price, balance, weight, result, or quantity.
- Validate on the server whether the player exists, whether the request respects cooldown, whether they have sufficient balance, and whether the box configuration and the rolled reward are valid.
- Deduct the currency and grant the item only on the server. The result sent to the client must be generated exclusively after validation and the server-side roll.
- Protect against RemoteEvent spam with debounce/cooldown per player and clean up the data when PlayerRemoving occurs.
- Do not use DataStore to save inventory or currency if I do not provide an existing persistence API. Instead, create clearly marked integration points, such as GrantReward and TrySpendCurrency functions, explaining how to connect them to my system.
- Use pcall wherever there are calls that may fail in external integrations. Handle missing references without freezing the entire game and send friendly error messages to the client without revealing sensitive logic.

In the LocalScript, implement a polished visual animation with TweenService: disable the button during the opening, show a sequence/carousel of items passing by, progressively slow down, highlight the final prize with rarity color, play sounds only if the objects exist, and reactivate controls when finished. The animation is visual only: make it explicit in the code that the item has already been defined and delivered by the server. Avoid allowing multiple concurrent animations.

Mandatory response format:
1. "Premises and structure in Explorer", with a short tree showing each Script, LocalScript, ModuleScript, and RemoteEvent needed.
2. Full code for each file, without pseudocode, each inside its own markdown block identified as ```lua. Comment important sections in Portuguese.
3. "How to test in Roblox Studio", with objective steps including Test > Start Server and at least two Players, insufficient balance validation, cooldown, rare reward, and an attempt to fire remotes from the client.
4. "Integration points", indicating exactly which functions/lines I should adapt to connect my existing inventory, currency, icons, and UI.

Produce valid Luau for Roblox Studio, with current APIs, appropriate WaitForChild usage, optional types only when they improve clarity, and no external dependencies.

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