Roblox Luau Shop with Secure Purchases, Stock and Anti-Spam
For Roblox developers building simulators, RPGs, tycoons or survival games who need a shop where the client never decides price, balance or delivery. The prompt asks for your project's context (currency, items, Remotes, GUI, persistence) and returns the Luau architecture with a catalog ModuleScript, a server Script and an interface LocalScript.
The output comes in stages you can test in sequence: assumptions, Explorer tree, each complete file, Remotes table, installation and multiplayer test plan. It includes itemId validation, a per-player lock, rate limiting, stock control and rollback if delivery fails.
Fill in the fields in brackets, state the version or current state of your project and paste the scripts into Studio one by one. The integration points with DataStore or ProfileService are flagged, without inventing anything you don't use.
Act as a senior Roblox Luau developer, an expert in secure economies, client-server architecture and exploit prevention. Create a shop for items bought with the game's internal currency, adapted to the context I provide below. The server is the only authority over price, balance, stock and delivery; the client sends only the itemId. Code commented in Portuguese, ready to paste into Roblox Studio.