elseif eventtype == "Dash" then
local CombatStatusTable = {"Cutscene", "Attacked", "Attacking"}
if table.find(CombatStatusTable, char.CombatStatus.Value) then
return
end
local DashDirection = arg1
local Attachment = Instance.new("Attachment", char.HumanoidRootPart)
local LinearVelocity = Instance.new("LinearVelocity", Attachment)
local Part = Instance.new("Part", workspace)
Part.Anchored = true
Part.Transparency = 1
Part.CanCollide = false
local Multiplier
if DashDirection == "W" then
Multiplier = CFrame.new(-1,-1,-20)
task.delay(0.5, function()
combatmod.FrontDash(plr)
print("FrontDash")
end)
elseif DashDirection == "A" then
Multiplier = CFrame.new(-20,-1,-1)
elseif DashDirection == "S" then
Multiplier = CFrame.new(-1,-1,20)
elseif DashDirection == "D" then
Multiplier = CFrame.new(20,-1,-1)
end
local AT = char.Humanoid.Animator:LoadAnimation(animFolder[plr.CurrentCharacter.Value][DashDirection].."Dash")
AT:Play()
ss.dash:Play()
Part.CFrame = char.HumanoidRootPart.CFrame * Multiplier
LinearVelocity.MaxForce = 99999
LinearVelocity.VectorVelocity = (Part.Position - char.HumanoidRootPart.Position).Unit * Vector3.new(100,0,100)
LinearVelocity.Attachment0 = Attachment
ds:AddItem(Attachment, 0.1)