Nangin20

Fullbright

Dec 7th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 4.00 KB | None | 0 0
  1. if not _G.FullBrightExecuted then
  2.  
  3.     _G.FullBrightEnabled = false
  4.  
  5.     _G.NormalLightingSettings = {
  6.         Brightness = game:GetService("Lighting").Brightness,
  7.         ClockTime = game:GetService("Lighting").ClockTime,
  8.         FogEnd = game:GetService("Lighting").FogEnd,
  9.         GlobalShadows = game:GetService("Lighting").GlobalShadows,
  10.         Ambient = game:GetService("Lighting").Ambient
  11.     }
  12.  
  13.     game:GetService("Lighting"):GetPropertyChangedSignal("Brightness"):Connect(function()
  14.         if game:GetService("Lighting").Brightness ~= 1 and game:GetService("Lighting").Brightness ~= _G.NormalLightingSettings.Brightness then
  15.             _G.NormalLightingSettings.Brightness = game:GetService("Lighting").Brightness
  16.             if not _G.FullBrightEnabled then
  17.                 repeat
  18.                     wait()
  19.                 until _G.FullBrightEnabled
  20.             end
  21.             game:GetService("Lighting").Brightness = 1
  22.         end
  23.     end)
  24.  
  25.     game:GetService("Lighting"):GetPropertyChangedSignal("ClockTime"):Connect(function()
  26.         if game:GetService("Lighting").ClockTime ~= 12 and game:GetService("Lighting").ClockTime ~= _G.NormalLightingSettings.ClockTime then
  27.             _G.NormalLightingSettings.ClockTime = game:GetService("Lighting").ClockTime
  28.             if not _G.FullBrightEnabled then
  29.                 repeat
  30.                     wait()
  31.                 until _G.FullBrightEnabled
  32.             end
  33.             game:GetService("Lighting").ClockTime = 12
  34.         end
  35.     end)
  36.  
  37.     game:GetService("Lighting"):GetPropertyChangedSignal("FogEnd"):Connect(function()
  38.         if game:GetService("Lighting").FogEnd ~= 786543 and game:GetService("Lighting").FogEnd ~= _G.NormalLightingSettings.FogEnd then
  39.             _G.NormalLightingSettings.FogEnd = game:GetService("Lighting").FogEnd
  40.             if not _G.FullBrightEnabled then
  41.                 repeat
  42.                     wait()
  43.                 until _G.FullBrightEnabled
  44.             end
  45.             game:GetService("Lighting").FogEnd = 786543
  46.         end
  47.     end)
  48.  
  49.     game:GetService("Lighting"):GetPropertyChangedSignal("GlobalShadows"):Connect(function()
  50.         if game:GetService("Lighting").GlobalShadows ~= false and game:GetService("Lighting").GlobalShadows ~= _G.NormalLightingSettings.GlobalShadows then
  51.             _G.NormalLightingSettings.GlobalShadows = game:GetService("Lighting").GlobalShadows
  52.             if not _G.FullBrightEnabled then
  53.                 repeat
  54.                     wait()
  55.                 until _G.FullBrightEnabled
  56.             end
  57.             game:GetService("Lighting").GlobalShadows = false
  58.         end
  59.     end)
  60.  
  61.     game:GetService("Lighting"):GetPropertyChangedSignal("Ambient"):Connect(function()
  62.         if game:GetService("Lighting").Ambient ~= Color3.fromRGB(178, 178, 178) and game:GetService("Lighting").Ambient ~= _G.NormalLightingSettings.Ambient then
  63.             _G.NormalLightingSettings.Ambient = game:GetService("Lighting").Ambient
  64.             if not _G.FullBrightEnabled then
  65.                 repeat
  66.                     wait()
  67.                 until _G.FullBrightEnabled
  68.             end
  69.             game:GetService("Lighting").Ambient = Color3.fromRGB(178, 178, 178)
  70.         end
  71.     end)
  72.  
  73.     game:GetService("Lighting").Brightness = 1
  74.     game:GetService("Lighting").ClockTime = 12
  75.     game:GetService("Lighting").FogEnd = 786543
  76.     game:GetService("Lighting").GlobalShadows = false
  77.     game:GetService("Lighting").Ambient = Color3.fromRGB(178, 178, 178)
  78.  
  79.     local LatestValue = true
  80.     spawn(function()
  81.         repeat
  82.             wait()
  83.         until _G.FullBrightEnabled
  84.         while wait() do
  85.             if _G.FullBrightEnabled ~= LatestValue then
  86.                 if not _G.FullBrightEnabled then
  87.                     game:GetService("Lighting").Brightness = _G.NormalLightingSettings.Brightness
  88.                     game:GetService("Lighting").ClockTime = _G.NormalLightingSettings.ClockTime
  89.                     game:GetService("Lighting").FogEnd = _G.NormalLightingSettings.FogEnd
  90.                     game:GetService("Lighting").GlobalShadows = _G.NormalLightingSettings.GlobalShadows
  91.                     game:GetService("Lighting").Ambient = _G.NormalLightingSettings.Ambient
  92.                 else
  93.                     game:GetService("Lighting").Brightness = 1
  94.                     game:GetService("Lighting").ClockTime = 12
  95.                     game:GetService("Lighting").FogEnd = 786543
  96.                     game:GetService("Lighting").GlobalShadows = false
  97.                     game:GetService("Lighting").Ambient = Color3.fromRGB(178, 178, 178)
  98.                 end
  99.                 LatestValue = not LatestValue
  100.             end
  101.         end
  102.     end)
  103. end
  104.  
  105. _G.FullBrightExecuted = true
  106. _G.FullBrightEnabled = not _G.FullBrightEnabled
Add Comment
Please, Sign In to add comment