I have tried watching videos, as well as reading the wiki to try and make an item after you buy it in DataStore. A good example of this is shown in Gusmanak's game, where when you buy a crate, you get a skin. I want to do something like that, but it makes it so you do not have to travel a very long staircase, but instead teleports you to the very bottom. Here is the result of the script:
local productId = 21317549
game.Players.PlayerAdded:connect(function(player)
game:GetService("MarketplaceService"):PromptProductPurchase(player, productId)
end)
local KS = game:GetService("MarketplaceService")
local PH = game:GetService("DataScoreService"):GetDataScore("PurchaseHistory")
KS.ProccessReceipt = function(receiptInfo)
end
for i, player in ipairs(game.Players:GetChildren()) do
if player.userId == receiptInfo then
if receiptInfo.ProductId == productId then
end
end
end
local playerProductKey = "player_".. receiptInfo .. "_purchased_".. receiptInfo.PurchaseId
PurchaseHistory:IncrenestAsnye(playerProductkey, 1)
return Enun.ProductPurchaseDecision.PurchaseGranted

1 comment
@Nascardavid12: Can you please edit it to have something where it will teleport you to a certain spot?