https://gyazo.com/eb41be4a78d5cb0df34833f6327c42da
game.ReplicatedStorage.IceMagic.IceShoot.OnServerEvent:Connect(function(plr,Mouse)
local char = plr.Character
for i = 1,5 do
local Icee = game.ReplicatedStorage.IceMagic.Icee:Clone()
wait(1)
Icee.Ice.CFrame = CFrame.new(plr.Character.HumanoidRootPart.Position,Mouse.p) * CFrame.Angles(-180, math.rad(-180), 0)* CFrame.new(0,-2,0)
plr.Character.HumanoidRootPart.CFrame = CFrame.new(plr.Character.HumanoidRootPart.Position,Mouse.p)
local BV = Instance.new("BodyVelocity")
BV.MaxForce = Vector3.new(1, 1, 1) * 5e4
BV.P = 5e4
BV.Velocity = plr.Character:WaitForChild("HumanoidRootPart").CFrame.lookVector * 50
BV.Parent = Icee.Ice
Icee.Parent = game.Workspace
Icee.Ice.Touched:Connect(function(Hit)
local hum = Hit.Parent:FindFirstChild("Humanoid")
if hum == nil then return end
local TargetedPlayer = game.Players:GetPlayerFromCharacter(Hit.Parent)
if (TargetedPlayer and TargetedPlayer.Block.Value == false) or (Hit.Parent:FindFirstChild("Block") and Hit.Parent.Block.Value==false) then
if Hit.Parent.Name ~= plr.Name and not Hit.Parent:FindFirstChild("Attacked") then
local Attacked = Instance.new("StringValue", Hit.Parent)
Attacked.Name = "Attacked"
game.Debris:AddItem(Attacked,1)
local creator = Instance.new("StringValue",Hit.Parent.Humanoid)
creator.Name = "creator"
creator.Value = plr.Name
Hit.Parent.Humanoid:TakeDamage(plr.leaderstats.level.Value + 60)
local BigBoom = game.ReplicatedStorage.IceMagic.IceBoom:Clone()
BigBoom.Parent = Hit.Parent.HumanoidRootPart
BigBoom:SetPrimaryPartCFrame(Hit.Parent.HumanoidRootPart.CFrame * CFrame.new(0,1,0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)))
Hit.Parent.HumanoidRootPart.Anchored = true
Icee:Destroy()
wait(2)
BigBoom:Destroy()
Hit.Parent.HumanoidRootPart.Anchored = false
end
end
end)
