Heyo! Wondering how I could make a script that doesn’t let a person join a game if there account was created in the last 30 days. If they made the account on 3/4/2019, they would be able to join on 4/3/19. If they try and join before 30 days are up, they get kicked. How would I go about making this?
See:
Just be aware that 30 days is a long time, enough that implementing this will hurt your user acquisition via friend-joins more than it will keep out trolls or banned players. Players who like to troll in games already have dozens of alts ready-made. Botters also use pools of old, compromised accounts they’ve brute-forced their way into.
You’re allowed to kick users based on their account age? The last thing I remember is that kicking based on account age wasn’t necessarily permitted but that was mostly due to the guest system.
The existence of the practice is already known and Roblox doesn’t exactly police games, however I distinctly remember that kicking based on account age wasn’t entirely allowed up until the removal of guests. I don’t know if it was a rule to begin with or if there’s anything standing about that now.
This practice isn’t really effective as exploiters and botters already have many premade accounts and you’re limiting access to new users on Roblox.
Exploiters maybe, but I have found that most botted accounts are terminated in under a month.
The code required, for anyone that needs it.
local players = game:GetService("Players")
local minimumAge = 0 --Change to minimum account age (in days).
local kickMessage = "" --Kick message here.
local function onPlayerAdded(player)
if player.AccountAge <= minimumAge then
player:Kick(kickMessage)
end
end
players.PlayerAdded:Connect(onPlayerAdded)