Anything need to be changed?

Should anything in my cooldown module be changed, I’m still new at coding so I’d like feedback.

	
		
}
local TweenService = game:GetService('TweenService')
----------------------------------------
module.DoGui = function(player, color, cooldown, movename)
	local main = game.ReplicatedStorage:FindFirstChild("Cooldown"):FindFirstChild("Main"):Clone()
	--
	local bar = main.Frame:FindFirstChild("Cooldown")
	--
	local text = main.TextLabel
	--
	main.Parent = player:WaitForChild("PlayerGui"):FindFirstChild("Cooldown"):FindFirstChild("Background")
	--
	text.Text = movename
	
	print(player.Name, "Is Using!", movename, "The Cooldown time is", cooldown, "The Color is", color)

	TweenService:Create(main, TweenInfo.new(1), {BackgroundTransparency = 0}):Play()
	--
	TweenService:Create(main.Frame.Cooldown, TweenInfo.new(1), {BackgroundTransparency = 0}):Play()
	--
	TweenService:Create(main.TextLabel, TweenInfo.new(1), {TextTransparency = 0}):Play()
	--
	text.TextColor3 = color
	--
	bar:TweenSize(UDim2.new(0,0,1,0), "In", "Linear", cooldown, true)
	-----------------------------------------------------------------
	task.wait(cooldown)
	--
	main:Destroy()
end
return module```

2022-06-20 00-21-20 how it looks in game

Not exactly sure why you have – between every line, seems a bit unneeded.
You could also remove spacing in lines in sort of segments based on function of those lines, for example

	local text = main.TextLabel
	main.Parent = player:WaitForChild("PlayerGui"):FindFirstChild("Cooldown"):FindFirstChild("Background")
	text.Text = movename
	
	print(player.Name, "Is Using!", movename, "The Cooldown time is", cooldown, "The Color is", color)

	TweenService:Create(main, TweenInfo.new(1), {BackgroundTransparency = 0}):Play()
	TweenService:Create(main.Frame.Cooldown, TweenInfo.new(1), {BackgroundTransparency = 0}):Play()
	TweenService:Create(main.TextLabel, TweenInfo.new(1), {TextTransparency = 0}):Play()

It just improves readability a little being able to look at the first line in a section and get the point of the next few lines.

Here you use TweenService for some transparency, then use TweenSize, but you could instead just use TweenService to tween the size.

TweenService:Create(bar, TweenInfo.new(cooldown, Enum.EasingStyle.Linear, Enum.EasingStyle.In), {Size = UDim2.new(0, 0, 1, 1)}):Play()

You can use TweenService for most properties, anything that is made of numbers, so sizes, positions, colors, etc. And I’d recommend TweenService over any of the UI functions like TweenSize or TweenPosition as you can only tween UI with TweenSize, but you can tween any instances size with TweenService.

The lines help me understand scripts better I’m weird lol.