BanIt is an open-source banning module that is extremely simple to use. Check out the docs to see what I mean. Don’t feel like it? Here’s an example banning script.
local BanIt = require(6451678459)
BanIt.Ban("Ty_Scripts")
And here’s an unbanning script:
local BanIt = require(6451678459)
BanIt.Unban("Ty_Scripts")
Yes… it’s that simple!
Found any module-breaking bugs? Please reply or send me a DM!
Also, suggestions… please reply here.
Update 11 Poll
Allow reason parameter to display at other times than the first kick
.UsernameBan (bans the user based on Username, will unban when the username is changed)
.DisplayBan (bans a user based on DisplayName, will unban the user when the DisplayName is different)
0voters
Thanks for considering this module for your banning needs. Again, please notify me of ways to improve the code!
I’ve got a suggestion, will you be able to ban with commands such as :ban or :kick eventually? I know you would need a permission system but this would be worth it.
I visualized this as more of a “ban service” meant for programmers, but if enough people support the idea, I could add commands/team up with an existing admin resource.
I have a question. If I ban someone by doing, for example. And they are in a vip server or in another server that is not mine will they still be banned? Basicly if they are playing right now and I ban them.
That is a good question! It will not kick them. I did not even think of this occuring, so I will add a feature to where it checks for ban updates every 30 seconds soon. Thanks for asking!
You don’t need to copy and paste the script shown here. You can just require the module:
That’s probably a good idea, I’ll roll it out with the next update (and you can always make a pull request on GitHub if you’d like it fixed before the next update).
Also; I noticed you said the username for functions was case sensitive. I only briefly looked at the source, but GetUserIdFromUsername hasn’t been case sensitive for me.
Update 8 is out! 58% of you voted for ShadowBan, so here it is. Here’s the documentation:
Technical details
Some improvements were made to shorten code, based on suggestion by a GitHub user named @ccuser44, were implemented. All pcalls were replaced by xpcalls, and some asserts were added. (Remember to make pull requests for anything you feel needs fixed!)
Thanks for choosing BanIt for all of your banning needs (and be sure to make suggestions)!