Why is my script not working?

So, not a long time I go, I made a script that gives players a game pass they bought, right? Well, it’s working only for me. My friend bought it and received nothing, two players bought it and nothing.

Script: 
local MarketPlaceService = game:GetService("MarketplaceService")

local GamepassId = 46741729
local Tool = script.M67

game.Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Character)
		if MarketPlaceService:UserOwnsGamePassAsync(Player.UserId, GamepassId) then
			local ToolClone = Tool:Clone()
			ToolClone.Parent = Player.Backpack
		end
	end)
end)

I don’t have any idea why is this not working.
I tried to contact RS, but they completely ignored me.

If you know the anwser, please help mate.

local MarketPlaceService = game:GetService("MarketplaceService")

local GamepassId = 46741729
local Tool = script.M67

game.Players.PlayerAdded:Connect(function(Player)
print(0)
	Player.CharacterAdded:Connect(function(Character)
print("-")
		if MarketPlaceService:UserOwnsGamePassAsync(Player.UserId, GamepassId) then
print(1)
			local ToolClone = Tool:Clone()
			ToolClone.Parent = Player.Backpack
		end
	end)
end)

Tell me what got printed.

Well, i dont have anyone to test it rn. What you did here, is (i think) check if player owns the game pass.
Ill send it trough tho

18:32:51.279  M67 is not a valid member of Script "ServerScriptService.weapontest"  -  Server - weapontest:4
18:32:51.279  Stack Begin  -  Studio
18:32:51.279  Script 'ServerScriptService.weapontest', Line 4  -  Studio - weapontest:4
18:32:51.279  Stack End  -  Studio
18:32:51.279  ServerScriptService.Explosive+:4: Expected identifier when parsing expression, got 'local'  -  Studio - Explosive+:4
18:32:51.280  Character is not a valid member of ServerScriptService "ServerScriptService"
local MarketPlaceService = game:GetService("MarketPlaceService")

local GamepassId = 46741729
local Tool = script:WaitForChild("M67")

game.Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function()
		if MarketPlaceService:UserOwnsGamePassAsync(Player.UserId, GamepassId) then
			local ToolClone = Tool:Clone()
			ToolClone.Parent = Player.Backpack
		end
	end)
end)
local MarketPlaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")

local GamepassId = 46741729
local Tool = script:WaitForChild("M67")

Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Character)
		if not MarketPlaceService:UserOwnsGamePassAsync(Player.UserId, GamepassId) then return end
		Tool:Clone().Parent = Player.Backpack
	end)
end)

Alright, but can anyone here help me in testing it? The gamepass is 1 robux only for now.

Tbh, both scripts are not working. Maybe this is a Roblox bug?

Try mine again, i forgot one small detail… Should work now

Oh. Both scripts are giving no false output.

 18:45:13.749  Stack Begin  -  Studio
  18:45:13.749  Script 'ServerScriptService.Test2.AK47.Program_Server', Line 4  -  Studio - Program_Server:4
  18:45:13.749  Stack End  -  Studio
  18:45:13.750  'MarketPlaceService' is not a valid Service name  -  Server - Test1:1
  18:45:13.750  Stack Begin  -  Studio
  18:45:13.750  Script 'ServerScriptService.Test1', Line 1  -  Studio - Test1:1
  18:45:13.750  Stack End  -  Studio

Alright, so it’s working FOR ME. I still dont know about a player. Can you help?

If it works for you its gonna work for a player.

EDIT:
What you can do is just change the gamepassid in the script to something else to check if you still get the weapon, if you do not it is working like its supposed to

Previously it was working only for me mate. Look up.

This type of error is one that you should be able to fix yourself, it’s simply just a typo.

I didnt see it lol, i see it now tho

I think that you missed something. It’s working, but only for me, the creator.

I didn’t miss that, I’m just saying that you should be able to fix the error: MarketPlaceService is not a valid Service name. There’s just a typo in the service name. I don’t know why the script isn’t working otherwise.

Did you commit and publish the game for others to test?

Yeah, 3 people did, but MY SCRIPT did not work. Can you join the game? I want to test your.

Can you, please?

sssssssssssssssss