(local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local ServerStorage = game:GetService("ServerStorage")
local gear = ServerStorage.Gear
local speedCoilPassId = 1725840688
local gravityCoilPassId = 1725460743
local rainbowCarpetPassId = 1728943252
game.Players.PlayerAdded:Connect(function(player)
local success, ErrorMessage = pcall(function()
if MarketplaceService:UserOwnsGamePassAsync(player.UserId, speedCoilPassId) then
local speedCoil = gear.speedCoil:Clone()
speedCoil.Parent = player.Backpack
end
if MarketplaceService:UserOwnsGamePassAsync(player.UserId, gravityCoilPassId) then
local gravityCoil = gear.gravityCoil:Clone()
gravityCoil.Parent = player.Backpack
end
if MarketplaceService:UserOwnsGamePassAsync(player.UserId, rainbowCarpetPassId) then
local rainbowCarpet = gear.rainbowCarpet:Clone()
rainbowCarpet.Parent = player.Backpack
end
end)
if not success then
warn(ErrorMessage)
end
end)
MarketplaceService.PromptGamePassPurchaseFinished:Connect(function(player, PassId, purchased)
if purchased == false then
return
end
if PassId == speedCoilPassId then
local speedCoil = gear.speedCoil:Clone()
speedCoil.Parent = player.Backpack
elseif PassId == gravityCoilPassId then
local gravityCoil = gear.gravityCoil:Clone()
gravityCoil.Parent = player.Backpack
elseif PassId == rainbowCarpetPassId then
local rainbowCarpet = gear.rainbowCarpet:Clone()
rainbowCarpet.Parent = player.Backpack
end
end)
)
#Help to receive item when buying gamepass script
1 messages · Page 1 of 1 (latest)
Everytime i buy the gamepass i cant receive the items like the speed coil or gravity coil ect idk what else too do idek if its the script the problem or that i need another script for this
checked for errors?
** You are now Level 13! **
i rewatched the tutorial multiple times and looked for errors and also used a bit of AI to find them and i dont think theres any left
i mean errors from the output
bruh
i dont think i need to explain
every 1st or 2nd part of any scripting tutorial series shows you how to use the output
I think you're lazy
yeah ill try watching how to find output
the tutorial i watched went straight to the point i didnt even know there was output
L tutorial then lol
imma watch a output tutorial then come back
is output the thing that say execute command
** You are now Level 1! **
or smt like that
nvm
i just watched a rlly old video
alr i found it
oh i found it
it says
nvm imma try to fix it myself
yeah i cant find it
21:17:36.762 Gear is not a valid member of ServerStorage "ServerStorage" - Server - Script:5 any idea how to fix this?
how do i make it valid
is there an object in ServerStorage called Gear?
Its my file
the hell does that mean
you mean folder?
yeah folder
uppercase Gear
OHHH I UNDERSTAND MY MISTAKES NOW
the object in storage has to be the EXACT same as the ones in the script?
yes
i pointed out the ones you are refering to
yeah my objects names were different
rainbow carpet may not work
nice
alr i just need to know why when i buy speed coil my gravity coil gest bought too
i think i can fix that myself
if you're at that level, I recommend you switch out PromptGamePassPurchaseFinished with ProcessReceipt
PromptGamePassPurchaseFinished is easily exploitable
wdym
Developer Forum | Roblox
A new vulnerability that may affect your game is if you use PromptProductPurchaseFinished, exploiters are now able to fake / spoof buy a dev product with SignalPromptProductPurchase where you can go call to the server that you have either failed or bought a product, this also affects PromptGamepassPurchaseFinished (make it recheck gamepass owner...
what are teh difference
** You are now Level 2! **
read the docs
no its not that simple
thats why I said when you're at that level
ahhh ok ok
im just slowly learning rn ill maybe take ur advice and do that if i ever want to continue scripting in the future
Idk if ur still here but when i die i dont keep the item do u know how to keep it
use ai
alr
Well. This is ridiculous
I do use this event to implementing a yielding function. I realized I was using the isPurchased parameter
I used the fact that ProcessReceipt and PromptGamePassPurchaseFinished are reliable
Instead of resuming the thread with isPurchased, I cached the thread and resumed it in the trusted pipelines
nice service
Might give it a touchup soon
I got employed with a studio that has its own framework, so I haven't had the opportunity to evolve my own tooling
i've want to be hired to work with a nice framework one day
like in a scripting team
how is it
im too busy with school for a while, i dont got time to get experience 😭
It has its ups and downs
But it is profesionally engineered, so I know I can rely on it
thats good
are u still a student
Yes, but I am outside of high school
da hell you mean by outside 
I am not a high school student
like ur in an outdoor school?
Yes
could have just said that 🥀
Are you in high school?
yes
Assumed so. I was speaking relative to you
Means the same thing 🤷♂️
nah i didnt catch that
Gotta bump up that reading comp 
your statement was ambiguous
¯_(ツ)_/¯
take this to dms i have a fear of necro posting
Nah, dumb conversation to keep going
I keep my DMs closed anyways
Good luck on getting into a studio though 💪
i added you
I do not open them for anything other than business