Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local players = game:GetService("Players")
- return function(player, message)
- if message == nil or message == "" or not message then
- return {player}
- elseif message:lower() == "me" then
- return {player}
- elseif message:lower() == "all" then
- return players:GetPlayers()
- elseif message:lower() == "others" then
- local list = {}
- for _, v in pairs(players:GetPlayers()) do
- if v ~= player then
- table.insert(list, v)
- end
- end
- return list
- elseif message:lower() == "random" then
- return {players:GetPlayers()[math.random(1, #players:GetPlayers())]}
- else
- for _, v in pairs(players:GetPlayers()) do
- if v.Name:lower():sub(1, #message) == message:lower() then
- return {v}
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement