Roblox Gamepass / VIP Door Script (Auto Purchase Prompt)
Checks if a touching player owns your Gamepass ID — if yes, lets them pass; if no, opens the official Roblox purchase prompt.
-- Script inside the VIP Door Part
local Players = game:GetService("Players")
local MarketplaceService = game:GetService("MarketplaceService")
local GAMEPASS_ID = 0 -- Replace with your Gamepass ID
local door = script.Parent :: BasePart
local cooldown: { [number]: number } = {}
door.Touched:Connect(function(hit)
local player = Players:GetPlayerFromCharacter(hit.Parent)
if not player then return end
if cooldown[player.UserId] and os.clock() - cooldown[player.UserId] < 3 then return end
cooldown[player.UserId] = os.clock()
local ok, owns = pcall(function()
return MarketplaceService:UserOwnsGamePassAsync(player.UserId, GAMEPASS_ID)
end)
if ok and owns then
door.CanCollide = false
door.Transparency = 0.65
task.delay(2.5, function()
door.CanCollide = true
door.Transparency = 0.2
end)
else
MarketplaceService:PromptGamePassPurchase(player, GAMEPASS_ID)
end
end)How to install in Studio
- Create a glowing VIP door Part in Workspace (Anchored = true).
- Insert a Script inside that Part and paste the code.
- Replace GAMEPASS_ID = 0 with your real Gamepass numeric ID from Creator Hub.
Tips & customization
- For per-player pass-through so non-owners can't sneak in behind a VIP, use PhysicsService CollisionGroups.
Common questions.
Why wrap UserOwnsGamePassAsync in pcall?
MarketplaceService makes a web request that can occasionally fail or throttle; pcall prevents the script from crashing.
More free Luau scripts.
Shift-to-Sprint Script
Hold Left Shift to sprint smoothly with a subtle camera FieldOfView boost and clean speed reset on release.
Double Jump Script
Lets players jump a second time mid-air using Roblox's JumpRequest event (works on PC, mobile, and controller).
Kill Brick Script
Instead of copying 100 scripts into 100 lava bricks, tag any part 'KillBrick' and let one clean server script handle all of them.
Round System Script
A clean server loop that runs Intermission -> Active Round -> Winner announcement and updates a shared Status StringValue for your HUD.
Skip manual wiring.
Let Revix code & playtest it.
Start building freeFree to start. No card needed.

