local db = false
script.Parent.Touched:connect(function(hit)
local plr = game:service("Players"):GetPlayerFromCharacter(hit.Parent)
if plr:GetRankInGroup(1203527) >= 75 then
if db == true then return; end
db = true
script.Parent.Transparency = 0.6
script.Parent.CanCollide = false
wait(1)
script.Parent.Transparency = 0
script.Parent.CanCollide = true
db = false
else
return print("Player not HR, ending function.")
end
end)
if the player has a rank of 75 and up, it'll allow them to access the door. if they're not, it'll end the function. |