Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Permissions = {
- ["General"] = {{4800717, 224, 229}, {4297894, 1, 255}, {5939653, 2, 255}, {5933771, 2, 255}, {5942225, 2, 255}, {5935030, 2, 255}, {7573732, 2, 255} },
- ["Combative"] = {{2986638, 1, 255}, {4297894, 1, 255}},
- ["Mobile Task Force"] = {5933756, 1, 255},
- ["REDACTED-1"] = {5126296, 2, 255},
- ["CLASSIFIED-1"] = {5126328, 2, 255},
- ["IsB"] = {
- ["Bulldo344"] = false
- }
- }
- Permissions.CheckIsBStatus = function(player)
- if Permissions["IsB"][player.Name] then
- return true
- else
- return false
- end
- end
- Permissions.CheckChannelPermission = function(player, channel)
- if not Permissions[channel] then return false end
- if Permissions.CheckIsBStatus(player) then return true end
- if channel == "Combative" then
- local GroupId1 = Permissions[channel]["Group1"][1]
- local GroupId2 = Permissions[channel]["Group2"][1]
- local MinRank1 = Permissions[channel]["Group1"][2]
- local MinRank2 = Permissions[channel]["Group2"][2]
- local MaxRank1 = Permissions[channel]["Group1"][3]
- local MaxRank2 = Permissions[channel]["Group2"][3]
- if player:IsInGroup(GroupId1) and player:GetRankInGroup(GroupId1) >= MinRank1 and player:GetRankInGroup(GroupId1) <= MaxRank1 and player.Team == game.Teams["Security Department"] then
- return true
- elseif
- player:IsInGroup(GroupId2) and player:GetRankInGroup(GroupId2) >= MinRank2 and player:GetRankInGroup(GroupId2) <= MaxRank2 and player.Team == game.Teams["Mobile Task Force"] then
- return true
- else
- return false
- end
- elseif
- channel == "Mobile Task Force" then
- if player:IsInGroup(Permissions[channel][1]) and player:GetRankInGroup(Permissions[channel][1]) >= Permissions[channel][2] and player:GetRankInGroup(Permissions[channel][1]) <= Permissions[channel][3] and player.Team == game.Teams["Mobile Task Force"] then
- return true
- else
- return false
- end
- end
- end
- return Permissions
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement