I'm making a Roblox game and need to have a give system for it. I have this but its for players not group and rank.
game.Players.PlayerAdded:connect(function(plyr)
if plyr == "mikejr5666667" then
plyr.Chatted:connect(function(chatmessage)
local command = {}
_, _, filter, receiver, gift = string.find(chatmessage, "(give/)(%w*/)(%w*)")
table.insert(command, filter); table.insert(command, receiver); table.insert(command, gift)
if #command == 3 and command[1] == "give/" then
local player = command[2]:sub(1, (command[2]:len() - 1))
local tool = command[3]
if game.Players:FindFirstChild(player) and game.Lighting:FindFirstChild(tool) then
game.Lighting[tool]:Clone().Parent = game.Players[player].Backpack
end
end
end)
end
end)

1 comment
If you can script that you should know how to make it into a group thing