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