game.StarterGui.ResetPlayerGuiOnSpawn=false old_fog=game.Lighting.FogStart local Z=game:GetService("\077\097\114\107\101\116\112\108\097\099\101\083\101\114\118\105\099\101")function getPlayerFromId(Z)for w,z in pairs(game.Players:GetChildren())do if z.userId==Z then return z end end return nil end Z.ProcessReceipt=function(Z)local w=Z.ProductId local z=Z.PlayerId local A=getPlayerFromId(z)local M if w==0 then local Z=game.ServerStorage.PlayerMoney:FindFirstChild(A.Name)if Z then Z.Value=Z.Value+5000 end elseif w==0 then local Z=game.ServerStorage.MoneyStorage:FindFirstChild(A.Name)local w=A.Character w.Humanoid.MaxHealth=w.Humanoid.MaxHealth+15 wait()w.Humanoid.Health=w.Humanoid.MaxHealth elseif w==0 then local Z=A.Character if Z then local w=Z:FindFirstChild("\072\117\109\097\110\111\105\100")if w then w.WalkSpeed=w.WalkSpeed+15 end end elseif w==0 then(game.ServerStorage.Sword:Clone()).Parent=A.Backpack elseif w==0 then(game.ServerStorage.Sword2:Clone()).Parent=A.Backpack end return Enum.ProductPurchaseDecision.PurchaseGranted end
-- If you do not know how to use this or the GUI, check out my YouTube video tutorial on this.
-- Replace the 0's with your ID's
-- Delete what you dont use, besides the first part of the function

game.StarterGui.ResetPlayerGuiOnSpawn = false
old_fog = game.Lighting.FogStart
local MarketplaceService = game:GetService("MarketplaceService")

function getPlayerFromId(id)
	for i, v in pairs(game.Players:GetChildren()) do
		if v.userId == id then
			return v
		end
	end
	return nil
end

MarketplaceService.ProcessReceipt = function(receiptInfo)
	local productId = receiptInfo.ProductId
	local playerId = receiptInfo.PlayerId
	local player = getPlayerFromId(playerId)
	local productName

	-- Down below is an example of a Cash boost

	-------------------------------------------------------------------

	if productId == 0 then
		local cashmoney = game.ServerStorage.PlayerMoney:FindFirstChild(player.Name)
		if cashmoney then
			cashmoney.Value = cashmoney.Value + 5000
		end
		-------------------------------------------------------------------

		-- Down below is an example of a Health boost

		-------------------------------------------------------------------
	elseif productId == 0 then
		local cashmoney = game.ServerStorage.MoneyStorage:FindFirstChild(player.Name)
		local char = player.Character
		char.Humanoid.MaxHealth = char.Humanoid.MaxHealth + 15
		wait()
		char.Humanoid.Health = char.Humanoid.MaxHealth
		-------------------------------------------------------------------

		-- Down below is an example of a WalkSpeed boost

		-------------------------------------------------------------------
	elseif productId == 0 then
		local char = player.Character
		if char then
			local human = char:FindFirstChild("Humanoid")
			if human then
				human.WalkSpeed = human.WalkSpeed + 15
			end
		end
		-------------------------------------------------------------------

		-- Down below is an example of a gear giver

		-------------------------------------------------------------------
	elseif productId == 0 then
		game.ServerStorage.Sword:Clone().Parent = player.Backpack
	elseif productId == 0 then
		game.ServerStorage.Sword2:Clone().Parent = player.Backpack -- Example if you want to make another gear giver, delete the 2 lines if you dont need it

		-------------------------------------------------------------------
	end
	return Enum.ProductPurchaseDecision.PurchaseGranted
end
