Can someone please correct this for me?

local MarketPlace = game:GetService
(“MarketplaceService”)
local id1 = 1190668215=
local id3 = 1190668197
local Players = game:GetService(“Players”)

Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
MarketPlace.ProcessReceipt = function(receiptInfo)
if receiptInfo.ProductId == id1 then
local plr = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
char.HumanoidRootPart.Position = char.HumanoidRootPart.Position + Vector3.new(0,0,-20)

		if receiptInfo.ProductId == id3 then
			game.ReplicatedStorage.JumpScare:FireAllClients()
		end

			
			return Enum.ProductPurchaseDecision.PurchaseGranted
			
			
			end

The PlayerAdded and CharacterAdded events are quite useless and messes up a lot of stuff and the if statement for id1 was never ended.

local MarketPlace = game:GetService("MarketplaceService")
local id1 = 1190668215
local id3 = 1190668197
local Players = game:GetService(“Players”)


MarketPlace.ProcessReceipt = function(receiptInfo)
    if receiptInfo.ProductId == id1 then
        local plr = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
        plr.Character.HumanoidRootPart.Position = plr.Character.HumanoidRootPart.Position + Vector3.new(0,0,-20)
    end

	if receiptInfo.ProductId == id3 then
		game.ReplicatedStorage.JumpScare:FireAllClients()
	end

			
    return Enum.ProductPurchaseDecision.PurchaseGranted		
end

Why are you setting id1 = id3.

Hey @JoyfulTaco.

Please review the rules and guidelines for this board.