Advertisement
griminz

Untitled

Dec 19th, 2020
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.67 KB | None | 0 0
  1. -- // Constants \\ --
  2.  
  3. -- [ Services ] --
  4. local Services = {}
  5. Services.RunService = game:GetService("RunService")
  6.  
  7. -- [ Custom Functions ] --
  8. local IsExploit = not Services.RunService:IsStudio()
  9.  
  10. local CustomFunctions = {}
  11. CustomFunctions.SetHidden = sethiddenproperty or set_hidden_property or set_hidden_prop
  12.  
  13. -- [ GraphicX ] --
  14. local GraphicX = {}
  15.  
  16. -- Create --
  17. function GraphicX.new(Class, Properties)
  18. -- Creates the Instance --
  19. local NewInstance = Instance.new(Class)
  20.  
  21. -- Sets the Properties --
  22. for i,v in pairs(Properties) do
  23. if NewInstance[i] ~= nil and i ~= "Parent" then
  24. NewInstance[i] = v
  25. end
  26. end
  27.  
  28. -- Sets Parent --
  29. if Properties.Parent then
  30. NewInstance.Parent = Properties.Parent
  31. end
  32.  
  33. return NewInstance
  34. end
  35.  
  36. function GraphicX.SetProperty(Object, Properties)
  37. -- Sets the Properties --
  38. for i,v in pairs(Properties) do
  39. if Object[i] ~= nil and i ~= "Parent" then
  40. Object[i] = v
  41. end
  42. end
  43.  
  44. -- Sets Parent --
  45. if Properties.Parent then
  46. Object.Parent = Properties.Parent
  47. end
  48. end
  49.  
  50. -- [ Instances ] --
  51. local Lighting = game:GetService("Lighting")
  52. local Terrain = workspace.Terrain
  53.  
  54. local LightingSaves = GraphicX.new("Folder", {Name = "LightingSaves", Parent = nil})
  55.  
  56.  
  57. -- // Main \\ --
  58. function GraphicX.Enhance(Settings)
  59. local GraphicSettings = Settings or {
  60. FogEnabled = true,
  61. WaterEnabled = true
  62. }
  63.  
  64. -- [ Clears Lighting ] --
  65. for i,v in ipairs(Lighting:GetChildren()) do
  66. if v:IsA("PostEffect") and not string.find(v.Name, "GraphicX") then
  67. v.Parent = LightingSaves
  68. end
  69. end
  70.  
  71. -- [ Sets Properties ] --
  72.  
  73. -- Lighting --
  74. if GraphicSettings.FogEnabled then
  75. GraphicX.SetProperty(Lighting, {
  76. FogEnd = 500,
  77. FogStart = 25
  78. })
  79. end
  80.  
  81. if IsExploit then
  82. CustomFunctions.SetHidden(Lighting, "Technology", Enum.Technology.Future)
  83. settings().Rendering.QualityLevel = 21
  84. end
  85.  
  86. -- Terrain --
  87. if GraphicSettings.WaterEnabled then
  88. GraphicX.SetProperty(Terrain, {
  89. WaterColor = Color3.fromRGB(131, 165, 164),
  90. WaterReflectance = 0.05,
  91. WaterTransparency = 1,
  92. WaterWaveSize = 0.05,
  93. WaterWaveSpeed = 25
  94. })
  95. end
  96.  
  97. -- [ Creates Effects ] --
  98. GraphicX.LightingEffects = {
  99. GraphicX.new("BloomEffect", {
  100. Name = "GraphicXBloom",
  101. Parent = Lighting,
  102. Intensity = 0.75,
  103. Size = 15,
  104. Threshold = 0.95
  105. }),
  106. GraphicX.new("BlurEffect", {
  107. Name = "GraphicXBlur",
  108. Parent = Lighting,
  109. Size = 5
  110. }),
  111. GraphicX.new("DepthOfFieldEffect", {
  112. Name = "GraphicXDepth",
  113. Parent = Lighting,
  114. FarIntensity = 0.15,
  115. FocusDistance = 0.05,
  116. InFocusRadius = 20,
  117. NearIntensity = 0.75
  118. }),
  119. GraphicX.new("SunRaysEffect", {
  120. Name = "GraphicXRays",
  121. Parent = Lighting,
  122. Intensity = 0.25,
  123. Spread = 0.5
  124. })
  125. }
  126. end
  127.  
  128. GraphicX.Enhance({
  129. FogEnabled = true,
  130. WaterEnabled = true
  131. })
  132.  
  133. return GraphicX
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement