This doesn't seem to work. I've changed so many things, and it still doesn't work. I've spent hours on this. Can anyone help me find out what's wrong?
ID = 162597573 GPS = game:GetService("MarketplaceService") player = script.Parent.Parent.Parent.Parent.Parent function Buy() game:GetService("MarketplaceService"):PromptPurchase(player,ID) GPS.PromptPurchaseFinished:connect(function(player, ID, isPurchased) if isPurchased then clone1 = game.ServerStorage["Dual Darkheart"]:clone() clone1.Parent = player.Backpack end end) end script.Parent.MouseButton1Click:connect(Buy)
local passid = 000000000 -- Gamepass ID -- local tools = {""} -- Tool names EXACTLY, make sure the tools are in Lighting -- local GamePassService = Game:GetService('GamePassService') game.Players.PlayerAdded:connect(function(player) repeat wait(0) until player.Backpack repeat wait(0) until player.StarterGear if GamePassService:PlayerHasPass(player, passid) then for i = 1,#tools do game.Lighting:FindFirstChild(tools[i]):Clone().Parent = player.Backpack game.Lighting:FindFirstChild(tools[i]):Clone().Parent = player.StarterGear end end end)
Try that? You have to set it up (For in-game purchase) (Put tools in lighting.)