Introducing Crrustban!

Kicking players based on their username is pointless because usernames can be changed.

if playerWhoJoined.UserId == bannedID[1] then
You are only checking if the player id matches the first element in the bannedID array. In your example, players with the userId 205576167 and 1 are not kicked even though they are on the kick list.

if playerJoined:IsA("Player") then
You do not need to check for this.

4 Likes

Yeah, and that’s why I provided 2 examples on how to do it.

Thanks for pointing this out, im fixing it right now

Updated it to be fully functional, so thank you!

The Username banning/kicking would be for trolls/jokes on friends really, but the ID is more of a serious one.

Thanks for sharing interest and ideas!

Yes, I agree, however while I am actively seeking better ways to handle bots etc…, this is good enough until then.

Very true, very true.

1 Like
for i,v in pairs(bannedID) do
game.Players.PlayerAdded:Connect(function(playerWhoJoined)

For every player on the list, you are creating a PlayerAdded connection. You have the right idea, but the for loop is in the wrong place.

2 Likes

slaps forehead

Well isn’t that silly of me?!
Wow, me need to kick me out of my game now…

Thanks, you have been most helpful!

2 Likes

if a player’s account is younger than 10 days, why don’t you just make a GUI where they have to put in a number, or a string to prove they are not a bot.

thats pretty cool

30charecters

Thank you!

As previously mentioned, I am making major improvements right now, such as what @twichman123 suggested.

You can use table.find instead of looping through each ID in the banlist.
if table.find(bannedID,playerWhoJoined.UserId) then

1 Like

A number of points I’ve observed from your code:

Age limits: These are against the Terms of Service. Kicking people for having different UpperTorso and UpperRightArm brick colour is… odd and not effective; but you’re still using age limits.

Additionally, your code has a number of anti-patterns; including indexing services (use GetService!), as well as unclear variables, unusual indentation, and race conditions.

1 Like

Oops, the brick color was accidental, I was testing something out in studio, and forgot about it. Don’t worry, no racial conditions are taking place.

Yeah, that was for my minigame, but was testing it out in my other studio haha
(basically, if they get infected something happens to their skin and yeah)

UPDATE: Version 0.2.0

Users with low account age now have to go into 2 step verification! (W.I.P)

1 Like

Unless I am blind, restricting access to users below a certain account age is not against the ToS. Raising a veterancy status as being above others or discriminating someone according to their real age is an offense, but not allowing someone access to a certain feature depending on whether their account is above a certain limit of a few weeks should be alright, I even noticed a few front page games implementing it as a security measure when I was playing on an alt (though it was about 2 months ago).

This doesn’t mean everyone should go ahead and do this though. You should provide a system to send players to a different server in case they don’t fulfill the requirements or were banned. You should also implement a fail-safe where a player gets sent to an empty place before getting kicked. Some server crashing exploits were countered multiple times this way.

How would you implement this? Offer a config module with blank strings included by default. If the string is equal to "", then do whatever you want to do directly; otherwise, teleport the player to the provided place.

2 Likes

yes but this function is used to stop Bots from joining games, plus it just asks the players to do a 2FA to make sure they are really human

Shouldn’t this go in #resources:community-tutorials ?

What plugin page? This just seems like a tutorial on how to ban players.

EDIT: Oh nevermind you changed it to model

There is no description for the model.

Aye, I am updating that now, thanks for the concern.

I like it but this would be much harder for People who own games. I might have read it wrong but every time someone needs to be banned you have to edit the game then shutdown. Well that’s just a waste of time. I recommend a discord bot and Google sheets. Google Sheets will create a database that will keep the players name and player id. Plus, it will global ban them instantly!

1 Like