client,service=nil,nil return function(z,y)if y then setfenv(1,y)end local C local v=0 local x local W=false local c=service.New("\083\111\117\110\100",{Volume=.25,Looped=false,SoundId="\114\098\120\097\115\115\101\116\105\100\058\047\047\049\053\049\055\049\053\057\053\057"})local V=service.TextService:GetTextSize(v,100,Enum.Font.SourceSans,Vector2.new(math.huge,math.huge))if V.X<150 then V=Vector2.new(175,V.Y)end local h=client.UI.Make("\087\105\110\100\111\119",{Name="\083\116\111\112\119\097\116\099\104";Title="\083\116\111\112\119\097\116\099\104";Icon=client.MatIcons["\072\111\117\114\103\108\097\115\115 \102\117\108\108"],Size={V.X+40,V.Y+20};Position=UDim2.new(0,10,1,-(V.Y+30));OnClose=function()c:Stop()c:Destroy()end})local m=h:Add("\084\101\120\116\076\097\098\101\108",{Text=v,BackgroundTransparency=1;TextScaled=true})local L=h:AddTitleButton({Text="";OnClick=function()if W then c.Volume=.25 x.Image="\114\098\120\097\115\115\101\116\105\100\058\047\047\049\054\051\056\053\053\049\054\057\054"W=false else c.Volume=0 x.Image="\114\098\120\097\115\115\101\116\105\100\058\047\047\049\054\051\056\053\056\052\054\055\053"W=true end end})x=L:Add("\073\109\097\103\101\076\097\098\101\108",{Size=UDim2.new(1,0,1,0),Position=UDim2.new(0,0,0,0);ScaleType=Enum.ScaleType.Fit,Image="\114\098\120\097\115\115\101\116\105\100\058\047\047\049\054\051\056\053\053\049\054\057\054",BackgroundTransparency=1})c.Parent=m C=h.gTable C:Ready()local U=0 while task.wait(1)do if not C.Active then break end c:Play()U+=1 m.Text=U end end
client, service = nil, nil

return function(data, env)
	if env then
		setfenv(1, env)
	end
	
	local gTable
	local tLimit = 0
	local sImg
	
	local isMuted = false

	local tock = service.New("Sound", {
		Volume = 0.25; Looped = false; SoundId = "rbxassetid://151715959";
	})

	local textSize = service.TextService:GetTextSize(tLimit, 100, Enum.Font.SourceSans, Vector2.new(math.huge,math.huge))	
	if textSize.X < 150 then textSize = Vector2.new(175, textSize.Y) end

	local window = client.UI.Make("Window", {
		Name = "Stopwatch";
		Title = "Stopwatch";
		Icon = client.MatIcons["Hourglass full"];
		Size = {textSize.X + 40, textSize.Y + 20};
		Position = UDim2.new(0, 10, 1, -(textSize.Y + 30));
		OnClose = function()
			tock:Stop()
			tock:Destroy()
		end
	})

	local label = window:Add("TextLabel", {
		Text = tLimit;
		BackgroundTransparency = 1;
		TextScaled = true;
	})

	local muteButton = window:AddTitleButton({
		Text = "";
		OnClick = function()
			if isMuted then
				tock.Volume = 0.25
				sImg.Image = "rbxassetid://1638551696"
				isMuted = false
			else
				tock.Volume = 0
				sImg.Image = "rbxassetid://1638584675"
				isMuted = true
			end
		end
	})

	sImg = muteButton:Add("ImageLabel", {
		Size = UDim2.new(1,0,1,0);
		Position = UDim2.new(0,0,0,0);
		ScaleType = Enum.ScaleType.Fit;
		Image = "rbxassetid://1638551696";
		BackgroundTransparency = 1;
	})

	tock.Parent = label
	gTable = window.gTable
	gTable:Ready()
	
	local ctime = 0

	while task.wait(1) do
		if not gTable.Active then break end
		tock:Play()
		ctime += 1
		label.Text = ctime
	end
end
