This is a localscript in StarterGui. This basically sees if a player is allowed to see the Developer Console from the whiteList and then if the player is allowed then the Developer Console is enabled and if not, it's disabled.
local player = game:GetService("Players").LocalPlayer
local starterGui = game:GetService("StarterGui")
local whiteList = {
"Precisionly",
"killzone45671",
"CommanderSkywalkerTR",
"Versatrax",
"Tragedy_Blue",
"DcMultiVerseParadox",
}
game["Run Service"].RenderStepped:wait()
if starterGui:GetCore("DeveloperConsoleVisible") then
if not whiteList[player.Name] then
starterGui:SetCore("DeveloperConsoleVisible", false)
end
end

2 comments
On line 9, would "for i,v in pairs(tbl) do" work?
Yes, but next is faster than pairs and looks neater.