The code below is supposed to check for whitelisted players in the json database.
However, it doesn’t do anything even though HTTPService is enabled.
I’ve tried looping until the website will return true(means it works), but it still doesn’t work.
Note: the script is a ModuleScript
local Blacklist = {}
local function getHttp()
local succ, err = pcall(function()
game:GetService('HttpService'):GetAsync('https://www.google.com')
end)
if succ then
return true
else
return false
end
end
if getHttp() then
local Http = game:GetService("HttpService")
local Json = Http:GetAsync("gist.github.com/user/blacklist.json")
local main = Http:JSONDecode(Json)
for i, v in pairs(main) do
table.insert(Blacklist, i, v)
end
end