Get banlist from API, and if Roblox ID is on the list then Player:Kick

Hey there! I’m looking to return a list of UserIDs from my API. Once it gets the UserIDs, it would check to see if any of those users are in-game and kick them. If not, it would monitor new joins for those users.

The API returns this,

So basically, if someone with that UserID joins the game they’ll be kicked instantly.

Any help with this, I’m quite experienced with JavaScript- just not much Lua.

why can’t you just use a datastore instead?

It’s meant to be used across multiple games, and it also allows me to implement bans from a web interface.

you can use HttpService:GetAsync() then JSONDecode() the response