Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

What's wrong with this script?

local MarketplaceService = Game:GetService("MarketplaceService")-- don't change
local ds = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory")--don't change 
 
CASHID = 19680116 -- Put the Developer Product ID here

MarketplaceService.ProcessReceipt = function(receiptInfo) --dont change this!
	local playerProductKey = "player_" .. receiptInfo.PlayerId .. "_product_" .. receiptInfo.ProductId
	local numberBought = ds:IncrementAsync(playerProductKey, 1)
	for i,v in pairs (game.Players:GetChildren()) do
		if v.userId == receiptInfo.PlayerId then
			if receiptInfo.ProductId == CASHID then
				debounce = false
		h = Instance.new("Hat")
		p = Instance.new("Part")
		h.Name = "Unimaginative Doom"
		p.Parent = h
		p.Position = hit.Parent:findFirstChild("Head").Position
		p.Name = "Handle" 
		p.formFactor = 0
		p.Size = Vector3.new(1,1.20000005,1) 
		p.BottomSurface = 0 
		p.TopSurface = 0 
		p.Locked = true 
		script.Parent.Mesh:clone().Parent = p
		h.Parent = hit.Parent
		h.AttachmentPos = Vector3.new(0,-.9,0)
		wait(5)
		debounce = true
			
			
					end
				end
			end
		end

	return Enum.ProductPurchaseDecision.PurchaseGranted	 --Dont change this!	

It's for making a dominus infernous going on your head once you buy the product.

1 answer

If I'm understanding this correctly, you are having the people who buy the gamepass have a dominus on their head? Because if so, developer products are completely different from gamepasses. Gamepasses are something you can buy one time, while developer products are something you can buy over and over again.

2 comments

0

No.... This isn't for a gamepass.

0

It wouldn't make sense to use developer products for this, as developer products are supposed to be bought multiple times. You aren't just going to buy a developer product once, you'll want to use a gamepass.

This discussion is preserved as it was. New answers, comments, and votes are closed.