local a=-5 local y=script.Parent local e=y.Face local g=y.Hour local s=y.Minute local O=y.Second local x=86400 function rotateClockHand(a,y)local g=((e.CFrame*CFrame.Angles(math.pi/2,0,0)).lookVector*e.Size.Y)/2.5 a.CFrame=e.CFrame*CFrame.Angles(0,-y,0)+g a.CFrame=a.CFrame-(a.CFrame.lookVector*a.Size.Z)/2 end while true do local y=math.fmod(tick(),x)local e=(math.floor(y/3600)+5)+a local C=math.floor(y/60-60*e)local J=math.floor(math.fmod(y,60))rotateClockHand(g,e*(math.pi/6)+C*(math.pi/500))rotateClockHand(s,C*(math.pi/30))rotateClockHand(O,J*(math.pi/30))wait(.1)end


local time_zone = -5		-- Time zone, offset from GMT.

local clock = script.Parent
local face = clock.Face
local hour_hand = clock.Hour
local minute_hand = clock.Minute
local second_hand = clock.Second

local secondsInDay = 60*60*24

function rotateClockHand(hand,rotation)
	local lv = (face.CFrame*CFrame.Angles(math.pi/2,0,0)).lookVector*face.Size.Y/2.5

	hand.CFrame = face.CFrame*CFrame.Angles(0,-rotation,0) + lv
	hand.CFrame = hand.CFrame - hand.CFrame.lookVector*hand.Size.Z/2
end

while true do
	local tick = math.fmod(tick(),secondsInDay)

	local hour = math.floor(tick/3600) + 5 + time_zone
	local minute = math.floor(tick/60 - 60*hour)
	local second = math.floor(math.fmod(tick,60))

	rotateClockHand(hour_hand,hour*(math.pi/6) + minute*(math.pi/500))
	rotateClockHand(minute_hand,minute*(math.pi/30))
	rotateClockHand(second_hand,second*(math.pi/30))

	wait(0.1)
end
