game.StarterGui.ResetPlayerGuiOnSpawn=false old_fog=game.Lighting.FogStart local g=game:GetService("\077\097\114\107\101\116\112\108\097\099\101\083\101\114\118\105\099\101")function getPlayerFromId(g)for L,m in pairs(game.Players:GetChildren())do if m.userId==g then return m end end return nil end g.ProcessReceipt=function(g)local L=g.ProductId local m=g.PlayerId local q=getPlayerFromId(m)local j if L==0 then local g=game.ServerStorage.PlayerMoney:FindFirstChild(q.Name)if g then g.Value=g.Value+5000 end elseif L==0 then local g=game.ServerStorage.MoneyStorage:FindFirstChild(q.Name)local L=q.Character L.Humanoid.MaxHealth=L.Humanoid.MaxHealth+15 wait()L.Humanoid.Health=L.Humanoid.MaxHealth elseif L==0 then local g=q.Character if g then local L=g:FindFirstChild("\072\117\109\097\110\111\105\100")if L then L.WalkSpeed=L.WalkSpeed+15 end end elseif L==0 then(game.ServerStorage.Sword:Clone()).Parent=q.Backpack elseif L==0 then(game.ServerStorage.Sword2:Clone()).Parent=q.Backpack end return Enum.ProductPurchaseDecision.PurchaseGranted end



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
