Advertisement
LawMixer

Script

Jul 30th, 2021
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.87 KB | None | 0 0
  1. local Permissions = {
  2. ["General"] = {{4800717, 224, 229}, {4297894, 1, 255}, {5939653, 2, 255}, {5933771, 2, 255}, {5942225, 2, 255}, {5935030, 2, 255}, {7573732, 2, 255} },
  3. ["Combative"] = {{2986638, 1, 255}, {4297894, 1, 255}},
  4. ["Mobile Task Force"] = {5933756, 1, 255},
  5. ["REDACTED-1"] = {5126296, 2, 255},
  6. ["CLASSIFIED-1"] = {5126328, 2, 255},
  7. ["IsB"] = {
  8. ["Bulldo344"] = false
  9. }
  10. }
  11.  
  12.  
  13.  
  14. Permissions.CheckIsBStatus = function(player)
  15. if Permissions["IsB"][player.Name] then
  16. return true
  17. else
  18. return false
  19. end
  20. end
  21.  
  22. Permissions.CheckChannelPermission = function(player, channel)
  23. if not Permissions[channel] then return false end
  24. if Permissions.CheckIsBStatus(player) then return true end
  25. if channel == "Combative" then
  26. local GroupId1 = Permissions[channel]["Group1"][1]
  27. local GroupId2 = Permissions[channel]["Group2"][1]
  28. local MinRank1 = Permissions[channel]["Group1"][2]
  29. local MinRank2 = Permissions[channel]["Group2"][2]
  30. local MaxRank1 = Permissions[channel]["Group1"][3]
  31. local MaxRank2 = Permissions[channel]["Group2"][3]
  32.  
  33. if player:IsInGroup(GroupId1) and player:GetRankInGroup(GroupId1) >= MinRank1 and player:GetRankInGroup(GroupId1) <= MaxRank1 and player.Team == game.Teams["Security Department"] then
  34. return true
  35. elseif
  36. player:IsInGroup(GroupId2) and player:GetRankInGroup(GroupId2) >= MinRank2 and player:GetRankInGroup(GroupId2) <= MaxRank2 and player.Team == game.Teams["Mobile Task Force"] then
  37. return true
  38. else
  39. return false
  40. end
  41. elseif
  42. channel == "Mobile Task Force" then
  43. 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
  44. return true
  45. else
  46. return false
  47. end
  48. end
  49. end
  50.  
  51. return Permissions
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement