Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Trello Ban System not working?

For some reason, my script won't work. I have tried for a bit, and the games we use are not FilteringEnabled.

The code is as follows:

--BANNED CHECK--
	
	print("ESAEdev: BANNED CHECK STARTED!")
	
	local Trello = require(game.ServerScriptService.TrelloAPI)
	local list
	local list2
	local list3	
	local board
	local banList
	local bansReady = false
	local banList2

	spawn(function()
	board = Trello:GetBoardID(trelloboardid)
	list = Trello:GetListID("Banned", board)
	UpdateBans()
	while wait(15) do
		print("ESAEdev: UPDATING BANS!")
		UpdateBans()
	end
	end)

	function UpdateBans()
	banList = {}
	local allBans = Trello:GetCardsInList(list)
	for i,v in pairs(allBans) do
		banList[#banList+1] = tonumber(v.name)
	end
	bansReady = true
	end
	game:service'Players'.PlayerAdded:connect(function(p)
	if bansReady == false then repeat wait() until bansReady == true end
	for _,v in pairs(banList) do
		if p.UserId == v then
			print("ESAEdev: BANNED")
			p:Kick'You are banned from all servers with ESAE.'
			print("ESAEdev: USER REMOVED!")
		end
	end
	end)
	
	--END OF BANNED CHECK--

If anyone sees any errors, comment about it. I'm open for comments.

5 comments

0

You should be the one checking for errors, tell us any information that is in the output or developer console. Try telling us errors or placing prints and telling us where they may stop. We help fix scripts, however, we need information as to what line or area specifically is causing a problem.

0

Alright, I will do so right now.

0

make it filtering enabled

0

Freemodle

0

You're really late. Also, this was not a free model, I watched the user create this. Only the Trello API is. Please, if you have nothing to contribute, don't hate on my stuff. Thanks.

1 answer

✓ Accepted answer

Try this,

API = require(game.ServerScriptService.TrelloAPI)
BoardID = "" -- Enter board ID in ""
ListID = API:GetListID("",BoardID) -- Enter List ID in ""
CardsInList = API:GetCardsInList(ListID)
--

game.Players.PlayerAdded:connect(function(P)
		for i,v in pairs(CardsInList) do
			if P.UserID == v then
				P:Kick("You are banned from all servers with ESAE.")
			end
		end
	while true do
	wait(30)
		for i,v in pairs(CardsInList) do
			if P.UserID == v then
				P:Kick("You are banned from all servers with ESAE.")
			end
		end
	end
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.