Making custom jump system but something wrong (UserInputService)

As you see, player jumping when not ‘press’ spacebar but ‘release’ spacebar.

So I opened ‘PlayerModule->ControlModule->BaseCharacterController’

And deleted function which seemed jumping.
I knew that was dangerous idea, but I should BREAK the ‘Press and Jump Rule’.

local ZERO_VECTOR3: Vector3 = Vector3.new(0,0,0)

--[[ The Module ]]--
local BaseCharacterController = {}
BaseCharacterController.__index = BaseCharacterController

function BaseCharacterController.new()
	local self = setmetatable({}, BaseCharacterController)
	self.enabled = false
	self.moveVector = ZERO_VECTOR3
	self.moveVectorIsCameraRelative = true
---REMOVED-------REMOVED-------REMOVED-------REMOVED-------REMOVED----

return self
end

function BaseCharacterController:OnRenderStepped(dt: number)
	-- By default, nothing to do
end

function BaseCharacterController:GetMoveVector(): Vector3
	return self.moveVector
end

function BaseCharacterController:IsMoveVectorCameraRelative(): boolean
	return self.moveVectorIsCameraRelative
end

function BaseCharacterController:GetIsJumping(): boolean

 ---REMOVED-------REMOVED-------REMOVED-------REMOVED-------REMOVED----

end

-- Override in derived classes to set self.enabled and return boolean indicating
-- whether Enable/Disable was successful. Return true if controller is already in the requested state.
function BaseCharacterController:Enable(enable: boolean): boolean
	error("BaseCharacterController:Enable must be overridden in derived classes and should not be called.")
	return false
end

return BaseCharacterController

I just removed Two lines, and the ‘Press and Jump Rule’ actually broken.
Now player can jump only by releaseing spacebar.
.
.
.
But after this situation, my landing system(down here) not working.

character.Humanoid:GetPropertyChangedSignal("FloorMaterial"):Connect(function()
    print("ha")
end)


FloorMaterial always changed well but just script not activated after I edited module.
Clearly, it resulted by removing all module. When I put past module, it worked again.

I thought it so easy.
How can I make my custom jump system without this bug?

Old jump script, looks like it’s working with some of the things you are here.
Maybe some of this will help …

--LocalScript StarterPlayer.StarterCharacterScripts
local plr = game:GetService("Players").LocalPlayer
local chr = plr.Character or plr.CharacterAdded:Wait()
local cas = game:GetService("ContextActionService")
local uis = game:GetService("UserInputService")
local rns = game:GetService("RunService")
local hum = chr:WaitForChild("Humanoid")
local eis = "Enum.UserInputState."
local jmp, psh = false, nil

if (uis.KeyboardEnabled) then
	local function Jump(Action, press)	
		if string.split(tostring(Action), nil)[1] == "Jump" then
			psh = string.split(tostring(press), eis)[2]
			if psh == "Begin" then jmp = true
			elseif psh == "End" then jmp = false
			end
		end
	end
	local function UpdateDirection()
		if jmp then jmp = false
			hum.Jump = true
		end
	end
	task.wait(1) cas:UnbindAction("Jump") task.wait(1)
	rns:BindToRenderStep("Control",Enum.RenderPriority.Input.Value, UpdateDirection) 
	cas:BindAction("Jump", Jump, true, Enum.KeyCode.KeypadZero, Enum.KeyCode.Space)
end