Is it possible to make a Private Sever using a Gamepass like other game

I’m just want to know is it possible to make a Private Server using a Gamepass instead.
I’m working on the new game, and it has Menu Screen Play.

After purchasing the Game pass, you can now create a private server, create a new private server’s password, the password itself can be used to access the private server, the password can be shared to your friends too, so they can join up together and have fun.
No game pass, but if you have a password you can still join it, make sure the password itself is CORRECT.

The private server owner can change the password anytime, so nobody can try entering it.

Sorry for my bad grammar, hope this won’t confuse you all.

Hello!
Of course you can, let’s take an example:
to create a private server, let’s say you have a menu (GUI) to create it, you can use the pcall function to confirm if it has the gamepass purchased, here an example code:

local MarketplaceService = game:GetService("MarketplaceService")
	local hasPass = false


	local success, message = pcall(function()
		hasPass = MarketplaceService:UserOwnsGamePassAsync(player.UserId, "here id of gamepass")
	end)
	if hasPass == true then
		Frame.Visible = true // its working with enable whatever
	end	

There are thousands of ways by which you can apply to create a private server, in case you want the private server to be temporary and can buy more, then you can create a developers products and the same mechanism.

1 Like

Once you confirmed the player has the required gamepass, allow them to create private servers through using remote events to tell the server to create and return a reserved server access code that the owner and whoever else can use to join the server via TeleportService"TeleportToPrivateServer
I recommend you read the api documentation on TeleportService

2 Likes

ouh, how about the code?

the code to access the private server

As the player above said you can look at that document to devise a code to teleport to a private server.

1 Like

oh ook, will do that

sksksksksk