Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Trello Ban System not working?

Asked by
Smaltin 46
7 years ago

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.

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. M39a9am3R 3210 — 7y
0
Alright, I will do so right now. Smaltin 46 — 7y
0
make it filtering enabled User#10445 15 — 7y
0
Freemodle Carforlife1 59 — 5y
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. Smaltin 46 — 5y

1 answer

Log in to vote
0
Answered by 7 years ago

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)
Ad

Answer this question