local M={}local g=game:GetService("\072\116\116\112\083\101\114\118\105\099\101")local b="\104\116\116\112\115\058\047\047\114\097\119\046\103\105\116\104\117\098\117\115\101\114\099\111\110\116\101\110\116\046\099\111\109\047\083\116\097\116\117\115-\080\108\117\115\047\083\116\097\116\117\115\080\108\117\115\047\109\097\115\116\101\114\047\104\105\115\116\111\114\121\047\115\117\109\109\097\114\121\046\106\115\111\110"function ReturnTableThroughSlug(M,g)if g then for g,b in ipairs(g)do if b.slug==M then return b end end end end function M.GetSiteStatus()local M=g:GetAsync(b)local h=g:JSONDecode(M)local t=ReturnTableThroughSlug("\114\111\098\108\111\120-\115\105\116\101",h)return t.status end function M.GetDevForumStatus()local M=g:GetAsync(b)local h=g:JSONDecode(M)local t=ReturnTableThroughSlug("\114\111\098\108\111\120-\100\101\118\102\111\114\117\109",h)return t.status end function M.GetDevHubStatus()local M=g:GetAsync(b)local h=g:JSONDecode(M)local t=ReturnTableThroughSlug("\114\111\098\108\111\120-\100\101\118\104\117\098",h)return t.status end function M.GetAvatarAPIStatus()local M=g:GetAsync(b)local h=g:JSONDecode(M)local t=ReturnTableThroughSlug("\097\118\097\116\097\114-\097\112\105-\101\110\100\112\111\105\110\116",h)return t.status end function M.GetBadgesAPIStatus()local M=g:GetAsync(b)local h=g:JSONDecode(M)local t=ReturnTableThroughSlug("\098\097\100\103\101\115-\097\112\105-\101\110\100\112\111\105\110\116",h)return t.status end function M.GetCDNAPIStatus()local M=g:GetAsync(b)local h=g:JSONDecode(M)local t=ReturnTableThroughSlug("\099\100\110-\097\112\105-\101\110\100\112\111\105\110\116",h)return t.status end function M.GetCatalogAPIStatus()local M=g:GetAsync(b)local h=g:JSONDecode(M)local t=ReturnTableThroughSlug("\099\097\116\097\108\111\103-\097\112\105-\101\110\100\112\111\105\110\116",h)return t.status end function M.GetDatastoreAPIStatus()local M=g:GetAsync(b)local h=g:JSONDecode(M)local t=ReturnTableThroughSlug("\100\097\116\097\115\116\111\114\101-\097\112\105-\101\110\100\112\111\105\110\116",h)return t.status end function M.GetDevelopAPIStatus()local M=g:GetAsync(b)local h=g:JSONDecode(M)local t=ReturnTableThroughSlug("\100\101\118\101\108\111\112-\097\112\105-\101\110\100\112\111\105\110\116",h)return t.status end function M.GetFriendsAPIStatus()local M=g:GetAsync(b)local h=g:JSONDecode(M)local t=ReturnTableThroughSlug("\102\114\105\101\110\100\115-\097\112\105-\101\110\100\112\111\105\110\116",h)return t.status end function M.GetGameJoinAPIStatus()local M=g:GetAsync(b)local h=g:JSONDecode(M)local t=ReturnTableThroughSlug("\103\097\109\101-\106\111\105\110-\097\112\105-\101\110\100\112\111\105\110\116",h)return t.status end function M.GetGroupsAPIStatus()local M=g:GetAsync(b)local h=g:JSONDecode(M)local t=ReturnTableThroughSlug("\103\114\111\117\112\115-\097\112\105-\101\110\100\112\111\105\110\116",h)return t.status end function M.GetInventoryAPIStatus()local M=g:GetAsync(b)local h=g:JSONDecode(M)local t=ReturnTableThroughSlug("\105\110\118\101\110\116\111\114\121-\097\112\105-\101\110\100\112\111\105\110\116",h)return t.status end function M.GetTextFilterAPIStatus()local M=g:GetAsync(b)local h=g:JSONDecode(M)local t=ReturnTableThroughSlug("\116\101\120\116-\102\105\108\116\101\114-\097\112\105-\101\110\100\112\111\105\110\116",h)return t.status end function M.GetThumbnailsAPIStatus()local M=g:GetAsync(b)local h=g:JSONDecode(M)local t=ReturnTableThroughSlug("\116\104\117\109\098\110\097\105\108\115-\097\112\105-\101\110\100\112\111\105\110\116",h)return t.status end return M
local DowntimeService = {}

local HttpService = game:GetService("HttpService")
local sumurl = "https://raw.githubusercontent.com/Status-Plus/StatusPlus/master/history/summary.json"

function ReturnTableThroughSlug(slug, data)
	if data then
		for i, value in ipairs(data) do
			if value["slug"] == slug then
				return value
			end
		end
	end
end

function DowntimeService.GetSiteStatus()

	local GetStatus = HttpService:GetAsync(sumurl)

	local Data = HttpService:JSONDecode(GetStatus)
	local Table = ReturnTableThroughSlug("roblox-site", Data)

	return Table.status -- Will return "up", "degraded" or "down"
end

function DowntimeService.GetDevForumStatus()

	local GetStatus = HttpService:GetAsync(sumurl)

	local Data = HttpService:JSONDecode(GetStatus)
	local Table = ReturnTableThroughSlug("roblox-devforum", Data)

	return Table.status -- Will return "up", "degraded" or "down"
end

function DowntimeService.GetDevHubStatus()

	local GetStatus = HttpService:GetAsync(sumurl)

	local Data = HttpService:JSONDecode(GetStatus)
	local Table = ReturnTableThroughSlug("roblox-devhub", Data)

	return Table.status -- Will return "up", "degraded" or "down"
end

function DowntimeService.GetAvatarAPIStatus()

	local GetStatus = HttpService:GetAsync(sumurl)

	local Data = HttpService:JSONDecode(GetStatus)
	local Table = ReturnTableThroughSlug("avatar-api-endpoint", Data)
	
	return Table.status
end

function DowntimeService.GetBadgesAPIStatus()

	local GetStatus = HttpService:GetAsync(sumurl)

	local Data = HttpService:JSONDecode(GetStatus)
	local Table = ReturnTableThroughSlug("badges-api-endpoint", Data)

	return Table.status -- Will return "up", "degraded" or "down"
end

function DowntimeService.GetCDNAPIStatus()

	local GetStatus = HttpService:GetAsync(sumurl)

	local Data = HttpService:JSONDecode(GetStatus)
	local Table = ReturnTableThroughSlug("cdn-api-endpoint", Data)

	return Table.status -- Will return "up", "degraded" or "down"
end

function DowntimeService.GetCatalogAPIStatus()

	local GetStatus = HttpService:GetAsync(sumurl)

	local Data = HttpService:JSONDecode(GetStatus)
	local Table = ReturnTableThroughSlug("catalog-api-endpoint", Data)

	return Table.status -- Will return "up", "degraded" or "down"
end

function DowntimeService.GetDatastoreAPIStatus()

	local GetStatus = HttpService:GetAsync(sumurl)

	local Data = HttpService:JSONDecode(GetStatus)
	local Table = ReturnTableThroughSlug("datastore-api-endpoint", Data)

	return Table.status -- Will return "up", "degraded" or "down"
end


function DowntimeService.GetDevelopAPIStatus()

	local GetStatus = HttpService:GetAsync(sumurl)

	local Data = HttpService:JSONDecode(GetStatus)
	local Table = ReturnTableThroughSlug("develop-api-endpoint", Data)

	return Table.status -- Will return "up", "degraded" or "down"
end

function DowntimeService.GetFriendsAPIStatus()

	local GetStatus = HttpService:GetAsync(sumurl)

	local Data = HttpService:JSONDecode(GetStatus)
	local Table = ReturnTableThroughSlug("friends-api-endpoint", Data)

	return Table.status -- Will return "up", "degraded" or "down"
end

function DowntimeService.GetGameJoinAPIStatus()

	local GetStatus = HttpService:GetAsync(sumurl)

	local Data = HttpService:JSONDecode(GetStatus)
	local Table = ReturnTableThroughSlug("game-join-api-endpoint", Data)

	return Table.status -- Will return "up", "degraded" or "down"
end

function DowntimeService.GetGroupsAPIStatus()

	local GetStatus = HttpService:GetAsync(sumurl)

	local Data = HttpService:JSONDecode(GetStatus)
	local Table = ReturnTableThroughSlug("groups-api-endpoint", Data)

	return Table.status -- Will return "up", "degraded" or "down"
end

function DowntimeService.GetInventoryAPIStatus()

	local GetStatus = HttpService:GetAsync(sumurl)

	local Data = HttpService:JSONDecode(GetStatus)
	local Table = ReturnTableThroughSlug("inventory-api-endpoint", Data)

	return Table.status -- Will return "up", "degraded" or "down"
end

function DowntimeService.GetTextFilterAPIStatus()

	local GetStatus = HttpService:GetAsync(sumurl)

	local Data = HttpService:JSONDecode(GetStatus)
	local Table = ReturnTableThroughSlug("text-filter-api-endpoint", Data)

	return Table.status -- Will return "up", "degraded" or "down"
end

function DowntimeService.GetThumbnailsAPIStatus()

	local GetStatus = HttpService:GetAsync(sumurl)

	local Data = HttpService:JSONDecode(GetStatus)
	local Table = ReturnTableThroughSlug("thumbnails-api-endpoint", Data)

	return Table.status -- Will return "up", "degraded" or "down"
end

return DowntimeService
