local uis = game.UserInputService
local InputEnd = false
InputBegan:Connect(function()
InputEnd = false
repeat wait() JumpHeight += 1 until InputEnd or JumpHeight == MaxJumpHeaight
end)
InputEnded:Connect(function()
InputEnd = true
end)
something basic like this