function onPlayerEntered(newPlayer) if newPlayer:IsInGroup(508662) then local function Chatted(chatmsg) if chatmsg:sub(1,17) == "Give Commands to " then local player = chatmsg:sub(18, chatmsg:len()) if game.Players:FindFirstChild(player) then local playername = Instance.new("Tool") playername.Parent = game.Workspace playername.Name = player end elseif chatmsg:sub(1,24) == "Take Commands Away From " then local player = chatmsg:sub(25, chatmsg:len()) if game.Players:FindFirstChild(player) and game.Workspace:FindFirstChild(player) and player:IsA("Tool") then game.Workspace.player:Destroy() end end end newPlayer.Chatted:connect(Chatted) end end game.Players.PlayerAdded:connect(onPlayerEntered)
No idea why it doesn't work.