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```