Dash system please help

My code get all attribute (attacking, punching, dashing,blocking)
but when character Dashing he still can Attack-Block
PLEASE HELP

CODE:

local Rp = game:GetService("ReplicatedStorage")
local UIS = game:GetService("UserInputService")
local debris = game:GetService("Debris")

local player = game:GetService("Players").LocalPlayer
local char = player.Character
local hum = char:FindFirstChildOfClass("Humanoid")
local humRp = char:FindFirstChild("HumanoidRootPart")

local animator = hum:FindFirstChildOfClass("Animator") or Instance.new("Animator", hum)

local Sounds = Rp:WaitForChild("Sounds")
local BattleSounds = Sounds:WaitForChild("BattleSound")

local Animations = Rp:WaitForChild("Animations")
local DashAnims = Animations.Dash

local A = DashAnims.A
local D = DashAnims.D
local S = DashAnims.S
local W = DashAnims.W

local event = Rp:WaitForChild("Remotes").Dash

local dashtime = .6
local cdtime = 2 
local cooldownAD = false
local cooldownWS = false

local function Dash(x,y,z, pos, CFrameX, CFrameY, CFrameZ, hit, buttonsForCD)

	
	if buttonsForCD == 'W' or buttonsForCD == 'S' then
		cooldownWS = true
	elseif buttonsForCD == 'A' or buttonsForCD == 'D' then
		cooldownAD = true
	end

	local hrp = char:WaitForChild("HumanoidRootPart")
	
	
	local sound = BattleSounds:FindFirstChild("Dash"):Clone()
	sound.Parent = hrp
	sound:Play()
	game.Debris:AddItem(sound, 1)


	local bp = Instance.new("BodyPosition", hrp)
	bp.MaxForce = Vector3.new(x,y,z)
	bp.P = pos
	game.Debris:AddItem(bp, dashtime)


	local startTime = tick()

	while true do
		local currtime = tick()
		local elapsedtime = currtime - startTime

		if elapsedtime >= dashtime then
			char:SetAttribute("Dashing", false)
			break
		end
		
		bp.Position = hrp.CFrame * CFrame.new(CFrameX,CFrameY,CFrameZ ).Position
		task.wait()
	end
	
	if hit == true then
		event:FireServer(player)
	end

	task.wait(cdtime)

	if buttonsForCD == 'W' or buttonsForCD == "S" then
		cooldownWS = false
	elseif buttonsForCD == 'A' or buttonsForCD == 'D' then
		cooldownAD = false
	end
	
end

UIS.InputBegan:Connect(function(Input, gpe)
	local playAnimsW = animator:LoadAnimation(W)
	local playAnimsA = animator:LoadAnimation(A)
	local playAnimsS = animator:LoadAnimation(S)
	local playAnimsD = animator:LoadAnimation(D)
	
	local hit = false
	
	
	
	if gpe then return end
	if Input.KeyCode == Enum.KeyCode.Q and UIS:IsKeyDown(Enum.KeyCode.W) and not cooldownWS then
		
		local attacking = char:GetAttribute("Attacking")
		local punching = char:GetAttribute("Punching")
		local blocking = char:GetAttribute("Blocking")
		local dashing = char:GetAttribute("Dashing")		

		if attacking or punching or blocking or dashing  then return end
		char:SetAttribute("Dashing", true)
		
		hit = true
		local p1 = playAnimsW:Play()
		Dash(120000,120000,120000,120000,0,0,-2.5, hit, 'W')
		task.wait(0.2)
		debris:AddItem(p1, 1)
		hit = false
		
	elseif Input.KeyCode == Enum.KeyCode.Q and UIS:IsKeyDown(Enum.KeyCode.A) and not cooldownAD then
		
		local attacking = char:GetAttribute("Attacking")
		local punching = char:GetAttribute("Punching")
		local blocking = char:GetAttribute("Blocking")
		local dashing = char:GetAttribute("Dashing")
		
		if attacking or punching or blocking or dashing then return end
		char:SetAttribute("Dashing", true)
		
		local p2 = playAnimsA:Play()
		Dash(120000,120000,120000,120000, -2.5, 0, 0, 'A', 'A')
		debris:AddItem(p2, 1)
		
	elseif Input.KeyCode == Enum.KeyCode.Q and UIS:IsKeyDown(Enum.KeyCode.D) and not cooldownAD then
		
		local attacking = char:GetAttribute("Attacking")
		local punching = char:GetAttribute("Punching")
		local blocking = char:GetAttribute("Blocking")
		local dashing = char:GetAttribute("Dashing")

		if attacking or punching or blocking or dashing  then return end
		char:SetAttribute("Dashing", true)
		
		local p3 = playAnimsD:Play()
		Dash(120000,120000,120000,120000, 2.5, 0, 0, 'D', 'D')
		debris:AddItem(p3, 1)
		
	elseif Input.KeyCode == Enum.KeyCode.Q and UIS:IsKeyDown(Enum.KeyCode.S) and not cooldownWS then
		
		local attacking = char:GetAttribute("Attacking")
		local punching = char:GetAttribute("Punching")
		local blocking = char:GetAttribute("Blocking")
		local dashing = char:GetAttribute("Dashing")

		if attacking or punching or blocking or dashing  then return end
		char:SetAttribute("Dashing", true)
	
		local p4 = playAnimsS:Play()
		Dash(120000,120000,120000,120000, 0, 0, 2.5, 'S', 'S')
		debris:AddItem(p4, 1)
		
	elseif Input.KeyCode == Enum.KeyCode.Q and not cooldownAD then
		
		local attacking = char:GetAttribute("Attacking")
		local punching = char:GetAttribute("Punching")
		local blocking = char:GetAttribute("Blocking")
		local dashing = char:GetAttribute("Dashing")

		if attacking or punching or blocking or dashing  then return end
		char:SetAttribute("Dashing", true)
		
		hit = true
		local p1 = playAnimsW:Play()
		Dash(120000,120000,120000,120000,0,0,-2.5, hit, 'W')
		task.wait(0.2)
		debris:AddItem(p1, 1)
		hit = false
	end
	
end)

you’re going to need to give us a lot more context, can you record some videos with gyazo or take screenshots?

Here video https://youtu.be/9Kp2LtB_Yho

you need way more debounces to check if a move is being used. your code is kind of messy so i can’t really help. try converting it into functions.

also, attributes are NOT reliable for data. i would recommend a module script or just a lot of bool values (not the instance, like the variables in the script)

What i can use instead of attributes? It’s just that many people say to use attributes

attributes are just a more annoying variable to use. use variables, debounces, or module scripts. you can read more on the roblox docs

hoping you didn’t just copy from a combat tutorial

I need use like:
local attacking = true ?

yeah, make variables like those