Tool = script.Parent Player = Tool.Parent.Parent Character = Player.Character Humanoid = Character.Humanoid root = Character.HumanoidRootPart Mouse = Player:GetMouse()
Tool.RemoteEvent.OnServerEvent:Connect(function(Player, mouseHit)
root.CFrame = CFrame.new(root.Position,root.Position + Vector3.new(mouseHit.lookVector.x, 0, mouseHit.lookVector.z)) --[[ 1st argument is position second argument is direction ( where it is
is and where its going to look at]]
local kiblast = Tool.Handle:clone()
game.Debris:AddItem(kiblast, 2)
kiblast.CFrame = Humanoid.Parent.RightHand.CFrame
local v = Instance.new("BodyVelocity")
v.Parent = kiblast
v.velocity = mouseHit.lookVector * 90
v.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
kiblast.CanCollide = false
kiblast.Parent = game.Workspace
kiblast.Transparency = 0
kiblast.Touched:Connect(function(hit)
local hum = hit.Parent:findFirstChild("Humanoid")
if hum and hum ~= Humanoid then
local explosion = Instance.new("Part")
local Torso = hum.Torso
explosion.Parent = game.Workspace
explosion.Shape = "Ball"
explosion.BrickColor = BrickColor.new("New Yeller")
explosion.Material = "Neon"
explosion.Size = Vector3.new(15, 15,15)
explosion.CanCollide = false
explosion.Position = Torso.Position
explosion.Anchored = true
for i = 0, 1, 0.02 do
wait(0.01)
explosion.Transparency = i
end
hum:TakeDamage(5)
game.Debris:AddItem(explosion, .0000000000000000001)
elseif hit.Anchored and hit.CanCollide == true then
for i = 1,10 do
local part = kiblast:clone()
part.Size = Vector3.new(0.5 , .5, .5)
part.CFrame = kiblast.CFrame
part.Parent = game.Workspace
part.BodyVelocity.Velocity = Vector3.new(math.random(-15,15), math.random(-15,15), math.random(-15,15)) * 5 --[[
without the times 50 it goes at a random speed i think
--]]
game.Debris:AddItem(part, 1)
end
end
end)
end)

2 comments
For how long? and why?
Whenever you touch it, the function triggers, and if you don't have debounce it can trigger hundreds of times in a short span, I would make it last forever considering you're just adding it to debris