Hey, i have this script which give u +100 walk speed when u buy a developer product, the problem is when i go on my game and buy it so i can test it out, it doesn't make me walk faster.
--[[This script goes inside of a TextBox which should be inside of a ScreenGui]]
productId = 21073044 -- Replace 123123123 with the id of your developer product.
local MarketplaceService = Game:GetService("MarketplaceService")
function UsernameFromID(ID)
if type(ID) ~= "number" then
return
end
local sets = game:service("InsertService"):GetUserSets(ID)
for k, v in next, sets do
if v.Name == "My Models" then
return v.CreatorName
end
end
end
function giveRewards(player)
Workspace.player.Humanoid.WalkSpeed = Workspace.player.Humanoid.WalkSpeed + 100
return Enum.ProductPurcaseDecision.PurchaseGranted
end
MarketplaceService.ProcessReceipt = function(receiptInfo)
giveRewards(UsernameFromID(receiptInfo.PlayerId))
end
script.Parent.MouseButton1Down:connect(function()
Game:GetService("MarketplaceService"):PromptProductPurchase(script.Parent.Parent.Parent.Parent, productId)
end)
EXTRA Can any one help me fix the script below which is like the one on the top but it gives u +15 Health, Thank you.
--[[This script goes inside of a TextBox which should be inside of a ScreenGui]]
productId = 20986884 -- Replace 123123123 with the id of your developer product.
local MarketplaceService = Game:GetService("MarketplaceService")
function UsernameFromID(ID)
if type(ID) ~= "number" then
return
end
local sets = game:service("InsertService"):GetUserSets(ID)
for k, v in next, sets do
if v.Name == "My Models" then
return v.CreatorName
end
end
end
function giveRewards(player)
local human = player.Parent:findFirstChild("Humanoid")
human.MaxHealth = human.MaxHealth + 15
human.Health = human.Health + 15
return Enum.ProductPurcaseDecision.PurchaseGranted
end
MarketplaceService.ProcessReceipt = function(receiptInfo)
giveRewards(UsernameFromID(receiptInfo.PlayerId))
end
script.Parent.MouseButton1Down:connect(function()
Game:GetService("MarketplaceService"):PromptProductPurchase(script.Parent.Parent.Parent.Parent, productId)
end)
Thank you

2 comments
This was 2 years agooooo m88888 ;pp
lol