Team Config
Group-locking Teams:
Step 1:
Navigate to ServerScriptService>Services>RemoteService:3225
Step 2:
Replace whole line with:
if Player:IsInGroup(TeamsDatabase[Value].GroupId) or Developers[Player.UserId] ~= nil then
PlayerListService:ChangeTeam(Player, Value)
Events.Alerts:FireClient(Player, "Change Team", "You have been switched to "..tostring(Value), "Blue")
end
Trello-locking Teams:
Step 1: Open Script
Navigate to ServerScriptService>Services>TrelloService
Step 2: Paste Code
Paste the following before the return TrelloService
line.
function TrelloService:GetTeamWhitelist(Player, Team)
if cooldown[Player] then return nil end
cooldown[Player] = true
task.delay(3, function() cooldown[Player] = nil end)
if not Lists[Team.."_TW"] then return true end
local GET = HttpService:GetAsync(temp)
local Results = HttpService:JSONDecode(GET)
if Results then
for i, v in Results do
if Lists[Team.."_TW"] == v.idList then
if Player.UserId == tonumber(v.name) then
return true
elseif Player.Name == v.name then
return true
elseif v.name:sub(1,6):lower() == "group:" then
local str = v.name:sub(7)
if str then
local tbl = str:split(":")
if tbl[1] then
if tbl[2] then
if Player:GetRankInGroup(tbl[1]) >= tbl[2] then
return true
end
else
if Player:IsInGroup(tbl[1]) then
return true
end
end
end
end
end
end
end
return false
end
end
Step 3: Open Trello
Go to trello
Step 4: Create Board
Create a board by clicking "Create new Board"
Step 5: Copy BoardId
Copy the boardId from the address bar (eg: the "boardId" in https://trello.com/b/boardId/boardName)
Step 6: Put boardId into script
Go to the TrelloService module script and add your boardId into the "board" variable.
Format:
local board = "https://api.trello.com/1/boards/boardId"
Step 7: Copy personal app key
Go here and copy your personal key
Step 8: Generate token
Look below the personal app key and click generate token.
You can go up to the address bar and change the text between "name=" and "&key=" to whatever you wish, or you can keep it the same.
Click "Allow" and copy your token.
Step 9: Input token & key into script
Place your key in both the "getCards" and "getLists" variables.
Like:
local getCards = board.."cards?key=KEYHERE&token=TOKENHERE"
local getLists = board.."lists?key=KEYHERE&token=TOKENHERE"
Step 10: Create Lists
On your trello board, create lists for each of the teams you would like whitelisted.
Step 11: Get ListIds
Go up to the address bar and add .json to the end of the URL, hit enter.
This may look crazy at first, but all you need to do is search for the name of the list and copy the id of the board.
Like this:
Repeat for all of the teams/lists you need.
Step 12: Add ids to table
For each of the teams, add them as entries into the "Lists" table.
Format:
["TeamNameHere_TW"] = "ListIdHere",
Step 13: Paste another bit
Replace ServerScriptService>Services>RemoteService line 3229 & line 3230 to:
if TrelloService:GetTeamWhitelist(Player, Value) then
PlayerListService:ChangeTeam(Player, Value)
Events.Alerts:FireClient(Player, "Change Team", "You have been switched to "..tostring(Value), "Blue")
else
Events.Alerts:FireClient(Player, "Team Change", "You do not have permission to join this team!", "Red")
end
Step 14: Paste again
Replace ServerScriptService>Services>RemoteService line 709 until 714 with:
if TrelloService:GetTeamWhitelist(Player, Team) then
PlayerListService:ChangeTeam(Player, Team)
MDTService.UpdateCallsign(Player, nil)
wait(0.25)
Player:LoadCharacter()
TeamChangeDebounce[Player] = nil
API.unlockMovement(Player)
else
Events.Alerts:FireClient(Player, "Change Team", "You do not have permission to join this team!", "Red")
end
Removing Team Killing Notifications:
Step 1:
Navigate to ServerScriptService>Services>RemoteService:5027
Step 2:
Remove ( or comment out ) the following:
if TeamsDatabase[killer.Team.Name].IsLEO == true and TeamsDatabase[Player.Team.Name].IsLEO == true and game.PrivateServerId == "" then
Events.Alerts:FireClient(killer, "Team Killing", "Killing other LEOs is against game rules. Continuing this behaviour will result in moderation!", "Red", true)
for i,v in pairs(game.Players:GetPlayers()) do
if require(game:GetService("ServerScriptService").Services.DataService):GetData(v).Moderator or require(game:GetService("ServerScriptService").Services.DataService):GetData(v).Developer then
Events.Alerts:FireClient(v, "Team Killing", Player.Name.." has just been team killed by "..killer.Name, "Red", true)
end
end
end
Adding team-changer UI:
Step 1:
Open the 'Find all / Replace All' menu by going to View>Find All / Replace All
Step 2:
Search for 7262405121 and replace with your place's ID#
![Image]