Trying to check if player pressed space 2 times

I used keycode.Space, and it worked perfectly, but the problem is, now i want mobile players to have the same thing. And i tried using jumprequest like this:

UIS.JumpRequest:Connect(function()
		local now = tick()

		print("Requesting Jump..")

		if (now-jumptick) > .3 and not Flying then
			jumptick = tick()

		elseif (now-jumptick) <= .3 and not Flying then
			Flying = true
        end
end)

But the problem is, when you press jump it fires like 300 times, and i can’t use that. I need help, please.

Use debounce!

local db = false
UIS.JumpRequest:Connect(function()
	if not db then
		db = true
		local now = tick()

		print("Requesting Jump..")

		if (now-jumptick) > .3 and not Flying then
			jumptick = tick()
		elseif (now-jumptick) <= .3 and not Flying then
			Flying = true
        end
		task.wait(0.5)
		db = false
	end
end)