Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function ExtractNames(t)
- local r={}
- for _,v in pairs(t) do
- table.insert(r,v.Name)
- end
- return r
- end
- local module = function()
- local defendersList = {}
- local raidersList = {}
- for _, player in pairs(game.Players:GetPlayers()) do
- table.insert(player.TeamColor==BrickColor.new("Bright red") and raidersList or defendersList, player)
- end
- local embed = {
- title = "Server Infomation",
- description =
- "Server `"..game.JobId.."` is currently official.\n"
- .."**Raid time remaining: " .. tostring(3600 - workspace.Schaltuhr.Value) .. "**\n"
- ..(workspace.Terminal.Controller.Value==BrickColor.new("Bright red")
- and "**Terminal time remaining: " .. tostring(workspace.Terminal.Countdown.Timer.Value) .."**\n"
- or "Terminal is controlled by Vortex Security.\n"
- )
- .."\n"
- .."**Player counts**\n"
- ,
- color = 0xE67E22,
- footer = {
- text = "Direct from server"
- },
- fields = {
- {
- name = "Defenders",
- value = #defendersList>0 and table.concat(ExtractNames(defendersList),"\n") or "none?",
- inline = true
- },
- {
- name = "Raiders",
- value = #raidersList>0 and table.concat(ExtractNames(raidersList),"\n") or "none?",
- inline = true
- }
- }
- }
- print(game.HttpService:JSONEncode(embed))
- return embed
- end
- return module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement