Need Help with a command script

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    Hopefully a working script that give player Spawner tokens.
  2. What is the issue? Include screenshots / videos if possible!
    Basically, I have commands that you can spawn stuff in, like /e Gun, gives you a gun and but it takes away a spawnToken , But i’m trying to make a command that gives players Tokens and pops up with a gui saying you recieved a token. doesn’t want to work though,
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Looked at old scripts, Dev Forum for help, and asking my friends for help.
    After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local GiveTokenCommand = "/giveToken"

game.Players.PlayerAdded:Connect(function(player)
	player.Chatted:Connect(function(chat)
		local message = chat:lower()
		local GiveSplit = message:split(" ")

		if GiveSplit[1] == GiveTokenCommand then
			for _, targetPlayer in pairs(game.Players:GetPlayers()) do
				if string.sub(targetPlayer.Name:lower(), 1, #GiveSplit[2]) == GiveSplit[2] then
					local SpawnerValue = targetPlayer:FindFirstChild("SpawnerValue")
					if SpawnerValue then
						SpawnerValue.Value = SpawnerValue.Value + 1

						-- Clone Spawner into PlayerGui and enable HowMuch
						local SpawnerClone = script.Parent.Spawner:Clone()
						SpawnerClone.Parent = targetPlayer:WaitForChild("PlayerGui")
						SpawnerClone.HowMuch.Disabled = false
					end
				end
			end
		end
	end)
end)

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

Also forgot to give an example, basically i wanted it to work like, /giveToken PlayerName , so the username i typed gets the spawntoken.