-- This is the first character we want to check messages for.
local AdminSignalCharacter = ":"
local Weapons = game.ServerStorage.Weapons
-- AdminCommands is a table that maps strings to functions. The string is the command name, the function is that of the command to be executed.
local AdminCommands = {
give = function(Player, WeaponName)
if not Weapons:FindFirstChild(WeaponName) then
return
end
local WeaponClone = Weapons[WeaponName]:Clone()
WeaponClone.Parent = Player:WaitForChild("Backpack")
end
}
game.Players.PlayerAdded:Connect(function(Player)
Player.Chatted:Connect(function(Message)
if Message:sub(1, 1) ~= AdminSignalCharacter then
return
end
-- Get the substring not including the signal character.
local CommandMessage = Message:sub(2)
local Command = nil
local Arguments = {}
-- Match one or more word characters in a generic for loop.
for Match in CommandMessage:gmatch("%w+") do
if Command then
-- We already know what command we're using, so it's an argument to it.
table.insert(Arguments, Match)
else
-- If we don't already know the command, this must be the first match.
Command = Match:lower()
end
end
-- If there were no matches.
if not Command then
return
end
local CommandExecutor = AdminCommands[Command]
-- If the command doesn't exist. if not CommandExecutor then return end
-- Call the function in AdminCommands.
CommandExecutor(Player, unpack(Arguments)) end) end)``
How can i adjust the script so i also type the player's name whose backpack it goes to. Thanks.

3 comments
See: https://scriptinghelpers.org/questions/57727/how-do-i-make-the-chat-service-do-this-command
chill out dude u never helped me that much
This is not a request site, it is to get help with you writing your own code. Stop making requests.