I made an ability for this roblox game but I don't know how to make a time limit function or a cooldown function where you can't use it again
This is the Script under ServerScriptService labeled Deathsperate
task.wait(1.5)
local Effect = game.ReplicatedStorage.FireBALL.Attachment:Clone()
Effect.Parent = data.Character:FindFirstChild("Head")
Effect.CFrame = Effect.CFrame*CFrame.new(0,-1,0)
for i,v in pairs(Effect:GetChildren()) do
v:Emit(10)
end
if data.RemoveShirt then
local shirt = data.Character:FindFirstChild("Shirt")
if shirt then
shirt:Destroy()
end
end
if data.RemovePants then
local pants = data.Character:FindFirstChild("Pants")
if pants then
pants:Destroy()
end
end
if data.PantsTemplate then
local pants = data.Character:FindFirstChild("Pants")
if pants then
pants.ShirtTemplate = data.PantsTemplate
end
end
if data.RemoveEffect then
for _, child in pairs(Effect:GetDescendants()) do
if child:IsA("BasePart") then
child:Destroy()
end
end
Effect:Destroy()
end
end)```
** You are now Level 6! **