local F=35 local c=F*60 local t=1440 local D=game:GetService("\076\105\103\104\116\105\110\103")local C=tick()-(D:getMinutesAfterMidnight()/t)*c local U=C+c local m=t/c if F==0 then F=1 end repeat local F=tick()if F>U then C=U U=C+c end D:setMinutesAfterMidnight((F-C)*m)wait(.066666666666667)until false


local dayLength = 35 --you can adjust this (24-34 recommended)

local cycleTime = dayLength*60
local minutesInADay = 24*60

local lighting = game:GetService("Lighting")

local startTime = tick() - (lighting:getMinutesAfterMidnight() / minutesInADay)*cycleTime
local endTime = startTime + cycleTime

local timeRatio = minutesInADay / cycleTime

if dayLength == 0 then
	dayLength = 1
end

repeat
	local currentTime = tick()
	
	if currentTime > endTime then
		startTime = endTime
		endTime = startTime + cycleTime
	end
	
	lighting:setMinutesAfterMidnight((currentTime - startTime)*timeRatio)
	wait(1/15)
until false
