Roblox Pet Merge Script Help

Job ID: 39749879

Budget: €8 – €30 EUR

I’ve built most of a “Hatch-a-Pet” experience in Roblox Studio, but I’m stuck on the Lua scripting that handles what happens after a player decides to sell or merge a pet. I need reliable, server-side code that:

• Detects the sell or merge action and updates the player’s data in real time
• Persists all relevant pet attributes and stats to DataStore so nothing is lost on rejoin
• Rolls back cleanly if a save fails, avoiding dupes or missing pets

Everything else in the game is already in place, so you can focus purely on these data-handling routines. The solution should be well-commented, follow Roblox best practices (remote events, server validation, etc.), and be easy for me to extend later if I add new pet tiers or attributes.

If you have solid Roblox Lua experience and know your way around DataStore, this should be a straightforward task. Once delivered, I’ll test by selling and merging pets across multiple sessions—if every attribute remains intact, we’re done.
Related categories: C++ Programming Game Development Lua Scripting Roblox