How would I set up an API to purchase roblox models for a community map system?

I have this came called Climbing Game. However, it’s lacking a community map system similar to Flood Escape 2’s. In that game, you can import models from Roblox Studio into a game to test and play the map.

They have an API buy the map and then load it in that way for people to play it. I just need help figuring out how I would even start to make something like this. I’d really love to have people create their own maps for my game, but I don’t know where to begin at all.

Thank you!
(Flood Escape 2’s Community Map System: Flood Escape 2 Community Maps - Roblox)

2 Likes

FE2CM uses a bot-managed account to purchase the map model, and then assigns it a unique ID (I’m not sure what base) within a database which FE2CM then queries.

You’ll first need to host a bot which acts through a bot account; you’ll also need to make sure that assets the account owns are able to be loaded in-game via InsertService. Crazyblox Games actually published FE2CM under the bot account to allow this; I’m pretty sure you will need to do the same.

You need to set up some kind of API endpoint on your hosted bot to receive requests from game servers - you might want to include some kind of authorisation.

Next - buying the map.

The game server will receive the asset ID of the map from the player, just how FE2CM does it. You could even follow a similar idea, using the same box for registered maps and registering of new maps.

The only endpoint I know if is this one, and I’m not even sure if it’s deprecated, so you might need to look into that.

https://economy.roblox.com/v1/purchases/products/<productId>

it requires a request structure containing things like the .ROBLOSECURITY cookie and a X-CRSF token.


afterwards, you want to have some kind of system which generates a unique ID and stores that ID in association with the asset ID of the map model in a database. You could add some extra security like FE2CM does, requiring the map to be offsale before being able to load it.

After that, you need to tell the user their unique map code.

Then, in future, have them enter their unique map code, then have the server query the database. Once you have the asset ID, you can load it using InsertService:LoadAsset(assetId).

Hope this helps!

1 Like

Thank you, I’ll look into these more!!

1 Like