How do I let players w/ higher tiered VIPs go into VIP rooms for lower tiered VIPs?
I'm having trouble making a system where a player w/ a high tier VIP game pass is able to go into a room that's accessible to lower tiered VIPs.
Example: Let's say a player bought a VIP game pass that's called Mega VIP. That player who bought Mega VIP should also get access to the VIP tier below Mega VIP, called Normal VIP.
How would I let the player that bought Mega VIP also get access to Normal VIP which is a "lower tier" than Mega VIP? (Hope I didn't sound too redundant with this question.)
Here's my script:
(Does not work)
01 | local Config = script.Parent.Configuration |
02 | local Gamepass = Config.GamepassId.Value |
03 | local Group = Config.GroupId.Value |
04 | local Gamepass 2 = Config.GamepassId 2. Value |
05 | local Kill = Config.KillOnTouch.Value |
07 | local Door = script.Parent.Door |
12 | function AllowedIn(Player) |
13 | if Player.userId = = 0 then |
15 | elseif Gamepass or Gamepass 2 > 0 then |
16 | if game.MarketplaceService:PlayerOwnsAsset(Player,Gamepass or Gamepass 2 ) then |
20 | if Player:IsInGroup(Group) then |
29 | Door.Touched:connect( function (hit) |
30 | if hit.Parent:FindFirstChild( "Humanoid" ) then |
31 | local Player = game.Players:GetPlayerFromCharacter(hit.Parent) |
32 | if Player and Debounce then |
34 | if AllowedIn(Player) then |
35 | Door.CanCollide = false |
36 | Door.Transparency = 0.5 |
39 | Door.CanCollide = true |
43 | if Gamepass or Gamepass 2 > 0 then |
44 | game.MarketplaceService:PromptPurchase(Player,Gamepass) |
47 | hit.Parent.Humanoid.Health = 0 |
48 | local Explosion = Instance.new( "Explosion" ,workspace) |
49 | Explosion.BlastPressure = 0 |
50 | Explosion.Position = hit.Position |
52 | if hit.Parent:FindFirstChild( "Torso" ) then |
53 | hit.Parent.Torso.Velocity = Door.CFrame.lookVector * 150 |