Hi there! This is a script I have for a gamepass / shop panel of a Menu GUI. When I try to input Gamepass IDs, they do not work and I believe it is because of scripting updates that were made a while ago. However, I do not script and am not sure how to fix this.
These are the IDs I am trying to work with:
6126802
6126798
6126793
6126776
local CurrentSelected = nil
local Open = false
for _,v in pairs(script.Parent.ScrollingFrame:GetChildren()) do
do
if v.ClassName == "TextButton" then
do
v.MouseButton1Click:connect(function()
CurrentSelected = v
for _,v in pairs(script.Parent.ScrollingFrame:GetChildren()) do
if v.ClassName == "TextButton" then
end
end
local Asset = game:GetService("MarketplaceService"):GetProductInfo(v.Id.Value)
script.Parent.Info.TipsText.Text = Asset.Name
script.Parent.Info.TheText.Text = Asset.Description
end)
v.MouseEnter:connect(function()
if v == CurrentSelected then
local hi = true
else
do
end
end
end)
v.MouseLeave:connect(function()
if v == CurrentSelected then
local hi = true
else
do
end
end
end)
-- DECOMPILER ERROR at PC27: LeaveBlock: unexpected jumping out IF_THEN_STMT
-- DECOMPILER ERROR at PC27: LeaveBlock: unexpected jumping out IF_STMT
end
end
end
end
script.Parent.Purchase.MouseButton1Click:connect(function()
if CurrentSelected then
game:GetService("MarketplaceService"):PromptPurchase(game.Players.LocalPlayer, CurrentSelected.Id.Value)
end
end)
Thanks in advance!