--[[
INSTRUCTIONS ARE BELOW.

Look in the Configuration, there are 2 IntValues, 1 is GroupId and the other is RankId. The rank
Id is the numbers that you set the rank to in your group, the numbers are (1-255), it will not 
only just work for that rank level, it will work for the rank and ABOVE. The GroupId is the numbers
at the end of your group's URL.Copy those numbers and but it in the Value section for GroupId. Now
You have finished the set up for the group door! WARNING : DONT TOUCH ANYTHING DOWN THERE...
]]


local config = script.Parent.Configuration

script.Parent.Touched:connect(function(part)
	if part.Parent and Game:GetService('Players'):GetPlayerFromCharacter(part.Parent) then
		local player = Game:GetService('Players'):GetPlayerFromCharacter(part.Parent)
		if player:GetRankInGroup(config.GroupId.Value) >= config.RankId.Value then
			script.Parent.Transparency = 1
			script.Parent.CanCollide = false
			wait(2)
			script.Parent.Transparency = 1
			script.Parent.CanCollide = true
		end
	end
end)
