This is pretty easy, it's the same as GamepassService but just with BadgeService.
01 | local Door = game.Workspace.VipBadgeDoor |
03 | function onTouched(hit) |
04 | local human = hit.Parent:findFirstChild( "Humanoid" ) |
05 | if (human ~ = nil ) then |
06 | if game:GetService( "BadgeService" ):UserHasBadge(game.Players [ human.Parent.Name ] .userId, script.Parent.BadgeID.Value) ~ = false then |
07 | Door.Transparency = 0.5 |
08 | Door.CanCollide = false |
10 | Door.CanCollide = true |
15 | script.Parent.Touched:connect(onTouched) |
Haven't tested this, but it should probably work.
Note: Make a IntValue in the door and name it BadgeID (or whatever you want to, you just have to change it in the script).
And for the door you can just make a big brick or something.