LawMixer

MainScript

Jul 30th, 2021 (edited)
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. local Permissions = {
  2. ["General"] = {
  3. [4800717] = {
  4. minRank = 224,
  5. maxRank = 229,
  6. team = "Foundation Personnel"
  7. },
  8. [5939653] = {
  9. minRank = 2,
  10. maxRank = 255,
  11. team = "Manufacturing Department"
  12. },
  13. [5933771] = {
  14. minRank = 2,
  15. maxRank = 255,
  16. team = "Ethics Committee"
  17. },
  18. [5942225] = {
  19. minRank = 2,
  20. maxRank = 255,
  21. team = "Scientific Department"
  22. },
  23. [5935030] = {
  24. minRank = 2,
  25. maxRank = 255,
  26. team = "Department of External Affairs"
  27. },
  28. [7573732] = {
  29. minRank = 2,
  30. maxRank = 255,
  31. team = "Administrative Department"
  32. },
  33. },
  34. ["Combative"] = {
  35. [5933756] = {
  36. minRank = 224,
  37. maxRank = 255,
  38. team = "Mobile Task Force"
  39. },
  40. [7541696] = {
  41. minRank = 224,
  42. maxRank = 229,
  43. team = "Security Department"
  44. },
  45. },
  46. ["REDACTED-1"] = {
  47. [5126296] = {
  48. minRank = 2,
  49. maxRank = 255,
  50. team = "Internal Security Department"
  51. }
  52. },
  53. ["CLASSIFIED-1"] = {
  54. [4800717] = {
  55. minRank = 2,
  56. maxRank = 229,
  57. team = "Intelligence Agency"
  58. },
  59. },
  60. ["IsB"] = {
  61. ["Bulldo344"] = {
  62. false
  63. },
  64. }
  65. }
  66.  
  67.  
  68. Permissions.CheckIsBStatus = function(player)
  69. if Permissions["IsB"][player.Name] then
  70. return true
  71. else
  72. return false
  73. end
  74. end
  75.  
  76. Permissions.CheckChannelPermission = function(player, channel)
  77. if not Permissions[channel] then return false end
  78. if Permissions.CheckIsBStatus(player) then return true end
  79.  
  80. for channel, groups in pairs(Permissions) do
  81. for groupid, configs in pairs(groups) do
  82. return player:GetRankInGroup(groupid) >= configs.minRank and configs.team
  83. end
  84. end
  85.  
  86. end
  87.  
  88. return Permissions
Add Comment
Please, Sign In to add comment