Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- || 📜 AUTHOR: @4zx16 || GAMEPASS AND GROUP RANK DOOR || ONLY CHANGE ID AND GROUP AND RANK.
- ]]
- local MPS = game:GetService('MarketplaceService')
- local id = 0
- local Group = 0
- local RankInGroup = 0
- local function onTouched(hit)
- local player = game.Players:GetPlayerFromCharacter(hit.Parent)
- local Timeout = false
- local Door = script.Parent
- if player ~= nil and Timeout == false then
- if MPS:UserOwnsGamePassAsync(player.UserId, id) then
- Timeout = true
- Door.CanCollide = false
- Door.Transparency = 0.7
- wait(1)
- Timeout = false
- Door.CanCollide = true
- Door.Transparency = 0
- elseif player:GetRankInGroup(Group) >= RankInGroup and Timeout == false then
- Timeout = true
- Door.CanCollide = false
- Door.Transparency = 0.7
- wait(1)
- Timeout = false
- Door.CanCollide = false
- Door.Transparency = 0
- else
- player.Character:BreakJoints()
- MPS:PromptGamePassPurchase(player, id)
- end
- end
- end
- script.Parent.Touched:Connect(onTouched)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement