BanIt - Simple ban module for anyone

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.

2 Likes

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.

BanIt.Ban("Ty_Scripts")
2 Likes

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!

1 Like

Aw come on I was legit just developing something like this (Mine was a bit more complicated though). Good job though.

2 Likes

Quick question: how did you get the Players.PlayerAdded event to run on a modulescript? Whenever I try that nothing happens.

2 Likes

Since a whopping 92% of you requested it, the TimedBan function has been released!
Below is the snippet from the docs on how to use it.

Thanks for choosing BanIt!

6 Likes

Do I place the script inside the server script storage? Also I can just copy and paste the script instead I change the numbers of an item right?

Shouldn’t the Players:GetUserIdFromNameAsync() calls be wrapped in pcalls?

1 Like

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

Update 7 has been rolled out! I’ll recap what’s available:

  • Ban
  • ServerBan
  • TimedBan
  • ServerUnban
  • Unban
  • When banning, all servers are scanned for the person to be banned (thanks @FelixProfit)
  • Enhanced pcall security (thanks @twinqle)

Update 8, releasing either today or tomorrow, will contain all of the above, and will add:

  • ShadowBan (recently got more votes than SetUnbannable)
1 Like

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.

1 Like

So once I have the module I can just instantly make a newer script and do the

and that’s that’s it.

Thank you! I will start using this now :smiley: .

1 Like

You should change the name to temp ban

Basically yes, the server automatically will update the Script when a new update is available.

1 Like

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

1 Like

ShadowBan has been MASSIVELY improved… but not by me. This is why open-source code is the future:

  • More kick messages added
  • Sometimes user appearance does not load
  • Ownership of character is transferred to server to add lag
  • Speed and jump changes are randomly decided
  • AutoRotate is randomly enabled/disabled

Thanks to Github user ccuser44 for the awesome additions!

2 Likes

Man, activity on this has been extremely great. Keep it up!

1 Like

I am assuming this uses data stores for banning, and if so, why should we use your module when we can make our own? Making data store requests for both regular player data and bans rather than combining the two is not very efficient, and honestly, banning is not that difficult to implement.

You can ask this about basically any module. I can personally tell you this took days to make. Implementing bans with a module just saves some extra time (and keeps lines of code short).

2 Likes