Here is the gif that I talk about. https://gyazo.com/6a893cb698d8de6530166c93bf382b3f
--|| SERVICES ||--
local UserInputService = game:GetService("UserInputService")
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Character = script.Parent
local Humanoid = Character:WaitForChild("Humanoid")
local animation = Instance.new("Animation", Character)
animation.Name = "Kurozumi" -- we call it "YamiFloor"
animation.AnimationId = "rbxassetid://6122680576"
local loader = Character:WaitForChild("Humanoid"):LoadAnimation(animation)
local Properties = {
Velocity = 50,
Duration = 1,
Keybind = Enum.KeyCode.F,
LastDash = tick(),
Cooldown = 2,
}
UserInputService.InputBegan:Connect(function(Input, GameProcessedEvent)
if Input.KeyCode == Properties.Keybind then
if tick() - Properties.LastDash >= Properties.Cooldown then
Properties.LastDash = tick()
local ZEffect = coroutine.wrap(function()
loader:Play() -- we make the animation player
end)()
local BodyVelocity = Instance.new("BodyVelocity")
BodyVelocity.MaxForce = Vector3.new(1,1,1) * 500000
BodyVelocity.Velocity = Character.HumanoidRootPart.CFrame.LookVector * Properties.Velocity
BodyVelocity.Parent = Character.HumanoidRootPart
wait(1)
loader:Stop()
BodyVelocity:Destroy()
loader:Destroy()
end
end
end)
