Advertisement
Guest User

Untitled

a guest
Nov 12th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. local frame = vgui.Create("DFrame")
  2. frame:SetSize(1000, 720)
  3. frame:Center()
  4. frame:SetVisible(true)
  5. frame:MakePopup()
  6.  
  7. local button = vgui.Create("DButton" , frame)
  8. button:SetPos(10, 30)
  9. button:SetSize(100, 50)
  10. button:SetText("Buy")
  11. button.DoClick = BuyItem
  12.  
  13. local DScrollPanel = vgui.Create( "DScrollPanel", frame )
  14. DScrollPanel:Dock( FILL )
  15.  
  16. for id, item in pairs( wOS.ItemIDTranslations ) do
  17. local DButton = DScrollPanel:Add( "DButton" )
  18. DButton:SetText( "Button #" .. item )
  19.  
  20. if (ITEM.RarityName = "Mythic") then
  21. DButton:SetTextColor(Color(255 , 0 , 0))
  22. DButton.DoClick = function(ply)
  23. ply:AddMoney(-MythicCost)
  24. end
  25.  
  26. else if (ITEM.RarityName = "Legendary") then
  27. DButton:SetTextColor(Color(255 , 215 , 0))
  28. DButton.DoClick = function(ply)
  29. ply:AddMoney(-LegendaryCost)
  30. end
  31.  
  32. else if (ITEM.RarityName = "Epic") then
  33. DButton:SetTextColor(Color(138 , 43 , 226))
  34. DButton.DoClick = function(ply)
  35. ply:AddMoney(-EpicCost)
  36. end
  37.  
  38. else if (ITEM.RarityName = "Rare") then
  39. DButton:SetTextColor(Color(0 , 0 , 255))
  40. DButton.DoClick = function(ply)
  41. ply:AddMoney(-RareCost)
  42. end
  43.  
  44. else end
  45.  
  46. end
  47.  
  48. DButton:Dock( TOP )
  49. DButton:DockMargin( 0, 0, 0, 5 )
  50.  
  51. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement