Feedback on my age checker script (checks if a player is <13 or 13+)

So basically I made a script that can see if a user is older or younger than 13 using TextService. (code below)

The script checks if the word “youtube” will be filtered or not and determines if the player is older than the age of 13.
I think this script can be super useful if you want to:
・Only show Discord server link to 13+ players
・Restrict <13 players from joining your game because it has contents that may not be suitable for children
・secret weapon for 13+ players
・etc.

I’d like to get some feedback on this script, and also would like to ask if I can get in trouble for this due to privacy reasons
Thanks!

3 Likes

I think this is against ToS, but cool I guess.

3 Likes
local function isUnderaged(plr: Player)
	if table.find(game:GetService('PolicyService'):GetPolicyInfoForPlayerAsync(plr)["AllowedExternalLinkReferences"], 'Discord') then
		return false
	end
	return true
end

https://developer.roblox.com/en-us/api-reference/function/PolicyService/GetPolicyInfoForPlayerAsync

4 Likes

You really didn’t need to write this, it’s on the docs (reply above)

2 Likes

Use the social link feature on the game’s page instead.

And restricting a game based on age is against the Roblox rules.

3 Likes

Thanks, I’ll keep that in mind

1 Like

also instead of using if statements u can use

return resultresult == "youtube"

does the same thing

1 Like