Nothing happens when function is called

I’m making a function to create a timer but whenever it is called, nothing happens! I’ve tried changing the name but it still hasn’t worked. Here is the function:

local function create(loadTable)
	print('lolhehe')
	if onTimer == true then
		local prev
		local children = 0
		for i,v in pairs(Timers:GetChildren()) do
			if v:IsA('Frame') then
				children = children + 1
			end
		end
		local clone = script.TimerTemp:Clone()
		clone:SetAttribute('Tag','T'.. tostring(children+2))
		clone.Parent = Timers
		clone.Name = 'Timer' .. tostring(#TimersFrame.Timers:GetChildren()-1)
		clone.TimerName.Text = clone.Name
		prev = clone.Name
		local widgetInfo2 = DockWidgetPluginGuiInfo.new(
			Enum.InitialDockState.Float,  -- Widget will be initialized in floating panel
			false,   -- Widget will be initially enabled
			false,  -- Don't override the previous enabled state
			255,    -- Default width of the floating window
			328,    -- Default height of the floating window
			255,    -- Minimum width of the floating window
			328     -- Minimum height of the floating window
		)

		local TimerEditWidget = plugin:CreateDockWidgetPluginGui('Edit'..num, widgetInfo2)


		local frame

		if loadTable then
			frame = script.TimerEdit:Clone()
			frame.Parent = TimerEditWidget
		else
			frame = script.TimerEdit:Clone()
			frame.Parent = TimerEditWidget	
		end
		TimerEditWidget.Title = 'Time'
		num = num + 1

		if loadTable then
			for i,data in pairs(loadTable) do
				local clone = script.TimerTemp:Clone()
				print('data lol')
				local widgetInfo2 = DockWidgetPluginGuiInfo.new(
					Enum.InitialDockState.Float,  -- Widget will be initialized in floating panel
					false,   -- Widget will be initially enabled
					false,  -- Don't override the previous enabled state
					255,    -- Default width of the floating window
					328,    -- Default height of the floating window
					255,    -- Minimum width of the floating window
					328     -- Minimum height of the floating window
				)

				local TimerEditWidget = plugin:CreateDockWidgetPluginGui('Edit'..math.random(1,99999999), widgetInfo2)

				local frame = script.TimerEdit:Clone()
				frame.Parent = TimerEditWidget
				clone:SetAttribute('Tag','T'.. tostring(children+2))
				print('Name is:' .. data.Name)
				clone.TimerName.Text = data.Name
				TimerEditWidget.Title = data.Name
				frame.Parent = TimerEditWidget
				frame.Title.Text = data.Name
				frame.Params.Start.Value.Text = tostring(data.Start)
				frame.Params.Separator.Value.Text = tostring(data.Separators)
				frame.Params.Separators.Value.Text = tostring(data.Separators)
				frame.Params.End.Value.Text = tostring(data.End)
				frame.Params.StartEvent.Value.Text = data.StartOn or '(None)'
				if data.Countdown == false then
					frame.Params.Countdown.Value.check.Visible = false
				end
				frame.Params.TickSound.Value.Text = tostring(data.Tick)
				frame.Params.UIElement.Value.Text = tostring(data.UI)
				clone.Parent = TimersFrame.Timers
				print('create timer')

				local clicked = false
				clone.Delete.MouseButton1Click:Connect(function()
					if clicked == false then
						clicked = true
						clone.Delete.question.Visible = true
						clone.Delete.delete.Visible = false
						coroutine.wrap(function()
							wait(3)
							if clone:FindFirstChild('Delete') then
								clone.Delete.question.Visible = false
								clone.Delete.delete.Visible = true
								clicked = false
							end
						end)()
					else
						plugin:SetSetting(clone:GetAttribute('Tag'),nil)
						clone:Destroy()
					end


				end)

				clone.TimerName.Changed:Connect(function(Text)
					if clone:FindFirstChild('TimerName') then
						TimerEditWidget.Title = clone.TimerName.Text
						if frame:FindFirstChild('Title') then
							frame.Title.Text = clone.TimerName.Text
						end
					end

				end)



				clone.Edit.MouseButton1Click:Connect(function()
					TimerEditWidget.Enabled = true
				end)

				frame.Help.MouseButton1Click:Connect(function()
					local widgetInfo = DockWidgetPluginGuiInfo.new(
						Enum.InitialDockState.Float,  -- Widget will be initialized in floating panel
						false,   -- Widget will be initially enabled
						false,  -- Don't override the previous enabled state
						255,    -- Default width of the floating window
						328,    -- Default height of the floating window
						255,    -- Minimum width of the floating window
						328     -- Minimum height of the floating window
					)

					local success,err = pcall(function()
						local HelpWidget = plugin:CreateDockWidgetPluginGui("HelpWidget", widgetInfo)
						HelpWidget.Title = "Help"
						HelpWidget.Enabled = true
						local clone = script.Help:Clone()
						clone.Parent = HelpWidget
						HelpWidget:GetPropertyChangedSignal('Enabled'):Connect(function()
							if HelpWidget.Enabled == false then
								HelpWidget:Destroy()
							end
						end)
					end)

				end)

				frame.Params.Countdown.Value.MouseButton1Click:Connect(function()
					if frame.Params.Countdown.Value.check.ImageTransparency == 0 then
						frame.Params.Countdown.Value.check.ImageTransparency = 1
					else
						frame.Params.Countdown.Value.check.ImageTransparency = 0
					end
				end)

				local function save()
					local countdown = false
					if frame.Params.Countdown.Value.check.Visible == true then
						countdown = true
					else
						countdown = false
					end

					print(clone:GetAttribute('Tag'))
					plugin:SetSetting(clone:GetAttribute('Tag'),{
						Name = clone.TimerName.Text,
						Start = tonumber(frame.Params.Start.Value.Text),
						IntervalDuration = 1,
						Separator = frame.Params.Separator.Transparency,
						Separators = tonumber(frame.Params.Separators.Value.Text),
						Countdown = countdown,
						End = tonumber(frame.Params.End.Value.Text),
						Tick = frame.Params.TickSound.Value.Text,
						UI = frame.Params.UIElement.Value.Text,
						StartOn = frame.Params.StartEvent.Value.Text
					})
					print('Data successfully saved')
				end

				frame.Save.MouseButton1Click:Connect(save)

				function create(name,data)
					local timer = Instance.new("TextLabel")
					timer.Font = Enum.Font.GothamBlack
					timer.Text = "Timer Text"
					timer.TextColor3 = Color3.fromRGB(255, 255, 255)
					timer.TextScaled = true
					timer.TextSize = 14
					timer.TextWrapped = true
					timer.TextXAlignment = Enum.TextXAlignment.Center
					timer.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
					timer.BackgroundTransparency = 1
					timer.Position = UDim2.fromScale(0.36, 0.453)
					timer.Size = UDim2.fromScale(0.278, 0.0917)

					if not game.ReplicatedStorage:FindFirstChild('EzTimer') then
						local module = script.Parent.EzTimer:Clone()
						module.Parent = game.ReplicatedStorage
					end
					if data then
						local start = data['Start'] or 60
						local separator = data.Separator or ':'
						local separators = data.Separators or 2
						local countdown = data.Countdown or true
						local target = data.End or 0
						local showText = [[
		local timer = require(game.ReplicatedStorage.EzTimer):Create(']].. clone.TimerName.Text ..[[')
		
				local params = {
				Start = ]].. start ..[[,
				IntervalDuration = 1,
				Separator ="]] ..separator..[[",
				Separators = ]] .. separators .. [[,
				Countdown = ]] .. countdown .. [[,
				Target = ]]..target ..[[
			}

		timer:SetParams(params)
		]]


						if data.TickSound ~= '' then
							showText = showText.. [[
				
				timer:SetTickSound(]].. data.TickSound .. [[)]]
						end

						showText = showText..[[
			
			--To start the timer, write "timer:Start()"]]

						local Script = Instance.new('LocalScript')
						Script.Source = showText
						Script.Parent = timer
						frame.Params.UIElement.Value.Text = timer.Name
						if not game.StarterGui:FindFirstChildWhichIsA('ScreenGui') then
							local ui = Instance.new('ScreenGui')
							ui.Parent = game.StarterGui
							timer.Parent = ui
						else
							timer.Parent = game.StarterGui:FindFirstChildWhichIsA('ScreenGui')
						end


					end
				end



				frame.New.MouseButton1Click:Connect(function()
					local new = script.TimerText:Clone()
					local countdown = false

					local found = 0
					for i,v in pairs(game:GetDescendants()) do
						if string.match(v.Name,frame.Title.Text) ~= nil then
							found = found + 1
						end
					end

					new.Name = 'Timer' .. tostring(found + 1)
					new.Text = 'Timer'
					new.Parent = game.StarterGui:FindFirstChildWhichIsA('ScreenGui') or Instance.new('ScreenGui',game.StarterGui)
					if not game.ReplicatedStorage:FindFirstChild('EzTimer') then
						local mod = script.Parent.EzTimer:Clone()
						mod.Parent = game.ReplicatedStorage
					end

					local showText = [[
		local timer = require(game.ReplicatedStorage.EzTimer):Create(']].. clone.TimerName.Text ..[[')
		local element
				local params = {
				Start = ]].. frame.Params.Start.Value.Text .. [[,
				IntervalDuration = 1,
				Separator ="]] .. frame.Params.Separator.Value.Text..[[",
				Separators = ]] .. frame.Params.Separators.Value.Text .. [[,
				Countdown = ]] .. countdown .. [[,
				Target = ]] .. frame.Params.End.Value.Text ..[[
			}
		
		for i,v in pairs(game:GetDescendants()) do
		
		
		
		
		]]

					if frame.Params.StartEvent.Value.Text ~= '(None)' then
						showText = showText..[[
				for i,v in pairs(game:GetDescendants()) do
					if v.Name == "]] ..frame.Params.StartEvent.Value.Text..[[" then
						event = v
						break
					end
				end

				]]

						if frame:GetAttribute('Event') == 'Bindable' then
							showText = showText..[[
						event.Event:Connect(function()
							timer:Start()
						end)
						]]

						elseif frame:GetAttribute('Event') == 'Remote' then
							showText = showText..[[
						event.OnServerEvent:Connect(function()
							timer:Start()
						end)
						]]
						end
					end

					if frame.Params.UIElement.Value.Text ~= '(None)' then
						showText = showText..[[
				for i,v in pairs(game:GetDescendants()) do
					if v.Name == "]] ..frame.Params.StartEvent.Value.Text..[[" then
						timer:SetUI(v)
						break
					end
				end

				]]

						if frame:GetAttribute('Event') == 'Bindable' then
							showText = showText..[[
						event.Event:Connect(function()
							timer:Start()
						end)
						]]

						elseif frame:GetAttribute('Event') == 'Remote' then
							showText = showText..[[
						event.OnServerEvent:Connect(function()
							timer:Start()
						end)
						]]
						end
					end
					showText = showText.. [[
			end]]

					local newScript = Instance.new('LocalScript')
					newScript.Parent = new
					newScript.Source = showText

					Selection:Set({new})
				end)

				frame.Show.MouseButton1Click:Connect(function()
					local valid = true

					local start = frame.Params.Start.Value.Text
					local countdown = true
					local separator = frame.Params.Separator.Value.Text
					local separators = frame.Params.Separators.Value.Text
					local element = frame.Params.UIElement.Value.Text
					local End = frame.Params.End.Value.Text
					local ticksound = frame.Params.TickSound.Value.Text
					local startEvent

					if frame.Params.Countdown.Value.check.ImageTransparency == 1 then
						countdown = false
					else
						countdown = true
					end

					--if not start:match("^%s*$") then
					--	valid = false
					--end

					--if not separator:match("^%s*$") then
					--	valid = false
					--end

					--if not separators:match("^%s*$") then
					--	valid = false
					--end

					if countdown == true then
						countdown = 'true'
					else
						countdown = 'false'
					end

					if valid == true then
						local showText = [[
		local timer = require(game.ReplicatedStorage.EzTimer):Create(']].. clone.TimerName.Text ..[[')
		local element
				local params = {
				Start = ]].. frame.Params.Start.Value.Text .. [[,
				IntervalDuration = 1,
				Separator ="]] .. frame.Params.Separator.Value.Text..[[",
				Separators = ]] .. frame.Params.Separators.Value.Text .. [[,
				Countdown = ]] .. countdown .. [[,
				Target = ]] .. frame.Params.End.Value.Text ..[[
			}
		

		]]

						if frame.Params.StartEvent.Value.Text ~= '(None)' then
							showText = showText..[[
				for i,v in pairs(game:GetDescendants()) do
					if v.Name == "]] ..frame.Params.StartEvent.Value.Text..[[" then
						event = v
						break
					end
				end

				]]

							if frame:GetAttribute('Event') == 'Bindable' then
								showText = showText..[[
						event.Event:Connect(function()
							timer:Start()
						end)
						]]

							elseif frame:GetAttribute('Event') == 'Remote' then
								showText = showText..[[
						event.OnServerEvent:Connect(function()
							timer:Start()
						end)
						]]
							end
						end

						if frame.Params.UIElement.Value.Text ~= '(None)' then
							showText = showText..[[
				for i,v in pairs(game:GetDescendants()) do
					if v.Name == "]] ..frame.Params.UIElement.Value.Text..[[" then
						timer:SetUI(v)
						break
					end
				end

				]]

							if frame:GetAttribute('Event') == 'Bindable' then
								showText = showText..[[
						event.Event:Connect(function()
							timer:Start()
						end)
						]]

							elseif frame:GetAttribute('Event') == 'Remote' then
								showText = showText..[[
						event.OnServerEvent:Connect(function()
							timer:Start()
						end)
						]]
							end
						end

						if frame.Params.TickSound.Value.Text ~= '' then
							showText = showText..[[
timer:SetTickSound(]].. frame.Params.TickSound.Value.Text ..[[)
				]]
						end

						showText = showText .. [[
--To start the timer, type timer:Start()]]
						frame.ScriptText.Visible = true
						frame.ScriptText.Text.Text = showText

					end









				end)

				frame.ScriptText.Back.MouseButton1Click:Connect(function()
					frame.ScriptText.Visible = false
				end)

				frame.Params.UIElement.Value.MouseButton1Click:Connect(function()
					frame.FindInstance.Visible = true
					for i,v in pairs(frame.FindInstance:GetChildren()) do
						if v:IsA('TextButton') then
							v:Destroy()
						end
					end

				end)

				frame.Params.StartEvent.Value.MouseButton1Click:Connect(function()
					frame.FindEvent.Visible = true

					for i,v in pairs(frame.FindEvent:GetChildren()) do
						if v:IsA('TextButton') then
							v:Destroy()
						end
					end

				end)

				for i,v in pairs(game.StarterGui:GetDescendants()) do


					if v:IsA('TextLabel') then
						local clone = script.Temp:Clone()
						clone.Title.Text = v.Name
						clone.Icon.Image = 'rbxassetid://413372383'
						clone.Parent = frame.FindInstance.Results
						clone.MouseButton1Click:Connect(function()
							frame.FindInstance.Visible = false
							frame.Params.UIElement.Value.Text = clone.Title.Text
						end)
					end

					if v:IsA('TextButton') then
						local clone = script.Temp:Clone()
						clone.Title.Text = v.Name
						clone.Icon.Image = 'rbxassetid://166526938'
						clone.Parent = frame.FindInstance.Results
						clone.MouseButton1Click:Connect(function()
							frame.FindInstance.Visible = false
							frame.Params.UIElement.Value.Text = clone.Title.Text
						end)
					end

					if v:IsA('TextBox') then
						local clone = script.Temp:Clone()
						clone.Title.Text = v.Name
						clone.Icon.Image = 'rbxassetid://166526938'
						clone.Parent = frame.FindInstance.Results
						clone.MouseButton1Click:Connect(function()
							frame.FindInstance.Visible = false
							frame.Params.UIElement.Value.Text = clone.Title.Text
						end)
					end
				end

				frame.FindEvent.Search:GetPropertyChangedSignal('Text'):Connect(function()
					for i,v in pairs(frame.FindEvent.Results:GetChildren()) do
						if v:IsA('TextButton') then
							v:Destroy()
						end
					end
					for i,v in pairs(game:GetDescendants()) do
						if string.match(v.Name:lower(),frame.FindEvent.Search.Text:lower()) ~= nil then

							if v:IsA('BindableEvent') then
								local clone = script.Temp:Clone()
								clone.Title.Text = v.Name
								clone.Icon.Image = 'rbxassetid://413363737'
								clone.Parent = frame.FindEvent.Results
								clone.MouseButton1Click:Connect(function()
									frame.FindEvent.Visible = false
									frame.Params.StartEvent.Value.Text = clone.Title.Text
									frame:SetAttribute('Event','Bindable')
								end)
							end

							if v:IsA('RemoteEvent') then
								local clone = script.Temp:Clone()
								clone.Title.Text = v.Name
								clone.Icon.Image = 'rbxassetid://4585398729'
								clone.Parent = frame.FindEvent.Results
								clone.MouseButton1Click:Connect(function()
									frame.FindEvent.Visible = false
									frame.Params.StartEvent.Value.Text = clone.Title.Text
									frame:SetAttribute('Event','Remote')
								end)
							end


						end
					end
				end)

				frame.FindInstance.Search:GetPropertyChangedSignal('Text'):Connect(function()
					for i,v in pairs(frame.FindInstance.Results:GetChildren()) do
						if v:IsA('TextButton') then
							v:Destroy()
						end
					end
					for i,v in pairs(game.StarterGui:GetDescendants()) do
						if string.match(v.Name:lower(),frame.FindInstance.Search.Text:lower()) ~= nil then

							if v:IsA('TextLabel') then
								local clone = script.Temp:Clone()
								clone.Title.Text = v.Name
								clone.Icon.Image = 'rbxassetid://413372383'
								clone.Parent = frame.FindInstance.Results
								clone.MouseButton1Click:Connect(function()
									frame.FindInstance.Visible = false
									frame.Params.UIElement.Value.Text = clone.Title.Text
								end)
							end

							if v:IsA('TextButton') then
								local clone = script.Temp:Clone()
								clone.Title.Text = v.Name
								clone.Icon.Image = 'rbxassetid://166526938'
								clone.Parent = frame.FindInstance.Results
								clone.MouseButton1Click:Connect(function()
									frame.FindInstance.Visible = false
									frame.Params.UIElement.Value.Text = clone.Title.Text
								end)
							end

							if v:IsA('TextBox') then
								local clone = script.Temp:Clone()
								clone.Title.Text = v.Name
								clone.Icon.Image = 'rbxassetid://166526938'
								clone.Parent = frame.FindInstance.Results
								clone.MouseButton1Click:Connect(function()
									frame.FindInstance.Visible = false
									frame.Params.UIElement.Value.Text = clone.Title.Text
								end)


							end
						end
					end
				end)
				coroutine.wrap(function()
					while true do
						wait()

						local total = 0
						if frame:FindFirstChild('FindInstance') then


							for i,v in pairs(frame.FindInstance.Results:GetChildren()) do
								if v:IsA('TextButton') then
									total = total + 1
								end
							end

							frame.FindInstance.Results.CanvasSize = UDim2.new(0,0,0,total*41)
						end
					end
				end)()

				coroutine.wrap(function()
					while true do
						wait()

						local total = 0
						if frame:FindFirstChild('FindInstance') then


							for i,v in pairs(frame.FindEvent.Results:GetChildren()) do
								if v:IsA('TextButton') then
									total = total + 1
								end
							end

							frame.FindEvent.Results.CanvasSize = UDim2.new(0,0,0,total*41)
						end
					end
				end)()


			end
		end
		print(table.unpack(TimersFrame.Timers:GetChildren()))

		local clicked = false
		clone.Delete.MouseButton1Click:Connect(function()
			if clicked == false then
				clicked = true
				clone.Delete.question.Visible = true
				clone.Delete.delete.Visible = false
				coroutine.wrap(function()
					wait(3)
					if clone:FindFirstChild('Delete') then
						clone.Delete.question.Visible = false
						clone.Delete.delete.Visible = true
						clicked = false
					end
				end)()
			else
				plugin:SetSetting(clone:GetAttribute('Tag'),nil)
				clone:Destroy()
				TimerEditWidget:Destroy()
			end


		end)

		clone.TimerName.Changed:Connect(function(Text)
			if clone:FindFirstChild('TimerName') then
				TimerEditWidget.Title = clone.TimerName.Text
				frame.Title.Text = clone.TimerName.Text
			end

		end)



		clone.Edit.MouseButton1Click:Connect(function()
			TimerEditWidget.Enabled = true
		end)
		local success,err = pcall(function()
			frame.Help.MouseButton1Click:Connect(function()
				local widgetInfo = DockWidgetPluginGuiInfo.new(
					Enum.InitialDockState.Float,  -- Widget will be initialized in floating panel
					false,   -- Widget will be initially enabled
					false,  -- Don't override the previous enabled state
					255,    -- Default width of the floating window
					328,    -- Default height of the floating window
					255,    -- Minimum width of the floating window
					328     -- Minimum height of the floating window
				)

				local success,err = pcall(function()
					local HelpWidget = plugin:CreateDockWidgetPluginGui("HelpWidget", widgetInfo)
					HelpWidget.Title = "Help"
					HelpWidget.Enabled = true
					local clone = script.Help:Clone()
					clone.Parent = HelpWidget
					HelpWidget:GetPropertyChangedSignal('Enabled'):Connect(function()
						if HelpWidget.Enabled == false then
							HelpWidget:Destroy()
						end
					end)
				end)

			end)
		end)

		frame.Params.Countdown.Value.MouseButton1Click:Connect(function()
			if frame.Params.Countdown.Value.check.ImageTransparency == 0 then
				frame.Params.Countdown.Value.check.ImageTransparency = 1
			else
				frame.Params.Countdown.Value.check.ImageTransparency = 0
			end
		end)

		local function save()
			local countdown = false
			if frame.Params.Countdown.Value.check.Visible == true then
				countdown = true
			else
				countdown = false
			end

			print(clone:GetAttribute('Tag'))
			plugin:SetSetting(clone:GetAttribute('Tag'),{
				Name = clone.TimerName.Text,
				Start = tonumber(frame.Params.Start.Value.Text),
				IntervalDuration = 1,
				Separator = frame.Params.Separator.Transparency,
				Separators = tonumber(frame.Params.Separators.Value.Text),
				Countdown = countdown,
				End = tonumber(frame.Params.End.Value.Text),
				Tick = frame.Params.TickSound.Value.Text,
				UI = frame.Params.UIElement.Value.Text,
				StartOn = frame.Params.StartEvent.Value.Text
			})
			print('Data successfully saved for '..clone.TimerName.Text)
		end

		frame.Save.MouseButton1Click:Connect(save)

		function create(name,data)
			local timer = Instance.new("TextLabel")
			timer.Font = Enum.Font.GothamBlack
			timer.Text = "Timer Text"
			timer.TextColor3 = Color3.fromRGB(255, 255, 255)
			timer.TextScaled = true
			timer.TextSize = 14
			timer.TextWrapped = true
			timer.TextXAlignment = Enum.TextXAlignment.Center
			timer.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
			timer.BackgroundTransparency = 1
			timer.Position = UDim2.fromScale(0.36, 0.453)
			timer.Size = UDim2.fromScale(0.278, 0.0917)

			if not game.ReplicatedStorage:FindFirstChild('EzTimer') then
				local module = script.Parent.EzTimer:Clone()
				module.Parent = game.ReplicatedStorage
			end
			if data then
				local start = data['Start'] or 60
				local separator = data.Separator or ':'
				local separators = data.Separators or 2
				local countdown = data.Countdown or true
				local target = data.End or 0
				local showText = [[
		local timer = require(game.ReplicatedStorage.EzTimer):Create(']].. clone.TimerName.Text ..[[')
		
				local params = {
				Start = ]].. start ..[[,
				IntervalDuration = 1,
				Separator ="]] ..separator..[[",
				Separators = ]] .. separators .. [[,
				Countdown = ]] .. countdown .. [[,
				Target = ]]..target ..[[
			}

		timer:SetParams(params)
		]]


				if data.TickSound ~= '' then
					showText = showText.. [[
				
				timer:SetTickSound(]].. data.TickSound .. [[)]]
				end

				showText = showText..[[
			
			--To start the timer, write "timer:Start()"]]

				local Script = Instance.new('LocalScript')
				Script.Source = showText
				Script.Parent = timer
				frame.Params.UIElement.Value.Text = timer.Name
				if not game.StarterGui:FindFirstChildWhichIsA('ScreenGui') then
					local ui = Instance.new('ScreenGui')
					ui.Parent = game.StarterGui
					timer.Parent = ui
				else
					timer.Parent = game.StarterGui:FindFirstChildWhichIsA('ScreenGui')
				end


			end
		end



		frame.New.MouseButton1Click:Connect(function()
			local new = script.TimerText:Clone()
			local countdown = false

			local found = 0
			for i,v in pairs(game:GetDescendants()) do
				if string.match(v.Name,frame.Title.Text) ~= nil then
					found = found + 1
				end
			end

			new.Name = 'Timer' .. tostring(found + 1)
			new.Text = 'Timer'
			new.Parent = game.StarterGui:FindFirstChildWhichIsA('ScreenGui') or Instance.new('ScreenGui',game.StarterGui)
			if not game.ReplicatedStorage:FindFirstChild('EzTimer') then
				local mod = script.Parent.EzTimer:Clone()
				mod.Parent = game.ReplicatedStorage
			end

			local showText = [[
		local timer = require(game.ReplicatedStorage.EzTimer):Create(']].. clone.TimerName.Text ..[[')
		local element
				local params = {
				Start = ]].. frame.Params.Start.Value.Text .. [[,
				IntervalDuration = 1,
				Separator ="]] .. frame.Params.Separator.Value.Text..[[",
				Separators = ]] .. frame.Params.Separators.Value.Text .. [[,
				Countdown = ]] .. countdown .. [[,
				Target = ]] .. frame.Params.End.Value.Text ..[[
			}
		
		for i,v in pairs(game:GetDescendants()) do
		
		
		
		
		]]

			if frame.Params.StartEvent.Value.Text ~= '(None)' then
				showText = showText..[[
				for i,v in pairs(game:GetDescendants()) do
					if v.Name == "]] ..frame.Params.StartEvent.Value.Text..[[" then
						event = v
						break
					end
				end

				]]

				if frame:GetAttribute('Event') == 'Bindable' then
					showText = showText..[[
						event.Event:Connect(function()
							timer:Start()
						end)
						]]

				elseif frame:GetAttribute('Event') == 'Remote' then
					showText = showText..[[
						event.OnServerEvent:Connect(function()
							timer:Start()
						end)
						]]
				end
			end

			if frame.Params.UIElement.Value.Text ~= '(None)' then
				showText = showText..[[
				for i,v in pairs(game:GetDescendants()) do
					if v.Name == "]] ..frame.Params.StartEvent.Value.Text..[[" then
						timer:SetUI(v)
						break
					end
				end

				]]

				if frame:GetAttribute('Event') == 'Bindable' then
					showText = showText..[[
						event.Event:Connect(function()
							timer:Start()
						end)
						]]

				elseif frame:GetAttribute('Event') == 'Remote' then
					showText = showText..[[
						event.OnServerEvent:Connect(function()
							timer:Start()
						end)
						]]
				end
			end
			showText = showText.. [[
			end]]

			local newScript = Instance.new('LocalScript')
			newScript.Parent = new
			newScript.Source = showText

			Selection:Set({new})
		end)

		frame.Show.MouseButton1Click:Connect(function()
			local valid = true

			local start = frame.Params.Start.Value.Text
			local countdown = true
			local separator = frame.Params.Separator.Value.Text
			local separators = frame.Params.Separators.Value.Text
			local element = frame.Params.UIElement.Value.Text
			local End = frame.Params.End.Value.Text
			local ticksound = frame.Params.TickSound.Value.Text
			local startEvent

			if frame.Params.Countdown.Value.check.ImageTransparency == 1 then
				countdown = false
			else
				countdown = true
			end

			--if not start:match("^%s*$") then
			--	valid = false
			--end

			--if not separator:match("^%s*$") then
			--	valid = false
			--end

			--if not separators:match("^%s*$") then
			--	valid = false
			--end

			if countdown == true then
				countdown = 'true'
			else
				countdown = 'false'
			end

			if valid == true then
				local showText = [[
		local timer = require(game.ReplicatedStorage.EzTimer):Create(']].. clone.TimerName.Text ..[[')
		local element
				local params = {
				Start = ]].. frame.Params.Start.Value.Text .. [[,
				IntervalDuration = 1,
				Separator ="]] .. frame.Params.Separator.Value.Text..[[",
				Separators = ]] .. frame.Params.Separators.Value.Text .. [[,
				Countdown = ]] .. countdown .. [[,
				Target = ]] .. frame.Params.End.Value.Text ..[[
			}
		

		]]

				if frame.Params.StartEvent.Value.Text ~= '(None)' then
					showText = showText..[[
				for i,v in pairs(game:GetDescendants()) do
					if v.Name == "]] ..frame.Params.StartEvent.Value.Text..[[" then
						event = v
						break
					end
				end

				]]

					if frame:GetAttribute('Event') == 'Bindable' then
						showText = showText..[[
						event.Event:Connect(function()
							timer:Start()
						end)
						]]

					elseif frame:GetAttribute('Event') == 'Remote' then
						showText = showText..[[
						event.OnServerEvent:Connect(function()
							timer:Start()
						end)
						]]
					end
				end

				if frame.Params.UIElement.Value.Text ~= '(None)' then
					showText = showText..[[
				for i,v in pairs(game:GetDescendants()) do
					if v.Name == "]] ..frame.Params.UIElement.Value.Text..[[" then
						timer:SetUI(v)
						break
					end
				end

				]]

					if frame:GetAttribute('Event') == 'Bindable' then
						showText = showText..[[
						event.Event:Connect(function()
							timer:Start()
						end)
						]]

					elseif frame:GetAttribute('Event') == 'Remote' then
						showText = showText..[[
						event.OnServerEvent:Connect(function()
							timer:Start()
						end)
						]]
					end
				end

				if frame.Params.TickSound.Value.Text ~= '' then
					showText = showText..[[
timer:SetTickSound(]].. frame.Params.TickSound.Value.Text ..[[)
				]]
				end

				showText = showText .. [[
--To start the timer, type timer:Start()]]
				frame.ScriptText.Visible = true
				frame.ScriptText.Text.Text = showText

			end









		end)

		frame.ScriptText.Back.MouseButton1Click:Connect(function()
			frame.ScriptText.Visible = false
		end)

		frame.Params.UIElement.Value.MouseButton1Click:Connect(function()
			frame.FindInstance.Visible = true
			for i,v in pairs(frame.FindInstance:GetChildren()) do
				if v:IsA('TextButton') then
					v:Destroy()
				end
			end

		end)

		frame.Params.StartEvent.Value.MouseButton1Click:Connect(function()
			frame.FindEvent.Visible = true

			for i,v in pairs(frame.FindEvent:GetChildren()) do
				if v:IsA('TextButton') then
					v:Destroy()
				end
			end

		end)

		for i,v in pairs(game.StarterGui:GetDescendants()) do


			if v:IsA('TextLabel') then
				local clone = script.Temp:Clone()
				clone.Title.Text = v.Name
				clone.Icon.Image = 'rbxassetid://413372383'
				clone.Parent = frame.FindInstance.Results
				clone.MouseButton1Click:Connect(function()
					frame.FindInstance.Visible = false
					frame.Params.UIElement.Value.Text = clone.Title.Text
				end)
			end

			if v:IsA('TextButton') then
				local clone = script.Temp:Clone()
				clone.Title.Text = v.Name
				clone.Icon.Image = 'rbxassetid://166526938'
				clone.Parent = frame.FindInstance.Results
				clone.MouseButton1Click:Connect(function()
					frame.FindInstance.Visible = false
					frame.Params.UIElement.Value.Text = clone.Title.Text
				end)
			end

			if v:IsA('TextBox') then
				local clone = script.Temp:Clone()
				clone.Title.Text = v.Name
				clone.Icon.Image = 'rbxassetid://166526938'
				clone.Parent = frame.FindInstance.Results
				clone.MouseButton1Click:Connect(function()
					frame.FindInstance.Visible = false
					frame.Params.UIElement.Value.Text = clone.Title.Text
				end)
			end
		end

		frame.FindEvent.Search:GetPropertyChangedSignal('Text'):Connect(function()
			for i,v in pairs(frame.FindEvent.Results:GetChildren()) do
				if v:IsA('TextButton') then
					v:Destroy()
				end
			end
			for i,v in pairs(game:GetDescendants()) do
				if string.match(v.Name:lower(),frame.FindEvent.Search.Text:lower()) ~= nil then

					if v:IsA('BindableEvent') then
						local clone = script.Temp:Clone()
						clone.Title.Text = v.Name
						clone.Icon.Image = 'rbxassetid://413363737'
						clone.Parent = frame.FindEvent.Results
						clone.MouseButton1Click:Connect(function()
							frame.FindEvent.Visible = false
							frame.Params.StartEvent.Value.Text = clone.Title.Text
							frame:SetAttribute('Event','Bindable')
						end)
					end

					if v:IsA('RemoteEvent') then
						local clone = script.Temp:Clone()
						clone.Title.Text = v.Name
						clone.Icon.Image = 'rbxassetid://4585398729'
						clone.Parent = frame.FindEvent.Results
						clone.MouseButton1Click:Connect(function()
							frame.FindEvent.Visible = false
							frame.Params.StartEvent.Value.Text = clone.Title.Text
							frame:SetAttribute('Event','Remote')
						end)
					end


				end
			end
		end)

		frame.FindInstance.Search:GetPropertyChangedSignal('Text'):Connect(function()
			for i,v in pairs(frame.FindInstance.Results:GetChildren()) do
				if v:IsA('TextButton') then
					v:Destroy()
				end
			end
			for i,v in pairs(game.StarterGui:GetDescendants()) do
				if string.match(v.Name:lower(),frame.FindInstance.Search.Text:lower()) ~= nil then

					if v:IsA('TextLabel') then
						local clone = script.Temp:Clone()
						clone.Title.Text = v.Name
						clone.Icon.Image = 'rbxassetid://413372383'
						clone.Parent = frame.FindInstance.Results
						clone.MouseButton1Click:Connect(function()
							frame.FindInstance.Visible = false
							frame.Params.UIElement.Value.Text = clone.Title.Text
						end)
					end

					if v:IsA('TextButton') then
						local clone = script.Temp:Clone()
						clone.Title.Text = v.Name
						clone.Icon.Image = 'rbxassetid://166526938'
						clone.Parent = frame.FindInstance.Results
						clone.MouseButton1Click:Connect(function()
							frame.FindInstance.Visible = false
							frame.Params.UIElement.Value.Text = clone.Title.Text
						end)
					end

					if v:IsA('TextBox') then
						local clone = script.Temp:Clone()
						clone.Title.Text = v.Name
						clone.Icon.Image = 'rbxassetid://166526938'
						clone.Parent = frame.FindInstance.Results
						clone.MouseButton1Click:Connect(function()
							frame.FindInstance.Visible = false
							frame.Params.UIElement.Value.Text = clone.Title.Text
						end)


					end
				end
			end
		end)
		coroutine.wrap(function()
			while true do
				wait()

				local total = 0
				if frame:FindFirstChild('FindInstance') then


					for i,v in pairs(frame.FindInstance.Results:GetChildren()) do
						if v:IsA('TextButton') then
							total = total + 1
						end
					end

					frame.FindInstance.Results.CanvasSize = UDim2.new(0,0,0,total*41)
				end
			end
		end)()

		coroutine.wrap(function()
			while true do
				wait()

				local total = 0
				if frame:FindFirstChild('FindInstance') then


					for i,v in pairs(frame.FindEvent.Results:GetChildren()) do
						if v:IsA('TextButton') then
							total = total + 1
						end
					end

					frame.FindEvent.Results.CanvasSize = UDim2.new(0,0,0,total*41)
				end
			end
		end)()

	else

(rest of function in reply)

		--Stopwatches
		local Watches = TimerWidget.Home.Watches
		local prev
		local children = 0
		for i,v in pairs(Watches:GetChildren()) do
			if v:IsA('Frame') then
				children = children + 1
			end
		end
		local clone = script.TimerTemp:Clone()
		clone:SetAttribute('Tag','W'.. tostring(children+2))
		clone.Parent = TimerWidget.Home.Watches
		clone.Name = 'Watch' .. tostring(#TimersFrame.Watches:GetChildren()-1)
		clone.TimerName.Text = clone.Name
		prev = clone.Name
		local widgetInfo2 = DockWidgetPluginGuiInfo.new(
			Enum.InitialDockState.Float,  -- Widget will be initialized in floating panel
			false,   -- Widget will be initially enabled
			false,  -- Don't override the previous enabled state
			255,    -- Default width of the floating window
			328,    -- Default height of the floating window
			255,    -- Minimum width of the floating window
			328     -- Minimum height of the floating window
		)

		local TimerEditWidget = plugin:CreateDockWidgetPluginGui('Edit'..num, widgetInfo2)
		local frame
		if loadTable then
			frame = script.WatchEdit:Clone()
			frame.Parent = TimerEditWidget
		else
			frame = script.WatchEdit:Clone()
			frame.Parent = TimerEditWidget
		end
		TimerEditWidget.Title = 'Stopwatch'
		num = num + 1

		if loadTable then
			frame = script.WatchEdit:Clone()
			frame.Parent = TimerEditWidget
		end

		if loadTable then
			for i,data in pairs(loadTable) do
				local clone = script.TimerTemp:Clone()
				local frame = script.WatchEdit:Clone()
				clone:SetAttribute('Tag','W'.. tostring(children+2))
				clone.TimerName.Text = data.Name
				TimerEditWidget.Title = data.Name
				frame.Title.Text = data.Name
				frame.Params.Separator.Value.Text = tostring(data.Separators)
				frame.Params.Separators.Value.Text = tostring(data.Separators)
				frame.Params.StartEvent.Value.Text = data.StartOn or '(None)'
				frame.Params.UIElement.Value.Text = tostring(data.UI) or '(None)'
				clone.Parent = TimersFrame.Watches
				print('create watch')

				local clicked = false
				clone.Delete.MouseButton1Click:Connect(function()
					if clicked == false then
						clicked = true
						clone.Delete.question.Visible = true
						clone.Delete.delete.Visible = false
						coroutine.wrap(function()
							wait(3)
							if clone:FindFirstChild('Delete') then
								clone.Delete.question.Visible = false
								clone.Delete.delete.Visible = true
								clicked = false
							end
						end)()
					else
						plugin:SetSetting(clone:GetAttribute('Tag'),nil)
						clone:Destroy()
					end


				end)

				clone.TimerName.Changed:Connect(function(Text)
					if clone:FindFirstChild('TimerName') then
						TimerEditWidget.Title = clone.TimerName.Text
						frame.Title.Text = clone.TimerName.Text
					end

				end)



				clone.Edit.MouseButton1Click:Connect(function()
					TimerEditWidget.Enabled = true
				end)

				frame.Help.MouseButton1Click:Connect(function()
					local widgetInfo = DockWidgetPluginGuiInfo.new(
						Enum.InitialDockState.Float,  -- Widget will be initialized in floating panel
						false,   -- Widget will be initially enabled
						false,  -- Don't override the previous enabled state
						255,    -- Default width of the floating window
						328,    -- Default height of the floating window
						255,    -- Minimum width of the floating window
						328     -- Minimum height of the floating window
					)

					local success,err = pcall(function()
						local HelpWidget = plugin:CreateDockWidgetPluginGui("HelpWidget", widgetInfo)
						HelpWidget.Title = "Help"
						HelpWidget.Enabled = true
						local clone = script.Help:Clone()
						clone.Parent = HelpWidget
						HelpWidget:GetPropertyChangedSignal('Enabled'):Connect(function()
							if HelpWidget.Enabled == false then
								HelpWidget:Destroy()
							end
						end)
					end)

				end)



				local function save()
					local countdown = false
					if frame.Params.Countdown.Value.check.Visible == true then
						countdown = true
					else
						countdown = false
					end

					print(clone:GetAttribute('Tag'))
					plugin:SetSetting(clone:GetAttribute('Tag'),{
						Name = clone.TimerName.Text,
						Separator = frame.Params.Separator.Transparency,
						Separators = tonumber(frame.Params.Separators.Value.Text),
						End = tonumber(frame.Params.End.Value.Text),
						UI = frame.Params.UIElement.Value.Text,
						StartOn = frame.Params.StartEvent.Value.Text
					})

					print(clone.TimerName.Text)
					print('Data successfully saved')
				end

				frame.Save.MouseButton1Click:Connect(save)

				function create(name,data)
					local timer = Instance.new("TextLabel")
					timer.Font = Enum.Font.GothamBlack
					timer.Text = "Timer Text"
					timer.TextColor3 = Color3.fromRGB(255, 255, 255)
					timer.TextScaled = true
					timer.TextSize = 14
					timer.TextWrapped = true
					timer.TextXAlignment = Enum.TextXAlignment.Center
					timer.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
					timer.BackgroundTransparency = 1
					timer.Position = UDim2.fromScale(0.36, 0.453)
					timer.Size = UDim2.fromScale(0.278, 0.0917)

					if not game.ReplicatedStorage:FindFirstChild('EzTimer') then
						local module = script.Parent.EzTimer:Clone()
						module.Parent = game.ReplicatedStorage
					end
					if data then
						local start = data['Start'] or 60
						local separator = data.Separator or ':'
						local separators = data.Separators or 2
						local countdown = data.Countdown or true
						local target = data.End or 0
						local showText = [[
		local timer = require(game.ReplicatedStorage.EzTimer):Create(']].. clone.TimerName.Text ..[[')
		
				local params = {
				Start = ]].. start ..[[,
				IntervalDuration = 1,
				Separator ="]] ..separator..[[",
				Separators = ]] .. separators .. [[,
				Countdown = ]] .. countdown .. [[,
				Target = ]]..target ..[[
			}

		timer:SetParams(params)
		]]


						if data.TickSound ~= '' then
							showText = showText.. [[
				
				timer:SetTickSound(]].. data.TickSound .. [[)]]
						end

						showText = showText..[[
			
			--To start the timer, write "timer:Start()"]]

						local Script = Instance.new('LocalScript')
						Script.Source = showText
						Script.Parent = timer
						frame.Params.UIElement.Value.Text = timer.Name
						if not game.StarterGui:FindFirstChildWhichIsA('ScreenGui') then
							local ui = Instance.new('ScreenGui')
							ui.Parent = game.StarterGui
							timer.Parent = ui
						else
							timer.Parent = game.StarterGui:FindFirstChildWhichIsA('ScreenGui')
						end


					end
				end



				frame.New.MouseButton1Click:Connect(function()
					local new = script.TimerText:Clone()
					local countdown = false

					local found = 0
					for i,v in pairs(game:GetDescendants()) do
						if string.match(v.Name,frame.Title.Text) ~= nil then
							found = found + 1
						end
					end

					new.Name = 'Timer' .. tostring(found + 1)
					new.Text = 'Timer'
					new.Parent = game.StarterGui:FindFirstChildWhichIsA('ScreenGui') or Instance.new('ScreenGui',game.StarterGui)
					if not game.ReplicatedStorage:FindFirstChild('EzTimer') then
						local mod = script.Parent.EzTimer:Clone()
						mod.Parent = game.ReplicatedStorage
					end

					local showText = [[
		local timer = require(game.ReplicatedStorage.EzTimer):Create(']].. clone.TimerName.Text ..[[')
		local element
				local params = {
				Start = ]].. frame.Params.Start.Value.Text .. [[,
				IntervalDuration = 1,
				Separator ="]] .. frame.Params.Separator.Value.Text..[[",
				Separators = ]] .. frame.Params.Separators.Value.Text .. [[,
				Countdown = ]] .. countdown .. [[,
				Target = ]] .. frame.Params.End.Value.Text ..[[
			}
		
		for i,v in pairs(game:GetDescendants()) do
		
		
		
		
		]]

					if frame.Params.StartEvent.Value.Text ~= '(None)' then
						showText = showText..[[
				for i,v in pairs(game:GetDescendants()) do
					if v.Name == "]] ..frame.Params.StartEvent.Value.Text..[[" then
						event = v
						break
					end
				end

				]]

						if frame:GetAttribute('Event') == 'Bindable' then
							showText = showText..[[
						event.Event:Connect(function()
							timer:Start()
						end)
						]]

						elseif frame:GetAttribute('Event') == 'Remote' then
							showText = showText..[[
						event.OnServerEvent:Connect(function()
							timer:Start()
						end)
						]]
						end
					end

					if frame.Params.UIElement.Value.Text ~= '(None)' then
						showText = showText..[[
				for i,v in pairs(game:GetDescendants()) do
					if v.Name == "]] ..frame.Params.StartEvent.Value.Text..[[" then
						timer:SetUI(v)
						break
					end
				end

				]]

						if frame:GetAttribute('Event') == 'Bindable' then
							showText = showText..[[
						event.Event:Connect(function()
							timer:Start()
						end)
						]]

						elseif frame:GetAttribute('Event') == 'Remote' then
							showText = showText..[[
						event.OnServerEvent:Connect(function()
							timer:Start()
						end)
						]]
						end
					end
					showText = showText.. [[
			end]]

					local newScript = Instance.new('LocalScript')
					newScript.Parent = new
					newScript.Source = showText

					Selection:Set({new})
				end)

				frame.Show.MouseButton1Click:Connect(function()
					local valid = true

					local start = frame.Params.Start.Value.Text
					local countdown = true
					local separator = frame.Params.Separator.Value.Text
					local separators = frame.Params.Separators.Value.Text
					local element = frame.Params.UIElement.Value.Text
					local End = frame.Params.End.Value.Text
					local ticksound = frame.Params.TickSound.Value.Text
					local startEvent

					if frame.Params.Countdown.Value.check.ImageTransparency == 1 then
						countdown = false
					else
						countdown = true
					end

					--if not start:match("^%s*$") then
					--	valid = false
					--end

					--if not separator:match("^%s*$") then
					--	valid = false
					--end

					--if not separators:match("^%s*$") then
					--	valid = false
					--end

					if countdown == true then
						countdown = 'true'
					else
						countdown = 'false'
					end

					if valid == true then
						local showText = [[
		local timer = require(game.ReplicatedStorage.EzTimer):Create(']].. clone.TimerName.Text ..[[')
		local element
				local params = {
				Start = ]].. frame.Params.Start.Value.Text .. [[,
				IntervalDuration = 1,
				Separator ="]] .. frame.Params.Separator.Value.Text..[[",
				Separators = ]] .. frame.Params.Separators.Value.Text .. [[,
				Countdown = ]] .. countdown .. [[,
				Target = ]] .. frame.Params.End.Value.Text ..[[
			}
		

		]]

						if frame.Params.StartEvent.Value.Text ~= '(None)' then
							showText = showText..[[
				for i,v in pairs(game:GetDescendants()) do
					if v.Name == "]] ..frame.Params.StartEvent.Value.Text..[[" then
						event = v
						break
					end
				end

				]]

							if frame:GetAttribute('Event') == 'Bindable' then
								showText = showText..[[
						event.Event:Connect(function()
							timer:Start()
						end)
						]]

							elseif frame:GetAttribute('Event') == 'Remote' then
								showText = showText..[[
						event.OnServerEvent:Connect(function()
							timer:Start()
						end)
						]]
							end
						end

						if frame.Params.UIElement.Value.Text ~= '(None)' then
							showText = showText..[[
				for i,v in pairs(game:GetDescendants()) do
					if v.Name == "]] ..frame.Params.UIElement.Value.Text..[[" then
						timer:SetUI(v)
						break
					end
				end

				]]

							if frame:GetAttribute('Event') == 'Bindable' then
								showText = showText..[[
						event.Event:Connect(function()
							timer:Start()
						end)
						]]

							elseif frame:GetAttribute('Event') == 'Remote' then
								showText = showText..[[
						event.OnServerEvent:Connect(function()
							timer:Start()
						end)
						]]
							end
						end

						if frame.Params.TickSound.Value.Text ~= '' then
							showText = showText..[[
timer:SetTickSound(]].. frame.Params.TickSound.Value.Text ..[[)
				]]
						end

						showText = showText .. [[
--To start the timer, type timer:Start()]]
						frame.ScriptText.Visible = true
						frame.ScriptText.Text.Text = showText

					end









				end)

				frame.ScriptText.Back.MouseButton1Click:Connect(function()
					frame.ScriptText.Visible = false
				end)

				frame.Params.UIElement.Value.MouseButton1Click:Connect(function()
					frame.FindInstance.Visible = true
					for i,v in pairs(frame.FindInstance:GetChildren()) do
						if v:IsA('TextButton') then
							v:Destroy()
						end
					end

				end)

				frame.Params.StartEvent.Value.MouseButton1Click:Connect(function()
					frame.FindEvent.Visible = true

					for i,v in pairs(frame.FindEvent:GetChildren()) do
						if v:IsA('TextButton') then
							v:Destroy()
						end
					end

				end)

				for i,v in pairs(game.StarterGui:GetDescendants()) do


					if v:IsA('TextLabel') then
						local clone = script.Temp:Clone()
						clone.Title.Text = v.Name
						clone.Icon.Image = 'rbxassetid://413372383'
						clone.Parent = frame.FindInstance.Results
						clone.MouseButton1Click:Connect(function()
							frame.FindInstance.Visible = false
							frame.Params.UIElement.Value.Text = clone.Title.Text
						end)
					end

					if v:IsA('TextButton') then
						local clone = script.Temp:Clone()
						clone.Title.Text = v.Name
						clone.Icon.Image = 'rbxassetid://166526938'
						clone.Parent = frame.FindInstance.Results
						clone.MouseButton1Click:Connect(function()
							frame.FindInstance.Visible = false
							frame.Params.UIElement.Value.Text = clone.Title.Text
						end)
					end

					if v:IsA('TextBox') then
						local clone = script.Temp:Clone()
						clone.Title.Text = v.Name
						clone.Icon.Image = 'rbxassetid://166526938'
						clone.Parent = frame.FindInstance.Results
						clone.MouseButton1Click:Connect(function()
							frame.FindInstance.Visible = false
							frame.Params.UIElement.Value.Text = clone.Title.Text
						end)
					end
				end

				frame.FindEvent.Search:GetPropertyChangedSignal('Text'):Connect(function()
					for i,v in pairs(frame.FindEvent.Results:GetChildren()) do
						if v:IsA('TextButton') then
							v:Destroy()
						end
					end
					for i,v in pairs(game:GetDescendants()) do
						if string.match(v.Name:lower(),frame.FindEvent.Search.Text:lower()) ~= nil then

							if v:IsA('BindableEvent') then
								local clone = script.Temp:Clone()
								clone.Title.Text = v.Name
								clone.Icon.Image = 'rbxassetid://413363737'
								clone.Parent = frame.FindEvent.Results
								clone.MouseButton1Click:Connect(function()
									frame.FindEvent.Visible = false
									frame.Params.StartEvent.Value.Text = clone.Title.Text
									frame:SetAttribute('Event','Bindable')
								end)
							end

							if v:IsA('RemoteEvent') then
								local clone = script.Temp:Clone()
								clone.Title.Text = v.Name
								clone.Icon.Image = 'rbxassetid://4585398729'
								clone.Parent = frame.FindEvent.Results
								clone.MouseButton1Click:Connect(function()
									frame.FindEvent.Visible = false
									frame.Params.StartEvent.Value.Text = clone.Title.Text
									frame:SetAttribute('Event','Remote')
								end)
							end


						end
					end
				end)

				frame.FindInstance.Search:GetPropertyChangedSignal('Text'):Connect(function()
					for i,v in pairs(frame.FindInstance.Results:GetChildren()) do
						if v:IsA('TextButton') then
							v:Destroy()
						end
					end
					for i,v in pairs(game.StarterGui:GetDescendants()) do
						if string.match(v.Name:lower(),frame.FindInstance.Search.Text:lower()) ~= nil then

							if v:IsA('TextLabel') then
								local clone = script.Temp:Clone()
								clone.Title.Text = v.Name
								clone.Icon.Image = 'rbxassetid://413372383'
								clone.Parent = frame.FindInstance.Results
								clone.MouseButton1Click:Connect(function()
									frame.FindInstance.Visible = false
									frame.Params.UIElement.Value.Text = clone.Title.Text
								end)
							end

							if v:IsA('TextButton') then
								local clone = script.Temp:Clone()
								clone.Title.Text = v.Name
								clone.Icon.Image = 'rbxassetid://166526938'
								clone.Parent = frame.FindInstance.Results
								clone.MouseButton1Click:Connect(function()
									frame.FindInstance.Visible = false
									frame.Params.UIElement.Value.Text = clone.Title.Text
								end)
							end

							if v:IsA('TextBox') then
								local clone = script.Temp:Clone()
								clone.Title.Text = v.Name
								clone.Icon.Image = 'rbxassetid://166526938'
								clone.Parent = frame.FindInstance.Results
								clone.MouseButton1Click:Connect(function()
									frame.FindInstance.Visible = false
									frame.Params.UIElement.Value.Text = clone.Title.Text
								end)


							end
						end
					end
				end)
				coroutine.wrap(function()
					while true do
						wait()

						local total = 0
						if frame:FindFirstChild('FindInstance') then


							for i,v in pairs(frame.FindInstance.Results:GetChildren()) do
								if v:IsA('TextButton') then
									total = total + 1
								end
							end

							frame.FindInstance.Results.CanvasSize = UDim2.new(0,0,0,total*41)
						end
					end
				end)()

				coroutine.wrap(function()
					while true do
						wait()

						local total = 0
						if frame:FindFirstChild('FindInstance') then


							for i,v in pairs(frame.FindEvent.Results:GetChildren()) do
								if v:IsA('TextButton') then
									total = total + 1
								end
							end

							frame.FindEvent.Results.CanvasSize = UDim2.new(0,0,0,total*41)
						end
					end
				end)()


			end
		end



		local clicked = false
		clone.Delete.MouseButton1Click:Connect(function()
			if clicked == false then
				clicked = true
				clone.Delete.question.Visible = true
				clone.Delete.delete.Visible = false
				coroutine.wrap(function()
					wait(3)
					if clone:FindFirstChild('Delete') then
						clone.Delete.question.Visible = false
						clone.Delete.delete.Visible = true
						clicked = false
					end
				end)()
			else
				plugin:SetSetting(clone:GetAttribute('Tag'),nil)
				clone:Destroy()
				TimerEditWidget:Destroy()
			end


		end)

		clone.TimerName.Changed:Connect(function(Text)
			if clone:FindFirstChild('TimerName') then
				TimerEditWidget.Title = clone.TimerName.Text
				frame.Title.Text = clone.TimerName.Text
			end

		end)



		clone.Edit.MouseButton1Click:Connect(function()
			TimerEditWidget.Enabled = true
		end)
		local success,err = pcall(function()
			frame.Help.MouseButton1Click:Connect(function()
				local widgetInfo = DockWidgetPluginGuiInfo.new(
					Enum.InitialDockState.Float,  -- Widget will be initialized in floating panel
					false,   -- Widget will be initially enabled
					false,  -- Don't override the previous enabled state
					255,    -- Default width of the floating window
					328,    -- Default height of the floating window
					255,    -- Minimum width of the floating window
					328     -- Minimum height of the floating window
				)

				local success,err = pcall(function()
					local HelpWidget = plugin:CreateDockWidgetPluginGui("HelpWidget", widgetInfo)
					HelpWidget.Title = "Help"
					HelpWidget.Enabled = true
					local clone = script.Help:Clone()
					clone.Parent = HelpWidget
					HelpWidget:GetPropertyChangedSignal('Enabled'):Connect(function()
						if HelpWidget.Enabled == false then
							HelpWidget:Destroy()
						end
					end)
				end)

			end)
		end)
		frame.New.MouseButton1Click:Connect(function()
			local new = script.TimerText:Clone()

			local found = 0
			for i,v in pairs(game:GetDescendants()) do
				if string.match(v.Name,frame.Title.Text) ~= nil then
					found = found + 1
				end
			end

			new.Name = 'Stopwatch' .. tostring(found + 1)
			new.Text = 'Stopwatch'
			new.Parent = game.StarterGui:FindFirstChildWhichIsA('ScreenGui') or Instance.new('ScreenGui',game.StarterGui)
			if not game.ReplicatedStorage:FindFirstChild('EzTimer') then
				local mod = script.Parent.EzTimer:Clone()
				mod.Parent = game.ReplicatedStorage
			end

			local showText = [[
		local watch = require(game.ReplicatedStorage.EzTimer):Create(']].. clone.TimerName.Text ..[[')
		local element
				local params = {
			
				Separator ="]] .. frame.Params.Separator.Value.Text..[[",
				Separators = ]] .. tostring(frame.Params.Separators.Value.Text) .. [[
			}
			for i,v in pairs(game:GetDescendants()) do
					if v.Name == "]] ..new.Name..[[" then
						element = v
						break
					end
				end
		watch:Start(element,params.Separator,0)
		
		
		]]

			if frame.Params.StartEvent.Value.Text ~= '(None)' then
				showText = showText..[[
				for i,v in pairs(game:GetDescendants()) do
					if v.Name == "]] ..frame.Params.StartEvent.Value.Text..[[" then
						event = v
						break
					end
				end

				]]

				if frame:GetAttribute('Event') == 'Bindable' then
					showText = showText..[[
						event.Event:Connect(function()
							timer:Start()
						end)
						]]

				elseif frame:GetAttribute('Event') == 'Remote' then
					showText = showText..[[
						event.OnServerEvent:Connect(function()
							timer:Start()
						end)
						]]
				end
			end


			local newScript = Instance.new('LocalScript')
			newScript.Parent = new
			newScript.Source = showText

			Selection:Set({new})
		end)

		frame.Show.MouseButton1Click:Connect(function()--hehehe
			local valid = true

			local separator = frame.Params.Separator.Value.Text
			local separators = frame.Params.Separators.Value.Text
			local element = frame.Params.UIElement.Value.Text
			local startEvent


			--if not start:match("^%s*$") then
			--	valid = false
			--end

			--if not separator:match("^%s*$") then
			--	valid = false
			--end

			--if not separators:match("^%s*$") then
			--	valid = false
			--end



			if valid == true then
				local showText = [[
		local watch = require(game.ReplicatedStorage.EzTimer):Create(']].. clone.TimerName.Text ..[[')
		local element
				local params = {
			
				Separator ="]] .. frame.Params.Separator.Value.Text..[[",
				Separators = ]] .. tostring(frame.Params.Separators.Value.Text) .. [[
			}
			for i,v in pairs(game:GetDescendants()) do
					if v.Name == "]] ..frame.Title.Text..[[" then
						element = v
						break
					end
				end
		watch:Start(element,params.Separator,0)
		
		
		]]

				if frame.Params.StartEvent.Value.Text ~= '(None)' then
					showText = showText..[[
				for i,v in pairs(game:GetDescendants()) do
					if v.Name == "]] ..frame.Params.StartEvent.Value.Text..[[" then
						event = v
						break
					end
				end

				]]

					if frame:GetAttribute('Event') == 'Bindable' then
						showText = showText..[[
						event.Event:Connect(function()
							timer:Start()
						end)
						]]

					elseif frame:GetAttribute('Event') == 'Remote' then
						showText = showText..[[
						event.OnServerEvent:Connect(function()
							timer:Start()
						end)
						]]
					end
				end


				frame.ScriptText.Visible = true
				frame.ScriptText.Text.Text = showText

			end

		end)


		local function save()
			print(clone:GetAttribute('Tag'))
			plugin:SetSetting(clone:GetAttribute('Tag'),{
				Name = clone.TimerName.Text,
				Separator = frame.Params.Separator.Transparency,
				Separators = tonumber(frame.Params.Separators.Value.Text),
				UI = frame.Params.UIElement.Value.Text,
				StartOn = frame.Params.StartEvent.Value.Text
			})
			print('Data successfully saved')
		end

		frame.Save.MouseButton1Click:Connect(save)

		frame.ScriptText.Back.MouseButton1Click:Connect(function()
			frame.ScriptText.Visible = false
		end)

		frame.Params.UIElement.Value.MouseButton1Click:Connect(function()
			frame.FindInstance.Visible = true
			for i,v in pairs(frame.FindInstance:GetChildren()) do
				if v:IsA('TextButton') then
					v:Destroy()
				end
			end

		end)

		frame.Params.StartEvent.Value.MouseButton1Click:Connect(function()
			for i,v in pairs(frame.FindEvent:GetChildren()) do
				if v:IsA('TextButton') then
					v:Destroy()
				end
			end
			frame.FindEvent.Visible = true

		end)

		for i,v in pairs(game.StarterGui:GetDescendants()) do


			if v:IsA('TextLabel') then
				local clone = script.Temp:Clone()
				clone.Title.Text = v.Name
				clone.Icon.Image = 'rbxassetid://413372383'
				clone.Parent = frame.FindInstance.Results
				clone.MouseButton1Click:Connect(function()
					frame.FindInstance.Visible = false
					frame.Params.UIElement.Value.Text = clone.Title.Text
				end)
			end

			if v:IsA('TextButton') then
				local clone = script.Temp:Clone()
				clone.Title.Text = v.Name
				clone.Icon.Image = 'rbxassetid://166526938'
				clone.Parent = frame.FindInstance.Results
				clone.MouseButton1Click:Connect(function()
					frame.FindInstance.Visible = false
					frame.Params.UIElement.Value.Text = clone.Title.Text
				end)
			end

			if v:IsA('TextBox') then
				local clone = script.Temp:Clone()
				clone.Title.Text = v.Name
				clone.Icon.Image = 'rbxassetid://166526938'
				clone.Parent = frame.FindInstance.Results
				clone.MouseButton1Click:Connect(function()
					frame.FindInstance.Visible = false
					frame.Params.UIElement.Value.Text = clone.Title.Text
				end)
			end
		end

		frame.FindEvent.Search:GetPropertyChangedSignal('Text'):Connect(function()
			for i,v in pairs(frame.FindEvent.Results:GetChildren()) do
				if v:IsA('TextButton') then
					v:Destroy()
				end
			end
			for i,v in pairs(game:GetDescendants()) do
				if string.match(v.Name:lower(),frame.FindEvent.Search.Text:lower()) ~= nil then

					if v:IsA('BindableEvent') then
						local clone = script.Temp:Clone()
						clone.Title.Text = v.Name
						clone.Icon.Image = 'rbxassetid://413363737'
						clone.Parent = frame.FindEvent.Results
						clone.MouseButton1Click:Connect(function()
							frame.FindEvent.Visible = false
							frame.Params.StartEvent.Value.Text = clone.Title.Text
							frame:SetAttribute('Event','Bindable')
						end)
					end

					if v:IsA('RemoteEvent') then
						local clone = script.Temp:Clone()
						clone.Title.Text = v.Name
						clone.Icon.Image = 'rbxassetid://4585398729'
						clone.Parent = frame.FindEvent.Results
						clone.MouseButton1Click:Connect(function()
							frame.FindEvent.Visible = false
							frame.Params.StartEvent.Value.Text = clone.Title.Text
							frame:SetAttribute('Event','Remote')
						end)
					end


				end
			end
		end)

		frame.FindInstance.Search:GetPropertyChangedSignal('Text'):Connect(function()
			for i,v in pairs(frame.FindInstance.Results:GetChildren()) do
				if v:IsA('TextButton') then
					v:Destroy()
				end
			end
			for i,v in pairs(game.StarterGui:GetDescendants()) do
				if string.match(v.Name:lower(),frame.FindInstance.Search.Text:lower()) ~= nil then

					if v:IsA('TextLabel') then
						local clone = script.Temp:Clone()
						clone.Title.Text = v.Name
						clone.Icon.Image = 'rbxassetid://413372383'
						clone.Parent = frame.FindInstance.Results
						clone.MouseButton1Click:Connect(function()
							frame.FindInstance.Visible = false
							frame.Params.UIElement.Value.Text = clone.Title.Text
						end)
					end

					if v:IsA('TextButton') then
						local clone = script.Temp:Clone()
						clone.Title.Text = v.Name
						clone.Icon.Image = 'rbxassetid://166526938'
						clone.Parent = frame.FindInstance.Results
						clone.MouseButton1Click:Connect(function()
							frame.FindInstance.Visible = false
							frame.Params.UIElement.Value.Text = clone.Title.Text
						end)
					end

					if v:IsA('TextBox') then
						local clone = script.Temp:Clone()
						clone.Title.Text = v.Name
						clone.Icon.Image = 'rbxassetid://166526938'
						clone.Parent = frame.FindInstance.Results
						clone.MouseButton1Click:Connect(function()
							frame.FindInstance.Visible = false
							frame.Params.UIElement.Value.Text = clone.Title.Text
						end)


					end
				end
			end
		end)
		while true do
			wait()

			local total = 0
			if frame:FindFirstChild('FindInstance') then


				for i,v in pairs(frame.FindInstance.Results:GetChildren()) do
					if v:IsA('TextButton') then
						total = total + 1
					end
				end

				frame.FindInstance.Results.CanvasSize = UDim2.new(0,0,0,total*41)
			end
		end
		coroutine.wrap(function()
			while true do
				wait()

				local total = 0
				if frame:FindFirstChild('FindInstance') then


					for i,v in pairs(frame.FindEvent.Results:GetChildren()) do
						if v:IsA('TextButton') then
							total = total + 1
						end
					end

					frame.FindEvent.Results.CanvasSize = UDim2.new(0,0,0,total*41)
				end
			end	
		end)()



		local function createwatch(data)
			local timer = Instance.new("TextLabel")
			timer.Font = Enum.Font.GothamBlack
			timer.Text = "Watch Text"
			timer.TextColor3 = Color3.fromRGB(255, 255, 255)
			timer.TextScaled = true
			timer.TextSize = 14
			timer.TextWrapped = true
			timer.TextXAlignment = Enum.TextXAlignment.Center
			timer.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
			timer.BackgroundTransparency = 1
			timer.Position = UDim2.fromScale(0.36, 0.453)
			timer.Size = UDim2.fromScale(0.278, 0.0917)

			if not game.ReplicatedStorage:FindFirstChild('EzTimer') then
				local module = script.Parent.EzTimer:Clone()
				module.Parent = game.ReplicatedStorage
			end
			local start = data['Start'] or 60
			local separator = data.Separator or ':'
			local separators = data.Separators or 2
			local countdown = data.Countdown or true
			local target = data.End or 0
			local showText = [[
			stopwatch:Start(]]..frame.Params.UIElement.Value.Text..[[,Separator,StartTime)
			]]
			local Script = Instance.new('LocalScript')
			Script.Source = showText
			Script.Parent = timer
			frame.Params.UIElement.Value.Text = timer.Name
			if not game.StarterGui:FindFirstChildWhichIsA('ScreenGui') then
				local ui = Instance.new('ScreenGui')
				ui.Parent = game.StarterGui
				timer.Parent = ui
			else
				timer.Parent = game.StarterGui:FindFirstChildWhichIsA('ScreenGui')
			end



		end
	end

this is how i do a timer class

-- modulescript inside replicatedstorage
local class = {}
class.__index = class

class.New = function()
    local self = setmetatable({}, class)
    self.id = 0
    return self
end

class.Start = function(self, duration, callback)
    self.id += 1
    local currentTimerID = self.id
    task.delay(duration, function()
        if currentTimerID ~= self.id then return end
        callback()
    end)
end

class.Stop = function(self)
    self.id += 1
end

return class

-- any other script
local timerClass = require(game.ReplicatedStorage.ModuleScript)

local timer1 = timerClass.New()
local timer2 = timerClass.New()

timer1:Start(10, function()
    print("Timer1 Ended")
end)

timer2:Start(10, function()
    print("Timer2 Ended")
end)

timer1:Stop()