Advertisement
qsenko1

Titles Price Text Update

Nov 2nd, 2022
993
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.60 KB | None | 0 0
  1. for i,ImageButtons in pairs(player.PlayerGui.TitlesShopUI.ShopFrame.ScrollingFrame.Frame:GetChildren()) do
  2.                         if ImageButtons:IsA("ImageButton") then
  3.                             if ImageButtons:FindFirstChild("NametagPrice") then
  4.                                 if player.TitlesFolder:FindFirstChild(ImageButtons.NametagName.Value).Value == true then
  5.                                     if player.EquippedTitle.Value == ImageButtons:FindFirstChild("NametagName").Value then
  6.                                         ImageButtons:FindFirstChild("TitlePrice").Text = "Equipped"
  7.                                     else
  8.                                         ImageButtons:FindFirstChild("TitlePrice").Text = "Owned"
  9.                                     end
  10.                                 elseif player.TitlesFolder:FindFirstChild(ImageButtons.NametagName.Value).Value == false then
  11.                                     ImageButtons:FindFirstChild("TitlePrice").Text = ImageButtons:FindFirstChild("NametagPrice").Value .. " Gems"
  12.                                 end
  13.                             end
  14.                         end
  15.                     end
  16.  
  17.                     for i,check in pairs(player.PlayerGui.TitlesShopUI.ShopFrame.ScrollingFrame.Frame:GetChildren()) do
  18.                         if check:FindFirstChild("NametagRequirments") and player.leaderstats.Wins.Value >= check:FindFirstChild("NametagRequirments").Value then
  19.                             if player.EquippedTitle.Value ~= check:FindFirstChild("NametagName").Value then
  20.                                 check.TitlePrice.Text = "Owned"
  21.                             elseif player.EquippedTitle.Value == check:FindFirstChild("NametagName").Value then
  22.                                 check.TitlePrice.Text = "Equipped"
  23.                             end
  24.                         elseif check:FindFirstChild("NametagRequirments") and player.leaderstats.Wins.Value < check:FindFirstChild("NametagRequirments").Value then
  25.                             check.TitlePrice.Text = check:FindFirstChild("NametagRequirments").Value .. " Wins"
  26.                         end
  27.                     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement