Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local frame = vgui.Create("DFrame")
- frame:SetSize(1000, 720)
- frame:Center()
- frame:SetVisible(true)
- frame:MakePopup()
- local button = vgui.Create("DButton" , frame)
- button:SetPos(10, 30)
- button:SetSize(100, 50)
- button:SetText("Buy")
- button.DoClick = BuyItem
- local DScrollPanel = vgui.Create( "DScrollPanel", frame )
- DScrollPanel:Dock( FILL )
- for id, item in pairs( wOS.ItemIDTranslations ) do
- local DButton = DScrollPanel:Add( "DButton" )
- DButton:SetText( "Button #" .. item )
- if (ITEM.RarityName = "Mythic") then
- DButton:SetTextColor(Color(255 , 0 , 0))
- DButton.DoClick = function(ply)
- ply:AddMoney(-MythicCost)
- end
- else if (ITEM.RarityName = "Legendary") then
- DButton:SetTextColor(Color(255 , 215 , 0))
- DButton.DoClick = function(ply)
- ply:AddMoney(-LegendaryCost)
- end
- else if (ITEM.RarityName = "Epic") then
- DButton:SetTextColor(Color(138 , 43 , 226))
- DButton.DoClick = function(ply)
- ply:AddMoney(-EpicCost)
- end
- else if (ITEM.RarityName = "Rare") then
- DButton:SetTextColor(Color(0 , 0 , 255))
- DButton.DoClick = function(ply)
- ply:AddMoney(-RareCost)
- end
- else end
- end
- DButton:Dock( TOP )
- DButton:DockMargin( 0, 0, 0, 5 )
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement