-- Define the function to handle the dash ability

local function dash()
	-- Check if the player is currently dashing
	if isDashing then
		return
	end
	isDashing = true

	-- Get the direction the character is facing
	local direction = character.HumanoidRootPart.CFrame.lookVector

	-- Move the character up and forward at the dash speed
	character.HumanoidRootPart.Velocity = (direction * Vector3.new(1, 0, 1)).Unit * dashSpeed

	-- Reset the isDashing variable after a short delay
	wait(0.5)
	isDashing = false
end
