How to make a VIP spawn location?

Hey there! I made a VIP gamepass where the player can obtain significanrt benefits compared to a normal player, but I don’t know what to do for what I’m about to explain.

You know how spawn locations work, the usual where players spawn? I want to put in a script where it checks the gamepass ID within the spawner, and spawns the player there. I want to achieve something like this.

local PassId = 00000
game.Players.PlayerAdded:Connect(function(plr)
	plr.Chatted:Connect(function(msg)
		if string.lower(msg) == '!spawn' and MS:UserOwnsGamepassAsync(plr.UserId, PassId) then

Something similar to that code, but instead of that, it’s where the player spawns at an exclusive area for them only.

In simpler terms, it would be like this:
Player owns gamepass, spawns at different location with that gamepass.

Is there anyone out there that can help me achieve this? I don’t know where to start, and an example with a script that works would be really nice!

Im not giving all the script because I dont know how gamepass works (I dont use gamepass), but in the teleport line, put this

Put your spawn part (normal part) in the workspace

plr.CharacterAdded:Connect(function(char)
   task.wait(.2)
   char.HumanoidRootPart.CFrame = workspace.YourSpawnPartHere.CFrame
end)
1 Like

Thanks for the reply!

I’ll be sure to test it out, as well as implementing a gamepass ID code into it to see if it works. Thanks!

local Players = game:GetService("Players")
local Marketplace = game:GetService("MarketplaceService")

local GamepassId = 0 --Change to ID of gamepass.

local Part = workspace.Part --Example teleport location.

Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Character)
		local Success, Result = pcall(function()
			return Marketplace:UserOwnsGamePassAsync(Player.UserId, GamepassId)
		end)

		if Success then
			if Result then
				Character:PivotTo(Part.CFrame) --Example.
			end
		end
	end)
end)

This worked for me when testing.

2 Likes