Loading Scripts from Google

Hello! I am new to scripting and I need some help. I wanted to make a ban script that would have known exploiters on it but I would update it a lot so I wanted to make it on Pastebin or GitHub but I don’t know how I would make it run from roblox studio. Please help.

1 Like

Hmmm this doesn’t really seem efficient to put known exploiters on a table of people to ban. Said exploiters can easily have/make alternate accounts to bypass this. The real efficient way to do this, is to ban them one by one. Have mods/admins to help with this as well!

While that would be a good idea, I plan on releasing it so that anybody can have their game safer from exploiters.

I would most likely have background checks on the accounts to find alternate accounts.

I’m not too entirely sure on how you’re going to do background checks???

Pastebin specifically has an API for creating and reading posts, you can also use loadstring coupled with HttpService to load scripts specifically. Good luck.

You can do this using HttpService.

It would look something like this:

local HTTPService = game:GetService("HttpService")
local url = "your patebin link here (Make sure it is the raw version)"

local response = HTTPService:GetAsync(url)
local Banned = string.split(response, "\n")

And on your pastebin you put your desired usernames or ids of exploiters each on a new line.

Edit: Banned is a table for all the usernames or ids on your pastebin.

Hope this helps :slight_smile:

How would it actually ban them then?

Check if it’s one of the players then ban them, sadly I had a tutorial for a few days on the community tutorials section (about making a ban script) but it got taken down a few hours ago due to “not being substantial enough” :frowning:

For now I moved it to scripting support so here’s the link to that:

local function IsExploiter(plr)
	local UserId = plr.UserId
	
	for i, v in pairs(Banned) do
		if v == UserId then
			return true
		end
	end
	return false
end

game.Players.PlayerAdded:Connect(function(plr)
	if IsExploiter(plr) then
		plr:Kick()
	end
end)

You put this code after the code that I wrote above. This whole script goes in a Server Script and preferably in ServerScriptStorage.

How should it be?

Like this:

000000000
000000010
000010000
010000000

Or like this:

000000000, 000000010, 000010000, 010000000

You can do it like that or if you wanna use the commas then do

local Banned = string.split(response, ",")

Instead of:

local Banned = string.split(response, "\n")

With my code, you should do it like the first one, where each id is on a new line. Tell me how it goes.