How would i make this?

i have a idea where if you press a twice you dash left if you press s twice you dash backwards etc, but i have no idea how i would make it. i thought it was a cool idea any help would be nice.

You could use UserInputService to detect keyboard input and tick() to differentiate how much time has passed when pressing a key twice.

Use InputBegan to connect the function and use IsKeyDown to know if you use that combination.

local UIS = game:GetService("UserInputService")
UIS.InputBegan:Connect(function(Input, Chat)
	if UIS:IsKeyDown(Enum.KeyCode.Q) and UIS:IsKeyDown(Enum.KeyCode.E) then
		print("Convination of Q + E")

you can start off with something like this

local last = tick()
local dashing = false

game:GetService("UserInputService").InputBegan:Connect(function(input, gp)
	if gp then return end

	if input.KeyCode == Enum.KeyCode.W then
		if (tick() - last)< 0.5 then
			if not dashing then
				dashing = true
				--dashing script
			else if dashing then
					print("Was Already Dashing")
				dashing = false
		last = tick()

This will detect if you pressed w twice and I hope you know what to do for the rest:)

thank you! i will try this right now.