Im looking for a script that does a check on handshake server screen. That will check the joining guys nickname for ‘‘does it have a link in his name’’. Or that will ‘‘check his/her username for some words’’ and acces will be denied if he/she has.
Example his name is: ‘‘hello.asd’’ (script wont allow the name with hello)
1 Like
Here’s something I knocked up in a few minutes…
BannedWords = {
'.com',
'.org',
'co.uk',
'hello',
'k',
} -- This is the array of words that the script will check for in a player's name.
AddEventHandler('playerConnecting', function(name, setReason) -- This is the event that handles a player joining
for _,v in ipairs(BannedWords) do -- This loops through the words in the array at the top, assigning the word every time to 'v'
print(v)
print(name)
if string.find(name, v) then -- Attempts to find the name assigned to 'v' in the player's name
setReason('The word ' .. v .. ' is banned from names.') -- sets the kick reason
CancelEvent() -- Cancels them joining
end
end
end)
Try and learn from the comments, any questions let me know and i’ll try to help. This is a serverside event too, so run it on the server 
3 Likes