I need to do this project for a friend, but I'm not entirely sure on how I should go about it. There is a script that gives the player the cash once they step on the brick, but I want it to instead give the player directly to the player once the part hits the conveyor collector.
Here is my script so far for once you buy it!
local marketPlace = game:GetService("MarketplaceService")
local passId = 0000 -- Pass Id not available yet
function isAuthenticated(player)
return marketPlace:PlayerOwnsAsset(assetId, player)
end
game.Players.PlayerAdded:connect(function(plr)
if isAuthenticated(plr) then
-- Not sure how to make it
end
end)
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
marketPlace.PromptPurchaseFinished:connect(function(player, assetid, isPurchased)
if isPurchased then
if assetId == passId then
-- Not sure what to do exactly
end
end
end)
end)
Thanks for any and ALL help I get!

2 comments
You could modify the conveyor collector to check if the player has the gamepass, if it does, transfer money directly to the player. If not, transfer money to the money giving brick.
Nice idea, thanks!