Advertisement
Guest User

Untitled

a guest
Mar 25th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. timer.Simple(0, function()
  2. if !PS then return end
  3. for _, item in pairs(PS.Items) do
  4. if UnboxConfig.RestrictedCategories[item.Category] then continue end
  5. if item.Price <= 0 then continue end
  6. local color
  7. local model
  8. local disp
  9. if item.Price >= UnboxConfig.OrangeItems then
  10. color = Color(255, 153, 0)
  11. elseif item.Price >= UnboxConfig.PurpleItems then
  12. color = Color(153, 0, 153)
  13. elseif item.Price >= UnboxConfig.BlueItems then
  14. color = Color(0, 102, 255)
  15. elseif item.Price >= UnboxConfig.GreenItems then
  16. color = Color(0, 156, 0)
  17. else
  18. color = Color(92, 92, 92)
  19. end
  20. if item.Material then
  21. disp = item.Material
  22. elseif item.Model then
  23. model = true
  24. disp = item.Model
  25. else
  26. disp = "materials/unboxing/trail.png"
  27. end
  28. Unbox_AddPointShopItem(item.Name, item.ID, model, disp, item.Category, item.Price, color, math.Clamp(UnboxConfig.MaxChance / item.Price, UnboxConfig.MinItemChance, UnboxConfig.MaxItemChance))
  29. end
  30. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement