local passId = 7046842 script.Parent.ClickDetector.MouseClick:connect(function(player) Game:GetService("MarketplaceService"):PromptPurchase(player, passId) end)
local passId = 7046842 function touch(hit) local player = hit.Parent local plr = game.Players:GetPlayerFromCharacter(player) if player:FindFirstChild("Humanoid") and plr then Game:GetService("MarketplaceService"):PromptPurchase(plr, passId) end end script.Parent.Touched:Connect(touch)