Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Upon executing, you must leave in order to disable the script
- local lighting = game:GetService("Lighting")
- local runService = game:GetService("RunService")
- local userInput = game:GetService("UserInputService")
- local isDayMode = false
- local originalTime = lighting.TimeOfDay -- Stores the original game time
- local connection -- Holds the loop event
- -- Function to enable daytime (permanent)
- local function enableDayMode()
- connection = runService.RenderStepped:Connect(function()
- lighting.TimeOfDay = "12:00:00" -- You can adjust the game time
- lighting.Brightness = 2
- lighting.OutdoorAmbient = Color3.fromRGB(200, 200, 200)
- lighting.Ambient = Color3.fromRGB(150, 150, 150)
- lighting.FogEnd = 100000
- end)
- print("[TOGGLE] Day Mode: ON")
- end
- -- Function to disable day time mode and restore the original time
- local function disableDayMode()
- if connection then connection:Disconnect() end
- lighting.TimeOfDay = originalTime
- print("[TOGGLE] Day Mode: OFF - Time restored to " .. originalTime)
- end
- -- Toggle function
- local function toggleDayMode()
- isDayMode = not isDayMode
- if isDayMode then
- enableDayMode()
- else
- disableDayMode()
- end
- end
- -- Listen for the "T" key to toggle
- userInput.InputBegan:Connect(function(input, gameProcessed)
- if not gameProcessed and input.KeyCode == Enum.KeyCode.T then
- toggleDayMode()
- end
- end)
- print("[INFO] Press 'T' to toggle Day Mode!")
- -- [Time Cycle's] (that you can use to adjust the script):
- -- 🌅 Sunrise (Soft morning glow)
- -- TimeOfDay = "06:00:00"
- -- Brightness = 1.5
- -- OutdoorAmbient = Color3.fromRGB(170, 140, 100)
- -- ☀️ Morning (Full daylight, bright & clear)
- -- TimeOfDay = "08:00:00"
- -- Brightness = 2.0
- -- OutdoorAmbient = Color3.fromRGB(200, 200, 200)
- -- 🌤 Noon (Peak brightness, overhead sun)
- -- TimeOfDay = "12:00:00"
- -- Brightness = 2.2
- -- OutdoorAmbient = Color3.fromRGB(255, 255, 255)
- -- 🌇 Afternoon (Sun slightly lower, warmer tone)
- -- TimeOfDay = "16:00:00"
- -- Brightness = 1.8
- -- OutdoorAmbient = Color3.fromRGB(220, 180, 140)
- -- 🌆 Dusk (Golden-hour sunset)
- -- TimeOfDay = "18:30:00"
- -- Brightness = 0.9
- -- OutdoorAmbient = Color3.fromRGB(180, 120, 80)
- -- 🌙 Night (Full night, dark blue sky)
- -- TimeOfDay = "20:00:00"
- -- Brightness = 0.3
- -- OutdoorAmbient = Color3.fromRGB(50, 50, 100)
- -- 🌌 Midnight (Deep night, very dark)
- -- TimeOfDay = "00:00:00"
- -- Brightness = 0.2
- -- OutdoorAmbient = Color3.fromRGB(25, 25, 50)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement