wait(1)
local player = game.Players.LocalPlayer
local Mouse = player:GetMouse()
local humanoid = player.Character.Humanoid
local s = humanoid:LoadAnimation(game.StarterPack.StarterPack.Animation)
Player = script.Parent.Parent -- Gets LocalPlayer
Character = Player.Character -- Gets Players Character
Mouse = Player:GetMouse()
function onKeyDown(key)
key = key:lower()
if key == "f" then
s:Play()
player.Character.Humanoid.WalkSpeed = 16
wait(.73)
local x = Instance.new("Part")
x.TopSurface = "Smooth"
x.BottomSurface = "Smooth"
x.Shape = "Ball"
x.Transparency = .7
x.BrickColor = BrickColor.new("Bright red")
x.Size = Vector3.new(10, 10, 10)
local z = Instance.new("Fire")
z.Parent = x
z.Size = 12
z.Heat = 12
local explosion = Instance.new("Explosion")
explosion.Parent = game.Workspace
explosion.Position = x.Position
local y = Instance.new("BodyVelocity")
y.maxForce = Vector3.new(math.huge, math.huge, math.huge)
y.velocity = Character.Torso.CFrame.lookVector*80
y.Parent = x
x.Parent = game.Workspace
x.CFrame = Character.Torso.CFrame*CFrame.new(0, 0, -12)
wait(3.5)
x:remove()
end
end
Mouse.KeyDown:connect(onKeyDown)
This is a fireball script, I hate that I could just spam F and a million fireballs are out. How do I stop this from being spammed?
And how would i make this fireball do damage?

6 comments
Where did you learn to use terms like "usable"? Because what is it? an event? Function? Can you give me a link to learn this stuff?
No, that's just a variable. I'll edit my answer with some helpful links.
No, you're wrong. I'm not all that new to scripting. And I took this script as a FM and edited it. Like, ALOT. Trust me. Plus, the "usable" variable, I just didn't understand how the game knew what 'usable" even meant. But I know what variables are. I created most of the variables in this script. Lol
After doing research, I learned that what you used was a debounce, something I knew nothing about.
It wasn't meant as an insult, lol. We all have to learn at some point & that's okay.
Oh.