Vip Door Script

Source Code:

local marketplaceservice = game:GetService("MarketplaceService")

local Door = game.Workspace.VipDoor
local Player = game.Players.LocalPlayer

local GamepassId = 0
local Debounce = false

Door.Touched:Connect(function(Touched)
	local PartParent = Touched.Parent
	local humanoid = PartParent:FindFirstChildWhichIsA("Humanoid")
	
	if humanoid then
		if Debounce == false then
			Debounce = true
			if marketplaceservice:UserOwnsGamePassAsync(Player.UserId, GamepassId) then
				Door.CanCollide = false
			else
				marketplaceservice:PromptGamePassPurchase(Player, GamepassId)
				wait(3)
				Debounce = false
			end
		end
	end
end)
1 Like

This topic was automatically closed 1 minute after the last reply. New replies are no longer allowed.