Time-Based Moderation System

I have no other use for this and figured I’d post it here, I made this around a year ago and only briefly touched up the code. It all works, but it isn’t exactly an example of good coding.

TimeBasedModerationFix_2.rbxm (13.1 KB)

The idea behind this system is having an easy method to ban players for [x] amount of time. The security on this module only reads the requests of administrators, and also prevents an admin from taking moderative action against another admin.

This system is nothing too special, it is merely to create ease above other popular admin systems that do not allow for a time limit on bans.

The coding is relatively easy to understand and the premise of the operation is simply using tick() with DataStores, and can be easily implemented into other use cases if not easily recreated.

Webhooks can easily be set up using values without editing the script at all.
image

I’m not entirely sure if this fits the memo of the community resources subcategory, however I figured I’d post this and the Post Approval team can decide using their own discretion whether to keep it up or not.


Edit:
Fixed straggling code from the original system that I neglected to remove.

8 Likes

A quick look over the source code shows that it bans the user that issues the ban, and not the target. Might want to correct that. Or maybe it does nothing at all, because there are some odd checks in place.

10 Likes

In translating the variables I must’ve overlooked these improper copy+paste errors, thank you for pointing them out. The OP has been updated with a fixed version.

As is evident, the kick function was set up properly however I did not properly convert the ban function along with it.

1 Like

changed it a bit

1 Like

This is really awesome! Thanks so much for sharing it!