Account age not enough script code example

Example: Account age not enough script

--[ A Script By Rigby#9052 on Discord ]--

local config = {
	
	--Feel free to edit any of the values in here.
	
	minaccountage = 30; --the player is kicked if their account is younger than this many days
	
	kickmsg = "Sorry but your account isn't old enough to play this game. This is to prevent hackers/scambots joining on throwaway accounts."; --the message the player gets when they are kicked
	
}

--Do not edit anything below this line, all the custom settings are above.

game.Players.PlayerAdded:Connect(function(plr)
	if plr.AccountAge < config.minaccountage then
		plr:Kick(config.kickmsg)
	end
end)