Advertisement
kill21_2

RTX

May 8th, 2025 (edited)
10,001
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.77 KB | None | 0 0
  1. -- Модуль для улучшенной графики
  2. local GraphicsEnhancer = {}
  3.  
  4. -- Настройки (можно менять)
  5. local settings = {
  6. enabled = true, -- Включено по умолчанию
  7. bloomEnabled = true,
  8. bloomIntensity = 0,
  9. bloomSize = 0,
  10. bloomThreshold = 0.7,
  11. colorCorrectionEnabled = true,
  12. colorCorrectionBrightness = 0.1,
  13. colorCorrectionContrast = 0.2,
  14. colorCorrectionSaturation = 0.1,
  15. colorCorrectionTintColor = Color3.fromRGB(255, 220, 220),
  16. depthOfFieldEnabled = true,
  17. depthOfFieldFarIntensity = 0,
  18. depthOfFieldFocusDistance = 10,
  19. depthOfFieldInFocusRadius = 15,
  20. depthOfFieldNearIntensity = 0.5,
  21. sunRaysEnabled = true,
  22. sunRaysIntensity = 0.2,
  23. sunRaysSpread = 1
  24. }
  25.  
  26. -- Функция для применения эффектов
  27. function GraphicsEnhancer.applyEffects()
  28. if not settings.enabled then return end
  29.  
  30. local lighting = game:GetService("Lighting")
  31.  
  32. -- Очищаем старые эффекты
  33. for _, effect in ipairs(lighting:GetChildren()) do
  34. if effect:IsA("BloomEffect") or effect:IsA("ColorCorrectionEffect") or
  35. effect:IsA("DepthOfFieldEffect") or effect:IsA("SunRaysEffect") then
  36. effect:Destroy()
  37. end
  38. end
  39.  
  40. -- Bloom эффект (свечение)
  41. if settings.bloomEnabled then
  42. local bloom = Instance.new("BloomEffect")
  43. bloom.Intensity = settings.bloomIntensity
  44. bloom.Size = settings.bloomSize
  45. bloom.Threshold = settings.bloomThreshold
  46. bloom.Parent = lighting
  47. end
  48.  
  49. -- Коррекция цвета
  50. if settings.colorCorrectionEnabled then
  51. local colorCorrection = Instance.new("ColorCorrectionEffect")
  52. colorCorrection.Brightness = settings.colorCorrectionBrightness
  53. colorCorrection.Contrast = settings.colorCorrectionContrast
  54. colorCorrection.Saturation = settings.colorCorrectionSaturation
  55. colorCorrection.TintColor = settings.colorCorrectionTintColor
  56. colorCorrection.Parent = lighting
  57. end
  58.  
  59. -- Глубина резкости
  60. if settings.depthOfFieldEnabled then
  61. local dof = Instance.new("DepthOfFieldEffect")
  62. dof.FarIntensity = settings.depthOfFieldFarIntensity
  63. dof.FocusDistance = settings.depthOfFieldFocusDistance
  64. dof.InFocusRadius = settings.depthOfFieldInFocusRadius
  65. dof.NearIntensity = settings.depthOfFieldNearIntensity
  66. dof.Parent = lighting
  67. end
  68.  
  69. -- Солнечные лучи
  70. if settings.sunRaysEnabled then
  71. local sunRays = Instance.new("SunRaysEffect")
  72. sunRays.Intensity = settings.sunRaysIntensity
  73. sunRays.Spread = settings.sunRaysSpread
  74. sunRays.Parent = lighting
  75. end
  76.  
  77. -- Дополнительные настройки освещения
  78. lighting.GlobalShadows = true
  79. lighting.Brightness = 2
  80. lighting.OutdoorAmbient = Color3.fromRGB(128, 128, 128)
  81. lighting.ClockTime = 7 -- Установлено на 7 часов (7h)
  82. lighting.GeographicLatitude = 45
  83. lighting.ExposureCompensation = 0.25
  84. end
  85.  
  86. -- Функция для включения/выключения
  87. function GraphicsEnhancer.setEnabled(state)
  88. settings.enabled = state
  89. GraphicsEnhancer.applyEffects()
  90. end
  91.  
  92. -- Функция для обновления настроек
  93. function GraphicsEnhancer.updateSettings(newSettings)
  94. for key, value in pairs(newSettings) do
  95. if settings[key] ~= nil then
  96. settings[key] = value
  97. end
  98. end
  99. GraphicsEnhancer.applyEffects()
  100. end
  101.  
  102. -- Применяем эффекты сразу при загрузке
  103. GraphicsEnhancer.applyEffects()
  104.  
  105. return GraphicsEnhancer
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement