-
What do you want to achieve? Keep it simple and clear!
I want to make a blacklist script that takes data from github and kick any players with the id. -
What is the issue? Include screenshots / videos if possible!
The script simply doesn’t work. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I did, but I haven’t found the solution so far.
Here’s the code:
local url = ""
local blk = {}
local HTTP = game:GetService("HttpService")
function req()
local s, r = pcall(function()
return HTTP:GetAsync(url)
end)
return s, r
end
function spl(t, tbl)
for w in string.gmatch(t, "([^,]+)") do
local num = tonumber(w)
if num then
table.insert(tbl, num)
else
warn("Invalid user ID found:", w)
end
end
end
local s, r = req()
if s then
print("Fetched data:", r)
spl(r, blk)
else
warn("Failed to retrieve text from GitHub:", r)
return
end
game.Players.PlayerAdded:Connect(function(player)
for _, playerID in pairs(blk) do
if player.UserId == playerID then
player:Kick("You are blacklisted!")
return
end
end
end)
Would appreciate the help!