Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- timer.Simple(0, function()
- if !PS then return end
- for _, item in pairs(PS.Items) do
- if UnboxConfig.RestrictedCategories[item.Category] then continue end
- if item.Price <= 0 then continue end
- local color
- local model
- local disp
- if item.Price >= UnboxConfig.OrangeItems then
- color = Color(255, 153, 0)
- elseif item.Price >= UnboxConfig.PurpleItems then
- color = Color(153, 0, 153)
- elseif item.Price >= UnboxConfig.BlueItems then
- color = Color(0, 102, 255)
- elseif item.Price >= UnboxConfig.GreenItems then
- color = Color(0, 156, 0)
- else
- color = Color(92, 92, 92)
- end
- if item.Material then
- disp = item.Material
- elseif item.Model then
- model = true
- disp = item.Model
- else
- disp = "materials/unboxing/trail.png"
- end
- Unbox_AddPointShopItem(item.Name, item.ID, model, disp, item.Category, item.Price, color, math.Clamp(UnboxConfig.MaxChance / item.Price, UnboxConfig.MinItemChance, UnboxConfig.MaxItemChance))
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement