I made a custom donation leaderboard script but the items don’t go in order.
I have even tried to set up the layour oder, here’s the script:
for Price, ProductId in pairs(Products) do
local NewTemplate = Template:Clone()
NewTemplate.LayoutOrder = Price
NewTemplate.Parent = ScrollingFrame
NewTemplate.Visible = true
NewTemplate.Price.Text = tostring(Price)
local BuyButton = NewTemplate.BuyButton
BuyButton.MouseEnter:Connect(function()
local tween = ts:Create(NewTemplate, TweenInfo.new(0.35), {BackgroundColor3 = Color3.fromRGB(132, 132, 132)}):Play()
end)
BuyButton.MouseLeave:Connect(function()
local tween = ts:Create(NewTemplate, TweenInfo.new(0.35), {BackgroundColor3 = Color3.fromRGB(70, 70, 70)}):Play()
end)
BuyButton.MouseButton1Down:Connect(function()
local tween = ts:Create(NewTemplate, TweenInfo.new(0.1), {BackgroundColor3 = Color3.fromRGB(176, 176, 176)}):Play()
end)
BuyButton.MouseButton1Up:Connect(function()
local tween = ts:Create(NewTemplate, TweenInfo.new(0.1), {BackgroundColor3 = Color3.fromRGB(132, 132, 132)}):Play()
mps:PromptProductPurchase(Player, ProductId)
end)
end